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 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
309 bool force_render_surface() const { return force_render_surface_; } | 309 bool force_render_surface() const { return force_render_surface_; } |
310 | 310 |
311 // LayerAnimationEventObserver | 311 // LayerAnimationEventObserver |
312 virtual void OnAnimationStarted(const cc::AnimationEvent& event) OVERRIDE; | 312 virtual void OnAnimationStarted(const cc::AnimationEvent& event) OVERRIDE; |
313 | 313 |
314 // Whether this layer has animations waiting to get sent to its cc::Layer. | 314 // Whether this layer has animations waiting to get sent to its cc::Layer. |
315 bool HasPendingThreadedAnimations() { | 315 bool HasPendingThreadedAnimations() { |
316 return pending_threaded_animations_.size() != 0; | 316 return pending_threaded_animations_.size() != 0; |
317 } | 317 } |
318 | 318 |
| 319 // Triggers a call to SwitchToLayer. |
| 320 void SwitchCCLayerForTest(); |
| 321 |
319 private: | 322 private: |
320 // Stacks |child| above or below |other|. Helper method for StackAbove() and | 323 // Stacks |child| above or below |other|. Helper method for StackAbove() and |
321 // StackBelow(). | 324 // StackBelow(). |
322 void StackRelativeTo(Layer* child, Layer* other, bool above); | 325 void StackRelativeTo(Layer* child, Layer* other, bool above); |
323 | 326 |
324 bool ConvertPointForAncestor(const Layer* ancestor, gfx::Point* point) const; | 327 bool ConvertPointForAncestor(const Layer* ancestor, gfx::Point* point) const; |
325 bool ConvertPointFromAncestor(const Layer* ancestor, gfx::Point* point) const; | 328 bool ConvertPointFromAncestor(const Layer* ancestor, gfx::Point* point) const; |
326 | 329 |
327 bool GetTargetTransformRelativeTo(const Layer* ancestor, | 330 bool GetTargetTransformRelativeTo(const Layer* ancestor, |
328 gfx::Transform* transform) const; | 331 gfx::Transform* transform) const; |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
460 // The size of the delegated frame in DIP, set when SetDelegatedFrame was | 463 // The size of the delegated frame in DIP, set when SetDelegatedFrame was |
461 // called. | 464 // called. |
462 gfx::Size delegated_frame_size_in_dip_; | 465 gfx::Size delegated_frame_size_in_dip_; |
463 | 466 |
464 DISALLOW_COPY_AND_ASSIGN(Layer); | 467 DISALLOW_COPY_AND_ASSIGN(Layer); |
465 }; | 468 }; |
466 | 469 |
467 } // namespace ui | 470 } // namespace ui |
468 | 471 |
469 #endif // UI_COMPOSITOR_LAYER_H_ | 472 #endif // UI_COMPOSITOR_LAYER_H_ |
OLD | NEW |