| 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 <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 373 | 373 |
| 374 void SetDeviceScaleFactor(float device_scale_factor); | 374 void SetDeviceScaleFactor(float device_scale_factor); |
| 375 float device_scale_factor() const { return device_scale_factor_; } | 375 float device_scale_factor() const { return device_scale_factor_; } |
| 376 | 376 |
| 377 void SetPageScaleOnActiveTree(float page_scale_factor); | 377 void SetPageScaleOnActiveTree(float page_scale_factor); |
| 378 | 378 |
| 379 const gfx::Transform& DrawTransform() const; | 379 const gfx::Transform& DrawTransform() const; |
| 380 | 380 |
| 381 scoped_ptr<ScrollAndScaleSet> ProcessScrollDeltas(); | 381 scoped_ptr<ScrollAndScaleSet> ProcessScrollDeltas(); |
| 382 | 382 |
| 383 bool needs_animate_layers() const { | |
| 384 return !animation_registrar_->active_animation_controllers().empty(); | |
| 385 } | |
| 386 | |
| 387 void set_max_memory_needed_bytes(size_t bytes) { | 383 void set_max_memory_needed_bytes(size_t bytes) { |
| 388 max_memory_needed_bytes_ = bytes; | 384 max_memory_needed_bytes_ = bytes; |
| 389 } | 385 } |
| 390 | 386 |
| 391 FrameRateCounter* fps_counter() { | 387 FrameRateCounter* fps_counter() { |
| 392 return fps_counter_.get(); | 388 return fps_counter_.get(); |
| 393 } | 389 } |
| 394 PaintTimeCounter* paint_time_counter() { | 390 PaintTimeCounter* paint_time_counter() { |
| 395 return paint_time_counter_.get(); | 391 return paint_time_counter_.get(); |
| 396 } | 392 } |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 447 | 443 |
| 448 void UpdateCurrentBeginFrameArgs(const BeginFrameArgs& args); | 444 void UpdateCurrentBeginFrameArgs(const BeginFrameArgs& args); |
| 449 void ResetCurrentBeginFrameArgsForNextFrame(); | 445 void ResetCurrentBeginFrameArgsForNextFrame(); |
| 450 virtual BeginFrameArgs CurrentBeginFrameArgs() const; | 446 virtual BeginFrameArgs CurrentBeginFrameArgs() const; |
| 451 | 447 |
| 452 // Expected time between two begin impl frame calls. | 448 // Expected time between two begin impl frame calls. |
| 453 base::TimeDelta begin_impl_frame_interval() const { | 449 base::TimeDelta begin_impl_frame_interval() const { |
| 454 return begin_impl_frame_interval_; | 450 return begin_impl_frame_interval_; |
| 455 } | 451 } |
| 456 | 452 |
| 457 void AsValueInto(base::trace_event::TracedValue* value) const; | |
| 458 void AsValueWithFrameInto(FrameData* frame, | 453 void AsValueWithFrameInto(FrameData* frame, |
| 459 base::trace_event::TracedValue* value) const; | 454 base::trace_event::TracedValue* value) const; |
| 460 scoped_refptr<base::trace_event::ConvertableToTraceFormat> AsValue() const; | |
| 461 scoped_refptr<base::trace_event::ConvertableToTraceFormat> AsValueWithFrame( | 455 scoped_refptr<base::trace_event::ConvertableToTraceFormat> AsValueWithFrame( |
| 462 FrameData* frame) const; | 456 FrameData* frame) const; |
| 463 scoped_refptr<base::trace_event::ConvertableToTraceFormat> | |
| 464 ActivationStateAsValue() const; | |
| 465 void ActivationStateAsValueInto(base::trace_event::TracedValue* value) const; | 457 void ActivationStateAsValueInto(base::trace_event::TracedValue* value) const; |
| 466 | 458 |
| 467 bool page_scale_animation_active() const { return !!page_scale_animation_; } | 459 bool page_scale_animation_active() const { return !!page_scale_animation_; } |
| 468 | 460 |
| 469 virtual void CreateUIResource(UIResourceId uid, | 461 virtual void CreateUIResource(UIResourceId uid, |
| 470 const UIResourceBitmap& bitmap); | 462 const UIResourceBitmap& bitmap); |
| 471 // Deletes a UI resource. May safely be called more than once. | 463 // Deletes a UI resource. May safely be called more than once. |
| 472 virtual void DeleteUIResource(UIResourceId uid); | 464 virtual void DeleteUIResource(UIResourceId uid); |
| 473 void EvictAllUIResources(); | 465 void EvictAllUIResources(); |
| 474 bool EvictedUIResourcesExist() const; | 466 bool EvictedUIResourcesExist() const; |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 607 | 599 |
| 608 // Resources that were evicted by EvictAllUIResources. Resources are removed | 600 // Resources that were evicted by EvictAllUIResources. Resources are removed |
| 609 // from this when they are touched by a create or destroy from the UI resource | 601 // from this when they are touched by a create or destroy from the UI resource |
| 610 // request queue. | 602 // request queue. |
| 611 std::set<UIResourceId> evicted_ui_resources_; | 603 std::set<UIResourceId> evicted_ui_resources_; |
| 612 | 604 |
| 613 scoped_ptr<OutputSurface> output_surface_; | 605 scoped_ptr<OutputSurface> output_surface_; |
| 614 | 606 |
| 615 // |resource_provider_| and |tile_manager_| can be NULL, e.g. when using tile- | 607 // |resource_provider_| and |tile_manager_| can be NULL, e.g. when using tile- |
| 616 // free rendering - see OutputSurface::ForcedDrawToSoftwareDevice(). | 608 // free rendering - see OutputSurface::ForcedDrawToSoftwareDevice(). |
| 609 // |tile_manager_| can also be NULL when raster_enabled is false. |
| 617 scoped_ptr<ResourceProvider> resource_provider_; | 610 scoped_ptr<ResourceProvider> resource_provider_; |
| 618 scoped_ptr<TileManager> tile_manager_; | 611 scoped_ptr<TileManager> tile_manager_; |
| 619 bool use_gpu_rasterization_; | 612 bool use_gpu_rasterization_; |
| 620 GpuRasterizationStatus gpu_rasterization_status_; | 613 GpuRasterizationStatus gpu_rasterization_status_; |
| 621 scoped_ptr<TileTaskWorkerPool> tile_task_worker_pool_; | 614 scoped_ptr<TileTaskWorkerPool> tile_task_worker_pool_; |
| 622 scoped_ptr<Rasterizer> rasterizer_; | 615 scoped_ptr<Rasterizer> rasterizer_; |
| 623 scoped_ptr<ResourcePool> resource_pool_; | 616 scoped_ptr<ResourcePool> resource_pool_; |
| 624 scoped_ptr<ResourcePool> staging_resource_pool_; | 617 scoped_ptr<ResourcePool> staging_resource_pool_; |
| 625 scoped_ptr<Renderer> renderer_; | 618 scoped_ptr<Renderer> renderer_; |
| 626 | 619 |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 732 bool is_likely_to_require_a_draw_; | 725 bool is_likely_to_require_a_draw_; |
| 733 | 726 |
| 734 scoped_ptr<FrameTimingTracker> frame_timing_tracker_; | 727 scoped_ptr<FrameTimingTracker> frame_timing_tracker_; |
| 735 | 728 |
| 736 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); | 729 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); |
| 737 }; | 730 }; |
| 738 | 731 |
| 739 } // namespace cc | 732 } // namespace cc |
| 740 | 733 |
| 741 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ | 734 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ |
| OLD | NEW |