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

Unified Diff: content/common/gpu/client/context_provider_command_buffer.cc

Issue 1095893002: gpu: Fix some context lost marking glitches+leaks and add UMA stats (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: kbr's comment Created 5 years, 8 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: content/common/gpu/client/context_provider_command_buffer.cc
diff --git a/content/common/gpu/client/context_provider_command_buffer.cc b/content/common/gpu/client/context_provider_command_buffer.cc
index 439e14f4fc1e49a9f57be80f56e5da5e9cec1cbd..8bfdc09adda5cb4149fc68585047518d01165839 100644
--- a/content/common/gpu/client/context_provider_command_buffer.cc
+++ b/content/common/gpu/client/context_provider_command_buffer.cc
@@ -39,18 +39,19 @@ class ContextProviderCommandBuffer::LostContextCallbackProxy
scoped_refptr<ContextProviderCommandBuffer>
ContextProviderCommandBuffer::Create(
scoped_ptr<WebGraphicsContext3DCommandBufferImpl> context3d,
- const std::string& debug_name) {
+ CommandBufferContextType type) {
if (!context3d)
return NULL;
- return new ContextProviderCommandBuffer(context3d.Pass(), debug_name);
+ return new ContextProviderCommandBuffer(context3d.Pass(), type);
}
ContextProviderCommandBuffer::ContextProviderCommandBuffer(
scoped_ptr<WebGraphicsContext3DCommandBufferImpl> context3d,
- const std::string& debug_name)
+ CommandBufferContextType type)
: context3d_(context3d.Pass()),
- debug_name_(debug_name),
+ context_type_(type),
+ debug_name_(CommandBufferContextTypeToString(type)),
destroyed_(false) {
DCHECK(main_thread_checker_.CalledOnValidThread());
DCHECK(context3d_);
@@ -93,6 +94,7 @@ bool ContextProviderCommandBuffer::BindToCurrentThread() {
if (lost_context_callback_proxy_)
return true;
+ context3d_->SetContextType(context_type_);
if (!context3d_->InitializeOnCurrentThread())
return false;

Powered by Google App Engine
This is Rietveld 408576698