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

Unified Diff: cc/output/output_surface.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/output/context_provider.h ('k') | cc/raster/gpu_tile_task_worker_pool.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/output/output_surface.cc
diff --git a/cc/output/output_surface.cc b/cc/output/output_surface.cc
index 056879f49d84ba444142101690da109437208d14..894138034d386feb56f4fbadf7bd6d8574364bd7 100644
--- a/cc/output/output_surface.cc
+++ b/cc/output/output_surface.cc
@@ -128,12 +128,6 @@ bool OutputSurface::BindToClient(OutputSurfaceClient* client) {
}
}
- if (success && worker_context_provider_.get()) {
- success = worker_context_provider_->BindToCurrentThread();
- if (success)
- worker_context_provider_->SetupLock();
- }
-
if (!success)
client_ = NULL;
@@ -209,13 +203,15 @@ void OutputSurface::SetWorkerContextShouldAggressivelyFreeResources(
if (auto* context_provider = worker_context_provider()) {
ContextProvider::ScopedContextLock scoped_context(context_provider);
- if (aggressively_free_resources) {
- context_provider->DeleteCachedResources();
- }
+ if (!context_provider->HasBeenDestroyed()) {
+ if (aggressively_free_resources) {
+ context_provider->DeleteCachedResources();
+ }
- if (auto* context_support = context_provider->ContextSupport()) {
- context_support->SetAggressivelyFreeResources(
- aggressively_free_resources);
+ if (auto* context_support = context_provider->ContextSupport()) {
+ context_support->SetAggressivelyFreeResources(
+ aggressively_free_resources);
+ }
}
}
}
« no previous file with comments | « cc/output/context_provider.h ('k') | cc/raster/gpu_tile_task_worker_pool.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698