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

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

Issue 205433002: ozone: Add OzoneSurface object that is owned by compositor, GLSurface (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 9 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/gfx/ozone/impl/file_surface_factory.cc ('k') | ui/gfx/ozone/surface_factory_ozone.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/ozone/surface_factory_ozone.h
diff --git a/ui/gfx/ozone/surface_factory_ozone.h b/ui/gfx/ozone/surface_factory_ozone.h
index fffdba6f8530e60666e4fc44098874a0629c0aa6..50c7e89c43533443a456e3453f43fcb46b739d9e 100644
--- a/ui/gfx/ozone/surface_factory_ozone.h
+++ b/ui/gfx/ozone/surface_factory_ozone.h
@@ -20,6 +20,7 @@ class SkCanvas;
namespace gfx {
class VSyncProvider;
class OverlayCandidatesOzone;
+class SurfaceOzone;
typedef intptr_t NativeBufferOzone;
// The Ozone interface allows external implementations to hook into Chromium to
@@ -109,11 +110,13 @@ class GFX_EXPORT SurfaceFactoryOzone {
// before it can be used to create a GL surface.
virtual gfx::AcceleratedWidget GetAcceleratedWidget() = 0;
- // Realizes an AcceleratedWidget so that the returned AcceleratedWidget
- // can be used to to create a GLSurface. This method may only be called in
- // a process that has a valid GL context.
- virtual gfx::AcceleratedWidget RealizeAcceleratedWidget(
- gfx::AcceleratedWidget w) = 0;
+ // Create a surface for the specified gfx::AcceleratedWidget.
+ //
+ // Note: When used from content, this is called in the GPU process. The
+ // platform must support creation of SurfaceOzone from the GPU process
+ // using only the handle contained in gfx::AcceleratedWidget.
+ virtual scoped_ptr<SurfaceOzone> CreateSurfaceForWidget(
+ gfx::AcceleratedWidget widget);
// Sets up GL bindings for the native surface. Takes two callback parameters
// that allow Ozone to register the GL bindings.
@@ -121,31 +124,6 @@ class GFX_EXPORT SurfaceFactoryOzone {
AddGLLibraryCallback add_gl_library,
SetGLGetProcAddressProcCallback set_gl_get_proc_address) = 0;
- // If possible attempts to resize the given AcceleratedWidget instance and if
- // a resize action was performed returns true, otherwise false (native
- // hardware may only support a single fixed size).
- virtual bool AttemptToResizeAcceleratedWidget(
- gfx::AcceleratedWidget w,
- const gfx::Rect& bounds) = 0;
-
- // Called after the appropriate GL swap buffers command. Used if extra work
- // is needed to perform the actual buffer swap.
- virtual bool SchedulePageFlip(gfx::AcceleratedWidget w);
-
- // Returns a SkCanvas for the backing buffers. Drawing to the canvas will draw
- // to the native surface. The canvas is intended for use when no EGL
- // acceleration is possible. Its implementation is optional when an EGL
- // backend is provided for rendering.
- virtual SkCanvas* GetCanvasForWidget(gfx::AcceleratedWidget w);
-
- // Returns a gfx::VsyncProvider for the provided AcceleratedWidget. Note
- // that this may be called after we have entered the sandbox so if there are
- // operations (e.g. opening a file descriptor providing vsync events) that
- // must be done outside of the sandbox, they must have been completed
- // in InitializeHardware. Returns an empty scoped_ptr on error.
- virtual scoped_ptr<gfx::VSyncProvider> CreateVSyncProvider(
- gfx::AcceleratedWidget w) = 0;
-
// Returns an array of EGL properties, which can be used in any EGL function
// used to select a display configuration. Note that all properties should be
// immediately followed by the corresponding desired value and array should be
« no previous file with comments | « ui/gfx/ozone/impl/file_surface_factory.cc ('k') | ui/gfx/ozone/surface_factory_ozone.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698