| 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 3f3704025072f00f6f917fe75d5adc9156dbf7c2..6809b487ae30da20ae68ad5e4f8f53fd42ef070f 100644
|
| --- a/ui/ozone/platform/drm/gpu/gbm_buffer.cc
|
| +++ b/ui/ozone/platform/drm/gpu/gbm_buffer.cc
|
| @@ -51,8 +51,9 @@ scoped_refptr<GbmBuffer> GbmBuffer::CreateBuffer(
|
| TRACE_EVENT2("drm", "GbmBuffer::CreateBuffer", "device",
|
| gbm->device_path().value(), "size", size.ToString());
|
| unsigned flags = GBM_BO_USE_RENDERING;
|
| - if (scanout)
|
| - flags |= GBM_BO_USE_SCANOUT;
|
| + // SCANOUT allocates continuous memory, so better for performance even if
|
| + // |scanout| is false.
|
| + flags |= GBM_BO_USE_SCANOUT;
|
| gbm_bo* bo = gbm_bo_create(gbm->device(), size.width(), size.height(),
|
| GetGbmFormatFromBufferFormat(format), flags);
|
| if (!bo)
|
| @@ -97,4 +98,17 @@ int GbmPixmap::GetDmaBufPitch() {
|
| return gbm_bo_get_stride(buffer_->bo());
|
| }
|
|
|
| +NativePixmap::BufferUsage GbmPixmap::GetBufferUsage() const {
|
| + return buffer_->GetFramebufferId() ? SCANOUT : MAP;
|
| +}
|
| +
|
| +void* GbmPixmap::Map() {
|
| + NOTREACHED();
|
| + return nullptr;
|
| +}
|
| +
|
| +void GbmPixmap::Unmap() {
|
| + NOTREACHED();
|
| +}
|
| +
|
| } // namespace ui
|
|
|