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

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

Issue 1128113011: ozone: Introduce ClientPixmap and ClientPixmapFactory for non-GPU processes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: separate VGEM part to another CL Created 5 years, 5 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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 return nullptr; 124 return nullptr;
125 125
126 return pixmap; 126 return pixmap;
127 } 127 }
128 128
129 bool GbmSurfaceFactory::CanShowPrimaryPlaneAsOverlay() { 129 bool GbmSurfaceFactory::CanShowPrimaryPlaneAsOverlay() {
130 DCHECK(thread_checker_.CalledOnValidThread()); 130 DCHECK(thread_checker_.CalledOnValidThread());
131 return allow_surfaceless_; 131 return allow_surfaceless_;
132 } 132 }
133 133
134 bool GbmSurfaceFactory::CanCreateNativePixmap(BufferUsage usage) {
135 DCHECK(thread_checker_.CalledOnValidThread());
136 switch (usage) {
137 case MAP:
138 return false;
139 case PERSISTENT_MAP:
140 return false;
141 case SCANOUT:
142 return true;
143 }
144 NOTREACHED();
145 return false;
146 }
147
148 scoped_refptr<GbmDevice> GbmSurfaceFactory::GetGbmDevice( 134 scoped_refptr<GbmDevice> GbmSurfaceFactory::GetGbmDevice(
149 gfx::AcceleratedWidget widget) { 135 gfx::AcceleratedWidget widget) {
150 return static_cast<GbmDevice*>( 136 return static_cast<GbmDevice*>(
151 drm_device_manager_->GetDrmDevice(widget).get()); 137 drm_device_manager_->GetDrmDevice(widget).get());
152 } 138 }
153 139
154 } // namespace ui 140 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698