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

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

Issue 1602343002: compositor-worker: cc->blink mutation plumbing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@compositor-worker-ian-patch
Patch Set: Merge master + s/scoped_ptr/unique_ptr/ Created 4 years, 8 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.cc ('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 <memory> 10 #include <memory>
11 #include <set> 11 #include <set>
12 #include <string> 12 #include <string>
13 #include <unordered_map> 13 #include <unordered_map>
14 #include <vector> 14 #include <vector>
15 15
16 #include "base/callback.h"
16 #include "base/macros.h" 17 #include "base/macros.h"
17 #include "base/time/time.h" 18 #include "base/time/time.h"
19 #include "cc/animation/animation_registrar.h"
20 #include "cc/animation/layer_tree_mutator.h"
18 #include "cc/base/cc_export.h" 21 #include "cc/base/cc_export.h"
19 #include "cc/base/synced_property.h" 22 #include "cc/base/synced_property.h"
20 #include "cc/debug/frame_timing_tracker.h" 23 #include "cc/debug/frame_timing_tracker.h"
21 #include "cc/debug/micro_benchmark_controller_impl.h" 24 #include "cc/debug/micro_benchmark_controller_impl.h"
22 #include "cc/input/input_handler.h" 25 #include "cc/input/input_handler.h"
23 #include "cc/input/scrollbar_animation_controller.h" 26 #include "cc/input/scrollbar_animation_controller.h"
24 #include "cc/input/top_controls_manager_client.h" 27 #include "cc/input/top_controls_manager_client.h"
25 #include "cc/layers/layer_collections.h" 28 #include "cc/layers/layer_collections.h"
26 #include "cc/layers/render_pass_sink.h" 29 #include "cc/layers/render_pass_sink.h"
27 #include "cc/output/begin_frame_args.h" 30 #include "cc/output/begin_frame_args.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 class SwapPromise; 75 class SwapPromise;
73 class SwapPromiseMonitor; 76 class SwapPromiseMonitor;
74 class SynchronousTaskGraphRunner; 77 class SynchronousTaskGraphRunner;
75 class TextureMailboxDeleter; 78 class TextureMailboxDeleter;
76 class TopControlsManager; 79 class TopControlsManager;
77 class UIResourceBitmap; 80 class UIResourceBitmap;
78 class UIResourceRequest; 81 class UIResourceRequest;
79 struct ScrollAndScaleSet; 82 struct ScrollAndScaleSet;
80 class Viewport; 83 class Viewport;
81 84
85 using BeginFrameCallbackList = std::vector<base::Closure>;
86
82 enum class GpuRasterizationStatus { 87 enum class GpuRasterizationStatus {
83 ON, 88 ON,
84 ON_FORCED, 89 ON_FORCED,
85 OFF_DEVICE, 90 OFF_DEVICE,
86 OFF_VIEWPORT, 91 OFF_VIEWPORT,
87 MSAA_CONTENT, 92 MSAA_CONTENT,
88 OFF_CONTENT 93 OFF_CONTENT
89 }; 94 };
90 95
91 // LayerTreeHost->Proxy callback interface. 96 // LayerTreeHost->Proxy callback interface.
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after
455 460
456 ManagedMemoryPolicy ActualManagedMemoryPolicy() const; 461 ManagedMemoryPolicy ActualManagedMemoryPolicy() const;
457 462
458 size_t memory_allocation_limit_bytes() const; 463 size_t memory_allocation_limit_bytes() const;
459 464
460 void SetViewportSize(const gfx::Size& device_viewport_size); 465 void SetViewportSize(const gfx::Size& device_viewport_size);
461 gfx::Size device_viewport_size() const { return device_viewport_size_; } 466 gfx::Size device_viewport_size() const { return device_viewport_size_; }
462 467
463 const gfx::Transform& DrawTransform() const; 468 const gfx::Transform& DrawTransform() const;
464 469
470 std::unique_ptr<BeginFrameCallbackList> ProcessLayerTreeMutations();
471
465 std::unique_ptr<ScrollAndScaleSet> ProcessScrollDeltas(); 472 std::unique_ptr<ScrollAndScaleSet> ProcessScrollDeltas();
466 473
467 void set_max_memory_needed_bytes(size_t bytes) { 474 void set_max_memory_needed_bytes(size_t bytes) {
468 max_memory_needed_bytes_ = bytes; 475 max_memory_needed_bytes_ = bytes;
469 } 476 }
470 477
471 FrameRateCounter* fps_counter() { 478 FrameRateCounter* fps_counter() {
472 return fps_counter_.get(); 479 return fps_counter_.get();
473 } 480 }
474 MemoryHistory* memory_history() { 481 MemoryHistory* memory_history() {
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
621 InputHandler::ScrollStatus TryScroll(const gfx::PointF& screen_space_point, 628 InputHandler::ScrollStatus TryScroll(const gfx::PointF& screen_space_point,
622 InputHandler::ScrollInputType type, 629 InputHandler::ScrollInputType type,
623 const ScrollTree& scroll_tree, 630 const ScrollTree& scroll_tree,
624 ScrollNode* scroll_node) const; 631 ScrollNode* scroll_node) const;
625 632
626 // Returns true if a scroll offset animation is created and false if we scroll 633 // Returns true if a scroll offset animation is created and false if we scroll
627 // by the desired amount without an animation. 634 // by the desired amount without an animation.
628 bool ScrollAnimationCreate(ScrollNode* scroll_node, 635 bool ScrollAnimationCreate(ScrollNode* scroll_node,
629 const gfx::Vector2dF& scroll_amount); 636 const gfx::Vector2dF& scroll_amount);
630 637
638 void SetLayerTreeMutator(LayerTreeMutator* mutator);
639 LayerTreeMutator* mutator() { return mutator_; }
640
631 protected: 641 protected:
632 LayerTreeHostImpl( 642 LayerTreeHostImpl(
633 const LayerTreeSettings& settings, 643 const LayerTreeSettings& settings,
634 LayerTreeHostImplClient* client, 644 LayerTreeHostImplClient* client,
635 TaskRunnerProvider* task_runner_provider, 645 TaskRunnerProvider* task_runner_provider,
636 RenderingStatsInstrumentation* rendering_stats_instrumentation, 646 RenderingStatsInstrumentation* rendering_stats_instrumentation,
637 SharedBitmapManager* shared_bitmap_manager, 647 SharedBitmapManager* shared_bitmap_manager,
638 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager, 648 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager,
639 TaskGraphRunner* task_graph_runner, 649 TaskGraphRunner* task_graph_runner,
640 int id); 650 int id);
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
851 861
852 std::set<SwapPromiseMonitor*> swap_promise_monitor_; 862 std::set<SwapPromiseMonitor*> swap_promise_monitor_;
853 863
854 bool requires_high_res_to_draw_; 864 bool requires_high_res_to_draw_;
855 bool is_likely_to_require_a_draw_; 865 bool is_likely_to_require_a_draw_;
856 866
857 std::unique_ptr<FrameTimingTracker> frame_timing_tracker_; 867 std::unique_ptr<FrameTimingTracker> frame_timing_tracker_;
858 868
859 std::unique_ptr<Viewport> viewport_; 869 std::unique_ptr<Viewport> viewport_;
860 870
871 LayerTreeMutator* mutator_;
872
861 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); 873 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl);
862 }; 874 };
863 875
864 } // namespace cc 876 } // namespace cc
865 877
866 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ 878 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host.cc ('k') | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698