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

Unified Diff: ui/gl/gl_context.cc

Issue 10913240: NOT FOR REVIEW - gpu memmgr context lost prototype (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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
« no previous file with comments | « content/common/gpu/gpu_memory_manager.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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() {
« no previous file with comments | « content/common/gpu/gpu_memory_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698