| 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 46a69755c3d2d0ae82bdd552a7be4a5e133c8b1f..0522b45bdf049ec77346c1e1d8f6dc77c6b934af 100644
|
| --- a/ui/ozone/public/surface_factory_ozone.h
|
| +++ b/ui/ozone/public/surface_factory_ozone.h
|
| @@ -12,11 +12,14 @@
|
|
|
| #include "base/callback.h"
|
| #include "base/macros.h"
|
| +#include "base/memory/ref_counted.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"
|
| +#include "ui/gl/gl_implementation.h"
|
| +#include "ui/gl/gl_surface.h"
|
| #include "ui/ozone/ozone_base_export.h"
|
| #include "ui/ozone/public/native_pixmap.h"
|
|
|
| @@ -28,22 +31,24 @@ class SurfaceOzoneEGL;
|
|
|
| // The Ozone interface allows external implementations to hook into Chromium to
|
| // provide a system specific implementation. The Ozone interface supports two
|
| -// drawing modes: 1) accelerated drawing through EGL and 2) software drawing
|
| +// drawing modes: 1) accelerated drawing using GL and 2) software drawing
|
| // through Skia.
|
| //
|
| -// If you want to paint on a window with ozone, you need to create a
|
| -// SurfaceOzoneEGL or SurfaceOzoneCanvas for that window. The platform can
|
| -// support software, EGL, or both for painting on the window.
|
| -// The following functionality is specific to the drawing mode and may not have
|
| -// any meaningful implementation in the other mode. An implementation must
|
| -// provide functionality for at least one mode.
|
| +// If you want to paint on a window with ozone, you need to create a GLSurface
|
| +// or SurfaceOzoneCanvas for that window. The platform can support software, GL,
|
| +// or both for painting on the window. The following functionality is specific
|
| +// to the drawing mode and may not have any meaningful implementation in the
|
| +// other mode. An implementation must provide functionality for at least one
|
| +// mode.
|
| //
|
| -// 1) Accelerated Drawing (EGL path):
|
| +// 1) Accelerated Drawing (GL path):
|
| //
|
| -// The following functions are specific to EGL:
|
| -// - GetNativeDisplay
|
| -// - LoadEGLGLES2Bindings
|
| -// - CreateEGLSurfaceForWidget
|
| +// The following functions are specific to GL:
|
| +// - GetNativeDisplay (EGL only)
|
| +// - LoadEGLGLES2Bindings (EGL only)
|
| +// - CreateViewGLSurface (all GL implementations)
|
| +// - CreateSurfacelessViewGLSurface (EGL only)
|
| +// - CreateOffscreenGLSurface (all GL implementations)
|
| //
|
| // 2) Software Drawing (Skia):
|
| //
|
| @@ -66,6 +71,28 @@ class OZONE_BASE_EXPORT SurfaceFactoryOzone {
|
| // display connection for the native display.
|
| virtual intptr_t GetNativeDisplay();
|
|
|
| + // Checks if platform uses the new surface creation API.
|
| + // TODO(kylechar): Delete when using all implementations use new surface API.
|
| + virtual bool UseNewSurfaceAPI();
|
| +
|
| + // Creates a GL surface that renders directly to a view for the specified GL
|
| + // implementation.
|
| + virtual scoped_refptr<gl::GLSurface> CreateViewGLSurface(
|
| + gl::GLImplementation implementation,
|
| + gfx::AcceleratedWidget widget);
|
| +
|
| + // Creates a GL surface that renders directly into a window with surfaceless
|
| + // semantics for the specified GL implementation.
|
| + virtual scoped_refptr<gl::GLSurface> CreateSurfacelessViewGLSurface(
|
| + gl::GLImplementation implementation,
|
| + gfx::AcceleratedWidget widget);
|
| +
|
| + // Creates a GL surface used for offscreen rendering for the specified GL
|
| + // implementation.
|
| + virtual scoped_refptr<gl::GLSurface> CreateOffscreenGLSurface(
|
| + gl::GLImplementation implementation,
|
| + const gfx::Size& size);
|
| +
|
| // Create SurfaceOzoneEGL for the specified gfx::AcceleratedWidget.
|
| //
|
| // Note: When used from content, this is called in the GPU process. The
|
|
|