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 <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
11 #include <vector> | 11 #include <vector> |
12 | 12 |
13 #include "base/basictypes.h" | 13 #include "base/basictypes.h" |
14 #include "base/cancelable_callback.h" | 14 #include "base/cancelable_callback.h" |
15 #include "base/containers/hash_tables.h" | 15 #include "base/containers/hash_tables.h" |
16 #include "base/memory/ref_counted.h" | 16 #include "base/memory/ref_counted.h" |
17 #include "base/memory/scoped_ptr.h" | 17 #include "base/memory/scoped_ptr.h" |
18 #include "base/memory/weak_ptr.h" | 18 #include "base/memory/weak_ptr.h" |
19 #include "base/time/time.h" | 19 #include "base/time/time.h" |
20 #include "base/timer/timer.h" | 20 #include "base/timer/timer.h" |
danakj
2015/09/21 20:49:24
oh.not needed now?
| |
21 #include "cc/animation/animation_events.h" | 21 #include "cc/animation/animation_events.h" |
22 #include "cc/base/cc_export.h" | 22 #include "cc/base/cc_export.h" |
23 #include "cc/base/scoped_ptr_vector.h" | 23 #include "cc/base/scoped_ptr_vector.h" |
24 #include "cc/debug/frame_timing_tracker.h" | 24 #include "cc/debug/frame_timing_tracker.h" |
25 #include "cc/debug/micro_benchmark.h" | 25 #include "cc/debug/micro_benchmark.h" |
26 #include "cc/debug/micro_benchmark_controller.h" | 26 #include "cc/debug/micro_benchmark_controller.h" |
27 #include "cc/input/input_handler.h" | 27 #include "cc/input/input_handler.h" |
28 #include "cc/input/layer_selection_bound.h" | 28 #include "cc/input/layer_selection_bound.h" |
29 #include "cc/input/scrollbar.h" | 29 #include "cc/input/scrollbar.h" |
30 #include "cc/input/top_controls_state.h" | 30 #include "cc/input/top_controls_state.h" |
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
237 void SetThrottleFrameProduction(bool throttle); | 237 void SetThrottleFrameProduction(bool throttle); |
238 | 238 |
239 void StartPageScaleAnimation(const gfx::Vector2d& target_offset, | 239 void StartPageScaleAnimation(const gfx::Vector2d& target_offset, |
240 bool use_anchor, | 240 bool use_anchor, |
241 float scale, | 241 float scale, |
242 base::TimeDelta duration); | 242 base::TimeDelta duration); |
243 | 243 |
244 void ApplyScrollAndScale(ScrollAndScaleSet* info); | 244 void ApplyScrollAndScale(ScrollAndScaleSet* info); |
245 void SetImplTransform(const gfx::Transform& transform); | 245 void SetImplTransform(const gfx::Transform& transform); |
246 | 246 |
247 // Virtual for tests. | |
248 virtual void StartRateLimiter(); | |
249 virtual void StopRateLimiter(); | |
250 | |
251 void RateLimit(); | |
252 | |
253 void SetDeviceScaleFactor(float device_scale_factor); | 247 void SetDeviceScaleFactor(float device_scale_factor); |
254 float device_scale_factor() const { return device_scale_factor_; } | 248 float device_scale_factor() const { return device_scale_factor_; } |
255 | 249 |
256 void UpdateTopControlsState(TopControlsState constraints, | 250 void UpdateTopControlsState(TopControlsState constraints, |
257 TopControlsState current, | 251 TopControlsState current, |
258 bool animate); | 252 bool animate); |
259 | 253 |
260 HeadsUpDisplayLayer* hud_layer() const { return hud_layer_.get(); } | 254 HeadsUpDisplayLayer* hud_layer() const { return hud_layer_.get(); } |
261 | 255 |
262 Proxy* proxy() const { return proxy_.get(); } | 256 Proxy* proxy() const { return proxy_.get(); } |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
417 typedef std::vector<UIResourceRequest> UIResourceRequestQueue; | 411 typedef std::vector<UIResourceRequest> UIResourceRequestQueue; |
418 UIResourceRequestQueue ui_resource_request_queue_; | 412 UIResourceRequestQueue ui_resource_request_queue_; |
419 | 413 |
420 void RecordGpuRasterizationHistogram(); | 414 void RecordGpuRasterizationHistogram(); |
421 void CalculateLCDTextMetricsCallback(Layer* layer); | 415 void CalculateLCDTextMetricsCallback(Layer* layer); |
422 | 416 |
423 void NotifySwapPromiseMonitorsOfSetNeedsCommit(); | 417 void NotifySwapPromiseMonitorsOfSetNeedsCommit(); |
424 | 418 |
425 void SetPropertyTreesNeedRebuild(); | 419 void SetPropertyTreesNeedRebuild(); |
426 | 420 |
427 bool inside_begin_main_frame_; | |
428 bool needs_full_tree_sync_; | 421 bool needs_full_tree_sync_; |
429 bool needs_meta_info_recomputation_; | 422 bool needs_meta_info_recomputation_; |
430 | 423 |
431 LayerTreeHostClient* client_; | 424 LayerTreeHostClient* client_; |
432 scoped_ptr<Proxy> proxy_; | 425 scoped_ptr<Proxy> proxy_; |
433 | 426 |
434 int source_frame_number_; | 427 int source_frame_number_; |
435 int meta_information_sequence_number_; | 428 int meta_information_sequence_number_; |
436 scoped_ptr<RenderingStatsInstrumentation> rendering_stats_instrumentation_; | 429 scoped_ptr<RenderingStatsInstrumentation> rendering_stats_instrumentation_; |
437 | 430 |
(...skipping 10 matching lines...) Expand all Loading... | |
448 | 441 |
449 gfx::Size device_viewport_size_; | 442 gfx::Size device_viewport_size_; |
450 bool top_controls_shrink_blink_size_; | 443 bool top_controls_shrink_blink_size_; |
451 float top_controls_height_; | 444 float top_controls_height_; |
452 float top_controls_shown_ratio_; | 445 float top_controls_shown_ratio_; |
453 bool hide_pinch_scrollbars_near_min_scale_; | 446 bool hide_pinch_scrollbars_near_min_scale_; |
454 float device_scale_factor_; | 447 float device_scale_factor_; |
455 | 448 |
456 bool visible_; | 449 bool visible_; |
457 | 450 |
458 base::OneShotTimer<LayerTreeHost> rate_limit_timer_; | |
459 | |
460 float page_scale_factor_; | 451 float page_scale_factor_; |
461 float min_page_scale_factor_; | 452 float min_page_scale_factor_; |
462 float max_page_scale_factor_; | 453 float max_page_scale_factor_; |
463 gfx::Vector2dF elastic_overscroll_; | 454 gfx::Vector2dF elastic_overscroll_; |
464 bool has_gpu_rasterization_trigger_; | 455 bool has_gpu_rasterization_trigger_; |
465 bool content_is_suitable_for_gpu_rasterization_; | 456 bool content_is_suitable_for_gpu_rasterization_; |
466 bool gpu_rasterization_histogram_recorded_; | 457 bool gpu_rasterization_histogram_recorded_; |
467 | 458 |
468 SkColor background_color_; | 459 SkColor background_color_; |
469 bool has_transparent_background_; | 460 bool has_transparent_background_; |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
503 | 494 |
504 uint32_t surface_id_namespace_; | 495 uint32_t surface_id_namespace_; |
505 uint32_t next_surface_sequence_; | 496 uint32_t next_surface_sequence_; |
506 | 497 |
507 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); | 498 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); |
508 }; | 499 }; |
509 | 500 |
510 } // namespace cc | 501 } // namespace cc |
511 | 502 |
512 #endif // CC_TREES_LAYER_TREE_HOST_H_ | 503 #endif // CC_TREES_LAYER_TREE_HOST_H_ |
OLD | NEW |