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 1050923003: zero-copy: Clarify to allocate/destroy GpuMemoryBuffer on any thread and use it on the main thread o (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: just add thread check Created 5 years, 8 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 4e223bf1fc8b8abc9252978c29a53e7aaf5179ff..da524ec84bbbfb26f724f3b9b491d3053425484a 100644
--- a/ui/ozone/public/surface_factory_ozone.h
+++ b/ui/ozone/public/surface_factory_ozone.h
@@ -78,7 +78,6 @@ class OZONE_BASE_EXPORT SurfaceFactoryOzone {
typedef base::Callback<void(GLGetProcAddressProc)>
SetGLGetProcAddressProcCallback;
- SurfaceFactoryOzone();
virtual ~SurfaceFactoryOzone();
// Returns the singleton instance.
@@ -133,6 +132,7 @@ class OZONE_BASE_EXPORT SurfaceFactoryOzone {
// Create a single native buffer to be used for overlay planes or zero copy
// for |widget| representing a particular display controller or default
// display controller for kNullAcceleratedWidget.
+ // It can be called on any thread.
virtual scoped_refptr<NativePixmap> CreateNativePixmap(
gfx::AcceleratedWidget widget,
gfx::Size size,
@@ -166,8 +166,11 @@ class OZONE_BASE_EXPORT SurfaceFactoryOzone {
// such as MAP for zero copy or SCANOUT for display controller.
virtual bool CanCreateNativePixmap(BufferUsage usage);
+ protected:
+ SurfaceFactoryOzone();
+
private:
- static SurfaceFactoryOzone* impl_; // not owned
+ DISALLOW_COPY_AND_ASSIGN(SurfaceFactoryOzone);
};
} // namespace ui

Powered by Google App Engine
This is Rietveld 408576698