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

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

Powered by Google App Engine
This is Rietveld 408576698