| Index: ui/ozone/demo/surfaceless_gl_renderer.cc
|
| diff --git a/ui/ozone/demo/surfaceless_gl_renderer.cc b/ui/ozone/demo/surfaceless_gl_renderer.cc
|
| index f7d6b8f5c5d4b36b6598950dc89650d45a616610..997f420bbf97a9a3a4509fa636a14f3d0d298351 100644
|
| --- a/ui/ozone/demo/surfaceless_gl_renderer.cc
|
| +++ b/ui/ozone/demo/surfaceless_gl_renderer.cc
|
| @@ -9,6 +9,7 @@
|
| #include "base/bind.h"
|
| #include "base/macros.h"
|
| #include "base/trace_event/trace_event.h"
|
| +#include "ui/display/types/display_mode.h"
|
| #include "ui/gl/gl_bindings.h"
|
| #include "ui/gl/gl_context.h"
|
| #include "ui/gl/gl_image.h"
|
| @@ -39,14 +40,14 @@ bool SurfacelessGlRenderer::BufferWrapper::Initialize(
|
| glGenFramebuffersEXT(1, &gl_fb_);
|
| glGenTextures(1, &gl_tex_);
|
|
|
| + gfx::BufferFormat format = ui::DisplayMode::PrimaryFormat();
|
| scoped_refptr<NativePixmap> pixmap =
|
| OzonePlatform::GetInstance()
|
| ->GetSurfaceFactoryOzone()
|
| - ->CreateNativePixmap(widget, size, gfx::BufferFormat::BGRX_8888,
|
| - gfx::BufferUsage::SCANOUT);
|
| + ->CreateNativePixmap(widget, size, format, gfx::BufferUsage::SCANOUT);
|
| scoped_refptr<ui::GLImageOzoneNativePixmap> image(
|
| new ui::GLImageOzoneNativePixmap(size, GL_RGB));
|
| - if (!image->Initialize(pixmap.get(), gfx::BufferFormat::BGRX_8888)) {
|
| + if (!image->Initialize(pixmap.get(), format)) {
|
| LOG(ERROR) << "Failed to create GLImage";
|
| return false;
|
| }
|
|
|