| 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 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 bool is_clipped() const { return draw_properties_.is_clipped; } | 146 bool is_clipped() const { return draw_properties_.is_clipped; } |
| 147 | 147 |
| 148 void UpdatePropertyTreeTransform(); | 148 void UpdatePropertyTreeTransform(); |
| 149 void UpdatePropertyTreeTransformIsAnimated(bool is_animated); | 149 void UpdatePropertyTreeTransformIsAnimated(bool is_animated); |
| 150 void UpdatePropertyTreeOpacity(); | 150 void UpdatePropertyTreeOpacity(); |
| 151 void UpdatePropertyTreeScrollOffset(); | 151 void UpdatePropertyTreeScrollOffset(); |
| 152 | 152 |
| 153 // For compatibility with Layer. | 153 // For compatibility with Layer. |
| 154 bool has_render_surface() const { return !!render_surface(); } | 154 bool has_render_surface() const { return !!render_surface(); } |
| 155 | 155 |
| 156 void PassCopyRequests( | |
| 157 std::vector<std::unique_ptr<CopyOutputRequest>>* requests); | |
| 158 // Can only be called when the layer has a copy request. | |
| 159 void TakeCopyRequestsAndTransformToTarget( | |
| 160 std::vector<std::unique_ptr<CopyOutputRequest>>* request); | |
| 161 bool HasCopyRequest() const { return !copy_requests_.empty(); } | |
| 162 | |
| 163 void SetMaskLayer(std::unique_ptr<LayerImpl> mask_layer); | 156 void SetMaskLayer(std::unique_ptr<LayerImpl> mask_layer); |
| 164 LayerImpl* mask_layer() { return mask_layer_; } | 157 LayerImpl* mask_layer() { return mask_layer_; } |
| 165 const LayerImpl* mask_layer() const { return mask_layer_; } | 158 const LayerImpl* mask_layer() const { return mask_layer_; } |
| 166 std::unique_ptr<LayerImpl> TakeMaskLayer(); | 159 std::unique_ptr<LayerImpl> TakeMaskLayer(); |
| 167 | 160 |
| 168 void SetReplicaLayer(std::unique_ptr<LayerImpl> replica_layer); | 161 void SetReplicaLayer(std::unique_ptr<LayerImpl> replica_layer); |
| 169 LayerImpl* replica_layer() { return replica_layer_; } | 162 LayerImpl* replica_layer() { return replica_layer_; } |
| 170 const LayerImpl* replica_layer() const { return replica_layer_; } | 163 const LayerImpl* replica_layer() const { return replica_layer_; } |
| 171 std::unique_ptr<LayerImpl> TakeReplicaLayer(); | 164 std::unique_ptr<LayerImpl> TakeReplicaLayer(); |
| 172 | 165 |
| (...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 632 uint32_t mutable_properties_; | 625 uint32_t mutable_properties_; |
| 633 // Rect indicating what was repainted/updated during update. | 626 // Rect indicating what was repainted/updated during update. |
| 634 // Note that plugin layers bypass this and leave it empty. | 627 // Note that plugin layers bypass this and leave it empty. |
| 635 // This is in the layer's space. | 628 // This is in the layer's space. |
| 636 gfx::Rect update_rect_; | 629 gfx::Rect update_rect_; |
| 637 | 630 |
| 638 // Denotes an area that is damaged and needs redraw. This is in the layer's | 631 // Denotes an area that is damaged and needs redraw. This is in the layer's |
| 639 // space. | 632 // space. |
| 640 gfx::Rect damage_rect_; | 633 gfx::Rect damage_rect_; |
| 641 | 634 |
| 642 std::vector<std::unique_ptr<CopyOutputRequest>> copy_requests_; | |
| 643 | |
| 644 // Group of properties that need to be computed based on the layer tree | 635 // Group of properties that need to be computed based on the layer tree |
| 645 // hierarchy before layers can be drawn. | 636 // hierarchy before layers can be drawn. |
| 646 DrawProperties draw_properties_; | 637 DrawProperties draw_properties_; |
| 647 PerformanceProperties<LayerImpl> performance_properties_; | 638 PerformanceProperties<LayerImpl> performance_properties_; |
| 648 | 639 |
| 649 std::unique_ptr<base::trace_event::ConvertableToTraceFormat> | 640 std::unique_ptr<base::trace_event::ConvertableToTraceFormat> |
| 650 owned_debug_info_; | 641 owned_debug_info_; |
| 651 base::trace_event::ConvertableToTraceFormat* debug_info_; | 642 base::trace_event::ConvertableToTraceFormat* debug_info_; |
| 652 std::unique_ptr<RenderSurfaceImpl> render_surface_; | 643 std::unique_ptr<RenderSurfaceImpl> render_surface_; |
| 653 | 644 |
| 654 bool scrolls_drawn_descendant_; | 645 bool scrolls_drawn_descendant_; |
| 655 bool has_will_change_transform_hint_; | 646 bool has_will_change_transform_hint_; |
| 656 | 647 |
| 657 DISALLOW_COPY_AND_ASSIGN(LayerImpl); | 648 DISALLOW_COPY_AND_ASSIGN(LayerImpl); |
| 658 }; | 649 }; |
| 659 | 650 |
| 660 } // namespace cc | 651 } // namespace cc |
| 661 | 652 |
| 662 #endif // CC_LAYERS_LAYER_IMPL_H_ | 653 #endif // CC_LAYERS_LAYER_IMPL_H_ |
| OLD | NEW |