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

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

Issue 165723010: Move NullDraw GL bindings and allow them to be disabled temporarily. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: glnulldraw: Created 6 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « ui/gl/gl_gl_api_implementation.cc ('k') | ui/gl/gl_implementation.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_IMPLEMENTATION_H_ 5 #ifndef UI_GL_GL_IMPLEMENTATION_H_
6 #define UI_GL_GL_IMPLEMENTATION_H_ 6 #define UI_GL_GL_IMPLEMENTATION_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 GL_EXPORT bool InitializeStaticGLBindings(GLImplementation implementation); 45 GL_EXPORT bool InitializeStaticGLBindings(GLImplementation implementation);
46 46
47 // Initialize function bindings that depend on the context for a GL 47 // Initialize function bindings that depend on the context for a GL
48 // implementation. 48 // implementation.
49 GL_EXPORT bool InitializeDynamicGLBindings(GLImplementation implementation, 49 GL_EXPORT bool InitializeDynamicGLBindings(GLImplementation implementation,
50 GLContext* context); 50 GLContext* context);
51 51
52 // Initialize Debug logging wrappers for GL bindings. 52 // Initialize Debug logging wrappers for GL bindings.
53 void InitializeDebugGLBindings(); 53 void InitializeDebugGLBindings();
54 54
55 // Initialize stub methods for drawing operations in the GL bindings. 55 // Initialize stub methods for drawing operations in the GL bindings. The
56 // null draw bindings default to enabled, so that draw operations do nothing.
56 void InitializeNullDrawGLBindings(); 57 void InitializeNullDrawGLBindings();
57 58
59 // Once initialized, instantiating this turns the stub methods for drawing
60 // operations off allowing drawing will occur while the object is alive.
61 class GL_EXPORT DisableNullDrawGLBindings {
62 public:
63 DisableNullDrawGLBindings();
64 ~DisableNullDrawGLBindings();
65
66 private:
67 bool initial_enabled_;
68 };
69
58 GL_EXPORT void ClearGLBindings(); 70 GL_EXPORT void ClearGLBindings();
59 71
60 // Set the current GL implementation. 72 // Set the current GL implementation.
61 GL_EXPORT void SetGLImplementation(GLImplementation implementation); 73 GL_EXPORT void SetGLImplementation(GLImplementation implementation);
62 74
63 // Get the current GL implementation. 75 // Get the current GL implementation.
64 GL_EXPORT GLImplementation GetGLImplementation(); 76 GL_EXPORT GLImplementation GetGLImplementation();
65 77
66 // Does the underlying GL support all features from Desktop GL 2.0 that were 78 // Does the underlying GL support all features from Desktop GL 2.0 that were
67 // removed from the ES 2.0 spec without requiring specific extension strings. 79 // removed from the ES 2.0 spec without requiring specific extension strings.
(...skipping 24 matching lines...) Expand all
92 // unsupported. 104 // unsupported.
93 void* GetGLProcAddress(const char* name); 105 void* GetGLProcAddress(const char* name);
94 106
95 // Return information about the GL window system binding implementation (e.g., 107 // Return information about the GL window system binding implementation (e.g.,
96 // EGL, GLX, WGL). Returns true if the information was retrieved successfully. 108 // EGL, GLX, WGL). Returns true if the information was retrieved successfully.
97 GL_EXPORT bool GetGLWindowSystemBindingInfo(GLWindowSystemBindingInfo* info); 109 GL_EXPORT bool GetGLWindowSystemBindingInfo(GLWindowSystemBindingInfo* info);
98 110
99 } // namespace gfx 111 } // namespace gfx
100 112
101 #endif // UI_GL_GL_IMPLEMENTATION_H_ 113 #endif // UI_GL_GL_IMPLEMENTATION_H_
OLDNEW
« no previous file with comments | « ui/gl/gl_gl_api_implementation.cc ('k') | ui/gl/gl_implementation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698