| 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 <list> | 8 #include <list> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 220 | 220 |
| 221 DrawMode GetDrawMode() const; | 221 DrawMode GetDrawMode() const; |
| 222 | 222 |
| 223 // Viewport size in draw space: this size is in physical pixels and is used | 223 // Viewport size in draw space: this size is in physical pixels and is used |
| 224 // for draw properties, tilings, quads and render passes. | 224 // for draw properties, tilings, quads and render passes. |
| 225 gfx::Size DrawViewportSize() const; | 225 gfx::Size DrawViewportSize() const; |
| 226 | 226 |
| 227 // Viewport rect in view space used for tiling prioritization. | 227 // Viewport rect in view space used for tiling prioritization. |
| 228 const gfx::Rect ViewportRectForTilePriority() const; | 228 const gfx::Rect ViewportRectForTilePriority() const; |
| 229 | 229 |
| 230 // Viewport size for scrolling and fixed-position compensation. This value | |
| 231 // excludes the URL bar and non-overlay scrollbars and is in DIP (and | |
| 232 // invariant relative to page scale). | |
| 233 gfx::SizeF UnscaledScrollableViewportSize() const; | |
| 234 float VerticalAdjust() const; | |
| 235 | |
| 236 // RendererClient implementation. | 230 // RendererClient implementation. |
| 237 virtual void SetFullRootLayerDamage() OVERRIDE; | 231 virtual void SetFullRootLayerDamage() OVERRIDE; |
| 238 virtual void RunOnDemandRasterTask(Task* on_demand_raster_task) OVERRIDE; | 232 virtual void RunOnDemandRasterTask(Task* on_demand_raster_task) OVERRIDE; |
| 239 | 233 |
| 240 // TileManagerClient implementation. | 234 // TileManagerClient implementation. |
| 241 virtual const std::vector<PictureLayerImpl*>& GetPictureLayers() | 235 virtual const std::vector<PictureLayerImpl*>& GetPictureLayers() |
| 242 const OVERRIDE; | 236 const OVERRIDE; |
| 243 virtual void NotifyReadyToActivate() OVERRIDE; | 237 virtual void NotifyReadyToActivate() OVERRIDE; |
| 244 virtual void NotifyTileStateChanged(const Tile* tile) OVERRIDE; | 238 virtual void NotifyTileStateChanged(const Tile* tile) OVERRIDE; |
| 245 virtual void BuildRasterQueue(RasterTilePriorityQueue* queue, | 239 virtual void BuildRasterQueue(RasterTilePriorityQueue* queue, |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 343 void SetNeedsRedraw(); | 337 void SetNeedsRedraw(); |
| 344 | 338 |
| 345 ManagedMemoryPolicy ActualManagedMemoryPolicy() const; | 339 ManagedMemoryPolicy ActualManagedMemoryPolicy() const; |
| 346 | 340 |
| 347 size_t memory_allocation_limit_bytes() const; | 341 size_t memory_allocation_limit_bytes() const; |
| 348 int memory_allocation_priority_cutoff() const; | 342 int memory_allocation_priority_cutoff() const; |
| 349 | 343 |
| 350 void SetViewportSize(const gfx::Size& device_viewport_size); | 344 void SetViewportSize(const gfx::Size& device_viewport_size); |
| 351 gfx::Size device_viewport_size() const { return device_viewport_size_; } | 345 gfx::Size device_viewport_size() const { return device_viewport_size_; } |
| 352 | 346 |
| 353 void SetOverdrawBottomHeight(float overdraw_bottom_height); | 347 void SetTopControlsLayoutHeight(float top_controls_layout_height); |
| 354 float overdraw_bottom_height() const { return overdraw_bottom_height_; } | 348 float top_controls_layout_height() const { |
| 349 return top_controls_layout_height_; |
| 350 } |
| 355 | 351 |
| 356 void SetOverhangUIResource(UIResourceId overhang_ui_resource_id, | 352 void SetOverhangUIResource(UIResourceId overhang_ui_resource_id, |
| 357 const gfx::Size& overhang_ui_resource_size); | 353 const gfx::Size& overhang_ui_resource_size); |
| 358 | 354 |
| 359 void SetDeviceScaleFactor(float device_scale_factor); | 355 void SetDeviceScaleFactor(float device_scale_factor); |
| 360 float device_scale_factor() const { return device_scale_factor_; } | 356 float device_scale_factor() const { return device_scale_factor_; } |
| 361 | 357 |
| 362 const gfx::Transform& DrawTransform() const; | 358 const gfx::Transform& DrawTransform() const; |
| 363 | 359 |
| 364 scoped_ptr<ScrollAndScaleSet> ProcessScrollDeltas(); | 360 scoped_ptr<ScrollAndScaleSet> ProcessScrollDeltas(); |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 492 | 488 |
| 493 protected: | 489 protected: |
| 494 LayerTreeHostImpl( | 490 LayerTreeHostImpl( |
| 495 const LayerTreeSettings& settings, | 491 const LayerTreeSettings& settings, |
| 496 LayerTreeHostImplClient* client, | 492 LayerTreeHostImplClient* client, |
| 497 Proxy* proxy, | 493 Proxy* proxy, |
| 498 RenderingStatsInstrumentation* rendering_stats_instrumentation, | 494 RenderingStatsInstrumentation* rendering_stats_instrumentation, |
| 499 SharedBitmapManager* manager, | 495 SharedBitmapManager* manager, |
| 500 int id); | 496 int id); |
| 501 | 497 |
| 502 gfx::SizeF ComputeInnerViewportContainerSize() const; | |
| 503 void UpdateInnerViewportContainerSize(); | 498 void UpdateInnerViewportContainerSize(); |
| 504 | 499 |
| 505 // Virtual for testing. | 500 // Virtual for testing. |
| 506 virtual void AnimateLayers(base::TimeTicks monotonic_time); | 501 virtual void AnimateLayers(base::TimeTicks monotonic_time); |
| 507 | 502 |
| 508 // Virtual for testing. | 503 // Virtual for testing. |
| 509 virtual base::TimeDelta LowFrequencyAnimationInterval() const; | 504 virtual base::TimeDelta LowFrequencyAnimationInterval() const; |
| 510 | 505 |
| 511 const AnimationRegistrar::AnimationControllerMap& | 506 const AnimationRegistrar::AnimationControllerMap& |
| 512 active_animation_controllers() const { | 507 active_animation_controllers() const { |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 668 gfx::Size device_viewport_size_; | 663 gfx::Size device_viewport_size_; |
| 669 | 664 |
| 670 // Conversion factor from CSS pixels to physical pixels when | 665 // Conversion factor from CSS pixels to physical pixels when |
| 671 // pageScaleFactor=1. | 666 // pageScaleFactor=1. |
| 672 float device_scale_factor_; | 667 float device_scale_factor_; |
| 673 | 668 |
| 674 // UI resource to use for drawing overhang gutters. | 669 // UI resource to use for drawing overhang gutters. |
| 675 UIResourceId overhang_ui_resource_id_; | 670 UIResourceId overhang_ui_resource_id_; |
| 676 gfx::Size overhang_ui_resource_size_; | 671 gfx::Size overhang_ui_resource_size_; |
| 677 | 672 |
| 678 // Vertical amount of the viewport size that's known to covered by a | 673 // Height of the top controls as known by Blink. |
| 679 // browser-side UI element, such as an on-screen-keyboard. This affects | 674 float top_controls_layout_height_; |
| 680 // scrollable size since we want to still be able to scroll to the bottom of | |
| 681 // the page when the keyboard is up. | |
| 682 float overdraw_bottom_height_; | |
| 683 | 675 |
| 684 // Optional top-level constraints that can be set by the OutputSurface. | 676 // Optional top-level constraints that can be set by the OutputSurface. |
| 685 // - external_transform_ applies a transform above the root layer | 677 // - external_transform_ applies a transform above the root layer |
| 686 // - external_viewport_ is used DrawProperties, tile management and | 678 // - external_viewport_ is used DrawProperties, tile management and |
| 687 // glViewport/window projection matrix. | 679 // glViewport/window projection matrix. |
| 688 // - external_clip_ specifies a top-level clip rect | 680 // - external_clip_ specifies a top-level clip rect |
| 689 // - viewport_rect_for_tile_priority_ is the rect in view space used for | 681 // - viewport_rect_for_tile_priority_ is the rect in view space used for |
| 690 // tiling priority. | 682 // tiling priority. |
| 691 gfx::Transform external_transform_; | 683 gfx::Transform external_transform_; |
| 692 gfx::Rect external_viewport_; | 684 gfx::Rect external_viewport_; |
| (...skipping 28 matching lines...) Expand all Loading... |
| 721 | 713 |
| 722 std::vector<PictureLayerImpl*> picture_layers_; | 714 std::vector<PictureLayerImpl*> picture_layers_; |
| 723 std::vector<PictureLayerImpl::Pair> picture_layer_pairs_; | 715 std::vector<PictureLayerImpl::Pair> picture_layer_pairs_; |
| 724 | 716 |
| 725 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); | 717 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); |
| 726 }; | 718 }; |
| 727 | 719 |
| 728 } // namespace cc | 720 } // namespace cc |
| 729 | 721 |
| 730 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ | 722 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ |
| OLD | NEW |