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

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: rename to ClientNativePixmap 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 side-by-side diff with in-line comments
Download patch
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 38b5baf89d4e3db8589359739730caf1d62d02b8..1ef76b2bf88664465b3930fbdc72fb04e3eea096 100644
--- a/ui/ozone/platform/drm/gpu/gbm_surface_factory.cc
+++ b/ui/ozone/platform/drm/gpu/gbm_surface_factory.cc
@@ -107,13 +107,12 @@ GbmSurfaceFactory::CreateSurfacelessEGLSurfaceForWidget(
scoped_refptr<ui::NativePixmap> GbmSurfaceFactory::CreateNativePixmap(
gfx::AcceleratedWidget widget,
gfx::Size size,
- BufferFormat format,
- BufferUsage usage) {
+ NativePixmapFormat format,
+ NativePixmapUsage usage) {
#if !defined(OS_CHROMEOS)
// Support for memory mapping accelerated buffers requires some
// CrOS-specific patches (using vgem).
- if (usage != SCANOUT)
- return nullptr;
+ DCHECK_EQ(NATIVE_PIXMAP_USAGE_SCANOUT, usage);
#endif
scoped_refptr<GbmDevice> gbm = GetGbmDevice(widget);
@@ -136,20 +135,6 @@ bool GbmSurfaceFactory::CanShowPrimaryPlaneAsOverlay() {
return allow_surfaceless_;
}
-bool GbmSurfaceFactory::CanCreateNativePixmap(BufferUsage usage) {
- DCHECK(thread_checker_.CalledOnValidThread());
- switch (usage) {
- case MAP:
- return false;
- case PERSISTENT_MAP:
- return false;
- case SCANOUT:
- return true;
- }
- NOTREACHED();
- return false;
-}
-
scoped_refptr<GbmDevice> GbmSurfaceFactory::GetGbmDevice(
gfx::AcceleratedWidget widget) {
return static_cast<GbmDevice*>(

Powered by Google App Engine
This is Rietveld 408576698