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 17 matching lines...) Expand all Loading... |
28 #include "cc/layers/layer_position_constraint.h" | 28 #include "cc/layers/layer_position_constraint.h" |
29 #include "cc/layers/performance_properties.h" | 29 #include "cc/layers/performance_properties.h" |
30 #include "cc/layers/render_surface_impl.h" | 30 #include "cc/layers/render_surface_impl.h" |
31 #include "cc/quads/shared_quad_state.h" | 31 #include "cc/quads/shared_quad_state.h" |
32 #include "cc/resources/resource_provider.h" | 32 #include "cc/resources/resource_provider.h" |
33 #include "cc/tiles/tile_priority.h" | 33 #include "cc/tiles/tile_priority.h" |
34 #include "cc/trees/element_id.h" | 34 #include "cc/trees/element_id.h" |
35 #include "cc/trees/mutator_host_client.h" | 35 #include "cc/trees/mutator_host_client.h" |
36 #include "cc/trees/target_property.h" | 36 #include "cc/trees/target_property.h" |
37 #include "third_party/skia/include/core/SkColor.h" | 37 #include "third_party/skia/include/core/SkColor.h" |
38 #include "third_party/skia/include/core/SkXfermode.h" | |
39 #include "ui/gfx/geometry/point3_f.h" | 38 #include "ui/gfx/geometry/point3_f.h" |
40 #include "ui/gfx/geometry/rect.h" | 39 #include "ui/gfx/geometry/rect.h" |
41 #include "ui/gfx/geometry/rect_f.h" | 40 #include "ui/gfx/geometry/rect_f.h" |
42 #include "ui/gfx/geometry/scroll_offset.h" | 41 #include "ui/gfx/geometry/scroll_offset.h" |
43 #include "ui/gfx/transform.h" | 42 #include "ui/gfx/transform.h" |
44 | 43 |
45 namespace base { | 44 namespace base { |
46 namespace trace_event { | 45 namespace trace_event { |
47 class ConvertableToTraceFormat; | 46 class ConvertableToTraceFormat; |
48 class TracedValue; | 47 class TracedValue; |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 | 187 |
189 float Opacity() const; | 188 float Opacity() const; |
190 const gfx::Transform& Transform() const; | 189 const gfx::Transform& Transform() const; |
191 | 190 |
192 void SetElementId(ElementId element_id); | 191 void SetElementId(ElementId element_id); |
193 ElementId element_id() const { return element_id_; } | 192 ElementId element_id() const { return element_id_; } |
194 | 193 |
195 void SetMutableProperties(uint32_t properties); | 194 void SetMutableProperties(uint32_t properties); |
196 uint32_t mutable_properties() const { return mutable_properties_; } | 195 uint32_t mutable_properties() const { return mutable_properties_; } |
197 | 196 |
198 void set_draw_blend_mode(SkXfermode::Mode blend_mode) { | 197 void set_draw_blend_mode(SkBlendMode blend_mode) { |
199 draw_blend_mode_ = blend_mode; | 198 draw_blend_mode_ = blend_mode; |
200 } | 199 } |
201 SkXfermode::Mode draw_blend_mode() const { return draw_blend_mode_; } | 200 SkBlendMode draw_blend_mode() const { return draw_blend_mode_; } |
202 | 201 |
203 void SetPosition(const gfx::PointF& position); | 202 void SetPosition(const gfx::PointF& position); |
204 gfx::PointF position() const { return position_; } | 203 gfx::PointF position() const { return position_; } |
205 | 204 |
206 bool IsAffectedByPageScale() const; | 205 bool IsAffectedByPageScale() const; |
207 | 206 |
208 gfx::Vector2dF FixedContainerSizeDelta() const; | 207 gfx::Vector2dF FixedContainerSizeDelta() const; |
209 | 208 |
210 bool Is3dSorted() const { return sorting_context_id_ != 0; } | 209 bool Is3dSorted() const { return sorting_context_id_ != 0; } |
211 | 210 |
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
518 | 517 |
519 // This is true if and only if the layer was ever ready since it last animated | 518 // This is true if and only if the layer was ever ready since it last animated |
520 // (all content was complete). | 519 // (all content was complete). |
521 bool was_ever_ready_since_last_transform_animation_ : 1; | 520 bool was_ever_ready_since_last_transform_animation_ : 1; |
522 | 521 |
523 Region non_fast_scrollable_region_; | 522 Region non_fast_scrollable_region_; |
524 Region touch_event_handler_region_; | 523 Region touch_event_handler_region_; |
525 SkColor background_color_; | 524 SkColor background_color_; |
526 SkColor safe_opaque_background_color_; | 525 SkColor safe_opaque_background_color_; |
527 | 526 |
528 SkXfermode::Mode draw_blend_mode_; | 527 SkBlendMode draw_blend_mode_; |
529 gfx::PointF position_; | 528 gfx::PointF position_; |
530 | 529 |
531 gfx::Rect clip_rect_in_target_space_; | 530 gfx::Rect clip_rect_in_target_space_; |
532 int transform_tree_index_; | 531 int transform_tree_index_; |
533 int effect_tree_index_; | 532 int effect_tree_index_; |
534 int clip_tree_index_; | 533 int clip_tree_index_; |
535 int scroll_tree_index_; | 534 int scroll_tree_index_; |
536 | 535 |
537 protected: | 536 protected: |
538 friend class TreeSynchronizer; | 537 friend class TreeSynchronizer; |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
575 bool has_will_change_transform_hint_ : 1; | 574 bool has_will_change_transform_hint_ : 1; |
576 bool needs_push_properties_ : 1; | 575 bool needs_push_properties_ : 1; |
577 bool scrollbars_hidden_ : 1; | 576 bool scrollbars_hidden_ : 1; |
578 | 577 |
579 DISALLOW_COPY_AND_ASSIGN(LayerImpl); | 578 DISALLOW_COPY_AND_ASSIGN(LayerImpl); |
580 }; | 579 }; |
581 | 580 |
582 } // namespace cc | 581 } // namespace cc |
583 | 582 |
584 #endif // CC_LAYERS_LAYER_IMPL_H_ | 583 #endif // CC_LAYERS_LAYER_IMPL_H_ |
OLD | NEW |