Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(530)

Side by Side Diff: ui/ozone/platform/drm/gpu/gbm_surface_factory.cc

Issue 1139903005: Add PERSISTENT_MAP usage for GpuMemoryBuffers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: persistentmap: rebase Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/ozone/platform/drm/gpu/gbm_surface_factory.h" 5 #include "ui/ozone/platform/drm/gpu/gbm_surface_factory.h"
6 6
7 #include <gbm.h> 7 #include <gbm.h>
8 8
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "third_party/khronos/EGL/egl.h" 10 #include "third_party/khronos/EGL/egl.h"
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 bool GbmSurfaceFactory::CanShowPrimaryPlaneAsOverlay() { 148 bool GbmSurfaceFactory::CanShowPrimaryPlaneAsOverlay() {
149 DCHECK(thread_checker_.CalledOnValidThread()); 149 DCHECK(thread_checker_.CalledOnValidThread());
150 return allow_surfaceless_; 150 return allow_surfaceless_;
151 } 151 }
152 152
153 bool GbmSurfaceFactory::CanCreateNativePixmap(BufferUsage usage) { 153 bool GbmSurfaceFactory::CanCreateNativePixmap(BufferUsage usage) {
154 DCHECK(thread_checker_.CalledOnValidThread()); 154 DCHECK(thread_checker_.CalledOnValidThread());
155 switch (usage) { 155 switch (usage) {
156 case MAP: 156 case MAP:
157 return false; 157 return false;
158 case PERSISTENT_MAP:
159 return false;
158 case SCANOUT: 160 case SCANOUT:
159 return true; 161 return true;
160 } 162 }
161 NOTREACHED(); 163 NOTREACHED();
162 return false; 164 return false;
163 } 165 }
164 166
165 scoped_refptr<GbmDevice> GbmSurfaceFactory::GetGbmDevice( 167 scoped_refptr<GbmDevice> GbmSurfaceFactory::GetGbmDevice(
166 gfx::AcceleratedWidget widget) { 168 gfx::AcceleratedWidget widget) {
167 return static_cast<GbmDevice*>( 169 return static_cast<GbmDevice*>(
168 drm_device_manager_->GetDrmDevice(widget).get()); 170 drm_device_manager_->GetDrmDevice(widget).get());
169 } 171 }
170 172
171 } // namespace ui 173 } // namespace ui
OLDNEW
« no previous file with comments | « ui/ozone/gpu/gpu_memory_buffer_factory_ozone_native_buffer.cc ('k') | ui/ozone/public/surface_factory_ozone.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698