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_TREES_LAYER_TREE_HOST_H_ | 5 #ifndef CC_TREES_LAYER_TREE_HOST_H_ |
6 #define CC_TREES_LAYER_TREE_HOST_H_ | 6 #define CC_TREES_LAYER_TREE_HOST_H_ |
7 | 7 |
8 #include <limits> | 8 #include <limits> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 | 160 |
161 void CollectRenderingStats(RenderingStats* stats) const; | 161 void CollectRenderingStats(RenderingStats* stats) const; |
162 | 162 |
163 RenderingStatsInstrumentation* rendering_stats_instrumentation() const { | 163 RenderingStatsInstrumentation* rendering_stats_instrumentation() const { |
164 return rendering_stats_instrumentation_.get(); | 164 return rendering_stats_instrumentation_.get(); |
165 } | 165 } |
166 | 166 |
167 const RendererCapabilities& GetRendererCapabilities() const; | 167 const RendererCapabilities& GetRendererCapabilities() const; |
168 | 168 |
169 void SetNeedsAnimate(); | 169 void SetNeedsAnimate(); |
| 170 virtual void SetNeedsUpdateLayers(); |
170 virtual void SetNeedsCommit(); | 171 virtual void SetNeedsCommit(); |
171 virtual void SetNeedsFullTreeSync(); | 172 virtual void SetNeedsFullTreeSync(); |
172 void SetNeedsRedraw(); | 173 void SetNeedsRedraw(); |
173 void SetNeedsRedrawRect(gfx::Rect damage_rect); | 174 void SetNeedsRedrawRect(gfx::Rect damage_rect); |
174 bool CommitRequested() const; | 175 bool CommitRequested() const; |
175 | 176 |
176 void SetAnimationEvents(scoped_ptr<AnimationEventsVector> events, | 177 void SetAnimationEvents(scoped_ptr<AnimationEventsVector> events, |
177 base::Time wall_clock_time); | 178 base::Time wall_clock_time); |
178 | 179 |
179 void SetRootLayer(scoped_refptr<Layer> root_layer); | 180 void SetRootLayer(scoped_refptr<Layer> root_layer); |
180 Layer* root_layer() { return root_layer_.get(); } | 181 Layer* root_layer() { return root_layer_.get(); } |
181 const Layer* root_layer() const { return root_layer_.get(); } | 182 const Layer* root_layer() const { return root_layer_.get(); } |
182 | 183 |
183 const LayerTreeSettings& settings() const { return settings_; } | 184 const LayerTreeSettings& settings() const { return settings_; } |
184 | 185 |
185 void SetDebugState(const LayerTreeDebugState& debug_state); | 186 void SetDebugState(const LayerTreeDebugState& debug_state); |
186 const LayerTreeDebugState& debug_state() const { return debug_state_; } | 187 const LayerTreeDebugState& debug_state() const { return debug_state_; } |
187 | 188 |
188 void SetViewportSize(gfx::Size device_viewport_size); | 189 void SetViewportSize(gfx::Size device_viewport_size); |
189 void SetOverdrawBottomHeight(float overdraw_bottom_height); | 190 void SetOverdrawBottomHeight(float overdraw_bottom_height); |
190 | 191 |
191 gfx::Size device_viewport_size() const { return device_viewport_size_; } | 192 gfx::Size device_viewport_size() const { return device_viewport_size_; } |
192 float overdraw_bottom_height() const { return overdraw_bottom_height_; } | 193 float overdraw_bottom_height() const { return overdraw_bottom_height_; } |
193 | 194 |
| 195 void ApplyPageScaleDeltaFromImplSide(float page_scale_delta); |
194 void SetPageScaleFactorAndLimits(float page_scale_factor, | 196 void SetPageScaleFactorAndLimits(float page_scale_factor, |
195 float min_page_scale_factor, | 197 float min_page_scale_factor, |
196 float max_page_scale_factor); | 198 float max_page_scale_factor); |
197 float page_scale_factor() const { return page_scale_factor_; } | 199 float page_scale_factor() const { return page_scale_factor_; } |
198 | 200 |
199 SkColor background_color() const { return background_color_; } | 201 SkColor background_color() const { return background_color_; } |
200 void set_background_color(SkColor color) { background_color_ = color; } | 202 void set_background_color(SkColor color) { background_color_ = color; } |
201 | 203 |
202 void set_has_transparent_background(bool transparent) { | 204 void set_has_transparent_background(bool transparent) { |
203 has_transparent_background_ = transparent; | 205 has_transparent_background_ = transparent; |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
368 int64 total_num_cc_layers_will_use_lcd_text; | 370 int64 total_num_cc_layers_will_use_lcd_text; |
369 }; | 371 }; |
370 LCDTextMetrics lcd_text_metrics_; | 372 LCDTextMetrics lcd_text_metrics_; |
371 | 373 |
372 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); | 374 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); |
373 }; | 375 }; |
374 | 376 |
375 } // namespace cc | 377 } // namespace cc |
376 | 378 |
377 #endif // CC_TREES_LAYER_TREE_HOST_H_ | 379 #endif // CC_TREES_LAYER_TREE_HOST_H_ |
OLD | NEW |