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

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

Issue 2641023002: cc: Remove ReflectedMainFrameState. (Closed)
Patch Set: Created 3 years, 11 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.cc ('k') | cc/trees/layer_tree_host_in_process.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_IN_PROCESS_H_ 5 #ifndef CC_TREES_LAYER_TREE_HOST_IN_PROCESS_H_
6 #define CC_TREES_LAYER_TREE_HOST_IN_PROCESS_H_ 6 #define CC_TREES_LAYER_TREE_HOST_IN_PROCESS_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 47
48 namespace cc { 48 namespace cc {
49 class MutatorEvents; 49 class MutatorEvents;
50 class Layer; 50 class Layer;
51 class LayerTreeHostClient; 51 class LayerTreeHostClient;
52 class LayerTreeHostImpl; 52 class LayerTreeHostImpl;
53 class LayerTreeHostImplClient; 53 class LayerTreeHostImplClient;
54 class LayerTreeHostSingleThreadClient; 54 class LayerTreeHostSingleThreadClient;
55 class LayerTreeMutator; 55 class LayerTreeMutator;
56 class MutatorHost; 56 class MutatorHost;
57 class PropertyTrees;
58 class RenderingStatsInstrumentation; 57 class RenderingStatsInstrumentation;
59 class TaskGraphRunner; 58 class TaskGraphRunner;
60 struct ReflectedMainFrameState;
61 struct RenderingStats; 59 struct RenderingStats;
62 struct ScrollAndScaleSet; 60 struct ScrollAndScaleSet;
63 61
64 class CC_EXPORT LayerTreeHostInProcess : public LayerTreeHost { 62 class CC_EXPORT LayerTreeHostInProcess : public LayerTreeHost {
65 public: 63 public:
66 // TODO(sad): InitParams should be a movable type so that it can be 64 // TODO(sad): InitParams should be a movable type so that it can be
67 // std::move()d to the Create* functions. 65 // std::move()d to the Create* functions.
68 struct CC_EXPORT InitParams { 66 struct CC_EXPORT InitParams {
69 LayerTreeHostClient* client = nullptr; 67 LayerTreeHostClient* client = nullptr;
70 TaskGraphRunner* task_graph_runner = nullptr; 68 TaskGraphRunner* task_graph_runner = nullptr;
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 void DidLoseCompositorFrameSink(); 150 void DidLoseCompositorFrameSink();
153 void DidCommitAndDrawFrame() { client_->DidCommitAndDrawFrame(); } 151 void DidCommitAndDrawFrame() { client_->DidCommitAndDrawFrame(); }
154 void DidReceiveCompositorFrameAck() { 152 void DidReceiveCompositorFrameAck() {
155 client_->DidReceiveCompositorFrameAck(); 153 client_->DidReceiveCompositorFrameAck();
156 } 154 }
157 bool UpdateLayers(); 155 bool UpdateLayers();
158 // Called when the compositor completed page scale animation. 156 // Called when the compositor completed page scale animation.
159 void DidCompletePageScaleAnimation(); 157 void DidCompletePageScaleAnimation();
160 void ApplyScrollAndScale(ScrollAndScaleSet* info); 158 void ApplyScrollAndScale(ScrollAndScaleSet* info);
161 159
162 void SetReflectedMainFrameState(
163 std::unique_ptr<ReflectedMainFrameState> reflected_main_frame_state);
164 const ReflectedMainFrameState* reflected_main_frame_state_for_testing()
165 const {
166 return reflected_main_frame_state_.get();
167 }
168
169 LayerTreeHostClient* client() { return client_; } 160 LayerTreeHostClient* client() { return client_; }
170 161
171 bool gpu_rasterization_histogram_recorded() const { 162 bool gpu_rasterization_histogram_recorded() const {
172 return gpu_rasterization_histogram_recorded_; 163 return gpu_rasterization_histogram_recorded_;
173 } 164 }
174 165
175 void CollectRenderingStats(RenderingStats* stats) const; 166 void CollectRenderingStats(RenderingStats* stats) const;
176 167
177 RenderingStatsInstrumentation* rendering_stats_instrumentation() const { 168 RenderingStatsInstrumentation* rendering_stats_instrumentation() const {
178 return rendering_stats_instrumentation_.get(); 169 return rendering_stats_instrumentation_.get();
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 bool next_commit_forces_recalculate_raster_scales_ = false; 275 bool next_commit_forces_recalculate_raster_scales_ = false;
285 // Track when we're inside a main frame to see if compositor is being 276 // Track when we're inside a main frame to see if compositor is being
286 // destroyed midway which causes a crash. crbug.com/654672 277 // destroyed midway which causes a crash. crbug.com/654672
287 bool inside_main_frame_ = false; 278 bool inside_main_frame_ = false;
288 279
289 TaskGraphRunner* task_graph_runner_; 280 TaskGraphRunner* task_graph_runner_;
290 281
291 SurfaceSequenceGenerator surface_sequence_generator_; 282 SurfaceSequenceGenerator surface_sequence_generator_;
292 uint32_t num_consecutive_frames_suitable_for_gpu_ = 0; 283 uint32_t num_consecutive_frames_suitable_for_gpu_ = 0;
293 284
294 // The state that was expected to be reflected from the main thread during
295 // BeginMainFrame, but could not be done. The client provides these deltas
296 // to use during the commit instead of applying them at that point because
297 // its necessary for these deltas to be applied *after* PropertyTrees are
298 // built/updated on the main thread.
299 // TODO(khushalsagar): Investigate removing this after SPV2, since then we
300 // should get these PropertyTrees directly from blink?
301 std::unique_ptr<ReflectedMainFrameState> reflected_main_frame_state_;
302
303 scoped_refptr<base::SequencedTaskRunner> image_worker_task_runner_; 285 scoped_refptr<base::SequencedTaskRunner> image_worker_task_runner_;
304 286
305 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostInProcess); 287 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostInProcess);
306 }; 288 };
307 289
308 } // namespace cc 290 } // namespace cc
309 291
310 #endif // CC_TREES_LAYER_TREE_HOST_IN_PROCESS_H_ 292 #endif // CC_TREES_LAYER_TREE_HOST_IN_PROCESS_H_
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_common.cc ('k') | cc/trees/layer_tree_host_in_process.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698