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 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "base/cancelable_callback.h" | 12 #include "base/cancelable_callback.h" |
13 #include "base/hash_tables.h" | 13 #include "base/hash_tables.h" |
14 #include "base/memory/ref_counted.h" | 14 #include "base/memory/ref_counted.h" |
15 #include "base/memory/scoped_ptr.h" | 15 #include "base/memory/scoped_ptr.h" |
16 #include "base/memory/weak_ptr.h" | 16 #include "base/memory/weak_ptr.h" |
17 #include "base/time.h" | 17 #include "base/time.h" |
18 #include "cc/animation/animation_events.h" | 18 #include "cc/animation/animation_events.h" |
19 #include "cc/base/cc_export.h" | 19 #include "cc/base/cc_export.h" |
20 #include "cc/base/scoped_ptr_vector.h" | 20 #include "cc/base/scoped_ptr_vector.h" |
21 #include "cc/debug/latency_info.h" | |
22 #include "cc/layers/layer_lists.h" | 21 #include "cc/layers/layer_lists.h" |
23 #include "cc/output/output_surface.h" | 22 #include "cc/output/output_surface.h" |
24 #include "cc/scheduler/rate_limiter.h" | 23 #include "cc/scheduler/rate_limiter.h" |
25 #include "cc/trees/layer_tree_host_client.h" | 24 #include "cc/trees/layer_tree_host_client.h" |
26 #include "cc/trees/layer_tree_host_common.h" | 25 #include "cc/trees/layer_tree_host_common.h" |
27 #include "cc/trees/layer_tree_settings.h" | 26 #include "cc/trees/layer_tree_settings.h" |
28 #include "cc/trees/occlusion_tracker.h" | 27 #include "cc/trees/occlusion_tracker.h" |
29 #include "cc/trees/proxy.h" | 28 #include "cc/trees/proxy.h" |
30 #include "skia/ext/refptr.h" | 29 #include "skia/ext/refptr.h" |
31 #include "third_party/WebKit/Source/Platform/chromium/public/WebScrollbar.h" | 30 #include "third_party/WebKit/Source/Platform/chromium/public/WebScrollbar.h" |
32 #include "third_party/skia/include/core/SkColor.h" | 31 #include "third_party/skia/include/core/SkColor.h" |
33 #include "third_party/skia/include/core/SkPicture.h" | 32 #include "third_party/skia/include/core/SkPicture.h" |
| 33 #include "ui/base/latency_info.h" |
34 #include "ui/gfx/rect.h" | 34 #include "ui/gfx/rect.h" |
35 | 35 |
36 #if defined(COMPILER_GCC) | 36 #if defined(COMPILER_GCC) |
37 namespace BASE_HASH_NAMESPACE { | 37 namespace BASE_HASH_NAMESPACE { |
38 template <> | 38 template <> |
39 struct hash<WebKit::WebGraphicsContext3D*> { | 39 struct hash<WebKit::WebGraphicsContext3D*> { |
40 size_t operator()(WebKit::WebGraphicsContext3D* ptr) const { | 40 size_t operator()(WebKit::WebGraphicsContext3D* ptr) const { |
41 return hash<size_t>()(reinterpret_cast<size_t>(ptr)); | 41 return hash<size_t>()(reinterpret_cast<size_t>(ptr)); |
42 } | 42 } |
43 }; | 43 }; |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 bool visible() const { return visible_; } | 209 bool visible() const { return visible_; } |
210 | 210 |
211 void StartPageScaleAnimation(gfx::Vector2d target_offset, | 211 void StartPageScaleAnimation(gfx::Vector2d target_offset, |
212 bool use_anchor, | 212 bool use_anchor, |
213 float scale, | 213 float scale, |
214 base::TimeDelta duration); | 214 base::TimeDelta duration); |
215 | 215 |
216 void ApplyScrollAndScale(const ScrollAndScaleSet& info); | 216 void ApplyScrollAndScale(const ScrollAndScaleSet& info); |
217 | 217 |
218 void SetImplTransform(const gfx::Transform& transform); | 218 void SetImplTransform(const gfx::Transform& transform); |
219 void SetLatencyInfo(const LatencyInfo& latency_info); | 219 void SetLatencyInfo(const ui::LatencyInfo& latency_info); |
220 | 220 |
221 void StartRateLimiter(WebKit::WebGraphicsContext3D* context3d); | 221 void StartRateLimiter(WebKit::WebGraphicsContext3D* context3d); |
222 void StopRateLimiter(WebKit::WebGraphicsContext3D* context3d); | 222 void StopRateLimiter(WebKit::WebGraphicsContext3D* context3d); |
223 | 223 |
224 // RateLimiterClient implementation. | 224 // RateLimiterClient implementation. |
225 virtual void RateLimit() OVERRIDE; | 225 virtual void RateLimit() OVERRIDE; |
226 | 226 |
227 bool buffered_updates() const { | 227 bool buffered_updates() const { |
228 return settings_.max_partial_texture_updates != | 228 return settings_.max_partial_texture_updates != |
229 std::numeric_limits<size_t>::max(); | 229 std::numeric_limits<size_t>::max(); |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
336 struct PendingPageScaleAnimation { | 336 struct PendingPageScaleAnimation { |
337 gfx::Vector2d target_offset; | 337 gfx::Vector2d target_offset; |
338 bool use_anchor; | 338 bool use_anchor; |
339 float scale; | 339 float scale; |
340 base::TimeDelta duration; | 340 base::TimeDelta duration; |
341 }; | 341 }; |
342 scoped_ptr<PendingPageScaleAnimation> pending_page_scale_animation_; | 342 scoped_ptr<PendingPageScaleAnimation> pending_page_scale_animation_; |
343 | 343 |
344 bool in_paint_layer_contents_; | 344 bool in_paint_layer_contents_; |
345 | 345 |
346 LatencyInfo latency_info_; | 346 ui::LatencyInfo latency_info_; |
347 | 347 |
348 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); | 348 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); |
349 }; | 349 }; |
350 | 350 |
351 } // namespace cc | 351 } // namespace cc |
352 | 352 |
353 #endif // CC_TREES_LAYER_TREE_HOST_H_ | 353 #endif // CC_TREES_LAYER_TREE_HOST_H_ |
OLD | NEW |