Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2010 The Chromium Authors. All rights reserved. | 1 // Copyright 2010 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_H_ | 5 #ifndef CC_LAYERS_LAYER_H_ |
| 6 #define CC_LAYERS_LAYER_H_ | 6 #define CC_LAYERS_LAYER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
| 12 #include "base/observer_list.h" | 12 #include "base/observer_list.h" |
| 13 #include "cc/animation/layer_animation_controller.h" | 13 #include "cc/animation/layer_animation_controller.h" |
| 14 #include "cc/animation/layer_animation_event_observer.h" | 14 #include "cc/animation/layer_animation_event_observer.h" |
| 15 #include "cc/animation/layer_animation_value_observer.h" | 15 #include "cc/animation/layer_animation_value_observer.h" |
| 16 #include "cc/base/cc_export.h" | 16 #include "cc/base/cc_export.h" |
| 17 #include "cc/base/region.h" | 17 #include "cc/base/region.h" |
| 18 #include "cc/layers/draw_properties.h" | 18 #include "cc/layers/draw_properties.h" |
| 19 #include "cc/layers/layer_position_constraint.h" | |
| 19 #include "cc/layers/render_surface.h" | 20 #include "cc/layers/render_surface.h" |
| 20 #include "cc/trees/occlusion_tracker.h" | 21 #include "cc/trees/occlusion_tracker.h" |
| 21 #include "skia/ext/refptr.h" | 22 #include "skia/ext/refptr.h" |
| 22 #include "third_party/WebKit/Source/Platform/chromium/public/WebFilterOperations .h" | 23 #include "third_party/WebKit/Source/Platform/chromium/public/WebFilterOperations .h" |
| 23 #include "third_party/skia/include/core/SkColor.h" | 24 #include "third_party/skia/include/core/SkColor.h" |
| 24 #include "third_party/skia/include/core/SkImageFilter.h" | 25 #include "third_party/skia/include/core/SkImageFilter.h" |
| 25 #include "ui/gfx/rect.h" | 26 #include "ui/gfx/rect.h" |
| 26 #include "ui/gfx/rect_f.h" | 27 #include "ui/gfx/rect_f.h" |
| 27 #include "ui/gfx/transform.h" | 28 #include "ui/gfx/transform.h" |
| 28 | 29 |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 116 return background_filters_; | 117 return background_filters_; |
| 117 } | 118 } |
| 118 | 119 |
| 119 virtual void SetContentsOpaque(bool opaque); | 120 virtual void SetContentsOpaque(bool opaque); |
| 120 bool contents_opaque() const { return contents_opaque_; } | 121 bool contents_opaque() const { return contents_opaque_; } |
| 121 | 122 |
| 122 void SetPosition(gfx::PointF position); | 123 void SetPosition(gfx::PointF position); |
| 123 gfx::PointF position() const { return position_; } | 124 gfx::PointF position() const { return position_; } |
| 124 | 125 |
| 125 void SetIsContainerForFixedPositionLayers(bool container); | 126 void SetIsContainerForFixedPositionLayers(bool container); |
| 126 bool is_container_for_fixed_position_layers() const { | 127 bool is_container_for_fixed_position_layers() const; |
|
Sami
2013/03/25 11:41:37
This should be renamed to IsContainerForFixedPosit
trchen
2013/03/26 01:45:28
Done.
| |
| 127 return is_container_for_fixed_position_layers_; | 128 |
| 129 void SetPositionConstraint(const LayerPositionConstraint& constraint); | |
| 130 const LayerPositionConstraint& position_constraint() const { | |
| 131 return position_constraint_; | |
| 128 } | 132 } |
| 129 | 133 |
| 130 void SetFixedToContainerLayer(bool fixed_to_container_layer); | |
| 131 bool fixed_to_container_layer() const { return fixed_to_container_layer_; } | |
| 132 | |
| 133 void SetSublayerTransform(const gfx::Transform& sublayer_transform); | 134 void SetSublayerTransform(const gfx::Transform& sublayer_transform); |
| 134 const gfx::Transform& sublayer_transform() const { | 135 const gfx::Transform& sublayer_transform() const { |
| 135 return sublayer_transform_; | 136 return sublayer_transform_; |
| 136 } | 137 } |
| 137 | 138 |
| 138 void SetTransform(const gfx::Transform& transform); | 139 void SetTransform(const gfx::Transform& transform); |
| 139 const gfx::Transform& transform() const { return transform_; } | 140 const gfx::Transform& transform() const { return transform_; } |
| 140 bool TransformIsAnimating() const; | 141 bool TransformIsAnimating() const; |
| 141 | 142 |
| 142 DrawProperties<Layer, RenderSurface>& draw_properties() { | 143 DrawProperties<Layer, RenderSurface>& draw_properties() { |
| (...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 445 gfx::PointF position_; | 446 gfx::PointF position_; |
| 446 gfx::PointF anchor_point_; | 447 gfx::PointF anchor_point_; |
| 447 SkColor background_color_; | 448 SkColor background_color_; |
| 448 std::string debug_name_; | 449 std::string debug_name_; |
| 449 float opacity_; | 450 float opacity_; |
| 450 skia::RefPtr<SkImageFilter> filter_; | 451 skia::RefPtr<SkImageFilter> filter_; |
| 451 WebKit::WebFilterOperations filters_; | 452 WebKit::WebFilterOperations filters_; |
| 452 WebKit::WebFilterOperations background_filters_; | 453 WebKit::WebFilterOperations background_filters_; |
| 453 float anchor_point_z_; | 454 float anchor_point_z_; |
| 454 bool is_container_for_fixed_position_layers_; | 455 bool is_container_for_fixed_position_layers_; |
| 455 bool fixed_to_container_layer_; | 456 LayerPositionConstraint position_constraint_; |
| 456 bool is_drawable_; | 457 bool is_drawable_; |
| 457 bool masks_to_bounds_; | 458 bool masks_to_bounds_; |
| 458 bool contents_opaque_; | 459 bool contents_opaque_; |
| 459 bool double_sided_; | 460 bool double_sided_; |
| 460 bool preserves_3d_; | 461 bool preserves_3d_; |
| 461 bool use_parent_backface_visibility_; | 462 bool use_parent_backface_visibility_; |
| 462 bool draw_checkerboard_for_missing_tiles_; | 463 bool draw_checkerboard_for_missing_tiles_; |
| 463 bool force_render_surface_; | 464 bool force_render_surface_; |
| 464 | 465 |
| 465 gfx::Transform transform_; | 466 gfx::Transform transform_; |
| (...skipping 13 matching lines...) Expand all Loading... | |
| 479 WebKit::WebLayerScrollClient* layer_scroll_client_; | 480 WebKit::WebLayerScrollClient* layer_scroll_client_; |
| 480 | 481 |
| 481 DrawProperties<Layer, RenderSurface> draw_properties_; | 482 DrawProperties<Layer, RenderSurface> draw_properties_; |
| 482 | 483 |
| 483 DISALLOW_COPY_AND_ASSIGN(Layer); | 484 DISALLOW_COPY_AND_ASSIGN(Layer); |
| 484 }; | 485 }; |
| 485 | 486 |
| 486 } // namespace cc | 487 } // namespace cc |
| 487 | 488 |
| 488 #endif // CC_LAYERS_LAYER_H_ | 489 #endif // CC_LAYERS_LAYER_H_ |
| OLD | NEW |