| 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 <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 380 // Whether this layer has animations waiting to get sent to its cc::Layer. | 380 // Whether this layer has animations waiting to get sent to its cc::Layer. |
| 381 bool HasPendingThreadedAnimationsForTesting() const; | 381 bool HasPendingThreadedAnimationsForTesting() const; |
| 382 | 382 |
| 383 // Triggers a call to SwitchToLayer. | 383 // Triggers a call to SwitchToLayer. |
| 384 void SwitchCCLayerForTest(); | 384 void SwitchCCLayerForTest(); |
| 385 | 385 |
| 386 const cc::Region& damaged_region_for_testing() const { | 386 const cc::Region& damaged_region_for_testing() const { |
| 387 return damaged_region_; | 387 return damaged_region_; |
| 388 } | 388 } |
| 389 | 389 |
| 390 gfx::ScrollOffset CurrentScrollOffset() const; |
| 391 void SetScrollOffset(const gfx::ScrollOffset& offset); |
| 392 void SetScrollable(Layer* parent_clip_layer, |
| 393 bool can_overscroll, |
| 394 const base::Closure& on_scroll); |
| 395 |
| 390 private: | 396 private: |
| 391 friend class LayerOwner; | 397 friend class LayerOwner; |
| 392 | 398 |
| 393 void CollectAnimators(std::vector<scoped_refptr<LayerAnimator> >* animators); | 399 void CollectAnimators(std::vector<scoped_refptr<LayerAnimator> >* animators); |
| 394 | 400 |
| 395 // Stacks |child| above or below |other|. Helper method for StackAbove() and | 401 // Stacks |child| above or below |other|. Helper method for StackAbove() and |
| 396 // StackBelow(). | 402 // StackBelow(). |
| 397 void StackRelativeTo(Layer* child, Layer* other, bool above); | 403 void StackRelativeTo(Layer* child, Layer* other, bool above); |
| 398 | 404 |
| 399 bool ConvertPointForAncestor(const Layer* ancestor, gfx::Point* point) const; | 405 bool ConvertPointForAncestor(const Layer* ancestor, gfx::Point* point) const; |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 533 // The texture scale. | 539 // The texture scale. |
| 534 float texture_x_scale_; | 540 float texture_x_scale_; |
| 535 float texture_y_scale_; | 541 float texture_y_scale_; |
| 536 | 542 |
| 537 DISALLOW_COPY_AND_ASSIGN(Layer); | 543 DISALLOW_COPY_AND_ASSIGN(Layer); |
| 538 }; | 544 }; |
| 539 | 545 |
| 540 } // namespace ui | 546 } // namespace ui |
| 541 | 547 |
| 542 #endif // UI_COMPOSITOR_LAYER_H_ | 548 #endif // UI_COMPOSITOR_LAYER_H_ |
| OLD | NEW |