| 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 15 matching lines...) Expand all Loading... |
| 26 #include "cc/layers/draw_properties.h" | 26 #include "cc/layers/draw_properties.h" |
| 27 #include "cc/layers/layer_collections.h" | 27 #include "cc/layers/layer_collections.h" |
| 28 #include "cc/layers/layer_impl_test_properties.h" | 28 #include "cc/layers/layer_impl_test_properties.h" |
| 29 #include "cc/layers/layer_position_constraint.h" | 29 #include "cc/layers/layer_position_constraint.h" |
| 30 #include "cc/layers/performance_properties.h" | 30 #include "cc/layers/performance_properties.h" |
| 31 #include "cc/layers/render_surface_impl.h" | 31 #include "cc/layers/render_surface_impl.h" |
| 32 #include "cc/output/filter_operations.h" | 32 #include "cc/output/filter_operations.h" |
| 33 #include "cc/quads/shared_quad_state.h" | 33 #include "cc/quads/shared_quad_state.h" |
| 34 #include "cc/resources/resource_provider.h" | 34 #include "cc/resources/resource_provider.h" |
| 35 #include "cc/tiles/tile_priority.h" | 35 #include "cc/tiles/tile_priority.h" |
| 36 #include "cc/trees/element_id.h" |
| 36 #include "third_party/skia/include/core/SkColor.h" | 37 #include "third_party/skia/include/core/SkColor.h" |
| 37 #include "third_party/skia/include/core/SkImageFilter.h" | 38 #include "third_party/skia/include/core/SkImageFilter.h" |
| 38 #include "ui/gfx/geometry/point3_f.h" | 39 #include "ui/gfx/geometry/point3_f.h" |
| 39 #include "ui/gfx/geometry/rect.h" | 40 #include "ui/gfx/geometry/rect.h" |
| 40 #include "ui/gfx/geometry/rect_f.h" | 41 #include "ui/gfx/geometry/rect_f.h" |
| 41 #include "ui/gfx/geometry/scroll_offset.h" | 42 #include "ui/gfx/geometry/scroll_offset.h" |
| 42 #include "ui/gfx/transform.h" | 43 #include "ui/gfx/transform.h" |
| 43 | 44 |
| 44 namespace base { | 45 namespace base { |
| 45 namespace trace_event { | 46 namespace trace_event { |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 237 | 238 |
| 238 void SetContentsOpaque(bool opaque); | 239 void SetContentsOpaque(bool opaque); |
| 239 bool contents_opaque() const { return contents_opaque_; } | 240 bool contents_opaque() const { return contents_opaque_; } |
| 240 | 241 |
| 241 void SetOpacity(float opacity); | 242 void SetOpacity(float opacity); |
| 242 float opacity() const { return opacity_; } | 243 float opacity() const { return opacity_; } |
| 243 bool OpacityIsAnimating() const; | 244 bool OpacityIsAnimating() const; |
| 244 bool HasPotentiallyRunningOpacityAnimation() const; | 245 bool HasPotentiallyRunningOpacityAnimation() const; |
| 245 bool OpacityIsAnimatingOnImplOnly() const; | 246 bool OpacityIsAnimatingOnImplOnly() const; |
| 246 | 247 |
| 247 void SetElementId(uint64_t element_id); | 248 void SetElementId(ElementId element_id); |
| 248 uint64_t element_id() const { return element_id_; } | 249 ElementId element_id() const { return element_id_; } |
| 249 | 250 |
| 250 void SetMutableProperties(uint32_t properties); | 251 void SetMutableProperties(uint32_t properties); |
| 251 uint32_t mutable_properties() const { return mutable_properties_; } | 252 uint32_t mutable_properties() const { return mutable_properties_; } |
| 252 | 253 |
| 253 void SetBlendMode(SkXfermode::Mode); | 254 void SetBlendMode(SkXfermode::Mode); |
| 254 SkXfermode::Mode blend_mode() const { return blend_mode_; } | 255 SkXfermode::Mode blend_mode() const { return blend_mode_; } |
| 255 void set_draw_blend_mode(SkXfermode::Mode blend_mode) { | 256 void set_draw_blend_mode(SkXfermode::Mode blend_mode) { |
| 256 if (draw_blend_mode_ == blend_mode) | 257 if (draw_blend_mode_ == blend_mode) |
| 257 return; | 258 return; |
| 258 draw_blend_mode_ = blend_mode; | 259 draw_blend_mode_ = blend_mode; |
| (...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 628 friend class TreeSynchronizer; | 629 friend class TreeSynchronizer; |
| 629 | 630 |
| 630 // Layers that share a sorting context id will be sorted together in 3d | 631 // Layers that share a sorting context id will be sorted together in 3d |
| 631 // space. 0 is a special value that means this layer will not be sorted and | 632 // space. 0 is a special value that means this layer will not be sorted and |
| 632 // will be drawn in paint order. | 633 // will be drawn in paint order. |
| 633 int sorting_context_id_; | 634 int sorting_context_id_; |
| 634 | 635 |
| 635 DrawMode current_draw_mode_; | 636 DrawMode current_draw_mode_; |
| 636 | 637 |
| 637 private: | 638 private: |
| 638 uint64_t element_id_; | 639 ElementId element_id_; |
| 639 uint32_t mutable_properties_; | 640 uint32_t mutable_properties_; |
| 640 // Rect indicating what was repainted/updated during update. | 641 // Rect indicating what was repainted/updated during update. |
| 641 // Note that plugin layers bypass this and leave it empty. | 642 // Note that plugin layers bypass this and leave it empty. |
| 642 // This is in the layer's space. | 643 // This is in the layer's space. |
| 643 gfx::Rect update_rect_; | 644 gfx::Rect update_rect_; |
| 644 | 645 |
| 645 // Denotes an area that is damaged and needs redraw. This is in the layer's | 646 // Denotes an area that is damaged and needs redraw. This is in the layer's |
| 646 // space. | 647 // space. |
| 647 gfx::Rect damage_rect_; | 648 gfx::Rect damage_rect_; |
| 648 | 649 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 661 bool scrolls_drawn_descendant_; | 662 bool scrolls_drawn_descendant_; |
| 662 // If true, the layer or one of its descendants has a touch handler. | 663 // If true, the layer or one of its descendants has a touch handler. |
| 663 bool layer_or_descendant_has_touch_handler_; | 664 bool layer_or_descendant_has_touch_handler_; |
| 664 | 665 |
| 665 DISALLOW_COPY_AND_ASSIGN(LayerImpl); | 666 DISALLOW_COPY_AND_ASSIGN(LayerImpl); |
| 666 }; | 667 }; |
| 667 | 668 |
| 668 } // namespace cc | 669 } // namespace cc |
| 669 | 670 |
| 670 #endif // CC_LAYERS_LAYER_IMPL_H_ | 671 #endif // CC_LAYERS_LAYER_IMPL_H_ |
| OLD | NEW |