Index: ui/gl/gl_context.cc |
diff --git a/ui/gl/gl_context.cc b/ui/gl/gl_context.cc |
index 6ab53a118286f0719beaf271c33b9465fc05bbb6..bf84d130ad0d5d24b99ae856ee865a6ebf9c4197 100644 |
--- a/ui/gl/gl_context.cc |
+++ b/ui/gl/gl_context.cc |
@@ -21,7 +21,11 @@ base::LazyInstance<base::ThreadLocalPointer<GLContext> >::Leaky |
current_context_ = LAZY_INSTANCE_INITIALIZER; |
} // namespace |
+int g_contextCount = 0; |
+ |
GLContext::GLContext(GLShareGroup* share_group) : share_group_(share_group) { |
+ g_contextCount += 1; |
+ printf("In GPU process: GLContext::GLContext (%d contexts exist)\n", g_contextCount); |
if (!share_group_.get()) |
share_group_ = new GLShareGroup; |
@@ -33,6 +37,8 @@ GLContext::~GLContext() { |
if (GetCurrent() == this) { |
SetCurrent(NULL, NULL); |
} |
+ g_contextCount -= 1; |
+ printf("In GPU process: GLContext::~GLContext (%d contexts exist)\n", g_contextCount); |
} |
std::string GLContext::GetExtensions() { |