Index: ui/ozone/platform/drm/gpu/gbm_surface.cc |
diff --git a/ui/ozone/platform/drm/gpu/gbm_surface.cc b/ui/ozone/platform/drm/gpu/gbm_surface.cc |
index 5995d899c13280c3f3f32c4168168e12f62d80bd..649f4b051fb7101c0a9b08c61ee970f3863c45e1 100644 |
--- a/ui/ozone/platform/drm/gpu/gbm_surface.cc |
+++ b/ui/ozone/platform/drm/gpu/gbm_surface.cc |
@@ -7,6 +7,7 @@ |
#include <utility> |
#include "base/logging.h" |
+#include "ui/display/types/display_snapshot.h" |
#include "ui/gfx/native_pixmap.h" |
#include "ui/gl/gl_image_native_pixmap.h" |
#include "ui/gl/gl_surface_egl.h" |
@@ -123,14 +124,15 @@ bool GbmSurface::CreatePixmaps() { |
return true; |
for (size_t i = 0; i < arraysize(textures_); i++) { |
scoped_refptr<gfx::NativePixmap> pixmap = |
- surface_factory()->CreateNativePixmap(widget(), GetSize(), |
- gfx::BufferFormat::BGRA_8888, |
- gfx::BufferUsage::SCANOUT); |
+ surface_factory()->CreateNativePixmap( |
+ widget(), GetSize(), display::DisplaySnapshot::PrimaryFormat(), |
+ gfx::BufferUsage::SCANOUT); |
if (!pixmap) |
return false; |
scoped_refptr<gl::GLImageNativePixmap> image = |
- new gl::GLImageNativePixmap(GetSize(), GL_BGRA_EXT); |
- if (!image->Initialize(pixmap.get(), gfx::BufferFormat::BGRA_8888)) |
+ new gl::GLImageNativePixmap(GetSize(), GL_RGB); |
dnicoara
2017/04/19 14:31:09
Why is this GL_RGB? Wouldn't this mean a pixel wit
Daniele Castagna
2017/04/19 14:51:06
That's the internal pixel format, it doesn't need
dnicoara
2017/04/19 15:08:23
Yeah, I saw that and it also confused me. So, what
|
+ if (!image->Initialize(pixmap.get(), |
+ display::DisplaySnapshot::PrimaryFormat())) |
return false; |
images_[i] = image; |
// Bind image to texture. |