Chromium Code Reviews| 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(); |
|
kalyank
2015/12/15 00:55:12
These changes now broke checks in VaapiWrapper.
h
dshwang
2015/12/15 04:48:31
Nope, VaapiWrapper requires format of dma_buf, not
|
| } |
| gfx::Size GbmPixmap::GetBufferSize() const { |