Bug 1482350 - Enable RGBA8 support of WebRender r=jnicol
authorsotaro <sotaro.ikeda.g@gmail.com>
Wed, 28 Nov 2018 11:44:43 +0900
changeset 507669 9853cc2d3e2eb5fc53c77b779f6c720a991617c6
parent 507667 33da443fa05e53b8f03d20d627cf6ef6ac445045
child 507670 4bc4adbcecae8a7d0bdcd75a28bd07237909b358
push id1905
push userffxbld-merge
push dateMon, 21 Jan 2019 12:33:13 +0000
treeherdermozilla-release@c2fca1944d8c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjnicol
bugs1482350
milestone65.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1482350 - Enable RGBA8 support of WebRender r=jnicol
gfx/webrender_bindings/WebRenderTypes.h
--- a/gfx/webrender_bindings/WebRenderTypes.h
+++ b/gfx/webrender_bindings/WebRenderTypes.h
@@ -64,20 +64,21 @@ inline DebugFlags NewDebugFlags(uint32_t
   flags.mBits = aFlags;
   return flags;
 }
 
 inline Maybe<wr::ImageFormat>
 SurfaceFormatToImageFormat(gfx::SurfaceFormat aFormat) {
   switch (aFormat) {
     case gfx::SurfaceFormat::R8G8B8X8:
-    case gfx::SurfaceFormat::R8G8B8A8:
-      // WebRender not support RGBA8 and RGBX8. Assert here.
+      // WebRender not support RGBX8. Assert here.
       MOZ_ASSERT(false);
       return Nothing();
+    case gfx::SurfaceFormat::R8G8B8A8:
+      return Some(wr::ImageFormat::RGBA8);
     case gfx::SurfaceFormat::B8G8R8X8:
       // TODO: WebRender will have a BGRA + opaque flag for this but does not
       // have it yet (cf. issue #732).
     case gfx::SurfaceFormat::B8G8R8A8:
       return Some(wr::ImageFormat::BGRA8);
     case gfx::SurfaceFormat::A8:
       return Some(wr::ImageFormat::R8);
     case gfx::SurfaceFormat::A16: