| 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 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 388 DCHECK(output_surface_lost_); | 388 DCHECK(output_surface_lost_); |
| 389 DCHECK(surface); | 389 DCHECK(surface); |
| 390 | 390 |
| 391 proxy_->SetOutputSurface(surface.Pass()); | 391 proxy_->SetOutputSurface(surface.Pass()); |
| 392 } | 392 } |
| 393 | 393 |
| 394 scoped_ptr<OutputSurface> LayerTreeHost::ReleaseOutputSurface() { | 394 scoped_ptr<OutputSurface> LayerTreeHost::ReleaseOutputSurface() { |
| 395 DCHECK(!visible_); | 395 DCHECK(!visible_); |
| 396 DCHECK(!output_surface_lost_); | 396 DCHECK(!output_surface_lost_); |
| 397 | 397 |
| 398 output_surface_lost_ = true; | 398 DidLoseOutputSurface(); |
| 399 return proxy_->ReleaseOutputSurface(); | 399 return proxy_->ReleaseOutputSurface(); |
| 400 } | 400 } |
| 401 | 401 |
| 402 void LayerTreeHost::RequestNewOutputSurface() { | 402 void LayerTreeHost::RequestNewOutputSurface() { |
| 403 client_->RequestNewOutputSurface(); | 403 client_->RequestNewOutputSurface(); |
| 404 } | 404 } |
| 405 | 405 |
| 406 void LayerTreeHost::DidInitializeOutputSurface() { | 406 void LayerTreeHost::DidInitializeOutputSurface() { |
| 407 output_surface_lost_ = false; | 407 output_surface_lost_ = false; |
| 408 client_->DidInitializeOutputSurface(); | 408 client_->DidInitializeOutputSurface(); |
| (...skipping 835 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1244 return animation_host_ ? animation_host_->HasAnyAnimation(layer->id()) | 1244 return animation_host_ ? animation_host_->HasAnyAnimation(layer->id()) |
| 1245 : false; | 1245 : false; |
| 1246 } | 1246 } |
| 1247 | 1247 |
| 1248 bool LayerTreeHost::HasActiveAnimation(const Layer* layer) const { | 1248 bool LayerTreeHost::HasActiveAnimation(const Layer* layer) const { |
| 1249 return animation_host_ ? animation_host_->HasActiveAnimation(layer->id()) | 1249 return animation_host_ ? animation_host_->HasActiveAnimation(layer->id()) |
| 1250 : false; | 1250 : false; |
| 1251 } | 1251 } |
| 1252 | 1252 |
| 1253 } // namespace cc | 1253 } // namespace cc |
| OLD | NEW |