OLD | NEW |
---|---|
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 Loading... | |
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_); | |
no sievers
2015/09/10 17:27:45
DCHECK(!output_surface_lost_) also
sohanjg
2015/09/11 07:00:49
Done.
| |
401 output_surface_lost_ = true; | |
402 return proxy_->ReleaseOutputSurface(); | |
403 } | |
404 | |
399 void LayerTreeHost::RequestNewOutputSurface() { | 405 void LayerTreeHost::RequestNewOutputSurface() { |
400 client_->RequestNewOutputSurface(); | 406 client_->RequestNewOutputSurface(); |
401 } | 407 } |
402 | 408 |
403 void LayerTreeHost::DidInitializeOutputSurface() { | 409 void LayerTreeHost::DidInitializeOutputSurface() { |
404 output_surface_lost_ = false; | 410 output_surface_lost_ = false; |
405 client_->DidInitializeOutputSurface(); | 411 client_->DidInitializeOutputSurface(); |
406 } | 412 } |
407 | 413 |
408 void LayerTreeHost::DidFailToInitializeOutputSurface() { | 414 void LayerTreeHost::DidFailToInitializeOutputSurface() { |
(...skipping 833 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1242 return animation_host_ ? animation_host_->HasAnyAnimation(layer->id()) | 1248 return animation_host_ ? animation_host_->HasAnyAnimation(layer->id()) |
1243 : false; | 1249 : false; |
1244 } | 1250 } |
1245 | 1251 |
1246 bool LayerTreeHost::HasActiveAnimation(const Layer* layer) const { | 1252 bool LayerTreeHost::HasActiveAnimation(const Layer* layer) const { |
1247 return animation_host_ ? animation_host_->HasActiveAnimation(layer->id()) | 1253 return animation_host_ ? animation_host_->HasActiveAnimation(layer->id()) |
1248 : false; | 1254 : false; |
1249 } | 1255 } |
1250 | 1256 |
1251 } // namespace cc | 1257 } // namespace cc |
OLD | NEW |