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

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

Issue 1230203007: Re-land: cc: Use worker context for one-copy tile initialization. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase and add missing locks Created 5 years, 4 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 cb827258a5fdf8c271bc0d3eb73874d9a5bc7fe4..f6b882a30f5d8cd11c13ec076618e661febc8d25 100644
--- a/content/common/gpu/client/context_provider_command_buffer.cc
+++ b/content/common/gpu/client/context_provider_command_buffer.cc
@@ -185,6 +185,8 @@ void ContextProviderCommandBuffer::DeleteCachedResources() {
}
void ContextProviderCommandBuffer::OnLostContext() {
+ base::AutoLock lock(context_lock_);
+
DCHECK(context_thread_checker_.CalledOnValidThread());
{
base::AutoLock lock(main_thread_lock_);
@@ -200,6 +202,8 @@ void ContextProviderCommandBuffer::OnLostContext() {
void ContextProviderCommandBuffer::OnMemoryAllocationChanged(
const gpu::MemoryAllocation& allocation) {
+ base::AutoLock lock(context_lock_);
+
DCHECK(context_thread_checker_.CalledOnValidThread());
if (memory_policy_changed_callback_.is_null())

Powered by Google App Engine
This is Rietveld 408576698