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