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

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

Issue 2445093002: cc/blimp: Add synchronization for scroll/scale state. (Closed)
Patch Set: test compile Created 4 years, 1 month 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 class LayerTreeHostSingleThreadClient; 60 class LayerTreeHostSingleThreadClient;
61 class LayerTreeMutator; 61 class LayerTreeMutator;
62 class PropertyTrees; 62 class PropertyTrees;
63 class Region; 63 class Region;
64 class RemoteProtoChannel; 64 class RemoteProtoChannel;
65 class RenderingStatsInstrumentation; 65 class RenderingStatsInstrumentation;
66 class ResourceProvider; 66 class ResourceProvider;
67 class ResourceUpdateQueue; 67 class ResourceUpdateQueue;
68 class TaskGraphRunner; 68 class TaskGraphRunner;
69 struct PendingPageScaleAnimation; 69 struct PendingPageScaleAnimation;
70 struct ReflectedMainFrameState;
70 struct RenderingStats; 71 struct RenderingStats;
71 struct ScrollAndScaleSet; 72 struct ScrollAndScaleSet;
72 73
73 namespace proto { 74 namespace proto {
74 class LayerTreeHost; 75 class LayerTreeHost;
75 } 76 }
76 77
77 class CC_EXPORT LayerTreeHostInProcess : public LayerTreeHost { 78 class CC_EXPORT LayerTreeHostInProcess : public LayerTreeHost {
78 public: 79 public:
79 // TODO(sad): InitParams should be a movable type so that it can be 80 // TODO(sad): InitParams should be a movable type so that it can be
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 void DidLoseCompositorFrameSink(); 181 void DidLoseCompositorFrameSink();
181 void DidCommitAndDrawFrame() { client_->DidCommitAndDrawFrame(); } 182 void DidCommitAndDrawFrame() { client_->DidCommitAndDrawFrame(); }
182 void DidReceiveCompositorFrameAck() { 183 void DidReceiveCompositorFrameAck() {
183 client_->DidReceiveCompositorFrameAck(); 184 client_->DidReceiveCompositorFrameAck();
184 } 185 }
185 bool UpdateLayers(); 186 bool UpdateLayers();
186 // Called when the compositor completed page scale animation. 187 // Called when the compositor completed page scale animation.
187 void DidCompletePageScaleAnimation(); 188 void DidCompletePageScaleAnimation();
188 void ApplyScrollAndScale(ScrollAndScaleSet* info); 189 void ApplyScrollAndScale(ScrollAndScaleSet* info);
189 190
191 void SetReflectedMainFrameState(
192 std::unique_ptr<ReflectedMainFrameState> reflected_main_frame_state);
193 const ReflectedMainFrameState* reflected_main_frame_state_for_testing()
194 const {
195 return reflected_main_frame_state_.get();
196 }
197
190 LayerTreeHostClient* client() { return client_; } 198 LayerTreeHostClient* client() { return client_; }
191 199
192 bool gpu_rasterization_histogram_recorded() const { 200 bool gpu_rasterization_histogram_recorded() const {
193 return gpu_rasterization_histogram_recorded_; 201 return gpu_rasterization_histogram_recorded_;
194 } 202 }
195 203
196 void CollectRenderingStats(RenderingStats* stats) const; 204 void CollectRenderingStats(RenderingStats* stats) const;
197 205
198 RenderingStatsInstrumentation* rendering_stats_instrumentation() const { 206 RenderingStatsInstrumentation* rendering_stats_instrumentation() const {
199 return rendering_stats_instrumentation_.get(); 207 return rendering_stats_instrumentation_.get();
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 350
343 TaskGraphRunner* task_graph_runner_; 351 TaskGraphRunner* task_graph_runner_;
344 352
345 ImageSerializationProcessor* image_serialization_processor_; 353 ImageSerializationProcessor* image_serialization_processor_;
346 std::unique_ptr<EnginePictureCache> engine_picture_cache_; 354 std::unique_ptr<EnginePictureCache> engine_picture_cache_;
347 std::unique_ptr<ClientPictureCache> client_picture_cache_; 355 std::unique_ptr<ClientPictureCache> client_picture_cache_;
348 356
349 SurfaceSequenceGenerator surface_sequence_generator_; 357 SurfaceSequenceGenerator surface_sequence_generator_;
350 uint32_t num_consecutive_frames_suitable_for_gpu_ = 0; 358 uint32_t num_consecutive_frames_suitable_for_gpu_ = 0;
351 359
360 // The state that was expected to be reflected from the main thread during
361 // BeginMainFrame, but could not be done. The client provides these deltas
362 // to use during the commit instead of applying them at that point because
363 // its necessary for these deltas to be applied *after* PropertyTrees are
364 // built/updated on the main thread.
365 // TODO(khushalsagar): Investigate removing this after SPV2, since then we
366 // should get these PropertyTrees directly from blink?
367 std::unique_ptr<ReflectedMainFrameState> reflected_main_frame_state_;
368
352 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostInProcess); 369 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostInProcess);
353 }; 370 };
354 371
355 } // namespace cc 372 } // namespace cc
356 373
357 #endif // CC_TREES_LAYER_TREE_HOST_IN_PROCESS_H_ 374 #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