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

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

Issue 2188943002: Remove OutputSurfaceClient external clip (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: viewport -> viewport_size Created 4 years, 4 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/test/fake_output_surface_client.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 <stddef.h> 8 #include <stddef.h>
9 9
10 #include <bitset> 10 #include <bitset>
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 const gfx::Transform& transform) override; 372 const gfx::Transform& transform) override;
373 void DidLoseOutputSurface() override; 373 void DidLoseOutputSurface() override;
374 void DidSwapBuffersComplete() override; 374 void DidSwapBuffersComplete() override;
375 void DidReceiveTextureInUseResponses( 375 void DidReceiveTextureInUseResponses(
376 const gpu::TextureInUseResponses& responses) override; 376 const gpu::TextureInUseResponses& responses) override;
377 void ReclaimResources(const ReturnedResourceArray& resources) override; 377 void ReclaimResources(const ReturnedResourceArray& resources) override;
378 void SetMemoryPolicy(const ManagedMemoryPolicy& policy) override; 378 void SetMemoryPolicy(const ManagedMemoryPolicy& policy) override;
379 void SetTreeActivationCallback(const base::Closure& callback) override; 379 void SetTreeActivationCallback(const base::Closure& callback) override;
380 void OnDraw(const gfx::Transform& transform, 380 void OnDraw(const gfx::Transform& transform,
381 const gfx::Rect& viewport, 381 const gfx::Rect& viewport,
382 const gfx::Rect& clip,
383 bool resourceless_software_draw) override; 382 bool resourceless_software_draw) override;
384 383
385 // LayerTreeMutatorClient. 384 // LayerTreeMutatorClient.
386 void SetNeedsMutate() override; 385 void SetNeedsMutate() override;
387 386
388 // Called from LayerTreeImpl. 387 // Called from LayerTreeImpl.
389 void OnCanDrawStateChangedForTree(); 388 void OnCanDrawStateChangedForTree();
390 389
391 // Implementation. 390 // Implementation.
392 int id() const { return id_; } 391 int id() const { return id_; }
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
563 gfx::Vector2dF ComputeScrollDelta(ScrollNode* scroll_node, 562 gfx::Vector2dF ComputeScrollDelta(ScrollNode* scroll_node,
564 const gfx::Vector2dF& delta); 563 const gfx::Vector2dF& delta);
565 564
566 void ScheduleMicroBenchmark(std::unique_ptr<MicroBenchmarkImpl> benchmark); 565 void ScheduleMicroBenchmark(std::unique_ptr<MicroBenchmarkImpl> benchmark);
567 566
568 CompositorFrameMetadata MakeCompositorFrameMetadata() const; 567 CompositorFrameMetadata MakeCompositorFrameMetadata() const;
569 // Viewport rectangle and clip in nonflipped window space. These rects 568 // Viewport rectangle and clip in nonflipped window space. These rects
570 // should only be used by Renderer subclasses to populate glViewport/glClip 569 // should only be used by Renderer subclasses to populate glViewport/glClip
571 // and their software-mode equivalents. 570 // and their software-mode equivalents.
572 gfx::Rect DeviceViewport() const; 571 gfx::Rect DeviceViewport() const;
573 gfx::Rect DeviceClip() const;
574 572
575 // When a SwapPromiseMonitor is created on the impl thread, it calls 573 // When a SwapPromiseMonitor is created on the impl thread, it calls
576 // InsertSwapPromiseMonitor() to register itself with LayerTreeHostImpl. 574 // InsertSwapPromiseMonitor() to register itself with LayerTreeHostImpl.
577 // When the monitor is destroyed, it calls RemoveSwapPromiseMonitor() 575 // When the monitor is destroyed, it calls RemoveSwapPromiseMonitor()
578 // to unregister itself. 576 // to unregister itself.
579 void InsertSwapPromiseMonitor(SwapPromiseMonitor* monitor); 577 void InsertSwapPromiseMonitor(SwapPromiseMonitor* monitor);
580 void RemoveSwapPromiseMonitor(SwapPromiseMonitor* monitor); 578 void RemoveSwapPromiseMonitor(SwapPromiseMonitor* monitor);
581 579
582 // TODO(weiliangc): Replace RequiresHighResToDraw with scheduler waits for 580 // TODO(weiliangc): Replace RequiresHighResToDraw with scheduler waits for
583 // ReadyToDraw. crbug.com/469175 581 // ReadyToDraw. crbug.com/469175
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
804 // Viewport size passed in from the main thread, in physical pixels. This 802 // Viewport size passed in from the main thread, in physical pixels. This
805 // value is the default size for all concepts of physical viewport (draw 803 // value is the default size for all concepts of physical viewport (draw
806 // viewport, scrolling viewport and device viewport), but it can be 804 // viewport, scrolling viewport and device viewport), but it can be
807 // overridden. 805 // overridden.
808 gfx::Size device_viewport_size_; 806 gfx::Size device_viewport_size_;
809 807
810 // Optional top-level constraints that can be set by the OutputSurface. 808 // Optional top-level constraints that can be set by the OutputSurface.
811 // - external_transform_ applies a transform above the root layer 809 // - external_transform_ applies a transform above the root layer
812 // - external_viewport_ is used DrawProperties, tile management and 810 // - external_viewport_ is used DrawProperties, tile management and
813 // glViewport/window projection matrix. 811 // glViewport/window projection matrix.
814 // - external_clip_ specifies a top-level clip rect
815 // - viewport_rect_for_tile_priority_ is the rect in view space used for 812 // - viewport_rect_for_tile_priority_ is the rect in view space used for
816 // tiling priority. 813 // tiling priority.
817 gfx::Transform external_transform_; 814 gfx::Transform external_transform_;
818 gfx::Rect external_viewport_; 815 gfx::Rect external_viewport_;
819 gfx::Rect external_clip_;
820 gfx::Rect viewport_rect_for_tile_priority_; 816 gfx::Rect viewport_rect_for_tile_priority_;
821 bool resourceless_software_draw_; 817 bool resourceless_software_draw_;
822 818
823 gfx::Rect viewport_damage_rect_; 819 gfx::Rect viewport_damage_rect_;
824 820
825 std::unique_ptr<AnimationHost> animation_host_; 821 std::unique_ptr<AnimationHost> animation_host_;
826 std::set<VideoFrameController*> video_frame_controllers_; 822 std::set<VideoFrameController*> video_frame_controllers_;
827 823
828 // Map from scroll layer ID to scrollbar animation controller. 824 // Map from scroll layer ID to scrollbar animation controller.
829 // There is one animation controller per pair of overlay scrollbars. 825 // There is one animation controller per pair of overlay scrollbars.
(...skipping 24 matching lines...) Expand all
854 850
855 std::unique_ptr<PendingTreeDurationHistogramTimer> 851 std::unique_ptr<PendingTreeDurationHistogramTimer>
856 pending_tree_duration_timer_; 852 pending_tree_duration_timer_;
857 853
858 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); 854 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl);
859 }; 855 };
860 856
861 } // namespace cc 857 } // namespace cc
862 858
863 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ 859 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_
OLDNEW
« no previous file with comments | « cc/test/fake_output_surface_client.h ('k') | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698