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

Side by Side Diff: ui/gl/gl_bindings.h

Issue 1203513004: Respect the disabled extension list during binding initialization. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: only apply disabled extensions list to GL and EGL 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef UI_GL_GL_BINDINGS_H_ 5 #ifndef UI_GL_GL_BINDINGS_H_
6 #define UI_GL_GL_BINDINGS_H_ 6 #define UI_GL_GL_BINDINGS_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector>
9 10
10 // Includes the platform independent and platform dependent GL headers. 11 // Includes the platform independent and platform dependent GL headers.
11 // Only include this in cc files. It pulls in system headers, including 12 // Only include this in cc files. It pulls in system headers, including
12 // the X11 headers on linux, which define all kinds of macros that are 13 // the X11 headers on linux, which define all kinds of macros that are
13 // liable to cause conflicts. 14 // liable to cause conflicts.
14 15
15 #include <GL/gl.h> 16 #include <GL/gl.h>
16 #include <GL/glext.h> 17 #include <GL/glext.h>
17 #include <EGL/egl.h> 18 #include <EGL/egl.h>
18 #include <EGL/eglext.h> 19 #include <EGL/eglext.h>
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 bool SetNullDrawBindingsEnabled(bool enabled); 339 bool SetNullDrawBindingsEnabled(bool enabled);
339 void ClearBindings(); 340 void ClearBindings();
340 341
341 ProcsGL fn; 342 ProcsGL fn;
342 ProcsGL orig_fn; 343 ProcsGL orig_fn;
343 ProcsGL debug_fn; 344 ProcsGL debug_fn;
344 ExtensionsGL ext; 345 ExtensionsGL ext;
345 bool null_draw_bindings_enabled; 346 bool null_draw_bindings_enabled;
346 347
347 private: 348 private:
348 void InitializeDynamicBindings(GLContext* context); 349 void InitializeDynamicBindings(
350 GLContext* context,
351 const std::vector<std::string>& disabled_extensions);
349 }; 352 };
350 353
351 struct GL_EXPORT DriverOSMESA { 354 struct GL_EXPORT DriverOSMESA {
352 void InitializeStaticBindings(); 355 void InitializeStaticBindings();
353 void InitializeDebugBindings(); 356 void InitializeDebugBindings();
354 void ClearBindings(); 357 void ClearBindings();
355 358
356 ProcsOSMESA fn; 359 ProcsOSMESA fn;
357 ProcsOSMESA debug_fn; 360 ProcsOSMESA debug_fn;
358 ExtensionsOSMESA ext; 361 ExtensionsOSMESA ext;
(...skipping 13 matching lines...) Expand all
372 ExtensionsWGL ext; 375 ExtensionsWGL ext;
373 376
374 private: 377 private:
375 static std::string GetPlatformExtensions(); 378 static std::string GetPlatformExtensions();
376 }; 379 };
377 #endif 380 #endif
378 381
379 #if defined(OS_WIN) || defined(USE_X11) || defined(OS_ANDROID) || defined(USE_OZ ONE) 382 #if defined(OS_WIN) || defined(USE_X11) || defined(OS_ANDROID) || defined(USE_OZ ONE)
380 struct GL_EXPORT DriverEGL { 383 struct GL_EXPORT DriverEGL {
381 void InitializeStaticBindings(); 384 void InitializeStaticBindings();
385 void InitializeExtensionBindings(
386 const std::vector<std::string>& disabled_extensions);
382 void InitializeDebugBindings(); 387 void InitializeDebugBindings();
383 void ClearBindings(); 388 void ClearBindings();
384 389
385 ProcsEGL fn; 390 ProcsEGL fn;
386 ProcsEGL debug_fn; 391 ProcsEGL debug_fn;
387 ExtensionsEGL ext; 392 ExtensionsEGL ext;
388 393
389 static std::string GetPlatformExtensions(); 394 static std::string GetPlatformExtensions();
390 static std::string GetClientExtensions(); 395 static std::string GetClientExtensions();
391 }; 396 };
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
436 #elif defined(OS_ANDROID) 441 #elif defined(OS_ANDROID)
437 442
438 GL_EXPORT extern EGLApi* g_current_egl_context; 443 GL_EXPORT extern EGLApi* g_current_egl_context;
439 GL_EXPORT extern DriverEGL g_driver_egl; 444 GL_EXPORT extern DriverEGL g_driver_egl;
440 445
441 #endif 446 #endif
442 447
443 } // namespace gfx 448 } // namespace gfx
444 449
445 #endif // UI_GL_GL_BINDINGS_H_ 450 #endif // UI_GL_GL_BINDINGS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698