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 <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 | 117 |
118 void SetMasksToBounds(bool masks_to_bounds); | 118 void SetMasksToBounds(bool masks_to_bounds); |
119 bool masks_to_bounds() const { return masks_to_bounds_; } | 119 bool masks_to_bounds() const { return masks_to_bounds_; } |
120 | 120 |
121 void SetMaskLayer(Layer* mask_layer); | 121 void SetMaskLayer(Layer* mask_layer); |
122 Layer* mask_layer() { return mask_layer_.get(); } | 122 Layer* mask_layer() { return mask_layer_.get(); } |
123 const Layer* mask_layer() const { return mask_layer_.get(); } | 123 const Layer* mask_layer() const { return mask_layer_.get(); } |
124 | 124 |
125 virtual void SetNeedsDisplayRect(const gfx::RectF& dirty_rect); | 125 virtual void SetNeedsDisplayRect(const gfx::RectF& dirty_rect); |
126 void SetNeedsDisplay() { SetNeedsDisplayRect(gfx::RectF(bounds())); } | 126 void SetNeedsDisplay() { SetNeedsDisplayRect(gfx::RectF(bounds())); } |
| 127 void SetIncludesFirstPaintInvalidation() { |
| 128 includes_first_paint_invalidation_ = true; |
| 129 } |
127 | 130 |
128 void SetOpacity(float opacity); | 131 void SetOpacity(float opacity); |
129 float opacity() const { return opacity_; } | 132 float opacity() const { return opacity_; } |
130 bool OpacityIsAnimating() const; | 133 bool OpacityIsAnimating() const; |
131 virtual bool OpacityCanAnimateOnImplThread() const; | 134 virtual bool OpacityCanAnimateOnImplThread() const; |
132 | 135 |
133 void SetBlendMode(SkXfermode::Mode blend_mode); | 136 void SetBlendMode(SkXfermode::Mode blend_mode); |
134 SkXfermode::Mode blend_mode() const { return blend_mode_; } | 137 SkXfermode::Mode blend_mode() const { return blend_mode_; } |
135 | 138 |
136 bool uses_default_blend_mode() const { | 139 bool uses_default_blend_mode() const { |
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
526 // siblings. | 529 // siblings. |
527 bool stacking_order_changed_; | 530 bool stacking_order_changed_; |
528 | 531 |
529 // The update rect is the region of the compositor resource that was | 532 // The update rect is the region of the compositor resource that was |
530 // actually updated by the compositor. For layers that may do updating | 533 // actually updated by the compositor. For layers that may do updating |
531 // outside the compositor's control (i.e. plugin layers), this information | 534 // outside the compositor's control (i.e. plugin layers), this information |
532 // is not available and the update rect will remain empty. | 535 // is not available and the update rect will remain empty. |
533 // Note this rect is in layer space (not content space). | 536 // Note this rect is in layer space (not content space). |
534 gfx::RectF update_rect_; | 537 gfx::RectF update_rect_; |
535 | 538 |
| 539 bool includes_first_paint_invalidation_; |
| 540 |
536 scoped_refptr<Layer> mask_layer_; | 541 scoped_refptr<Layer> mask_layer_; |
537 | 542 |
538 int layer_id_; | 543 int layer_id_; |
539 | 544 |
540 // When true, the layer is about to perform an update. Any commit requests | 545 // When true, the layer is about to perform an update. Any commit requests |
541 // will be handled implicitly after the update completes. | 546 // will be handled implicitly after the update completes. |
542 bool ignore_set_needs_commit_; | 547 bool ignore_set_needs_commit_; |
543 | 548 |
544 // Layers that share a sorting context id will be sorted together in 3d | 549 // Layers that share a sorting context id will be sorted together in 3d |
545 // space. 0 is a special value that means this layer will not be sorted and | 550 // space. 0 is a special value that means this layer will not be sorted and |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
640 DrawProperties<Layer> draw_properties_; | 645 DrawProperties<Layer> draw_properties_; |
641 | 646 |
642 PaintProperties paint_properties_; | 647 PaintProperties paint_properties_; |
643 | 648 |
644 DISALLOW_COPY_AND_ASSIGN(Layer); | 649 DISALLOW_COPY_AND_ASSIGN(Layer); |
645 }; | 650 }; |
646 | 651 |
647 } // namespace cc | 652 } // namespace cc |
648 | 653 |
649 #endif // CC_LAYERS_LAYER_H_ | 654 #endif // CC_LAYERS_LAYER_H_ |
OLD | NEW |