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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 virtual void SetNeedsAnimate() OVERRIDE; | 152 virtual void SetNeedsAnimate() OVERRIDE; |
153 virtual bool IsCurrentlyScrollingLayerAt( | 153 virtual bool IsCurrentlyScrollingLayerAt( |
154 const gfx::Point& viewport_point, | 154 const gfx::Point& viewport_point, |
155 InputHandler::ScrollInputType type) OVERRIDE; | 155 InputHandler::ScrollInputType type) OVERRIDE; |
156 virtual bool HaveTouchEventHandlersAt( | 156 virtual bool HaveTouchEventHandlersAt( |
157 const gfx::Point& viewport_port) OVERRIDE; | 157 const gfx::Point& viewport_port) OVERRIDE; |
158 virtual scoped_ptr<SwapPromiseMonitor> CreateLatencyInfoSwapPromiseMonitor( | 158 virtual scoped_ptr<SwapPromiseMonitor> CreateLatencyInfoSwapPromiseMonitor( |
159 ui::LatencyInfo* latency) OVERRIDE; | 159 ui::LatencyInfo* latency) OVERRIDE; |
160 | 160 |
161 // TopControlsManagerClient implementation. | 161 // TopControlsManagerClient implementation. |
| 162 virtual void SetControlsTopOffset(float offset) OVERRIDE; |
| 163 virtual float ControlsTopOffset() const OVERRIDE; |
162 virtual void DidChangeTopControlsPosition() OVERRIDE; | 164 virtual void DidChangeTopControlsPosition() OVERRIDE; |
163 virtual bool HaveRootScrollLayer() const OVERRIDE; | 165 virtual bool HaveRootScrollLayer() const OVERRIDE; |
164 | 166 |
165 struct CC_EXPORT FrameData : public RenderPassSink { | 167 struct CC_EXPORT FrameData : public RenderPassSink { |
166 FrameData(); | 168 FrameData(); |
167 virtual ~FrameData(); | 169 virtual ~FrameData(); |
168 void AsValueInto(base::debug::TracedValue* value) const; | 170 void AsValueInto(base::debug::TracedValue* value) const; |
169 | 171 |
170 std::vector<gfx::Rect> occluding_screen_space_rects; | 172 std::vector<gfx::Rect> occluding_screen_space_rects; |
171 std::vector<gfx::Rect> non_occluding_screen_space_rects; | 173 std::vector<gfx::Rect> non_occluding_screen_space_rects; |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
335 void SetNeedsRedraw(); | 337 void SetNeedsRedraw(); |
336 | 338 |
337 ManagedMemoryPolicy ActualManagedMemoryPolicy() const; | 339 ManagedMemoryPolicy ActualManagedMemoryPolicy() const; |
338 | 340 |
339 size_t memory_allocation_limit_bytes() const; | 341 size_t memory_allocation_limit_bytes() const; |
340 int memory_allocation_priority_cutoff() const; | 342 int memory_allocation_priority_cutoff() const; |
341 | 343 |
342 void SetViewportSize(const gfx::Size& device_viewport_size); | 344 void SetViewportSize(const gfx::Size& device_viewport_size); |
343 gfx::Size device_viewport_size() const { return device_viewport_size_; } | 345 gfx::Size device_viewport_size() const { return device_viewport_size_; } |
344 | 346 |
345 void SetTopControlsLayoutHeight(float top_controls_layout_height); | |
346 float top_controls_layout_height() const { | |
347 return top_controls_layout_height_; | |
348 } | |
349 | |
350 void SetOverhangUIResource(UIResourceId overhang_ui_resource_id, | 347 void SetOverhangUIResource(UIResourceId overhang_ui_resource_id, |
351 const gfx::Size& overhang_ui_resource_size); | 348 const gfx::Size& overhang_ui_resource_size); |
352 | 349 |
353 void SetDeviceScaleFactor(float device_scale_factor); | 350 void SetDeviceScaleFactor(float device_scale_factor); |
354 float device_scale_factor() const { return device_scale_factor_; } | 351 float device_scale_factor() const { return device_scale_factor_; } |
355 | 352 |
356 const gfx::Transform& DrawTransform() const; | 353 const gfx::Transform& DrawTransform() const; |
357 | 354 |
358 scoped_ptr<ScrollAndScaleSet> ProcessScrollDeltas(); | 355 scoped_ptr<ScrollAndScaleSet> ProcessScrollDeltas(); |
359 | 356 |
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
656 gfx::Size device_viewport_size_; | 653 gfx::Size device_viewport_size_; |
657 | 654 |
658 // Conversion factor from CSS pixels to physical pixels when | 655 // Conversion factor from CSS pixels to physical pixels when |
659 // pageScaleFactor=1. | 656 // pageScaleFactor=1. |
660 float device_scale_factor_; | 657 float device_scale_factor_; |
661 | 658 |
662 // UI resource to use for drawing overhang gutters. | 659 // UI resource to use for drawing overhang gutters. |
663 UIResourceId overhang_ui_resource_id_; | 660 UIResourceId overhang_ui_resource_id_; |
664 gfx::Size overhang_ui_resource_size_; | 661 gfx::Size overhang_ui_resource_size_; |
665 | 662 |
666 // Height of the top controls as known by Blink. | |
667 float top_controls_layout_height_; | |
668 | |
669 // Optional top-level constraints that can be set by the OutputSurface. | 663 // Optional top-level constraints that can be set by the OutputSurface. |
670 // - external_transform_ applies a transform above the root layer | 664 // - external_transform_ applies a transform above the root layer |
671 // - external_viewport_ is used DrawProperties, tile management and | 665 // - external_viewport_ is used DrawProperties, tile management and |
672 // glViewport/window projection matrix. | 666 // glViewport/window projection matrix. |
673 // - external_clip_ specifies a top-level clip rect | 667 // - external_clip_ specifies a top-level clip rect |
674 // - viewport_rect_for_tile_priority_ is the rect in view space used for | 668 // - viewport_rect_for_tile_priority_ is the rect in view space used for |
675 // tiling priority. | 669 // tiling priority. |
676 gfx::Transform external_transform_; | 670 gfx::Transform external_transform_; |
677 gfx::Rect external_viewport_; | 671 gfx::Rect external_viewport_; |
678 gfx::Rect external_clip_; | 672 gfx::Rect external_clip_; |
(...skipping 26 matching lines...) Expand all Loading... |
705 | 699 |
706 std::vector<PictureLayerImpl*> picture_layers_; | 700 std::vector<PictureLayerImpl*> picture_layers_; |
707 std::vector<PictureLayerImpl::Pair> picture_layer_pairs_; | 701 std::vector<PictureLayerImpl::Pair> picture_layer_pairs_; |
708 | 702 |
709 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); | 703 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); |
710 }; | 704 }; |
711 | 705 |
712 } // namespace cc | 706 } // namespace cc |
713 | 707 |
714 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ | 708 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ |
OLD | NEW |