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

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

Issue 47213009: Add callbacks to register EGL bindings from Ozone (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 2 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/software_surface_factory_ozone.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 6983b2154f2854877603eedfe5782ff99138ee2c..272afcebdede20f385d15ef0eb74a4f3023e7326 100644
--- a/ui/gfx/ozone/surface_factory_ozone.h
+++ b/ui/gfx/ozone/surface_factory_ozone.h
@@ -5,6 +5,8 @@
#ifndef UI_GFX_OZONE_SURFACE_LNUX_FACTORY_OZONE_H_
#define UI_GFX_OZONE_SURFACE_LNUX_FACTORY_OZONE_H_
+#include "base/callback.h"
+#include "base/native_library.h"
#include "ui/gfx/gfx_export.h"
#include "ui/gfx/native_widget_types.h"
#include "ui/gfx/rect.h"
@@ -51,6 +53,11 @@ class GFX_EXPORT SurfaceFactoryOzone {
FAILED,
};
+ typedef void*(*GLGetProcAddressProc)(const char* name);
+ typedef base::Callback<void(base::NativeLibrary)> AddGLLibraryCallback;
+ typedef base::Callback<void(GLGetProcAddressProc)>
+ SetGLGetProcAddressProcCallback;
+
SurfaceFactoryOzone();
virtual ~SurfaceFactoryOzone();
@@ -91,8 +98,11 @@ class GFX_EXPORT SurfaceFactoryOzone {
virtual gfx::AcceleratedWidget RealizeAcceleratedWidget(
gfx::AcceleratedWidget w) = 0;
- // Sets up GL bindings for the native surface.
- virtual bool LoadEGLGLES2Bindings() = 0;
+ // Sets up GL bindings for the native surface. Takes two callback parameters
+ // that allow Ozone to register the GL bindings.
+ virtual bool LoadEGLGLES2Bindings(
+ 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
« no previous file with comments | « ui/gfx/ozone/impl/software_surface_factory_ozone.cc ('k') | ui/gfx/ozone/surface_factory_ozone.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698