| 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();
|
| }
|
| }
|
|
|
|
|