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

Unified 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: fix extensions_unittests Created 5 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/ozone/platform/drm/gpu/gbm_surface_factory.h ('k') | ui/ozone/platform/egltest/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/ozone/platform/drm/gpu/gbm_surface_factory.cc
diff --git a/ui/ozone/platform/drm/gpu/gbm_surface_factory.cc b/ui/ozone/platform/drm/gpu/gbm_surface_factory.cc
index da0638ae29a992077fd84884a1816b8eb5722bff..c3952bddc6c3ead34a6e08b1b9e7cd2abb0ba722 100644
--- a/ui/ozone/platform/drm/gpu/gbm_surface_factory.cc
+++ b/ui/ozone/platform/drm/gpu/gbm_surface_factory.cc
@@ -112,8 +112,7 @@ scoped_refptr<ui::NativePixmap> GbmSurfaceFactory::CreateNativePixmap(
#if !defined(OS_CHROMEOS)
// Support for memory mapping accelerated buffers requires some
// CrOS-specific patches (using vgem).
- if (usage != SCANOUT)
- return nullptr;
+ DCHECK_EQ(gfx::BufferUsage::SCANOUT, usage);
#endif
scoped_refptr<GbmDevice> gbm = GetGbmDevice(widget);
@@ -136,20 +135,6 @@ bool GbmSurfaceFactory::CanShowPrimaryPlaneAsOverlay() {
return allow_surfaceless_;
}
-bool GbmSurfaceFactory::CanCreateNativePixmap(gfx::BufferUsage usage) {
- DCHECK(thread_checker_.CalledOnValidThread());
- switch (usage) {
- case gfx::BufferUsage::MAP:
- return false;
- case gfx::BufferUsage::PERSISTENT_MAP:
- return false;
- case gfx::BufferUsage::SCANOUT:
- return true;
- }
- NOTREACHED();
- return false;
-}
-
scoped_refptr<GbmDevice> GbmSurfaceFactory::GetGbmDevice(
gfx::AcceleratedWidget widget) {
return static_cast<GbmDevice*>(
« no previous file with comments | « ui/ozone/platform/drm/gpu/gbm_surface_factory.h ('k') | ui/ozone/platform/egltest/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698