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

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

Issue 2567283003: Fix memory dumping for command buffers with no gr_context_. (Closed)
Patch Set: Created 4 years 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 5aa148499e85420e87f71fbd67564b31e9b39e94..74756be6c0076b3615da4d59aa6a234c6c6bb827 100644
--- a/content/common/gpu/client/context_provider_command_buffer.cc
+++ b/content/common/gpu/client/context_provider_command_buffer.cc
@@ -447,8 +447,6 @@ bool ContextProviderCommandBuffer::OnMemoryDump(
const base::trace_event::MemoryDumpArgs& args,
base::trace_event::ProcessMemoryDump* pmd) {
DCHECK(bind_succeeded_);
- if (!gr_context_)
- return false;
base::Optional<base::AutoLock> hold;
if (support_locking_)
@@ -457,11 +455,13 @@ bool ContextProviderCommandBuffer::OnMemoryDump(
gles2_impl_->OnMemoryDump(args, pmd);
gles2_helper_->OnMemoryDump(args, pmd);
- context_thread_checker_.DetachFromThread();
- SkiaGpuTraceMemoryDump trace_memory_dump(
- pmd, gles2_impl_->ShareGroupTracingGUID());
- gr_context_->get()->dumpMemoryStatistics(&trace_memory_dump);
- context_thread_checker_.DetachFromThread();
+ if (gr_context_) {
+ context_thread_checker_.DetachFromThread();
+ SkiaGpuTraceMemoryDump trace_memory_dump(
+ pmd, gles2_impl_->ShareGroupTracingGUID());
+ gr_context_->get()->dumpMemoryStatistics(&trace_memory_dump);
+ context_thread_checker_.DetachFromThread();
+ }
return true;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698