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

Unified Diff: cc/trees/layer_tree_host_impl.cc

Issue 1317743002: cc: Implement shared worker contexts. (v1) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix tear down Created 5 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 | « cc/test/test_in_process_context_provider.cc ('k') | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_impl.cc
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
index f9d115a6cefd2fab2b0adc86aa527f8501b30aaa..ccfba4a19880fa8e92428a1cba4f41792b3d459c 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -1613,7 +1613,9 @@ bool LayerTreeHostImpl::CanUseGpuRasterization() {
ContextProvider* context_provider =
output_surface_->worker_context_provider();
- base::AutoLock context_lock(*context_provider->GetLock());
+ ContextProvider::ScopedContextLock scoped_context(context_provider);
+ if (context_provider->HasBeenDestroyed())
+ return false;
if (!context_provider->GrContext())
return false;
« no previous file with comments | « cc/test/test_in_process_context_provider.cc ('k') | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698