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

Unified Diff: ui/gl/gl_egl_api_implementation.cc

Issue 1203513004: Respect the disabled extension list during binding initialization. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: split extension binding loading from static binding loading; pass enabled extensions Created 5 years, 6 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/gl/gl_egl_api_implementation.h ('k') | ui/gl/gl_gl_api_implementation.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/gl_egl_api_implementation.cc
diff --git a/ui/gl/gl_egl_api_implementation.cc b/ui/gl/gl_egl_api_implementation.cc
index 8acaf0f460d034f71ace4701402c69fc6e69a3d6..0959fea945142d203118d26f172b6b83086de433 100644
--- a/ui/gl/gl_egl_api_implementation.cc
+++ b/ui/gl/gl_egl_api_implementation.cc
@@ -15,13 +15,13 @@ namespace gfx {
RealEGLApi* g_real_egl;
void InitializeStaticGLBindingsEGL() {
+ g_driver_egl.InitializeStaticBindings();
if (!g_real_egl) {
g_real_egl = new RealEGLApi();
}
g_real_egl->Initialize(&g_driver_egl);
g_current_egl_context = g_real_egl;
- g_driver_egl.InitializeStaticBindings();
-
+ g_driver_egl.InitializeExtensionBindings(g_real_egl->GetEnabledExtensions());
g_real_egl->InitializeFilteredExtensions();
}
@@ -114,6 +114,29 @@ const char* RealEGLApi::eglQueryStringFn(EGLDisplay dpy, EGLint name) {
return EGLApiBase::eglQueryStringFn(dpy, name);
}
+std::set<std::string> RealEGLApi::GetEnabledExtensions() const {
no sievers 2015/06/23 20:48:25 This is basically duplicated code, see InitializeF
+ std::set<std::string> enabled_extensions;
+
+ std::vector<std::string> platform_extensions_vec;
+ std::string platform_ext = DriverEGL::GetPlatformExtensions();
+ base::SplitString(platform_ext, ' ', &platform_extensions_vec);
+
+ std::vector<std::string> client_extensions_vec;
+ std::string client_ext = DriverEGL::GetClientExtensions();
+ base::SplitString(client_ext, ' ', &client_extensions_vec);
+
+ enabled_extensions.insert(platform_extensions_vec.begin(),
+ platform_extensions_vec.end());
+ enabled_extensions.insert(client_extensions_vec.begin(),
+ client_extensions_vec.end());
+
+ for (auto ext : disabled_exts_) {
+ enabled_extensions.erase(ext);
+ }
+
+ return enabled_extensions;
+}
+
TraceEGLApi::~TraceEGLApi() {
}
« no previous file with comments | « ui/gl/gl_egl_api_implementation.h ('k') | ui/gl/gl_gl_api_implementation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698