| 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 base::TimeTicks CurrentPhysicalTimeTicks() const; |
| 374 void SetCurrentPhysicalTimeTicksForTest(base::TimeTicks fake_time); |
| 375 |
| 373 scoped_ptr<base::Value> AsValue() const; | 376 scoped_ptr<base::Value> AsValue() const; |
| 374 scoped_ptr<base::Value> ActivationStateAsValue() const; | 377 scoped_ptr<base::Value> ActivationStateAsValue() const; |
| 375 | 378 |
| 376 bool page_scale_animation_active() const { return !!page_scale_animation_; } | 379 bool page_scale_animation_active() const { return !!page_scale_animation_; } |
| 377 | 380 |
| 378 protected: | 381 protected: |
| 379 LayerTreeHostImpl( | 382 LayerTreeHostImpl( |
| 380 const LayerTreeSettings& settings, | 383 const LayerTreeSettings& settings, |
| 381 LayerTreeHostImplClient* client, | 384 LayerTreeHostImplClient* client, |
| 382 Proxy* proxy, | 385 Proxy* proxy, |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 431 | 434 |
| 432 void AnimateScrollbarsRecursive(LayerImpl* layer, | 435 void AnimateScrollbarsRecursive(LayerImpl* layer, |
| 433 base::TimeTicks time); | 436 base::TimeTicks time); |
| 434 | 437 |
| 435 void DumpRenderSurfaces(std::string* str, | 438 void DumpRenderSurfaces(std::string* str, |
| 436 int indent, | 439 int indent, |
| 437 const LayerImpl* layer) const; | 440 const LayerImpl* layer) const; |
| 438 | 441 |
| 439 static LayerImpl* GetNonCompositedContentLayerRecursive(LayerImpl* layer); | 442 static LayerImpl* GetNonCompositedContentLayerRecursive(LayerImpl* layer); |
| 440 | 443 |
| 444 void UpdateCurrentFrameTime(base::TimeTicks* ticks, base::Time* now) const; |
| 445 |
| 441 void StartScrollbarAnimationRecursive(LayerImpl* layer, base::TimeTicks time); | 446 void StartScrollbarAnimationRecursive(LayerImpl* layer, base::TimeTicks time); |
| 442 | 447 |
| 443 scoped_ptr<OutputSurface> output_surface_; | 448 scoped_ptr<OutputSurface> output_surface_; |
| 444 | 449 |
| 445 // |resource_provider_| and |tile_manager_| can be NULL, e.g. when using tile- | 450 // |resource_provider_| and |tile_manager_| can be NULL, e.g. when using tile- |
| 446 // free rendering - see OutputSurface::ForcedDrawToSoftwareDevice(). | 451 // free rendering - see OutputSurface::ForcedDrawToSoftwareDevice(). |
| 447 scoped_ptr<ResourceProvider> resource_provider_; | 452 scoped_ptr<ResourceProvider> resource_provider_; |
| 448 scoped_ptr<TileManager> tile_manager_; | 453 scoped_ptr<TileManager> tile_manager_; |
| 449 scoped_ptr<Renderer> renderer_; | 454 scoped_ptr<Renderer> renderer_; |
| 450 | 455 |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 520 // external_viewport_'s size takes precedence over device_viewport_size_ for | 525 // external_viewport_'s size takes precedence over device_viewport_size_ for |
| 521 // DrawQuad generation and Renderer; however, device_viewport_size_ is still | 526 // DrawQuad generation and Renderer; however, device_viewport_size_ is still |
| 522 // used for scrollable size. | 527 // used for scrollable size. |
| 523 gfx::Transform external_transform_; | 528 gfx::Transform external_transform_; |
| 524 gfx::Rect external_viewport_; | 529 gfx::Rect external_viewport_; |
| 525 | 530 |
| 526 gfx::Rect viewport_damage_rect_; | 531 gfx::Rect viewport_damage_rect_; |
| 527 | 532 |
| 528 base::TimeTicks current_frame_timeticks_; | 533 base::TimeTicks current_frame_timeticks_; |
| 529 base::Time current_frame_time_; | 534 base::Time current_frame_time_; |
| 535 base::TimeTicks fake_current_physical_time_for_test_; |
| 530 | 536 |
| 531 scoped_ptr<AnimationRegistrar> animation_registrar_; | 537 scoped_ptr<AnimationRegistrar> animation_registrar_; |
| 532 | 538 |
| 533 RenderingStatsInstrumentation* rendering_stats_instrumentation_; | 539 RenderingStatsInstrumentation* rendering_stats_instrumentation_; |
| 534 | 540 |
| 535 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); | 541 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); |
| 536 }; | 542 }; |
| 537 | 543 |
| 538 } // namespace cc | 544 } // namespace cc |
| 539 | 545 |
| 540 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ | 546 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ |
| OLD | NEW |