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

Unified Diff: cc/trees/layer_tree_host.cc

Issue 286293002: cc: Remove CreateAndInitializeOutputSurface from the Proxy interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: createandinitos: Created 6 years, 7 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 c83a68e4a7ec9e6ddbcc552b1d90d8f40019099c..a96699647a3ba325cabcb5f2da46a56056498ba7 100644
--- a/cc/trees/layer_tree_host.cc
+++ b/cc/trees/layer_tree_host.cc
@@ -96,7 +96,6 @@ LayerTreeHost::LayerTreeHost(LayerTreeHostClient* client,
client_(client),
source_frame_number_(0),
rendering_stats_instrumentation_(RenderingStatsInstrumentation::Create()),
- output_surface_can_be_initialized_(true),
output_surface_lost_(true),
num_failed_recreate_attempts_(0),
settings_(settings),
@@ -698,16 +697,13 @@ void LayerTreeHost::NotifyInputThrottledUntilCommit() {
void LayerTreeHost::Composite(base::TimeTicks frame_begin_time) {
DCHECK(!proxy_->HasImplThread());
SingleThreadProxy* proxy = static_cast<SingleThreadProxy*>(proxy_.get());
- proxy->CompositeImmediately(frame_begin_time);
-}
-
-bool LayerTreeHost::InitializeOutputSurfaceIfNeeded() {
- if (!output_surface_can_be_initialized_)
- return false;
if (output_surface_lost_)
- proxy_->CreateAndInitializeOutputSurface();
- return !output_surface_lost_;
+ proxy->CreateAndInitializeOutputSurface();
+ if (output_surface_lost_)
+ return;
+
+ proxy->CompositeImmediately(frame_begin_time);
}
bool LayerTreeHost::UpdateLayers(ResourceUpdateQueue* queue) {

Powered by Google App Engine
This is Rietveld 408576698