| 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 3783c80adcaba9eabb9a98524ab40ad9c777929a..5e016786a47e4865d8e09d042f810a8e77f79001 100644
|
| --- a/ui/ozone/platform/drm/gpu/gbm_buffer.cc
|
| +++ b/ui/ozone/platform/drm/gpu/gbm_buffer.cc
|
| @@ -19,11 +19,11 @@ namespace ui {
|
|
|
| namespace {
|
|
|
| -int GetGbmFormatFromBufferFormat(SurfaceFactoryOzone::BufferFormat fmt) {
|
| +int GetGbmFormatFromNativePixmapFormat(NativePixmapFormat fmt) {
|
| switch (fmt) {
|
| - case SurfaceFactoryOzone::BGRA_8888:
|
| + case NATIVE_PIXMAP_FORMAT_BGRA_8888:
|
| return GBM_BO_FORMAT_ARGB8888;
|
| - case SurfaceFactoryOzone::RGBX_8888:
|
| + case NATIVE_PIXMAP_FORMAT_RGBX_8888:
|
| return GBM_BO_FORMAT_XRGB8888;
|
| default:
|
| NOTREACHED();
|
| @@ -47,17 +47,18 @@ GbmBuffer::~GbmBuffer() {
|
| // static
|
| scoped_refptr<GbmBuffer> GbmBuffer::CreateBuffer(
|
| const scoped_refptr<GbmDevice>& gbm,
|
| - SurfaceFactoryOzone::BufferFormat format,
|
| + NativePixmapFormat format,
|
| const gfx::Size& size,
|
| - SurfaceFactoryOzone::BufferUsage usage) {
|
| + NativePixmapUsage usage) {
|
| TRACE_EVENT2("drm", "GbmBuffer::CreateBuffer", "device",
|
| gbm->device_path().value(), "size", size.ToString());
|
| - bool use_scanout = (usage == ui::SurfaceFactoryOzone::SCANOUT);
|
| + bool use_scanout = (usage == NATIVE_PIXMAP_USAGE_SCANOUT);
|
| unsigned flags = GBM_BO_USE_RENDERING;
|
| + // GBM_BO_USE_SCANOUT is the hint of x-tiling.
|
| if (use_scanout)
|
| flags |= GBM_BO_USE_SCANOUT;
|
| gbm_bo* bo = gbm_bo_create(gbm->device(), size.width(), size.height(),
|
| - GetGbmFormatFromBufferFormat(format), flags);
|
| + GetGbmFormatFromNativePixmapFormat(format), flags);
|
| if (!bo)
|
| return NULL;
|
|
|
|
|