| 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 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 408 struct PendingPageScaleAnimation { | 406 struct PendingPageScaleAnimation { |
| 409 gfx::Vector2d target_offset; | 407 gfx::Vector2d target_offset; |
| 410 bool use_anchor; | 408 bool use_anchor; |
| 411 float scale; | 409 float scale; |
| 412 base::TimeDelta duration; | 410 base::TimeDelta duration; |
| 413 }; | 411 }; |
| 414 scoped_ptr<PendingPageScaleAnimation> pending_page_scale_animation_; | 412 scoped_ptr<PendingPageScaleAnimation> pending_page_scale_animation_; |
| 415 | 413 |
| 416 bool in_paint_layer_contents_; | 414 bool in_paint_layer_contents_; |
| 417 | 415 |
| 418 ui::LatencyInfo latency_info_; | |
| 419 | |
| 420 static const int kTotalFramesToUseForLCDTextMetrics = 50; | 416 static const int kTotalFramesToUseForLCDTextMetrics = 50; |
| 421 int total_frames_used_for_lcd_text_metrics_; | 417 int total_frames_used_for_lcd_text_metrics_; |
| 422 | 418 |
| 423 struct LCDTextMetrics { | 419 struct LCDTextMetrics { |
| 424 LCDTextMetrics() | 420 LCDTextMetrics() |
| 425 : total_num_cc_layers(0), | 421 : total_num_cc_layers(0), |
| 426 total_num_cc_layers_can_use_lcd_text(0), | 422 total_num_cc_layers_can_use_lcd_text(0), |
| 427 total_num_cc_layers_will_use_lcd_text(0) {} | 423 total_num_cc_layers_will_use_lcd_text(0) {} |
| 428 | 424 |
| 429 int64 total_num_cc_layers; | 425 int64 total_num_cc_layers; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 441 SharedBitmapManager* shared_bitmap_manager_; | 437 SharedBitmapManager* shared_bitmap_manager_; |
| 442 | 438 |
| 443 ScopedPtrVector<SwapPromise> swap_promise_list_; | 439 ScopedPtrVector<SwapPromise> swap_promise_list_; |
| 444 | 440 |
| 445 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); | 441 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); |
| 446 }; | 442 }; |
| 447 | 443 |
| 448 } // namespace cc | 444 } // namespace cc |
| 449 | 445 |
| 450 #endif // CC_TREES_LAYER_TREE_HOST_H_ | 446 #endif // CC_TREES_LAYER_TREE_HOST_H_ |
| OLD | NEW |