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

Unified Diff: ui/gl/gl_implementation.h

Issue 145293007: ui: No more TestCompositor. Use NullDraw contexts in unit tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: testsnulldraw: Created 6 years, 11 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_implementation.h
diff --git a/ui/gl/gl_implementation.h b/ui/gl/gl_implementation.h
index 0881e10b32d378887da20aa30c0ebb3fef96e711..f163e07c1505c3b3ccf91660bbe117a237f18f98 100644
--- a/ui/gl/gl_implementation.h
+++ b/ui/gl/gl_implementation.h
@@ -52,9 +52,21 @@ GL_EXPORT bool InitializeDynamicGLBindings(GLImplementation implementation,
// Initialize Debug logging wrappers for GL bindings.
void InitializeDebugGLBindings();
-// Initialize stub methods for drawing operations in the GL bindings.
+// Initialize stub methods for drawing operations in the GL bindings. The
+// null draw bindings default to enabled, so that draw operations do nothing.
void InitializeNullDrawGLBindings();
+// Once initialized, instantiating this turns the stub methods for drawing
+// operations off allowing drawing will occur while the object is alive.
+class GL_EXPORT DisableNullDrawGLBindings {
danakj 2014/01/29 01:28:21 I feel like gl_implementation.h should be consider
piman 2014/01/29 01:40:17 Bits of this file are definitely used legitimately
+ public:
+ DisableNullDrawGLBindings();
+ ~DisableNullDrawGLBindings();
+
+ private:
+ bool initial_enabled_;
+};
+
GL_EXPORT void ClearGLBindings();
// Set the current GL implementation.

Powered by Google App Engine
This is Rietveld 408576698