Index: ui/ozone/platform/dri/gbm_buffer.cc |
diff --git a/ui/ozone/platform/dri/gbm_buffer.cc b/ui/ozone/platform/dri/gbm_buffer.cc |
index 97f7d83ea52940898f7210e740a4ffe0a0ec65c9..89ba1ab898dc44c2003171ca83ed103b7d4211f5 100644 |
--- a/ui/ozone/platform/dri/gbm_buffer.cc |
+++ b/ui/ozone/platform/dri/gbm_buffer.cc |
@@ -10,7 +10,7 @@ |
#include <xf86drm.h> |
#include "base/logging.h" |
-#include "ui/ozone/platform/dri/dri_wrapper.h" |
+#include "ui/ozone/platform/dri/gbm_wrapper.h" |
namespace ui { |
@@ -30,8 +30,8 @@ int GetGbmFormatFromBufferFormat(SurfaceFactoryOzone::BufferFormat fmt) { |
} // namespace |
-GbmBuffer::GbmBuffer(DriWrapper* dri, gbm_bo* bo, bool scanout) |
- : GbmBufferBase(dri, bo, scanout) { |
+GbmBuffer::GbmBuffer(GbmWrapper* gbm, gbm_bo* bo, bool scanout) |
+ : GbmBufferBase(gbm, bo, scanout) { |
} |
GbmBuffer::~GbmBuffer() { |
@@ -41,23 +41,19 @@ GbmBuffer::~GbmBuffer() { |
// static |
scoped_refptr<GbmBuffer> GbmBuffer::CreateBuffer( |
- DriWrapper* dri, |
- gbm_device* device, |
+ GbmWrapper* gbm, |
SurfaceFactoryOzone::BufferFormat format, |
const gfx::Size& size, |
bool scanout) { |
unsigned flags = GBM_BO_USE_RENDERING; |
if (scanout) |
flags |= GBM_BO_USE_SCANOUT; |
- gbm_bo* bo = gbm_bo_create(device, |
- size.width(), |
- size.height(), |
- GetGbmFormatFromBufferFormat(format), |
- flags); |
+ gbm_bo* bo = gbm_bo_create(gbm->device(), size.width(), size.height(), |
+ GetGbmFormatFromBufferFormat(format), flags); |
if (!bo) |
return NULL; |
- scoped_refptr<GbmBuffer> buffer(new GbmBuffer(dri, bo, scanout)); |
+ scoped_refptr<GbmBuffer> buffer(new GbmBuffer(gbm, bo, scanout)); |
if (scanout && !buffer->GetFramebufferId()) |
return NULL; |
@@ -68,7 +64,7 @@ GbmPixmap::GbmPixmap(scoped_refptr<GbmBuffer> buffer) |
: buffer_(buffer), dma_buf_(-1) { |
} |
-bool GbmPixmap::Initialize(DriWrapper* dri) { |
+bool GbmPixmap::Initialize(GbmWrapper* gbm) { |
// We want to use the GBM API because it's going to call into libdrm |
// which might do some optimizations on buffer allocation, |
// especially when sharing buffers via DMABUF. |