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

Unified Diff: ui/gl/gl_bindings_autogen_glx.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_glx.cc
diff --git a/ui/gl/gl_bindings_autogen_glx.cc b/ui/gl/gl_bindings_autogen_glx.cc
index ca36b7aa00c18877cbe10e2086419dc4c9f1e6ee..c8cec26831ed5578428fbeddcb699ba05cf95a72 100644
--- a/ui/gl/gl_bindings_autogen_glx.cc
+++ b/ui/gl/gl_bindings_autogen_glx.cc
@@ -112,27 +112,32 @@ void DriverGLX::InitializeStaticBindings() {
reinterpret_cast<glXWaitGLProc>(GetGLProcAddress("glXWaitGL"));
fn.glXWaitVideoSyncSGIFn = 0;
fn.glXWaitXFn = reinterpret_cast<glXWaitXProc>(GetGLProcAddress("glXWaitX"));
- std::string extensions(GetPlatformExtensions());
- extensions += " ";
- ALLOW_UNUSED_LOCAL(extensions);
+}
+void DriverGLX::InitializeExtensionBindings(
+ const std::set<std::string>& enabled_extensions) {
ext.b_GLX_ARB_create_context =
- extensions.find("GLX_ARB_create_context ") != std::string::npos;
+ enabled_extensions.find("GLX_ARB_create_context") !=
+ enabled_extensions.end();
ext.b_GLX_EXT_swap_control =
- extensions.find("GLX_EXT_swap_control ") != std::string::npos;
+ enabled_extensions.find("GLX_EXT_swap_control") !=
+ enabled_extensions.end();
ext.b_GLX_EXT_texture_from_pixmap =
- extensions.find("GLX_EXT_texture_from_pixmap ") != std::string::npos;
+ enabled_extensions.find("GLX_EXT_texture_from_pixmap") !=
+ enabled_extensions.end();
ext.b_GLX_MESA_copy_sub_buffer =
- extensions.find("GLX_MESA_copy_sub_buffer ") != std::string::npos;
+ enabled_extensions.find("GLX_MESA_copy_sub_buffer") !=
+ enabled_extensions.end();
ext.b_GLX_MESA_swap_control =
- extensions.find("GLX_MESA_swap_control ") != std::string::npos;
+ enabled_extensions.find("GLX_MESA_swap_control") !=
+ enabled_extensions.end();
ext.b_GLX_OML_sync_control =
- extensions.find("GLX_OML_sync_control ") != std::string::npos;
+ enabled_extensions.find("GLX_OML_sync_control") !=
+ enabled_extensions.end();
ext.b_GLX_SGIX_fbconfig =
- extensions.find("GLX_SGIX_fbconfig ") != std::string::npos;
+ enabled_extensions.find("GLX_SGIX_fbconfig") != enabled_extensions.end();
ext.b_GLX_SGI_video_sync =
- extensions.find("GLX_SGI_video_sync ") != std::string::npos;
-
+ enabled_extensions.find("GLX_SGI_video_sync") != enabled_extensions.end();
debug_fn.glXBindTexImageEXTFn = 0;
if (ext.b_GLX_EXT_texture_from_pixmap) {
fn.glXBindTexImageEXTFn = reinterpret_cast<glXBindTexImageEXTProc>(

Powered by Google App Engine
This is Rietveld 408576698