Index: content/renderer/media/renderer_gpu_video_accelerator_factories.cc |
diff --git a/content/renderer/media/renderer_gpu_video_accelerator_factories.cc b/content/renderer/media/renderer_gpu_video_accelerator_factories.cc |
index 86d40cd960b67deb86d3dc954cd3c8d96bb6a687..7b4777c03451e87d2fe4d9611508b8f16a8239c1 100644 |
--- a/content/renderer/media/renderer_gpu_video_accelerator_factories.cc |
+++ b/content/renderer/media/renderer_gpu_video_accelerator_factories.cc |
@@ -257,11 +257,20 @@ void RendererGpuVideoAcceleratorFactories::AsyncReadPixels( |
gles2->FramebufferTexture2D( |
GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, tmp_texture, 0); |
gles2->PixelStorei(GL_PACK_ALIGNMENT, 4); |
+#if SK_B32_SHIFT == 0 && SK_G32_SHIFT == 8 && SK_R32_SHIFT == 16 && \ |
scherkus (not reviewing)
2013/10/22 18:29:10
it seems like the cool kids only check for SK_B32_
scherkus (not reviewing)
2013/10/22 18:29:46
... there really isn't a reason *NOT* to check ...
Ami GONE FROM CHROMIUM
2013/10/22 18:32:59
Yeah, the first version of this code was actually
|
+ SK_A32_SHIFT == 24 |
+ GLenum skia_format = GL_BGRA_EXT; |
+#elif SK_R32_SHIFT == 0 && SK_G32_SHIFT == 8 && SK_B32_SHIFT == 16 && \ |
+ SK_A32_SHIFT == 24 |
+ GLenum skia_format = GL_RGBA; |
+#else |
+#error Unexpected Skia ARGB_8888 layout! |
+#endif |
gles2->ReadPixels(0, |
0, |
size.width(), |
size.height(), |
- GL_BGRA_EXT, |
+ skia_format, |
GL_UNSIGNED_BYTE, |
read_pixels_bitmap_.pixelRef()->pixels()); |
gles2->DeleteFramebuffers(1, &fb); |