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 <list> | 9 #include <list> |
10 #include <string> | 10 #include <string> |
(...skipping 19 matching lines...) Expand all Loading... |
30 #include "cc/layers/layer_lists.h" | 30 #include "cc/layers/layer_lists.h" |
31 #include "cc/output/output_surface.h" | 31 #include "cc/output/output_surface.h" |
32 #include "cc/resources/resource_format.h" | 32 #include "cc/resources/resource_format.h" |
33 #include "cc/resources/scoped_ui_resource.h" | 33 #include "cc/resources/scoped_ui_resource.h" |
34 #include "cc/trees/layer_tree_host_client.h" | 34 #include "cc/trees/layer_tree_host_client.h" |
35 #include "cc/trees/layer_tree_host_common.h" | 35 #include "cc/trees/layer_tree_host_common.h" |
36 #include "cc/trees/layer_tree_settings.h" | 36 #include "cc/trees/layer_tree_settings.h" |
37 #include "cc/trees/occlusion_tracker.h" | 37 #include "cc/trees/occlusion_tracker.h" |
38 #include "cc/trees/proxy.h" | 38 #include "cc/trees/proxy.h" |
39 #include "third_party/skia/include/core/SkColor.h" | 39 #include "third_party/skia/include/core/SkColor.h" |
40 #include "ui/events/latency_info.h" | |
41 #include "ui/gfx/rect.h" | 40 #include "ui/gfx/rect.h" |
42 | 41 |
43 namespace cc { | 42 namespace cc { |
44 | 43 |
45 class AnimationRegistrar; | 44 class AnimationRegistrar; |
46 class HeadsUpDisplayLayer; | 45 class HeadsUpDisplayLayer; |
47 class Layer; | 46 class Layer; |
48 class LayerTreeHostImpl; | 47 class LayerTreeHostImpl; |
49 class LayerTreeHostImplClient; | 48 class LayerTreeHostImplClient; |
50 class LayerTreeHostSingleThreadClient; | 49 class LayerTreeHostSingleThreadClient; |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
226 bool visible() const { return visible_; } | 225 bool visible() const { return visible_; } |
227 | 226 |
228 void StartPageScaleAnimation(gfx::Vector2d target_offset, | 227 void StartPageScaleAnimation(gfx::Vector2d target_offset, |
229 bool use_anchor, | 228 bool use_anchor, |
230 float scale, | 229 float scale, |
231 base::TimeDelta duration); | 230 base::TimeDelta duration); |
232 | 231 |
233 void ApplyScrollAndScale(const ScrollAndScaleSet& info); | 232 void ApplyScrollAndScale(const ScrollAndScaleSet& info); |
234 | 233 |
235 void SetImplTransform(const gfx::Transform& transform); | 234 void SetImplTransform(const gfx::Transform& transform); |
236 void SetLatencyInfo(const ui::LatencyInfo& latency_info); | |
237 | 235 |
238 // Virtual for tests. | 236 // Virtual for tests. |
239 virtual void StartRateLimiter(); | 237 virtual void StartRateLimiter(); |
240 virtual void StopRateLimiter(); | 238 virtual void StopRateLimiter(); |
241 | 239 |
242 void RateLimit(); | 240 void RateLimit(); |
243 | 241 |
244 bool AlwaysUsePartialTextureUpdates(); | 242 bool AlwaysUsePartialTextureUpdates(); |
245 size_t MaxPartialTextureUpdates() const; | 243 size_t MaxPartialTextureUpdates() const; |
246 bool RequestPartialTextureUpdate(); | 244 bool RequestPartialTextureUpdate(); |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
410 struct PendingPageScaleAnimation { | 408 struct PendingPageScaleAnimation { |
411 gfx::Vector2d target_offset; | 409 gfx::Vector2d target_offset; |
412 bool use_anchor; | 410 bool use_anchor; |
413 float scale; | 411 float scale; |
414 base::TimeDelta duration; | 412 base::TimeDelta duration; |
415 }; | 413 }; |
416 scoped_ptr<PendingPageScaleAnimation> pending_page_scale_animation_; | 414 scoped_ptr<PendingPageScaleAnimation> pending_page_scale_animation_; |
417 | 415 |
418 bool in_paint_layer_contents_; | 416 bool in_paint_layer_contents_; |
419 | 417 |
420 ui::LatencyInfo latency_info_; | |
421 | |
422 static const int kTotalFramesToUseForLCDTextMetrics = 50; | 418 static const int kTotalFramesToUseForLCDTextMetrics = 50; |
423 int total_frames_used_for_lcd_text_metrics_; | 419 int total_frames_used_for_lcd_text_metrics_; |
424 | 420 |
425 struct LCDTextMetrics { | 421 struct LCDTextMetrics { |
426 LCDTextMetrics() | 422 LCDTextMetrics() |
427 : total_num_cc_layers(0), | 423 : total_num_cc_layers(0), |
428 total_num_cc_layers_can_use_lcd_text(0), | 424 total_num_cc_layers_can_use_lcd_text(0), |
429 total_num_cc_layers_will_use_lcd_text(0) {} | 425 total_num_cc_layers_will_use_lcd_text(0) {} |
430 | 426 |
431 int64 total_num_cc_layers; | 427 int64 total_num_cc_layers; |
(...skipping 11 matching lines...) Expand all Loading... |
443 SharedBitmapManager* shared_bitmap_manager_; | 439 SharedBitmapManager* shared_bitmap_manager_; |
444 | 440 |
445 ScopedPtrVector<SwapPromise> swap_promise_list_; | 441 ScopedPtrVector<SwapPromise> swap_promise_list_; |
446 | 442 |
447 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); | 443 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); |
448 }; | 444 }; |
449 | 445 |
450 } // namespace cc | 446 } // namespace cc |
451 | 447 |
452 #endif // CC_TREES_LAYER_TREE_HOST_H_ | 448 #endif // CC_TREES_LAYER_TREE_HOST_H_ |
OLD | NEW |