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

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

Issue 1269503007: Unify graphics buffer format & usage enums for GpuMemoryBuffer & SurfaceFactoryOzone (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add header to BUILD.gn 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/public/overlay_candidates_ozone.h ('k') | ui/ozone/public/surface_factory_ozone.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..33119da7bc4fd491eceb5d9930fe1f481c0cf16d 100644
--- a/ui/ozone/public/surface_factory_ozone.h
+++ b/ui/ozone/public/surface_factory_ozone.h
@@ -8,6 +8,7 @@
#include "base/callback.h"
#include "base/memory/scoped_ptr.h"
#include "base/native_library.h"
+#include "ui/gfx/buffer_types.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/native_widget_types.h"
#include "ui/gfx/overlay_transform.h"
@@ -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,8 +103,8 @@ class OZONE_BASE_EXPORT SurfaceFactoryOzone {
virtual scoped_refptr<NativePixmap> CreateNativePixmap(
gfx::AcceleratedWidget widget,
gfx::Size size,
- BufferFormat format,
- BufferUsage usage);
+ gfx::BufferFormat format,
+ gfx::BufferUsage usage);
// Returns true if overlays can be shown at z-index 0, replacing the main
// surface. Combined with surfaceless extensions, it allows for an
@@ -128,7 +113,7 @@ class OZONE_BASE_EXPORT SurfaceFactoryOzone {
// 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);
+ virtual bool CanCreateNativePixmap(gfx::BufferUsage usage);
protected:
SurfaceFactoryOzone();
« no previous file with comments | « ui/ozone/public/overlay_candidates_ozone.h ('k') | ui/ozone/public/surface_factory_ozone.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698