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

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

Issue 1483633002: ozone: support gfx::BufferFormat::RGBX_8888 as a native pixmap format. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: keep hardware overlay creating 24 bits plane Created 5 years 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
Index: ui/ozone/platform/drm/gpu/gbm_buffer.cc
diff --git a/ui/ozone/platform/drm/gpu/gbm_buffer.cc b/ui/ozone/platform/drm/gpu/gbm_buffer.cc
index b18238e893c6d21834add54e6d4a862013579af5..a04bd6a3ea16f002ed5ed245fa89015471fd4ea6 100644
--- a/ui/ozone/platform/drm/gpu/gbm_buffer.cc
+++ b/ui/ozone/platform/drm/gpu/gbm_buffer.cc
@@ -31,8 +31,10 @@ namespace ui {
GbmBuffer::GbmBuffer(const scoped_refptr<GbmDevice>& gbm,
gbm_bo* bo,
+ gfx::BufferFormat format,
gfx::BufferUsage usage)
: GbmBufferBase(gbm, bo, usage == gfx::BufferUsage::SCANOUT),
+ format_(format),
usage_(usage) {}
GbmBuffer::~GbmBuffer() {
@@ -58,7 +60,7 @@ scoped_refptr<GbmBuffer> GbmBuffer::CreateBuffer(
if (!bo)
return nullptr;
- scoped_refptr<GbmBuffer> buffer(new GbmBuffer(gbm, bo, usage));
+ scoped_refptr<GbmBuffer> buffer(new GbmBuffer(gbm, bo, format, usage));
if (use_scanout && !buffer->GetFramebufferId())
return nullptr;
@@ -142,7 +144,7 @@ int GbmPixmap::GetDmaBufPitch() const {
}
gfx::BufferFormat GbmPixmap::GetBufferFormat() const {
- return GetBufferFormatFromFourCCFormat(buffer_->GetFramebufferPixelFormat());
+ return buffer_->GetFormat();
}
gfx::Size GbmPixmap::GetBufferSize() const {

Powered by Google App Engine
This is Rietveld 408576698