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

Unified Diff: ui/ozone/public/surface_factory_ozone.h

Issue 1128113011: ozone: Introduce ClientPixmap and ClientPixmapFactory for non-GPU processes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed nits 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/public/surface_factory_ozone.h
diff --git a/ui/ozone/public/surface_factory_ozone.h b/ui/ozone/public/surface_factory_ozone.h
index 4dc5572ad3c34cbbaf8539c7574878a8bc03da11..8573e5ac99acb84d2113e1ea8bfe02966b7f1daf 100644
--- a/ui/ozone/public/surface_factory_ozone.h
+++ b/ui/ozone/public/surface_factory_ozone.h
@@ -12,6 +12,7 @@
#include "ui/gfx/native_widget_types.h"
#include "ui/gfx/overlay_transform.h"
#include "ui/ozone/ozone_base_export.h"
+#include "ui/ozone/public/native_pixmap_types.h"
namespace ui {
@@ -52,22 +53,6 @@ class SurfaceOzoneEGL;
// modes (See comments bellow for descriptions).
class OZONE_BASE_EXPORT SurfaceFactoryOzone {
public:
- // Describes overlay buffer format.
- // TODO: this is a placeholder for now and will be populated with more
- // formats once we know what sorts of content, video, etc. we can support.
- enum BufferFormat {
- UNKNOWN,
- BGRA_8888,
- RGBX_8888,
- BUFFER_FORMAT_LAST = RGBX_8888
- };
-
- enum BufferUsage {
- MAP,
- PERSISTENT_MAP,
- SCANOUT,
- };
-
typedef void* (*GLGetProcAddressProc)(const char* name);
typedef base::Callback<void(base::NativeLibrary)> AddGLLibraryCallback;
typedef base::Callback<void(GLGetProcAddressProc)>
@@ -118,18 +103,14 @@ class OZONE_BASE_EXPORT SurfaceFactoryOzone {
virtual scoped_refptr<NativePixmap> CreateNativePixmap(
gfx::AcceleratedWidget widget,
gfx::Size size,
- BufferFormat format,
- BufferUsage usage);
+ NativePixmapFormat format,
+ NativePixmapUsage usage);
// Returns true if overlays can be shown at z-index 0, replacing the main
// surface. Combined with surfaceless extensions, it allows for an
// overlay-only mode.
virtual bool CanShowPrimaryPlaneAsOverlay();
- // Returns true if the platform is able to create buffers for a specific usage
- // such as MAP for zero copy or SCANOUT for display controller.
- virtual bool CanCreateNativePixmap(BufferUsage usage);
-
protected:
SurfaceFactoryOzone();
virtual ~SurfaceFactoryOzone();

Powered by Google App Engine
This is Rietveld 408576698