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

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

Issue 750593003: Ozone X11 platform Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cleanup leftover stuff Created 6 years 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/ozone/platform/x11/x11_surface_factory.cc ('k') | ui/ozone/public/surface_factory_ozone.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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(
« no previous file with comments | « ui/ozone/platform/x11/x11_surface_factory.cc ('k') | ui/ozone/public/surface_factory_ozone.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698