Bug 1416594 - Add SurfaceFormat::R8G8B8A8 handling to SurfaceFormatToImageFormat() r=nical
authorsotaro <sotaro.ikeda.g@gmail.com>
Wed, 15 Nov 2017 07:15:11 +0900
changeset 436270 b72a76a98bef7e5f8e44ad7fca32a9fc4cbc5667
parent 436269 35a8d93c2142342da86cd5614acbcdc5fa188067
child 436271 ea1df4688f4ba7c6f16292d6758201c0862e74bc
push id117
push userfmarier@mozilla.com
push dateTue, 28 Nov 2017 20:17:16 +0000
reviewersnical
bugs1416594
milestone59.0a1
Bug 1416594 - Add SurfaceFormat::R8G8B8A8 handling to SurfaceFormatToImageFormat() r=nical
gfx/webrender_bindings/WebRenderTypes.h
--- a/gfx/webrender_bindings/WebRenderTypes.h
+++ b/gfx/webrender_bindings/WebRenderTypes.h
@@ -56,16 +56,17 @@ inline DebugFlags NewDebugFlags(uint32_t
   return flags;
 }
 
 inline Maybe<wr::ImageFormat>
 SurfaceFormatToImageFormat(gfx::SurfaceFormat aFormat) {
   switch (aFormat) {
     case gfx::SurfaceFormat::R8G8B8X8:
       // TODO: use RGBA + opaque flag
+    case gfx::SurfaceFormat::R8G8B8A8:
       return Some(wr::ImageFormat::BGRA8);
     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::B8G8R8:
       return Some(wr::ImageFormat::RGB8);