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_IMPL_H_ | 5 #ifndef CC_TREES_LAYER_TREE_HOST_IMPL_H_ |
6 #define CC_TREES_LAYER_TREE_HOST_IMPL_H_ | 6 #define CC_TREES_LAYER_TREE_HOST_IMPL_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 base::TimeDelta duration) OVERRIDE; | 124 base::TimeDelta duration) OVERRIDE; |
125 virtual void ScheduleAnimation() OVERRIDE; | 125 virtual void ScheduleAnimation() OVERRIDE; |
126 virtual bool HaveTouchEventHandlersAt(gfx::Point viewport_port) OVERRIDE; | 126 virtual bool HaveTouchEventHandlersAt(gfx::Point viewport_port) OVERRIDE; |
127 virtual void SetLatencyInfoForInputEvent(const ui::LatencyInfo& latency_info) | 127 virtual void SetLatencyInfoForInputEvent(const ui::LatencyInfo& latency_info) |
128 OVERRIDE; | 128 OVERRIDE; |
129 | 129 |
130 // TopControlsManagerClient implementation. | 130 // TopControlsManagerClient implementation. |
131 virtual void DidChangeTopControlsPosition() OVERRIDE; | 131 virtual void DidChangeTopControlsPosition() OVERRIDE; |
132 virtual bool HaveRootScrollLayer() const OVERRIDE; | 132 virtual bool HaveRootScrollLayer() const OVERRIDE; |
133 | 133 |
134 void StartScrollbarAnimation(base::TimeTicks now); | 134 void StartScrollbarAnimation(); |
135 | 135 |
136 struct CC_EXPORT FrameData : public RenderPassSink { | 136 struct CC_EXPORT FrameData : public RenderPassSink { |
137 FrameData(); | 137 FrameData(); |
138 virtual ~FrameData(); | 138 virtual ~FrameData(); |
139 | 139 |
140 std::vector<gfx::Rect> occluding_screen_space_rects; | 140 std::vector<gfx::Rect> occluding_screen_space_rects; |
141 std::vector<gfx::Rect> non_occluding_screen_space_rects; | 141 std::vector<gfx::Rect> non_occluding_screen_space_rects; |
142 RenderPassList render_passes; | 142 RenderPassList render_passes; |
143 RenderPassIdHashMap render_passes_by_id; | 143 RenderPassIdHashMap render_passes_by_id; |
144 const LayerImplList* render_surface_layer_list; | 144 const LayerImplList* render_surface_layer_list; |
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
363 } | 363 } |
364 | 364 |
365 bool pinch_gesture_active() const { return pinch_gesture_active_; } | 365 bool pinch_gesture_active() const { return pinch_gesture_active_; } |
366 | 366 |
367 void SetTreePriority(TreePriority priority); | 367 void SetTreePriority(TreePriority priority); |
368 | 368 |
369 void ResetCurrentFrameTimeForNextFrame(); | 369 void ResetCurrentFrameTimeForNextFrame(); |
370 base::TimeTicks CurrentFrameTimeTicks(); | 370 base::TimeTicks CurrentFrameTimeTicks(); |
371 base::Time CurrentFrameTime(); | 371 base::Time CurrentFrameTime(); |
372 | 372 |
| 373 virtual base::TimeTicks CurrentPhysicalTimeTicks() const; |
| 374 |
373 scoped_ptr<base::Value> AsValue() const; | 375 scoped_ptr<base::Value> AsValue() const; |
374 scoped_ptr<base::Value> ActivationStateAsValue() const; | 376 scoped_ptr<base::Value> ActivationStateAsValue() const; |
375 | 377 |
376 bool page_scale_animation_active() const { return !!page_scale_animation_; } | 378 bool page_scale_animation_active() const { return !!page_scale_animation_; } |
377 | 379 |
378 protected: | 380 protected: |
379 LayerTreeHostImpl( | 381 LayerTreeHostImpl( |
380 const LayerTreeSettings& settings, | 382 const LayerTreeSettings& settings, |
381 LayerTreeHostImplClient* client, | 383 LayerTreeHostImplClient* client, |
382 Proxy* proxy, | 384 Proxy* proxy, |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
431 | 433 |
432 void AnimateScrollbarsRecursive(LayerImpl* layer, | 434 void AnimateScrollbarsRecursive(LayerImpl* layer, |
433 base::TimeTicks time); | 435 base::TimeTicks time); |
434 | 436 |
435 void DumpRenderSurfaces(std::string* str, | 437 void DumpRenderSurfaces(std::string* str, |
436 int indent, | 438 int indent, |
437 const LayerImpl* layer) const; | 439 const LayerImpl* layer) const; |
438 | 440 |
439 static LayerImpl* GetNonCompositedContentLayerRecursive(LayerImpl* layer); | 441 static LayerImpl* GetNonCompositedContentLayerRecursive(LayerImpl* layer); |
440 | 442 |
| 443 void UpdateCurrentFrameTime(base::TimeTicks* ticks, base::Time* now) const; |
| 444 |
441 void StartScrollbarAnimationRecursive(LayerImpl* layer, base::TimeTicks time); | 445 void StartScrollbarAnimationRecursive(LayerImpl* layer, base::TimeTicks time); |
442 | 446 |
443 scoped_ptr<OutputSurface> output_surface_; | 447 scoped_ptr<OutputSurface> output_surface_; |
444 | 448 |
445 // |resource_provider_| and |tile_manager_| can be NULL, e.g. when using tile- | 449 // |resource_provider_| and |tile_manager_| can be NULL, e.g. when using tile- |
446 // free rendering - see OutputSurface::ForcedDrawToSoftwareDevice(). | 450 // free rendering - see OutputSurface::ForcedDrawToSoftwareDevice(). |
447 scoped_ptr<ResourceProvider> resource_provider_; | 451 scoped_ptr<ResourceProvider> resource_provider_; |
448 scoped_ptr<TileManager> tile_manager_; | 452 scoped_ptr<TileManager> tile_manager_; |
449 scoped_ptr<Renderer> renderer_; | 453 scoped_ptr<Renderer> renderer_; |
450 | 454 |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
531 scoped_ptr<AnimationRegistrar> animation_registrar_; | 535 scoped_ptr<AnimationRegistrar> animation_registrar_; |
532 | 536 |
533 RenderingStatsInstrumentation* rendering_stats_instrumentation_; | 537 RenderingStatsInstrumentation* rendering_stats_instrumentation_; |
534 | 538 |
535 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); | 539 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); |
536 }; | 540 }; |
537 | 541 |
538 } // namespace cc | 542 } // namespace cc |
539 | 543 |
540 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ | 544 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ |
OLD | NEW |