Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(436)

Unified Diff: ui/ozone/platform/drm/gpu/gbm_surface.cc

Issue 2825933002: ozone: Create RGBX (not RGBA) buffers in GbmSurface. (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698