Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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_TREES_LAYER_TREE_IMPL_H_ | 5 #ifndef CC_TREES_LAYER_TREE_IMPL_H_ |
| 6 #define CC_TREES_LAYER_TREE_IMPL_H_ | 6 #define CC_TREES_LAYER_TREE_IMPL_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 112 SkColor background_color() const { return background_color_; } | 112 SkColor background_color() const { return background_color_; } |
| 113 void set_background_color(SkColor color) { background_color_ = color; } | 113 void set_background_color(SkColor color) { background_color_ = color; } |
| 114 | 114 |
| 115 bool has_transparent_background() const { | 115 bool has_transparent_background() const { |
| 116 return has_transparent_background_; | 116 return has_transparent_background_; |
| 117 } | 117 } |
| 118 void set_has_transparent_background(bool transparent) { | 118 void set_has_transparent_background(bool transparent) { |
| 119 has_transparent_background_ = transparent; | 119 has_transparent_background_ = transparent; |
| 120 } | 120 } |
| 121 | 121 |
| 122 enum UpdateDrawPropertiesReason { | |
|
enne (OOO)
2013/04/22 17:03:48
<3
| |
| 123 UPDATE_PENDING_TREE, | |
| 124 UPDATE_ACTIVE_TREE, | |
| 125 UPDATE_ACTIVE_TREE_FOR_DRAW | |
| 126 }; | |
| 127 | |
| 128 gfx::Transform ImplTransform() const; | 122 gfx::Transform ImplTransform() const; |
| 129 | 123 |
| 130 void SetPageScaleFactorAndLimits(float page_scale_factor, | 124 void SetPageScaleFactorAndLimits(float page_scale_factor, |
| 131 float min_page_scale_factor, float max_page_scale_factor); | 125 float min_page_scale_factor, float max_page_scale_factor); |
| 132 void SetPageScaleDelta(float delta); | 126 void SetPageScaleDelta(float delta); |
| 133 float total_page_scale_factor() const { | 127 float total_page_scale_factor() const { |
| 134 return page_scale_factor_ * page_scale_delta_; | 128 return page_scale_factor_ * page_scale_delta_; |
| 135 } | 129 } |
| 136 float page_scale_factor() const { return page_scale_factor_; } | 130 float page_scale_factor() const { return page_scale_factor_; } |
| 137 float min_page_scale_factor() const { return min_page_scale_factor_; } | 131 float min_page_scale_factor() const { return min_page_scale_factor_; } |
| 138 float max_page_scale_factor() const { return max_page_scale_factor_; } | 132 float max_page_scale_factor() const { return max_page_scale_factor_; } |
| 139 float page_scale_delta() const { return page_scale_delta_; } | 133 float page_scale_delta() const { return page_scale_delta_; } |
| 140 void set_sent_page_scale_delta(float delta) { | 134 void set_sent_page_scale_delta(float delta) { |
| 141 sent_page_scale_delta_ = delta; | 135 sent_page_scale_delta_ = delta; |
| 142 } | 136 } |
| 143 float sent_page_scale_delta() const { return sent_page_scale_delta_; } | 137 float sent_page_scale_delta() const { return sent_page_scale_delta_; } |
| 144 | 138 |
| 145 // Updates draw properties and render surface layer list | 139 // Updates draw properties and render surface layer list, as well as tile |
| 146 void UpdateDrawProperties(UpdateDrawPropertiesReason reason); | 140 // priorities. |
| 141 void UpdateDrawProperties(); | |
| 142 | |
| 147 void set_needs_update_draw_properties() { | 143 void set_needs_update_draw_properties() { |
| 148 needs_update_draw_properties_ = true; | 144 needs_update_draw_properties_ = true; |
| 149 } | 145 } |
| 150 bool needs_update_draw_properties() const { | 146 bool needs_update_draw_properties() const { |
| 151 return needs_update_draw_properties_; | 147 return needs_update_draw_properties_; |
| 152 } | 148 } |
| 153 | 149 |
| 154 void set_needs_full_tree_sync(bool needs) { needs_full_tree_sync_ = needs; } | 150 void set_needs_full_tree_sync(bool needs) { needs_full_tree_sync_ = needs; } |
| 155 bool needs_full_tree_sync() const { return needs_full_tree_sync_; } | 151 bool needs_full_tree_sync() const { return needs_full_tree_sync_; } |
| 156 | 152 |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 241 LayerImplList render_surface_layer_list_; | 237 LayerImplList render_surface_layer_list_; |
| 242 | 238 |
| 243 bool contents_textures_purged_; | 239 bool contents_textures_purged_; |
| 244 bool viewport_size_invalid_; | 240 bool viewport_size_invalid_; |
| 245 bool needs_update_draw_properties_; | 241 bool needs_update_draw_properties_; |
| 246 | 242 |
| 247 // In impl-side painting mode, this is true when the tree may contain | 243 // In impl-side painting mode, this is true when the tree may contain |
| 248 // structural differences relative to the active tree. | 244 // structural differences relative to the active tree. |
| 249 bool needs_full_tree_sync_; | 245 bool needs_full_tree_sync_; |
| 250 | 246 |
| 247 base::TimeTicks frame_time_last_update_tile_priorities_; | |
| 248 | |
| 251 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl); | 249 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl); |
| 252 }; | 250 }; |
| 253 | 251 |
| 254 } // namespace cc | 252 } // namespace cc |
| 255 | 253 |
| 256 #endif // CC_TREES_LAYER_TREE_IMPL_H_ | 254 #endif // CC_TREES_LAYER_TREE_IMPL_H_ |
| OLD | NEW |