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 c508db25aa344b3ae3415b6be0c0a01b9a0c8d6b..88033efb074c3a1dd751ba2ba80bb95a9e3c8ae6 100644 |
--- a/ui/ozone/public/surface_factory_ozone.h |
+++ b/ui/ozone/public/surface_factory_ozone.h |
@@ -42,7 +42,7 @@ class SurfaceOzoneEGL; |
// The following functions are specific to EGL: |
// - GetNativeDisplay |
// - LoadEGLGLES2Bindings |
-// - GetEGLSurfaceProperties (optional if the properties match the default |
+// - GetEGLSurfaceConfig (optional if the properties match the default |
// Chromium ones). |
// - CreateEGLSurfaceForWidget |
// |
@@ -78,6 +78,20 @@ class OZONE_BASE_EXPORT SurfaceFactoryOzone { |
typedef base::Callback<void(GLGetProcAddressProc)> |
SetGLGetProcAddressProcCallback; |
+ struct EglConfigInfo { |
+ EglConfigInfo(); |
+ ~EglConfigInfo(); |
+ |
+ base::Callback<bool(const int32* attribs, |
+ void** /* EGLConfig* */ configs, |
+ int32 config_size, |
+ int32* num_configs)> choose_config; |
+ base::Callback<bool(void* /* EGLConfig */ config, |
+ int32 attribute, |
+ int32* value)> get_config_attribute; |
+ base::Callback<const char*()> get_last_error_string; |
+ }; |
+ |
SurfaceFactoryOzone(); |
virtual ~SurfaceFactoryOzone(); |
@@ -115,12 +129,11 @@ class OZONE_BASE_EXPORT SurfaceFactoryOzone { |
AddGLLibraryCallback add_gl_library, |
SetGLGetProcAddressProcCallback set_gl_get_proc_address) = 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 |
- // terminated with EGL_NONE. Ownership of the array is not transferred to |
- // caller. desired_list contains list of desired EGL properties and values. |
- virtual const int32* GetEGLSurfaceProperties(const int32* desired_list); |
+ // Returns the EGL configuration to use for |surface|. The default EGL |
+ // configuration |
+ // will be used if this returns NULL. |
+ virtual void* /* EGLConfig */ GetEGLSurfaceConfig(const EglConfigInfo& egl, |
+ SurfaceOzoneEGL* surface); |
// Get the hal struct to check for overlay support. |
virtual OverlayCandidatesOzone* GetOverlayCandidates( |