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

Unified Diff: ui/gl/gl_bindings_autogen_wgl.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
Index: ui/gl/gl_bindings_autogen_wgl.cc
diff --git a/ui/gl/gl_bindings_autogen_wgl.cc b/ui/gl/gl_bindings_autogen_wgl.cc
index b70f929286b13dc8de1e0116dbe298a427db6637..412ae1efb6af331245e675b7b0c3a36476dcfe5b 100644
--- a/ui/gl/gl_bindings_autogen_wgl.cc
+++ b/ui/gl/gl_bindings_autogen_wgl.cc
@@ -55,21 +55,24 @@ void DriverWGL::InitializeStaticBindings() {
fn.wglSwapIntervalEXTFn = 0;
fn.wglSwapLayerBuffersFn = reinterpret_cast<wglSwapLayerBuffersProc>(
GetGLProcAddress("wglSwapLayerBuffers"));
- std::string extensions(GetPlatformExtensions());
- extensions += " ";
- ALLOW_UNUSED_LOCAL(extensions);
+}
+void DriverWGL::InitializeExtensionBindings(
+ const std::set<std::string>& enabled_extensions) {
ext.b_WGL_ARB_extensions_string =
- extensions.find("WGL_ARB_extensions_string ") != std::string::npos;
+ enabled_extensions.find("WGL_ARB_extensions_string") !=
+ enabled_extensions.end();
ext.b_WGL_ARB_pbuffer =
- extensions.find("WGL_ARB_pbuffer ") != std::string::npos;
+ enabled_extensions.find("WGL_ARB_pbuffer") != enabled_extensions.end();
ext.b_WGL_ARB_pixel_format =
- extensions.find("WGL_ARB_pixel_format ") != std::string::npos;
+ enabled_extensions.find("WGL_ARB_pixel_format") !=
+ enabled_extensions.end();
ext.b_WGL_EXT_extensions_string =
- extensions.find("WGL_EXT_extensions_string ") != std::string::npos;
+ enabled_extensions.find("WGL_EXT_extensions_string") !=
+ enabled_extensions.end();
ext.b_WGL_EXT_swap_control =
- extensions.find("WGL_EXT_swap_control ") != std::string::npos;
-
+ enabled_extensions.find("WGL_EXT_swap_control") !=
+ enabled_extensions.end();
debug_fn.wglChoosePixelFormatARBFn = 0;
if (ext.b_WGL_ARB_pixel_format) {
fn.wglChoosePixelFormatARBFn =

Powered by Google App Engine
This is Rietveld 408576698