| 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 #ifndef CC_LAYERS_LAYER_IMPL_H_ | 5 #ifndef CC_LAYERS_LAYER_IMPL_H_ |
| 6 #define CC_LAYERS_LAYER_IMPL_H_ | 6 #define CC_LAYERS_LAYER_IMPL_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 462 touch_event_handler_region_ = region; | 462 touch_event_handler_region_ = region; |
| 463 } | 463 } |
| 464 const Region& touch_event_handler_region() const { | 464 const Region& touch_event_handler_region() const { |
| 465 return touch_event_handler_region_; | 465 return touch_event_handler_region_; |
| 466 } | 466 } |
| 467 | 467 |
| 468 void SetDoubleSided(bool double_sided); | 468 void SetDoubleSided(bool double_sided); |
| 469 bool double_sided() const { return double_sided_; } | 469 bool double_sided() const { return double_sided_; } |
| 470 | 470 |
| 471 void SetTransform(const gfx::Transform& transform); | 471 void SetTransform(const gfx::Transform& transform); |
| 472 void SetSubpixelOffset(const gfx::Vector2dF& subpixel_offset) { subpixel_offse
t_ = subpixel_offset; } |
| 472 const gfx::Transform& transform() const { return transform_; } | 473 const gfx::Transform& transform() const { return transform_; } |
| 473 bool TransformIsAnimating() const; | 474 bool TransformIsAnimating() const; |
| 474 bool HasPotentiallyRunningTransformAnimation() const; | 475 bool HasPotentiallyRunningTransformAnimation() const; |
| 475 bool TransformIsAnimatingOnImplOnly() const; | 476 bool TransformIsAnimatingOnImplOnly() const; |
| 476 bool HasOnlyTranslationTransforms() const; | 477 bool HasOnlyTranslationTransforms() const; |
| 477 bool AnimationsPreserveAxisAlignment() const; | 478 bool AnimationsPreserveAxisAlignment() const; |
| 478 void SetTransformAndInvertibility(const gfx::Transform& transform, | 479 void SetTransformAndInvertibility(const gfx::Transform& transform, |
| 479 bool transform_is_invertible); | 480 bool transform_is_invertible); |
| 480 bool transform_is_invertible() const { return transform_is_invertible_; } | 481 bool transform_is_invertible() const { return transform_is_invertible_; } |
| 481 | 482 |
| (...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 727 | 728 |
| 728 protected: | 729 protected: |
| 729 friend class TreeSynchronizer; | 730 friend class TreeSynchronizer; |
| 730 | 731 |
| 731 // Layers that share a sorting context id will be sorted together in 3d | 732 // Layers that share a sorting context id will be sorted together in 3d |
| 732 // space. 0 is a special value that means this layer will not be sorted and | 733 // space. 0 is a special value that means this layer will not be sorted and |
| 733 // will be drawn in paint order. | 734 // will be drawn in paint order. |
| 734 int sorting_context_id_; | 735 int sorting_context_id_; |
| 735 | 736 |
| 736 DrawMode current_draw_mode_; | 737 DrawMode current_draw_mode_; |
| 738 public: |
| 739 gfx::Vector2dF subpixel_offset_; |
| 737 | 740 |
| 738 private: | 741 private: |
| 739 uint64_t element_id_; | 742 uint64_t element_id_; |
| 740 uint32_t mutable_properties_; | 743 uint32_t mutable_properties_; |
| 741 // Rect indicating what was repainted/updated during update. | 744 // Rect indicating what was repainted/updated during update. |
| 742 // Note that plugin layers bypass this and leave it empty. | 745 // Note that plugin layers bypass this and leave it empty. |
| 743 // This is in the layer's space. | 746 // This is in the layer's space. |
| 744 gfx::Rect update_rect_; | 747 gfx::Rect update_rect_; |
| 745 | 748 |
| 746 // Denotes an area that is damaged and needs redraw. This is in the layer's | 749 // Denotes an area that is damaged and needs redraw. This is in the layer's |
| (...skipping 12 matching lines...) Expand all Loading... |
| 759 scoped_ptr<RenderSurfaceImpl> render_surface_; | 762 scoped_ptr<RenderSurfaceImpl> render_surface_; |
| 760 | 763 |
| 761 bool force_render_surface_; | 764 bool force_render_surface_; |
| 762 | 765 |
| 763 std::vector<FrameTimingRequest> frame_timing_requests_; | 766 std::vector<FrameTimingRequest> frame_timing_requests_; |
| 764 bool frame_timing_requests_dirty_; | 767 bool frame_timing_requests_dirty_; |
| 765 bool layer_or_descendant_is_drawn_; | 768 bool layer_or_descendant_is_drawn_; |
| 766 // If true, the layer or one of its descendants has a touch handler. | 769 // If true, the layer or one of its descendants has a touch handler. |
| 767 bool layer_or_descendant_has_touch_handler_; | 770 bool layer_or_descendant_has_touch_handler_; |
| 768 | 771 |
| 772 |
| 769 DISALLOW_COPY_AND_ASSIGN(LayerImpl); | 773 DISALLOW_COPY_AND_ASSIGN(LayerImpl); |
| 770 }; | 774 }; |
| 771 | 775 |
| 772 } // namespace cc | 776 } // namespace cc |
| 773 | 777 |
| 774 #endif // CC_LAYERS_LAYER_IMPL_H_ | 778 #endif // CC_LAYERS_LAYER_IMPL_H_ |
| OLD | NEW |