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

Side by Side Diff: cc/trees/layer_tree_host.cc

Issue 1287043002: cc: Setup API to release OutputSurface from LTHClient. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update test. 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 unified diff | Download patch
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/trees/layer_tree_host.h" 5 #include "cc/trees/layer_tree_host.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <stack> 8 #include <stack>
9 #include <string> 9 #include <string>
10 10
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after
389 } 389 }
390 390
391 void LayerTreeHost::SetOutputSurface(scoped_ptr<OutputSurface> surface) { 391 void LayerTreeHost::SetOutputSurface(scoped_ptr<OutputSurface> surface) {
392 TRACE_EVENT0("cc", "LayerTreeHost::SetOutputSurface"); 392 TRACE_EVENT0("cc", "LayerTreeHost::SetOutputSurface");
393 DCHECK(output_surface_lost_); 393 DCHECK(output_surface_lost_);
394 DCHECK(surface); 394 DCHECK(surface);
395 395
396 proxy_->SetOutputSurface(surface.Pass()); 396 proxy_->SetOutputSurface(surface.Pass());
397 } 397 }
398 398
399 scoped_ptr<OutputSurface> LayerTreeHost::ReleaseOutputSurface() {
400 DCHECK(!visible_);
401 DCHECK(!output_surface_lost_);
402
403 output_surface_lost_ = true;
danakj 2015/09/17 18:43:55 rather than doing this directly here, could this f
404 return proxy_->ReleaseOutputSurface();
405 }
406
399 void LayerTreeHost::RequestNewOutputSurface() { 407 void LayerTreeHost::RequestNewOutputSurface() {
400 client_->RequestNewOutputSurface(); 408 client_->RequestNewOutputSurface();
401 } 409 }
402 410
403 void LayerTreeHost::DidInitializeOutputSurface() { 411 void LayerTreeHost::DidInitializeOutputSurface() {
404 output_surface_lost_ = false; 412 output_surface_lost_ = false;
405 client_->DidInitializeOutputSurface(); 413 client_->DidInitializeOutputSurface();
406 } 414 }
407 415
408 void LayerTreeHost::DidFailToInitializeOutputSurface() { 416 void LayerTreeHost::DidFailToInitializeOutputSurface() {
(...skipping 833 matching lines...) Expand 10 before | Expand all | Expand 10 after
1242 return animation_host_ ? animation_host_->HasAnyAnimation(layer->id()) 1250 return animation_host_ ? animation_host_->HasAnyAnimation(layer->id())
1243 : false; 1251 : false;
1244 } 1252 }
1245 1253
1246 bool LayerTreeHost::HasActiveAnimation(const Layer* layer) const { 1254 bool LayerTreeHost::HasActiveAnimation(const Layer* layer) const {
1247 return animation_host_ ? animation_host_->HasActiveAnimation(layer->id()) 1255 return animation_host_ ? animation_host_->HasActiveAnimation(layer->id())
1248 : false; 1256 : false;
1249 } 1257 }
1250 1258
1251 } // namespace cc 1259 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698