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

Side by Side 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 // 4 //
5 // This file is auto-generated from 5 // This file is auto-generated from
6 // ui/gl/generate_bindings.py 6 // ui/gl/generate_bindings.py
7 // It's formatted by clang-format using chromium coding style: 7 // It's formatted by clang-format using chromium coding style:
8 // clang-format -i -style=chromium filename 8 // clang-format -i -style=chromium filename
9 // DO NOT EDIT! 9 // DO NOT EDIT!
10 10
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 fn.glXSwapBuffersFn = 105 fn.glXSwapBuffersFn =
106 reinterpret_cast<glXSwapBuffersProc>(GetGLProcAddress("glXSwapBuffers")); 106 reinterpret_cast<glXSwapBuffersProc>(GetGLProcAddress("glXSwapBuffers"));
107 fn.glXSwapIntervalEXTFn = 0; 107 fn.glXSwapIntervalEXTFn = 0;
108 fn.glXSwapIntervalMESAFn = 0; 108 fn.glXSwapIntervalMESAFn = 0;
109 fn.glXUseXFontFn = 109 fn.glXUseXFontFn =
110 reinterpret_cast<glXUseXFontProc>(GetGLProcAddress("glXUseXFont")); 110 reinterpret_cast<glXUseXFontProc>(GetGLProcAddress("glXUseXFont"));
111 fn.glXWaitGLFn = 111 fn.glXWaitGLFn =
112 reinterpret_cast<glXWaitGLProc>(GetGLProcAddress("glXWaitGL")); 112 reinterpret_cast<glXWaitGLProc>(GetGLProcAddress("glXWaitGL"));
113 fn.glXWaitVideoSyncSGIFn = 0; 113 fn.glXWaitVideoSyncSGIFn = 0;
114 fn.glXWaitXFn = reinterpret_cast<glXWaitXProc>(GetGLProcAddress("glXWaitX")); 114 fn.glXWaitXFn = reinterpret_cast<glXWaitXProc>(GetGLProcAddress("glXWaitX"));
115 std::string extensions(GetPlatformExtensions()); 115 }
116 extensions += " ";
117 ALLOW_UNUSED_LOCAL(extensions);
118 116
117 void DriverGLX::InitializeExtensionBindings(
118 const std::set<std::string>& enabled_extensions) {
119 ext.b_GLX_ARB_create_context = 119 ext.b_GLX_ARB_create_context =
120 extensions.find("GLX_ARB_create_context ") != std::string::npos; 120 enabled_extensions.find("GLX_ARB_create_context") !=
121 enabled_extensions.end();
121 ext.b_GLX_EXT_swap_control = 122 ext.b_GLX_EXT_swap_control =
122 extensions.find("GLX_EXT_swap_control ") != std::string::npos; 123 enabled_extensions.find("GLX_EXT_swap_control") !=
124 enabled_extensions.end();
123 ext.b_GLX_EXT_texture_from_pixmap = 125 ext.b_GLX_EXT_texture_from_pixmap =
124 extensions.find("GLX_EXT_texture_from_pixmap ") != std::string::npos; 126 enabled_extensions.find("GLX_EXT_texture_from_pixmap") !=
127 enabled_extensions.end();
125 ext.b_GLX_MESA_copy_sub_buffer = 128 ext.b_GLX_MESA_copy_sub_buffer =
126 extensions.find("GLX_MESA_copy_sub_buffer ") != std::string::npos; 129 enabled_extensions.find("GLX_MESA_copy_sub_buffer") !=
130 enabled_extensions.end();
127 ext.b_GLX_MESA_swap_control = 131 ext.b_GLX_MESA_swap_control =
128 extensions.find("GLX_MESA_swap_control ") != std::string::npos; 132 enabled_extensions.find("GLX_MESA_swap_control") !=
133 enabled_extensions.end();
129 ext.b_GLX_OML_sync_control = 134 ext.b_GLX_OML_sync_control =
130 extensions.find("GLX_OML_sync_control ") != std::string::npos; 135 enabled_extensions.find("GLX_OML_sync_control") !=
136 enabled_extensions.end();
131 ext.b_GLX_SGIX_fbconfig = 137 ext.b_GLX_SGIX_fbconfig =
132 extensions.find("GLX_SGIX_fbconfig ") != std::string::npos; 138 enabled_extensions.find("GLX_SGIX_fbconfig") != enabled_extensions.end();
133 ext.b_GLX_SGI_video_sync = 139 ext.b_GLX_SGI_video_sync =
134 extensions.find("GLX_SGI_video_sync ") != std::string::npos; 140 enabled_extensions.find("GLX_SGI_video_sync") != enabled_extensions.end();
135
136 debug_fn.glXBindTexImageEXTFn = 0; 141 debug_fn.glXBindTexImageEXTFn = 0;
137 if (ext.b_GLX_EXT_texture_from_pixmap) { 142 if (ext.b_GLX_EXT_texture_from_pixmap) {
138 fn.glXBindTexImageEXTFn = reinterpret_cast<glXBindTexImageEXTProc>( 143 fn.glXBindTexImageEXTFn = reinterpret_cast<glXBindTexImageEXTProc>(
139 GetGLProcAddress("glXBindTexImageEXT")); 144 GetGLProcAddress("glXBindTexImageEXT"));
140 DCHECK(fn.glXBindTexImageEXTFn); 145 DCHECK(fn.glXBindTexImageEXTFn);
141 } 146 }
142 147
143 debug_fn.glXCopySubBufferMESAFn = 0; 148 debug_fn.glXCopySubBufferMESAFn = 0;
144 if (ext.b_GLX_MESA_copy_sub_buffer) { 149 if (ext.b_GLX_MESA_copy_sub_buffer) {
145 fn.glXCopySubBufferMESAFn = reinterpret_cast<glXCopySubBufferMESAProc>( 150 fn.glXCopySubBufferMESAFn = reinterpret_cast<glXCopySubBufferMESAProc>(
(...skipping 1363 matching lines...) Expand 10 before | Expand all | Expand 10 after
1509 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glXWaitVideoSyncSGI") 1514 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glXWaitVideoSyncSGI")
1510 return glx_api_->glXWaitVideoSyncSGIFn(divisor, remainder, count); 1515 return glx_api_->glXWaitVideoSyncSGIFn(divisor, remainder, count);
1511 } 1516 }
1512 1517
1513 void TraceGLXApi::glXWaitXFn(void) { 1518 void TraceGLXApi::glXWaitXFn(void) {
1514 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glXWaitX") 1519 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glXWaitX")
1515 glx_api_->glXWaitXFn(); 1520 glx_api_->glXWaitXFn();
1516 } 1521 }
1517 1522
1518 } // namespace gfx 1523 } // namespace gfx
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698