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 <string> | 8 #include <string> |
9 | 9 |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
12 #include "base/values.h" | 12 #include "base/values.h" |
13 #include "cc/animation/layer_animation_controller.h" | 13 #include "cc/animation/layer_animation_controller.h" |
14 #include "cc/animation/layer_animation_value_observer.h" | 14 #include "cc/animation/layer_animation_value_observer.h" |
15 #include "cc/base/cc_export.h" | 15 #include "cc/base/cc_export.h" |
16 #include "cc/base/region.h" | 16 #include "cc/base/region.h" |
17 #include "cc/base/scoped_ptr_vector.h" | 17 #include "cc/base/scoped_ptr_vector.h" |
18 #include "cc/input/input_handler.h" | 18 #include "cc/input/input_handler.h" |
19 #include "cc/layers/draw_properties.h" | 19 #include "cc/layers/draw_properties.h" |
20 #include "cc/layers/layer_position_constraint.h" | |
20 #include "cc/layers/render_surface_impl.h" | 21 #include "cc/layers/render_surface_impl.h" |
21 #include "cc/quads/render_pass.h" | 22 #include "cc/quads/render_pass.h" |
22 #include "cc/quads/shared_quad_state.h" | 23 #include "cc/quads/shared_quad_state.h" |
23 #include "cc/resources/resource_provider.h" | 24 #include "cc/resources/resource_provider.h" |
24 #include "skia/ext/refptr.h" | 25 #include "skia/ext/refptr.h" |
25 #include "third_party/WebKit/Source/Platform/chromium/public/WebFilterOperations .h" | 26 #include "third_party/WebKit/Source/Platform/chromium/public/WebFilterOperations .h" |
26 #include "third_party/skia/include/core/SkColor.h" | 27 #include "third_party/skia/include/core/SkColor.h" |
27 #include "third_party/skia/include/core/SkImageFilter.h" | 28 #include "third_party/skia/include/core/SkImageFilter.h" |
28 #include "third_party/skia/include/core/SkPicture.h" | 29 #include "third_party/skia/include/core/SkPicture.h" |
29 #include "ui/gfx/rect.h" | 30 #include "ui/gfx/rect.h" |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
155 void SetPosition(gfx::PointF position); | 156 void SetPosition(gfx::PointF position); |
156 gfx::PointF position() const { return position_; } | 157 gfx::PointF position() const { return position_; } |
157 | 158 |
158 void SetIsContainerForFixedPositionLayers(bool container) { | 159 void SetIsContainerForFixedPositionLayers(bool container) { |
159 is_container_for_fixed_position_layers_ = container; | 160 is_container_for_fixed_position_layers_ = container; |
160 } | 161 } |
161 bool is_container_for_fixed_position_layers() const { | 162 bool is_container_for_fixed_position_layers() const { |
162 return is_container_for_fixed_position_layers_; | 163 return is_container_for_fixed_position_layers_; |
163 } | 164 } |
164 | 165 |
165 void SetFixedToContainerLayer(bool fixed) { | 166 void SetFixedContainerSizeDelta(const gfx::Vector2dF& delta) { |
166 fixed_to_container_layer_ = fixed; | 167 fixed_container_size_delta_ = delta; |
167 } | 168 } |
168 bool fixed_to_container_layer() const { return fixed_to_container_layer_; } | 169 const gfx::Vector2dF& fixed_container_size_delta() const { |
170 return fixed_container_size_delta_; | |
171 } | |
172 | |
173 void SetPositionConstraint(const LayerPositionConstraint& constraint) { | |
174 position_constraint_ = constraint; | |
175 } | |
176 const LayerPositionConstraint& position_constraint() const { | |
177 return position_constraint_; | |
178 } | |
169 | 179 |
170 void SetPreserves3d(bool preserves_3d); | 180 void SetPreserves3d(bool preserves_3d); |
171 bool preserves_3d() const { return preserves_3d_; } | 181 bool preserves_3d() const { return preserves_3d_; } |
172 | 182 |
173 void SetUseParentBackfaceVisibility(bool use) { | 183 void SetUseParentBackfaceVisibility(bool use) { |
174 use_parent_backface_visibility_ = use; | 184 use_parent_backface_visibility_ = use; |
175 } | 185 } |
176 bool use_parent_backface_visibility() const { | 186 bool use_parent_backface_visibility() const { |
177 return use_parent_backface_visibility_; | 187 return use_parent_backface_visibility_; |
178 } | 188 } |
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
468 bool use_parent_backface_visibility_; | 478 bool use_parent_backface_visibility_; |
469 bool draw_checkerboard_for_missing_tiles_; | 479 bool draw_checkerboard_for_missing_tiles_; |
470 gfx::Transform sublayer_transform_; | 480 gfx::Transform sublayer_transform_; |
471 gfx::Transform transform_; | 481 gfx::Transform transform_; |
472 | 482 |
473 bool draws_content_; | 483 bool draws_content_; |
474 bool force_render_surface_; | 484 bool force_render_surface_; |
475 | 485 |
476 // Set for the layer that other layers are fixed to. | 486 // Set for the layer that other layers are fixed to. |
477 bool is_container_for_fixed_position_layers_; | 487 bool is_container_for_fixed_position_layers_; |
478 // This is true if the layer should be fixed to the closest ancestor | 488 // This property is effective when m_isContainerForFixedPositionLayers == true , |
Sami
2013/03/25 11:41:37
s/m_isContainerForFixedPositionLayers/is_container
trchen
2013/03/26 01:45:28
Done.
| |
479 // container. | 489 gfx::Vector2dF fixed_container_size_delta_; |
480 bool fixed_to_container_layer_; | 490 |
491 LayerPositionConstraint position_constraint_; | |
481 | 492 |
482 gfx::Vector2dF scroll_delta_; | 493 gfx::Vector2dF scroll_delta_; |
483 gfx::Vector2d sent_scroll_delta_; | 494 gfx::Vector2d sent_scroll_delta_; |
484 gfx::Vector2d max_scroll_offset_; | 495 gfx::Vector2d max_scroll_offset_; |
485 gfx::Transform impl_transform_; | 496 gfx::Transform impl_transform_; |
486 gfx::Vector2dF last_scroll_offset_; | 497 gfx::Vector2dF last_scroll_offset_; |
487 | 498 |
488 // The global depth value of the center of the layer. This value is used | 499 // The global depth value of the center of the layer. This value is used |
489 // to sort layers from back to front. | 500 // to sort layers from back to front. |
490 float draw_depth_; | 501 float draw_depth_; |
(...skipping 28 matching lines...) Expand all Loading... | |
519 // Group of properties that need to be computed based on the layer tree | 530 // Group of properties that need to be computed based on the layer tree |
520 // hierarchy before layers can be drawn. | 531 // hierarchy before layers can be drawn. |
521 DrawProperties<LayerImpl, RenderSurfaceImpl> draw_properties_; | 532 DrawProperties<LayerImpl, RenderSurfaceImpl> draw_properties_; |
522 | 533 |
523 DISALLOW_COPY_AND_ASSIGN(LayerImpl); | 534 DISALLOW_COPY_AND_ASSIGN(LayerImpl); |
524 }; | 535 }; |
525 | 536 |
526 } | 537 } |
527 | 538 |
528 #endif // CC_LAYERS_LAYER_IMPL_H_ | 539 #endif // CC_LAYERS_LAYER_IMPL_H_ |
OLD | NEW |