| 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 <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 #include "cc/layers/layer_position_constraint.h" | 23 #include "cc/layers/layer_position_constraint.h" |
| 24 #include "cc/layers/render_surface_impl.h" | 24 #include "cc/layers/render_surface_impl.h" |
| 25 #include "cc/output/filter_operations.h" | 25 #include "cc/output/filter_operations.h" |
| 26 #include "cc/quads/render_pass.h" | 26 #include "cc/quads/render_pass.h" |
| 27 #include "cc/quads/shared_quad_state.h" | 27 #include "cc/quads/shared_quad_state.h" |
| 28 #include "cc/resources/resource_provider.h" | 28 #include "cc/resources/resource_provider.h" |
| 29 #include "skia/ext/refptr.h" | 29 #include "skia/ext/refptr.h" |
| 30 #include "third_party/skia/include/core/SkColor.h" | 30 #include "third_party/skia/include/core/SkColor.h" |
| 31 #include "third_party/skia/include/core/SkImageFilter.h" | 31 #include "third_party/skia/include/core/SkImageFilter.h" |
| 32 #include "third_party/skia/include/core/SkPicture.h" | 32 #include "third_party/skia/include/core/SkPicture.h" |
| 33 #include "ui/gfx/point3_f.h" |
| 33 #include "ui/gfx/rect.h" | 34 #include "ui/gfx/rect.h" |
| 34 #include "ui/gfx/rect_f.h" | 35 #include "ui/gfx/rect_f.h" |
| 35 #include "ui/gfx/transform.h" | 36 #include "ui/gfx/transform.h" |
| 36 | 37 |
| 37 namespace base { | 38 namespace base { |
| 38 namespace debug { | 39 namespace debug { |
| 39 class ConvertableToTraceFormat; | 40 class ConvertableToTraceFormat; |
| 40 } | 41 } |
| 41 | 42 |
| 42 class DictionaryValue; | 43 class DictionaryValue; |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 // Returns true if this layer has content to draw. | 196 // Returns true if this layer has content to draw. |
| 196 void SetDrawsContent(bool draws_content); | 197 void SetDrawsContent(bool draws_content); |
| 197 bool DrawsContent() const { return draws_content_; } | 198 bool DrawsContent() const { return draws_content_; } |
| 198 | 199 |
| 199 void SetHideLayerAndSubtree(bool hide); | 200 void SetHideLayerAndSubtree(bool hide); |
| 200 bool hide_layer_and_subtree() const { return hide_layer_and_subtree_; } | 201 bool hide_layer_and_subtree() const { return hide_layer_and_subtree_; } |
| 201 | 202 |
| 202 bool force_render_surface() const { return force_render_surface_; } | 203 bool force_render_surface() const { return force_render_surface_; } |
| 203 void SetForceRenderSurface(bool force) { force_render_surface_ = force; } | 204 void SetForceRenderSurface(bool force) { force_render_surface_ = force; } |
| 204 | 205 |
| 205 void SetAnchorPoint(const gfx::PointF& anchor_point); | 206 void SetTransformOrigin(const gfx::Point3F& transform_origin); |
| 206 gfx::PointF anchor_point() const { return anchor_point_; } | 207 gfx::Point3F transform_origin() const { return transform_origin_; } |
| 207 | |
| 208 void SetAnchorPointZ(float anchor_point_z); | |
| 209 float anchor_point_z() const { return anchor_point_z_; } | |
| 210 | 208 |
| 211 void SetBackgroundColor(SkColor background_color); | 209 void SetBackgroundColor(SkColor background_color); |
| 212 SkColor background_color() const { return background_color_; } | 210 SkColor background_color() const { return background_color_; } |
| 213 // If contents_opaque(), return an opaque color else return a | 211 // If contents_opaque(), return an opaque color else return a |
| 214 // non-opaque color. Tries to return background_color(), if possible. | 212 // non-opaque color. Tries to return background_color(), if possible. |
| 215 SkColor SafeOpaqueBackgroundColor() const; | 213 SkColor SafeOpaqueBackgroundColor() const; |
| 216 | 214 |
| 217 void SetFilters(const FilterOperations& filters); | 215 void SetFilters(const FilterOperations& filters); |
| 218 const FilterOperations& filters() const { return filters_; } | 216 const FilterOperations& filters() const { return filters_; } |
| 219 bool FilterIsAnimating() const; | 217 bool FilterIsAnimating() const; |
| (...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 590 // mask_layer_ can be temporarily stolen during tree sync, we need this ID to | 588 // mask_layer_ can be temporarily stolen during tree sync, we need this ID to |
| 591 // confirm newly assigned layer is still the previous one | 589 // confirm newly assigned layer is still the previous one |
| 592 int mask_layer_id_; | 590 int mask_layer_id_; |
| 593 scoped_ptr<LayerImpl> mask_layer_; | 591 scoped_ptr<LayerImpl> mask_layer_; |
| 594 int replica_layer_id_; // ditto | 592 int replica_layer_id_; // ditto |
| 595 scoped_ptr<LayerImpl> replica_layer_; | 593 scoped_ptr<LayerImpl> replica_layer_; |
| 596 int layer_id_; | 594 int layer_id_; |
| 597 LayerTreeImpl* layer_tree_impl_; | 595 LayerTreeImpl* layer_tree_impl_; |
| 598 | 596 |
| 599 // Properties synchronized from the associated Layer. | 597 // Properties synchronized from the associated Layer. |
| 600 gfx::PointF anchor_point_; | 598 gfx::Point3F transform_origin_; |
| 601 float anchor_point_z_; | |
| 602 gfx::Size bounds_; | 599 gfx::Size bounds_; |
| 603 gfx::SizeF temporary_impl_bounds_; | 600 gfx::SizeF temporary_impl_bounds_; |
| 604 gfx::Vector2d scroll_offset_; | 601 gfx::Vector2d scroll_offset_; |
| 605 ScrollOffsetDelegate* scroll_offset_delegate_; | 602 ScrollOffsetDelegate* scroll_offset_delegate_; |
| 606 LayerImpl* scroll_clip_layer_; | 603 LayerImpl* scroll_clip_layer_; |
| 607 bool scrollable_ : 1; | 604 bool scrollable_ : 1; |
| 608 bool should_scroll_on_main_thread_ : 1; | 605 bool should_scroll_on_main_thread_ : 1; |
| 609 bool have_wheel_event_handlers_ : 1; | 606 bool have_wheel_event_handlers_ : 1; |
| 610 bool have_scroll_event_handlers_ : 1; | 607 bool have_scroll_event_handlers_ : 1; |
| 611 bool user_scrollable_horizontal_ : 1; | 608 bool user_scrollable_horizontal_ : 1; |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 693 DrawProperties<LayerImpl> draw_properties_; | 690 DrawProperties<LayerImpl> draw_properties_; |
| 694 | 691 |
| 695 scoped_refptr<base::debug::ConvertableToTraceFormat> debug_info_; | 692 scoped_refptr<base::debug::ConvertableToTraceFormat> debug_info_; |
| 696 | 693 |
| 697 DISALLOW_COPY_AND_ASSIGN(LayerImpl); | 694 DISALLOW_COPY_AND_ASSIGN(LayerImpl); |
| 698 }; | 695 }; |
| 699 | 696 |
| 700 } // namespace cc | 697 } // namespace cc |
| 701 | 698 |
| 702 #endif // CC_LAYERS_LAYER_IMPL_H_ | 699 #endif // CC_LAYERS_LAYER_IMPL_H_ |
| OLD | NEW |