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

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: move application of deltas to push time. 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
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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 class PropertyTrees; 66 class PropertyTrees;
67 class Region; 67 class Region;
68 class RemoteProtoChannel; 68 class RemoteProtoChannel;
69 class RenderingStatsInstrumentation; 69 class RenderingStatsInstrumentation;
70 class ResourceProvider; 70 class ResourceProvider;
71 class ResourceUpdateQueue; 71 class ResourceUpdateQueue;
72 class SharedBitmapManager; 72 class SharedBitmapManager;
73 class TaskGraphRunner; 73 class TaskGraphRunner;
74 class TopControlsManager; 74 class TopControlsManager;
75 struct PendingPageScaleAnimation; 75 struct PendingPageScaleAnimation;
76 struct ReflectedMainFrameState;
76 struct RenderingStats; 77 struct RenderingStats;
77 struct ScrollAndScaleSet; 78 struct ScrollAndScaleSet;
78 79
79 namespace proto { 80 namespace proto {
80 class LayerTreeHost; 81 class LayerTreeHost;
81 } 82 }
82 83
83 class CC_EXPORT LayerTreeHostInProcess : public LayerTreeHost { 84 class CC_EXPORT LayerTreeHostInProcess : public LayerTreeHost {
84 public: 85 public:
85 // TODO(sad): InitParams should be a movable type so that it can be 86 // TODO(sad): InitParams should be a movable type so that it can be
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 void DidLoseCompositorFrameSink(); 190 void DidLoseCompositorFrameSink();
190 void DidCommitAndDrawFrame() { client_->DidCommitAndDrawFrame(); } 191 void DidCommitAndDrawFrame() { client_->DidCommitAndDrawFrame(); }
191 void DidReceiveCompositorFrameAck() { 192 void DidReceiveCompositorFrameAck() {
192 client_->DidReceiveCompositorFrameAck(); 193 client_->DidReceiveCompositorFrameAck();
193 } 194 }
194 bool UpdateLayers(); 195 bool UpdateLayers();
195 // Called when the compositor completed page scale animation. 196 // Called when the compositor completed page scale animation.
196 void DidCompletePageScaleAnimation(); 197 void DidCompletePageScaleAnimation();
197 void ApplyScrollAndScale(ScrollAndScaleSet* info); 198 void ApplyScrollAndScale(ScrollAndScaleSet* info);
198 199
200 void SetReflectedMainFrameState(
201 std::unique_ptr<ReflectedMainFrameState> reflected_main_frame_state);
202
199 LayerTreeHostClient* client() { return client_; } 203 LayerTreeHostClient* client() { return client_; }
200 204
201 bool gpu_rasterization_histogram_recorded() const { 205 bool gpu_rasterization_histogram_recorded() const {
202 return gpu_rasterization_histogram_recorded_; 206 return gpu_rasterization_histogram_recorded_;
203 } 207 }
204 208
205 void CollectRenderingStats(RenderingStats* stats) const; 209 void CollectRenderingStats(RenderingStats* stats) const;
206 210
207 RenderingStatsInstrumentation* rendering_stats_instrumentation() const { 211 RenderingStatsInstrumentation* rendering_stats_instrumentation() const {
208 return rendering_stats_instrumentation_.get(); 212 return rendering_stats_instrumentation_.get();
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager_; 364 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager_;
361 TaskGraphRunner* task_graph_runner_; 365 TaskGraphRunner* task_graph_runner_;
362 366
363 ImageSerializationProcessor* image_serialization_processor_; 367 ImageSerializationProcessor* image_serialization_processor_;
364 std::unique_ptr<EnginePictureCache> engine_picture_cache_; 368 std::unique_ptr<EnginePictureCache> engine_picture_cache_;
365 std::unique_ptr<ClientPictureCache> client_picture_cache_; 369 std::unique_ptr<ClientPictureCache> client_picture_cache_;
366 370
367 SurfaceSequenceGenerator surface_sequence_generator_; 371 SurfaceSequenceGenerator surface_sequence_generator_;
368 uint32_t num_consecutive_frames_suitable_for_gpu_ = 0; 372 uint32_t num_consecutive_frames_suitable_for_gpu_ = 0;
369 373
374 // The state that was expected to be reflected from the main thread during
375 // BeginMainFrame, but could not be done. The client provides these deltas
376 // to use during the commit instead of applying them at that point because
377 // its necessary for these deltas to be applied *after* PropertyTrees are
378 // built/updated on the main thread.
379 // TODO(khushalsagar): Investigate removing this after SPV2, since then we
380 // should get these PropertyTrees directly from blink?
381 std::unique_ptr<ReflectedMainFrameState> reflected_main_frame_state_;
382
370 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostInProcess); 383 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostInProcess);
371 }; 384 };
372 385
373 } // namespace cc 386 } // namespace cc
374 387
375 #endif // CC_TREES_LAYER_TREE_HOST_IN_PROCESS_H_ 388 #endif // CC_TREES_LAYER_TREE_HOST_IN_PROCESS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698