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

Unified Diff: cc/trees/layer_tree_host.cc

Issue 1336733002: Re-land: cc: Implement shared worker contexts. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: mutex fix 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
Index: cc/trees/layer_tree_host.cc
diff --git a/cc/trees/layer_tree_host.cc b/cc/trees/layer_tree_host.cc
index 48604f7e9760172cf3d48f6f48ed22696201e318..c9f76f769ab8acac7a709ea155c8882344969ea9 100644
--- a/cc/trees/layer_tree_host.cc
+++ b/cc/trees/layer_tree_host.cc
@@ -388,7 +388,9 @@ void LayerTreeHost::SetOutputSurface(scoped_ptr<OutputSurface> surface) {
DCHECK(output_surface_lost_);
DCHECK(surface);
- proxy_->SetOutputSurface(surface.Pass());
+ DCHECK(!new_output_surface_);
+ new_output_surface_ = surface.Pass();
+ proxy_->SetOutputSurface(new_output_surface_.get());
}
void LayerTreeHost::RequestNewOutputSurface() {
@@ -396,12 +398,16 @@ void LayerTreeHost::RequestNewOutputSurface() {
}
void LayerTreeHost::DidInitializeOutputSurface() {
+ DCHECK(new_output_surface_);
output_surface_lost_ = false;
client_->DidInitializeOutputSurface();
+ current_output_surface_ = new_output_surface_.Pass();
}
void LayerTreeHost::DidFailToInitializeOutputSurface() {
DCHECK(output_surface_lost_);
+ DCHECK(new_output_surface_);
+ new_output_surface_ = nullptr;
client_->DidFailToInitializeOutputSurface();
}

Powered by Google App Engine
This is Rietveld 408576698