| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef UI_COMPOSITOR_LAYER_H_ | 5 #ifndef UI_COMPOSITOR_LAYER_H_ |
| 6 #define UI_COMPOSITOR_LAYER_H_ | 6 #define UI_COMPOSITOR_LAYER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 427 | 427 |
| 428 // Cleanup |cc_layer_| and replaces it with |new_layer|. | 428 // Cleanup |cc_layer_| and replaces it with |new_layer|. |
| 429 void SwitchToLayer(scoped_refptr<cc::Layer> new_layer); | 429 void SwitchToLayer(scoped_refptr<cc::Layer> new_layer); |
| 430 | 430 |
| 431 // We cannot send animations to our cc_layer_ until we have been added to a | 431 // We cannot send animations to our cc_layer_ until we have been added to a |
| 432 // layer tree. Instead, we hold on to these animations in | 432 // layer tree. Instead, we hold on to these animations in |
| 433 // pending_threaded_animations_, and expect SendPendingThreadedAnimations to | 433 // pending_threaded_animations_, and expect SendPendingThreadedAnimations to |
| 434 // be called once we have been added to a tree. | 434 // be called once we have been added to a tree. |
| 435 void SendPendingThreadedAnimations(); | 435 void SendPendingThreadedAnimations(); |
| 436 | 436 |
| 437 void AddAnimatorsInTreeToCollection(LayerAnimatorCollection* collection); | 437 void SetCompositorForAnimatorsInTree(Compositor* compositor); |
| 438 void RemoveAnimatorsInTreeFromCollection(LayerAnimatorCollection* collection); | 438 void ResetCompositorForAnimatorsInTree(Compositor* compositor); |
| 439 | |
| 440 // Returns whether the layer has an animating LayerAnimator. | |
| 441 bool IsAnimating() const; | |
| 442 | 439 |
| 443 const LayerType type_; | 440 const LayerType type_; |
| 444 | 441 |
| 445 Compositor* compositor_; | 442 Compositor* compositor_; |
| 446 | 443 |
| 447 Layer* parent_; | 444 Layer* parent_; |
| 448 | 445 |
| 449 // This layer's children, in bottom-to-top stacking order. | 446 // This layer's children, in bottom-to-top stacking order. |
| 450 std::vector<Layer*> children_; | 447 std::vector<Layer*> children_; |
| 451 | 448 |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 530 // The size of the frame or texture in DIP, set when SetShowDelegatedContent | 527 // The size of the frame or texture in DIP, set when SetShowDelegatedContent |
| 531 // or SetTextureMailbox was called. | 528 // or SetTextureMailbox was called. |
| 532 gfx::Size frame_size_in_dip_; | 529 gfx::Size frame_size_in_dip_; |
| 533 | 530 |
| 534 DISALLOW_COPY_AND_ASSIGN(Layer); | 531 DISALLOW_COPY_AND_ASSIGN(Layer); |
| 535 }; | 532 }; |
| 536 | 533 |
| 537 } // namespace ui | 534 } // namespace ui |
| 538 | 535 |
| 539 #endif // UI_COMPOSITOR_LAYER_H_ | 536 #endif // UI_COMPOSITOR_LAYER_H_ |
| OLD | NEW |