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

Unified Diff: cc/output/output_surface.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: nits and use best_resource_format for now Created 5 years, 5 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: cc/output/output_surface.cc
diff --git a/cc/output/output_surface.cc b/cc/output/output_surface.cc
index a597a87d8456bc65f3ce763d469db9e7e776ed7f..14a328a85b45ec24f912d8fe81513f7e7b4bb9fd 100644
--- a/cc/output/output_surface.cc
+++ b/cc/output/output_surface.cc
@@ -217,11 +217,7 @@ void OutputSurface::SetWorkerContextShouldAggressivelyFreeResources(
"OutputSurface::SetWorkerContextShouldAggressivelyFreeResources",
"aggressively_free_resources", aggressively_free_resources);
if (auto* context_provider = worker_context_provider()) {
- // The context lock must be held while accessing the worker context.
- base::AutoLock context_lock(*context_provider->GetLock());
-
- // Allow context to bind to current thread.
- context_provider->DetachFromThread();
+ ContextProvider::ScopedContextGL scoped_context(context_provider);
if (aggressively_free_resources) {
context_provider->DeleteCachedResources();
@@ -231,9 +227,6 @@ void OutputSurface::SetWorkerContextShouldAggressivelyFreeResources(
context_support->SetAggressivelyFreeResources(
aggressively_free_resources);
}
-
- // Allow context to bind to other threads.
- context_provider->DetachFromThread();
}
}

Powered by Google App Engine
This is Rietveld 408576698