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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 SkColor background_color() const { return background_color_; } | 114 SkColor background_color() const { return background_color_; } |
115 void set_background_color(SkColor color) { background_color_ = color; } | 115 void set_background_color(SkColor color) { background_color_ = color; } |
116 | 116 |
117 bool has_transparent_background() const { | 117 bool has_transparent_background() const { |
118 return has_transparent_background_; | 118 return has_transparent_background_; |
119 } | 119 } |
120 void set_has_transparent_background(bool transparent) { | 120 void set_has_transparent_background(bool transparent) { |
121 has_transparent_background_ = transparent; | 121 has_transparent_background_ = transparent; |
122 } | 122 } |
123 | 123 |
124 enum UpdateDrawPropertiesReason { | |
125 UPDATE_PENDING_TREE, | |
126 UPDATE_ACTIVE_TREE, | |
127 UPDATE_ACTIVE_TREE_FOR_DRAW | |
128 }; | |
129 | |
130 gfx::Transform ImplTransform() const; | 124 gfx::Transform ImplTransform() const; |
131 | 125 |
132 void SetPageScaleFactorAndLimits(float page_scale_factor, | 126 void SetPageScaleFactorAndLimits(float page_scale_factor, |
133 float min_page_scale_factor, float max_page_scale_factor); | 127 float min_page_scale_factor, float max_page_scale_factor); |
134 void SetPageScaleDelta(float delta); | 128 void SetPageScaleDelta(float delta); |
135 float total_page_scale_factor() const { | 129 float total_page_scale_factor() const { |
136 return page_scale_factor_ * page_scale_delta_; | 130 return page_scale_factor_ * page_scale_delta_; |
137 } | 131 } |
138 float page_scale_factor() const { return page_scale_factor_; } | 132 float page_scale_factor() const { return page_scale_factor_; } |
139 float min_page_scale_factor() const { return min_page_scale_factor_; } | 133 float min_page_scale_factor() const { return min_page_scale_factor_; } |
140 float max_page_scale_factor() const { return max_page_scale_factor_; } | 134 float max_page_scale_factor() const { return max_page_scale_factor_; } |
141 float page_scale_delta() const { return page_scale_delta_; } | 135 float page_scale_delta() const { return page_scale_delta_; } |
142 void set_sent_page_scale_delta(float delta) { | 136 void set_sent_page_scale_delta(float delta) { |
143 sent_page_scale_delta_ = delta; | 137 sent_page_scale_delta_ = delta; |
144 } | 138 } |
145 float sent_page_scale_delta() const { return sent_page_scale_delta_; } | 139 float sent_page_scale_delta() const { return sent_page_scale_delta_; } |
146 | 140 |
147 // Updates draw properties and render surface layer list | 141 // Updates draw properties and render surface layer list, as well as tile |
148 void UpdateDrawProperties(UpdateDrawPropertiesReason reason); | 142 // priorities. |
| 143 void UpdateDrawProperties(); |
| 144 |
149 void set_needs_update_draw_properties() { | 145 void set_needs_update_draw_properties() { |
150 needs_update_draw_properties_ = true; | 146 needs_update_draw_properties_ = true; |
151 } | 147 } |
152 bool needs_update_draw_properties() const { | 148 bool needs_update_draw_properties() const { |
153 return needs_update_draw_properties_; | 149 return needs_update_draw_properties_; |
154 } | 150 } |
155 | 151 |
156 void set_needs_full_tree_sync(bool needs) { needs_full_tree_sync_ = needs; } | 152 void set_needs_full_tree_sync(bool needs) { needs_full_tree_sync_ = needs; } |
157 bool needs_full_tree_sync() const { return needs_full_tree_sync_; } | 153 bool needs_full_tree_sync() const { return needs_full_tree_sync_; } |
158 | 154 |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
255 bool needs_full_tree_sync_; | 251 bool needs_full_tree_sync_; |
256 | 252 |
257 LatencyInfo latency_info_; | 253 LatencyInfo latency_info_; |
258 | 254 |
259 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl); | 255 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl); |
260 }; | 256 }; |
261 | 257 |
262 } // namespace cc | 258 } // namespace cc |
263 | 259 |
264 #endif // CC_TREES_LAYER_TREE_IMPL_H_ | 260 #endif // CC_TREES_LAYER_TREE_IMPL_H_ |
OLD | NEW |