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 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
230 std::numeric_limits<size_t>::max(); | 230 std::numeric_limits<size_t>::max(); |
231 } | 231 } |
232 bool RequestPartialTextureUpdate(); | 232 bool RequestPartialTextureUpdate(); |
233 | 233 |
234 void SetDeviceScaleFactor(float device_scale_factor); | 234 void SetDeviceScaleFactor(float device_scale_factor); |
235 float device_scale_factor() const { return device_scale_factor_; } | 235 float device_scale_factor() const { return device_scale_factor_; } |
236 | 236 |
237 void UpdateTopControlsState(TopControlsState constraints, | 237 void UpdateTopControlsState(TopControlsState constraints, |
238 TopControlsState current, | 238 TopControlsState current, |
239 bool animate); | 239 bool animate); |
| 240 void UpdateTopControlsStatePreservingConstraints(bool show); |
240 | 241 |
241 HeadsUpDisplayLayer* hud_layer() const { return hud_layer_.get(); } | 242 HeadsUpDisplayLayer* hud_layer() const { return hud_layer_.get(); } |
242 | 243 |
243 Proxy* proxy() const { return proxy_.get(); } | 244 Proxy* proxy() const { return proxy_.get(); } |
244 | 245 |
245 AnimationRegistrar* animation_registrar() const { | 246 AnimationRegistrar* animation_registrar() const { |
246 return animation_registrar_.get(); | 247 return animation_registrar_.get(); |
247 } | 248 } |
248 | 249 |
249 skia::RefPtr<SkPicture> CapturePicture(); | 250 skia::RefPtr<SkPicture> CapturePicture(); |
250 | 251 |
251 bool BlocksPendingCommit() const; | 252 bool BlocksPendingCommit() const; |
252 | 253 |
253 // Obtains a thorough dump of the LayerTreeHost as a value. | 254 // Obtains a thorough dump of the LayerTreeHost as a value. |
254 scoped_ptr<base::Value> AsValue() const; | 255 scoped_ptr<base::Value> AsValue() const; |
255 | 256 |
256 bool in_paint_layer_contents() const { return in_paint_layer_contents_; } | 257 bool in_paint_layer_contents() const { return in_paint_layer_contents_; } |
257 | 258 |
| 259 |
258 void IncrementLCDTextMetrics( | 260 void IncrementLCDTextMetrics( |
259 bool update_total_num_cc_layers_can_use_lcd_text, | 261 bool update_total_num_cc_layers_can_use_lcd_text, |
260 bool update_total_num_cc_layers_will_use_lcd_text); | 262 bool update_total_num_cc_layers_will_use_lcd_text); |
261 | 263 |
262 protected: | 264 protected: |
263 LayerTreeHost(LayerTreeHostClient* client, const LayerTreeSettings& settings); | 265 LayerTreeHost(LayerTreeHostClient* client, const LayerTreeSettings& settings); |
264 bool Initialize(scoped_ptr<Thread> impl_thread); | 266 bool Initialize(scoped_ptr<Thread> impl_thread); |
265 bool InitializeForTesting(scoped_ptr<Proxy> proxy_for_testing); | 267 bool InitializeForTesting(scoped_ptr<Proxy> proxy_for_testing); |
266 | 268 |
267 private: | 269 private: |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
364 int64 total_num_cc_layers_will_use_lcd_text; | 366 int64 total_num_cc_layers_will_use_lcd_text; |
365 }; | 367 }; |
366 LCDTextMetrics lcd_text_metrics_; | 368 LCDTextMetrics lcd_text_metrics_; |
367 | 369 |
368 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); | 370 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); |
369 }; | 371 }; |
370 | 372 |
371 } // namespace cc | 373 } // namespace cc |
372 | 374 |
373 #endif // CC_TREES_LAYER_TREE_HOST_H_ | 375 #endif // CC_TREES_LAYER_TREE_HOST_H_ |
OLD | NEW |