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

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: fix gl_image_ozone_native_pixmap also, which gl_unittests check 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
« no previous file with comments | « ui/ozone/platform/drm/gpu/gbm_buffer.h ('k') | ui/ozone/platform/drm/gpu/gbm_buffer_base.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..cfa5ab7d588779e0f261513ec5cc8734b6e7472c 100644
--- a/ui/ozone/platform/drm/gpu/gbm_buffer.cc
+++ b/ui/ozone/platform/drm/gpu/gbm_buffer.cc
@@ -31,9 +31,9 @@ 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),
- usage_(usage) {}
+ : GbmBufferBase(gbm, bo, format, usage), format_(format), usage_(usage) {}
GbmBuffer::~GbmBuffer() {
if (bo())
@@ -58,7 +58,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 +142,7 @@ int GbmPixmap::GetDmaBufPitch() const {
}
gfx::BufferFormat GbmPixmap::GetBufferFormat() const {
- return GetBufferFormatFromFourCCFormat(buffer_->GetFramebufferPixelFormat());
+ return buffer_->GetFormat();
}
gfx::Size GbmPixmap::GetBufferSize() const {
« no previous file with comments | « ui/ozone/platform/drm/gpu/gbm_buffer.h ('k') | ui/ozone/platform/drm/gpu/gbm_buffer_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698