| Index: ui/ozone/platform/dri/gbm_surface_factory.cc
|
| diff --git a/ui/ozone/platform/dri/gbm_surface_factory.cc b/ui/ozone/platform/dri/gbm_surface_factory.cc
|
| index 8d81c257e7219b5bb4d9ced23d8a4d81b42bbea7..1d74eece0a732f675edd5a2118c5d7cb295f8103 100644
|
| --- a/ui/ozone/platform/dri/gbm_surface_factory.cc
|
| +++ b/ui/ozone/platform/dri/gbm_surface_factory.cc
|
| @@ -169,9 +169,13 @@ GbmSurfaceFactory::CreateSurfacelessEGLSurfaceForWidget(
|
|
|
| scoped_refptr<ui::NativePixmap> GbmSurfaceFactory::CreateNativePixmap(
|
| gfx::Size size,
|
| - BufferFormat format) {
|
| - scoped_refptr<GbmBuffer> buffer = GbmBuffer::CreateBuffer(
|
| - drm_, device_, format, size, true);
|
| + BufferFormat format,
|
| + BufferUsage usage) {
|
| + if (usage == MAP)
|
| + return NULL;
|
| +
|
| + scoped_refptr<GbmBuffer> buffer =
|
| + GbmBuffer::CreateBuffer(drm_, device_, format, size, true);
|
| if (!buffer.get())
|
| return NULL;
|
|
|
| @@ -219,6 +223,17 @@ bool GbmSurfaceFactory::CanShowPrimaryPlaneAsOverlay() {
|
| return allow_surfaceless_;
|
| }
|
|
|
| +bool GbmSurfaceFactory::CanCreateNativePixmap(BufferUsage usage) {
|
| + switch (usage) {
|
| + case MAP:
|
| + return false;
|
| + case SCANOUT:
|
| + return true;
|
| + }
|
| + NOTREACHED();
|
| + return false;
|
| +}
|
| +
|
| DriWindowDelegate* GbmSurfaceFactory::GetOrCreateWindowDelegate(
|
| gfx::AcceleratedWidget widget) {
|
| if (!window_manager_->HasWindowDelegate(widget)) {
|
|
|