Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(372)

Side by Side Diff: cc/trees/layer_tree_host_impl.h

Issue 511253003: Made Blink aware of top controls offset (Chromium-side) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed crash + mojo example build break Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/trees/layer_tree_host_common.h ('k') | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 void SetNeedsRedraw(); 338 void SetNeedsRedraw();
337 339
338 ManagedMemoryPolicy ActualManagedMemoryPolicy() const; 340 ManagedMemoryPolicy ActualManagedMemoryPolicy() const;
339 341
340 size_t memory_allocation_limit_bytes() const; 342 size_t memory_allocation_limit_bytes() const;
341 int memory_allocation_priority_cutoff() const; 343 int memory_allocation_priority_cutoff() const;
342 344
343 void SetViewportSize(const gfx::Size& device_viewport_size); 345 void SetViewportSize(const gfx::Size& device_viewport_size);
344 gfx::Size device_viewport_size() const { return device_viewport_size_; } 346 gfx::Size device_viewport_size() const { return device_viewport_size_; }
345 347
346 void SetTopControlsLayoutHeight(float top_controls_layout_height);
347 float top_controls_layout_height() const {
348 return top_controls_layout_height_;
349 }
350
351 void SetOverhangUIResource(UIResourceId overhang_ui_resource_id, 348 void SetOverhangUIResource(UIResourceId overhang_ui_resource_id,
352 const gfx::Size& overhang_ui_resource_size); 349 const gfx::Size& overhang_ui_resource_size);
353 350
354 void SetDeviceScaleFactor(float device_scale_factor); 351 void SetDeviceScaleFactor(float device_scale_factor);
355 float device_scale_factor() const { return device_scale_factor_; } 352 float device_scale_factor() const { return device_scale_factor_; }
356 353
357 const gfx::Transform& DrawTransform() const; 354 const gfx::Transform& DrawTransform() const;
358 355
359 scoped_ptr<ScrollAndScaleSet> ProcessScrollDeltas(); 356 scoped_ptr<ScrollAndScaleSet> ProcessScrollDeltas();
360 357
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
478 // to unregister itself. 475 // to unregister itself.
479 void InsertSwapPromiseMonitor(SwapPromiseMonitor* monitor); 476 void InsertSwapPromiseMonitor(SwapPromiseMonitor* monitor);
480 void RemoveSwapPromiseMonitor(SwapPromiseMonitor* monitor); 477 void RemoveSwapPromiseMonitor(SwapPromiseMonitor* monitor);
481 478
482 void RegisterPictureLayerImpl(PictureLayerImpl* layer); 479 void RegisterPictureLayerImpl(PictureLayerImpl* layer);
483 void UnregisterPictureLayerImpl(PictureLayerImpl* layer); 480 void UnregisterPictureLayerImpl(PictureLayerImpl* layer);
484 481
485 void GetPictureLayerImplPairs( 482 void GetPictureLayerImplPairs(
486 std::vector<PictureLayerImpl::Pair>* layers) const; 483 std::vector<PictureLayerImpl::Pair>* layers) const;
487 484
485 void SetTopControlsLayoutHeight(float height);
486
488 protected: 487 protected:
489 LayerTreeHostImpl( 488 LayerTreeHostImpl(
490 const LayerTreeSettings& settings, 489 const LayerTreeSettings& settings,
491 LayerTreeHostImplClient* client, 490 LayerTreeHostImplClient* client,
492 Proxy* proxy, 491 Proxy* proxy,
493 RenderingStatsInstrumentation* rendering_stats_instrumentation, 492 RenderingStatsInstrumentation* rendering_stats_instrumentation,
494 SharedBitmapManager* manager, 493 SharedBitmapManager* manager,
495 int id); 494 int id);
496 495
497 void UpdateInnerViewportContainerSize(); 496 void UpdateInnerViewportContainerSize();
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
657 gfx::Size device_viewport_size_; 656 gfx::Size device_viewport_size_;
658 657
659 // Conversion factor from CSS pixels to physical pixels when 658 // Conversion factor from CSS pixels to physical pixels when
660 // pageScaleFactor=1. 659 // pageScaleFactor=1.
661 float device_scale_factor_; 660 float device_scale_factor_;
662 661
663 // UI resource to use for drawing overhang gutters. 662 // UI resource to use for drawing overhang gutters.
664 UIResourceId overhang_ui_resource_id_; 663 UIResourceId overhang_ui_resource_id_;
665 gfx::Size overhang_ui_resource_size_; 664 gfx::Size overhang_ui_resource_size_;
666 665
667 // Height of the top controls as known by Blink.
668 float top_controls_layout_height_;
669
670 // Optional top-level constraints that can be set by the OutputSurface. 666 // Optional top-level constraints that can be set by the OutputSurface.
671 // - external_transform_ applies a transform above the root layer 667 // - external_transform_ applies a transform above the root layer
672 // - external_viewport_ is used DrawProperties, tile management and 668 // - external_viewport_ is used DrawProperties, tile management and
673 // glViewport/window projection matrix. 669 // glViewport/window projection matrix.
674 // - external_clip_ specifies a top-level clip rect 670 // - external_clip_ specifies a top-level clip rect
675 // - viewport_rect_for_tile_priority_ is the rect in view space used for 671 // - viewport_rect_for_tile_priority_ is the rect in view space used for
676 // tiling priority. 672 // tiling priority.
677 gfx::Transform external_transform_; 673 gfx::Transform external_transform_;
678 gfx::Rect external_viewport_; 674 gfx::Rect external_viewport_;
679 gfx::Rect external_clip_; 675 gfx::Rect external_clip_;
(...skipping 26 matching lines...) Expand all
706 702
707 std::vector<PictureLayerImpl*> picture_layers_; 703 std::vector<PictureLayerImpl*> picture_layers_;
708 std::vector<PictureLayerImpl::Pair> picture_layer_pairs_; 704 std::vector<PictureLayerImpl::Pair> picture_layer_pairs_;
709 705
710 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); 706 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl);
711 }; 707 };
712 708
713 } // namespace cc 709 } // namespace cc
714 710
715 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ 711 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_common.h ('k') | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698