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

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

Issue 2251143002: cc: Reland Move data to LayerTree from LayerTreeHost. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: better fix? Created 4 years, 4 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
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_H_ 5 #ifndef CC_TREES_LAYER_TREE_HOST_H_
6 #define CC_TREES_LAYER_TREE_HOST_H_ 6 #define CC_TREES_LAYER_TREE_HOST_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 // a CompositorMessageToImpl::CloseImpl message from the server. This ensures 121 // a CompositorMessageToImpl::CloseImpl message from the server. This ensures
122 // that the client will not send any compositor messages once the 122 // that the client will not send any compositor messages once the
123 // LayerTreeHost on the server is destroyed. 123 // LayerTreeHost on the server is destroyed.
124 static std::unique_ptr<LayerTreeHost> CreateRemoteClient( 124 static std::unique_ptr<LayerTreeHost> CreateRemoteClient(
125 RemoteProtoChannel* remote_proto_channel, 125 RemoteProtoChannel* remote_proto_channel,
126 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner, 126 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner,
127 InitParams* params); 127 InitParams* params);
128 128
129 virtual ~LayerTreeHost(); 129 virtual ~LayerTreeHost();
130 130
131 // LayerTreeHost interface to Proxy. 131 // LayerTreeHost interface to Proxy
132 void WillBeginMainFrame(); 132 void WillBeginMainFrame();
133 void DidBeginMainFrame(); 133 void DidBeginMainFrame();
134 void BeginMainFrame(const BeginFrameArgs& args); 134 void BeginMainFrame(const BeginFrameArgs& args);
135 void BeginMainFrameNotExpectedSoon(); 135 void BeginMainFrameNotExpectedSoon();
136 void AnimateLayers(base::TimeTicks monotonic_frame_begin_time); 136 void AnimateLayers(base::TimeTicks monotonic_frame_begin_time);
137 void DidStopFlinging(); 137 void DidStopFlinging();
138 void RequestMainFrameUpdate(); 138 void RequestMainFrameUpdate();
139 void FinishCommitOnImplThread(LayerTreeHostImpl* host_impl); 139 void FinishCommitOnImplThread(LayerTreeHostImpl* host_impl);
140 void WillCommit(); 140 void WillCommit();
141 void CommitComplete(); 141 void CommitComplete();
142 void SetOutputSurface(std::unique_ptr<OutputSurface> output_surface); 142 void SetOutputSurface(std::unique_ptr<OutputSurface> output_surface);
143 std::unique_ptr<OutputSurface> ReleaseOutputSurface(); 143 std::unique_ptr<OutputSurface> ReleaseOutputSurface();
144 void RequestNewOutputSurface(); 144 void RequestNewOutputSurface();
145 void DidInitializeOutputSurface(); 145 void DidInitializeOutputSurface();
146 void DidFailToInitializeOutputSurface(); 146 void DidFailToInitializeOutputSurface();
147 virtual std::unique_ptr<LayerTreeHostImpl> CreateLayerTreeHostImpl( 147 virtual std::unique_ptr<LayerTreeHostImpl> CreateLayerTreeHostImpl(
148 LayerTreeHostImplClient* client); 148 LayerTreeHostImplClient* client);
149 void DidLoseOutputSurface(); 149 void DidLoseOutputSurface();
150 bool output_surface_lost() const { return output_surface_lost_; } 150 bool output_surface_lost() const { return output_surface_lost_; }
151 void DidCommitAndDrawFrame() { client_->DidCommitAndDrawFrame(); } 151 void DidCommitAndDrawFrame() { client_->DidCommitAndDrawFrame(); }
152 void DidCompleteSwapBuffers() { client_->DidCompleteSwapBuffers(); } 152 void DidCompleteSwapBuffers() { client_->DidCompleteSwapBuffers(); }
153 bool UpdateLayers(); 153 bool UpdateLayers();
154 // Called when the compositor completed page scale animation.
155 void DidCompletePageScaleAnimation();
154 156
155 LayerListIterator<Layer> begin() const; 157 LayerListIterator<Layer> begin() const;
156 LayerListIterator<Layer> end() const; 158 LayerListIterator<Layer> end() const;
157 LayerListReverseIterator<Layer> rbegin(); 159 LayerListReverseIterator<Layer> rbegin();
158 LayerListReverseIterator<Layer> rend(); 160 LayerListReverseIterator<Layer> rend();
159 161
160 // Called when the compositor completed page scale animation.
161 void DidCompletePageScaleAnimation();
162
163 LayerTreeHostClient* client() { return client_; } 162 LayerTreeHostClient* client() { return client_; }
164 const base::WeakPtr<InputHandler>& GetInputHandler() { 163 const base::WeakPtr<InputHandler>& GetInputHandler() {
165 return input_handler_weak_ptr_; 164 return input_handler_weak_ptr_;
166 } 165 }
167 166
168 void NotifyInputThrottledUntilCommit(); 167 void NotifyInputThrottledUntilCommit();
169 168
170 void LayoutAndUpdateLayers(); 169 void LayoutAndUpdateLayers();
171 void Composite(base::TimeTicks frame_begin_time); 170 void Composite(base::TimeTicks frame_begin_time);
172 171
(...skipping 11 matching lines...) Expand all
184 183
185 RenderingStatsInstrumentation* rendering_stats_instrumentation() const { 184 RenderingStatsInstrumentation* rendering_stats_instrumentation() const {
186 return rendering_stats_instrumentation_.get(); 185 return rendering_stats_instrumentation_.get();
187 } 186 }
188 187
189 virtual const RendererCapabilities& GetRendererCapabilities() const; 188 virtual const RendererCapabilities& GetRendererCapabilities() const;
190 189
191 void SetNeedsAnimate(); 190 void SetNeedsAnimate();
192 virtual void SetNeedsUpdateLayers(); 191 virtual void SetNeedsUpdateLayers();
193 virtual void SetNeedsCommit(); 192 virtual void SetNeedsCommit();
194 virtual void SetNeedsFullTreeSync();
195 virtual void SetNeedsMetaInfoRecomputation(
196 bool needs_meta_info_recomputation);
197 void SetNeedsRedraw(); 193 void SetNeedsRedraw();
198 void SetNeedsRedrawRect(const gfx::Rect& damage_rect); 194 void SetNeedsRedrawRect(const gfx::Rect& damage_rect);
199 bool CommitRequested() const; 195 bool CommitRequested() const;
200 bool BeginMainFrameRequested() const; 196 bool BeginMainFrameRequested() const;
201 197
202 void SetNextCommitWaitsForActivation(); 198 void SetNextCommitWaitsForActivation();
203 199
204 void SetNextCommitForcesRedraw(); 200 void SetNextCommitForcesRedraw();
205 201
206 void SetAnimationEvents(std::unique_ptr<AnimationEvents> events); 202 void SetAnimationEvents(std::unique_ptr<AnimationEvents> events);
207 203
208 void SetRootLayer(scoped_refptr<Layer> root_layer);
209 Layer* root_layer() { return root_layer_.get(); }
210 const Layer* root_layer() const { return root_layer_.get(); }
211 const Layer* overscroll_elasticity_layer() const {
212 return overscroll_elasticity_layer_.get();
213 }
214 const Layer* page_scale_layer() const { return page_scale_layer_.get(); }
215 void RegisterViewportLayers(scoped_refptr<Layer> overscroll_elasticity_layer,
216 scoped_refptr<Layer> page_scale_layer,
217 scoped_refptr<Layer> inner_viewport_scroll_layer,
218 scoped_refptr<Layer> outer_viewport_scroll_layer);
219 Layer* inner_viewport_scroll_layer() const {
220 return inner_viewport_scroll_layer_.get();
221 }
222 Layer* outer_viewport_scroll_layer() const {
223 return outer_viewport_scroll_layer_.get();
224 }
225
226 void RegisterSelection(const LayerSelection& selection);
227
228 bool have_scroll_event_handlers() const {
229 return have_scroll_event_handlers_;
230 }
231 void SetHaveScrollEventHandlers(bool have_event_handlers);
232
233 void SetEventListenerProperties(EventListenerClass event_class,
234 EventListenerProperties event_properties);
235 EventListenerProperties event_listener_properties(
236 EventListenerClass event_class) const {
237 return event_listener_properties_[static_cast<size_t>(event_class)];
238 }
239
240 const LayerTreeSettings& settings() const { return settings_; } 204 const LayerTreeSettings& settings() const { return settings_; }
241 205
242 void SetDebugState(const LayerTreeDebugState& debug_state); 206 void SetDebugState(const LayerTreeDebugState& debug_state);
243 const LayerTreeDebugState& debug_state() const { return debug_state_; } 207 const LayerTreeDebugState& debug_state() const { return debug_state_; }
244 208
245 bool has_gpu_rasterization_trigger() const { 209 bool has_gpu_rasterization_trigger() const {
246 return has_gpu_rasterization_trigger_; 210 return has_gpu_rasterization_trigger_;
247 } 211 }
248 void SetHasGpuRasterizationTrigger(bool has_trigger); 212 void SetHasGpuRasterizationTrigger(bool has_trigger);
249 213
250 void SetViewportSize(const gfx::Size& device_viewport_size);
251 void SetTopControlsHeight(float height, bool shrink);
252 void SetTopControlsShownRatio(float ratio);
253
254 gfx::Size device_viewport_size() const { return device_viewport_size_; }
255
256 void ApplyPageScaleDeltaFromImplSide(float page_scale_delta); 214 void ApplyPageScaleDeltaFromImplSide(float page_scale_delta);
257 void SetPageScaleFactorAndLimits(float page_scale_factor,
258 float min_page_scale_factor,
259 float max_page_scale_factor);
260 float page_scale_factor() const { return page_scale_factor_; }
261 gfx::Vector2dF elastic_overscroll() const { return elastic_overscroll_; }
262
263 SkColor background_color() const { return background_color_; }
264 void set_background_color(SkColor color) { background_color_ = color; }
265
266 void set_has_transparent_background(bool transparent) {
267 has_transparent_background_ = transparent;
268 }
269 215
270 void SetVisible(bool visible); 216 void SetVisible(bool visible);
271 bool visible() const { return visible_; } 217 bool visible() const { return visible_; }
272 218
273 void StartPageScaleAnimation(const gfx::Vector2d& target_offset,
274 bool use_anchor,
275 float scale,
276 base::TimeDelta duration);
277 bool HasPendingPageScaleAnimation() const;
278
279 void ApplyScrollAndScale(ScrollAndScaleSet* info); 219 void ApplyScrollAndScale(ScrollAndScaleSet* info);
280 void SetImplTransform(const gfx::Transform& transform);
281
282 void SetDeviceScaleFactor(float device_scale_factor);
283 void SetPaintedDeviceScaleFactor(float painted_device_scale_factor);
284
285 float device_scale_factor() const { return device_scale_factor_; }
286 220
287 void UpdateTopControlsState(TopControlsState constraints, 221 void UpdateTopControlsState(TopControlsState constraints,
288 TopControlsState current, 222 TopControlsState current,
289 bool animate); 223 bool animate);
290 224
291 HeadsUpDisplayLayer* hud_layer() const { return hud_layer_.get(); }
292
293 Proxy* proxy() const { return proxy_.get(); } 225 Proxy* proxy() const { return proxy_.get(); }
294 TaskRunnerProvider* task_runner_provider() const { 226 TaskRunnerProvider* task_runner_provider() const {
295 return task_runner_provider_.get(); 227 return task_runner_provider_.get();
296 } 228 }
297 AnimationHost* animation_host() const; 229 AnimationHost* animation_host() const;
298 230
299 bool has_output_surface() const { return !!current_output_surface_; } 231 bool has_output_surface() const { return !!current_output_surface_; }
300 232
301 // CreateUIResource creates a resource given a bitmap. The bitmap is 233 // CreateUIResource creates a resource given a bitmap. The bitmap is
302 // generated via an interface function, which is called when initializing the 234 // generated via an interface function, which is called when initializing the
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 // See swap_promise.h for how to use SwapPromise. 266 // See swap_promise.h for how to use SwapPromise.
335 void QueueSwapPromise(std::unique_ptr<SwapPromise> swap_promise); 267 void QueueSwapPromise(std::unique_ptr<SwapPromise> swap_promise);
336 void BreakSwapPromises(SwapPromise::DidNotSwapReason reason); 268 void BreakSwapPromises(SwapPromise::DidNotSwapReason reason);
337 std::vector<std::unique_ptr<SwapPromise>> TakeSwapPromises(); 269 std::vector<std::unique_ptr<SwapPromise>> TakeSwapPromises();
338 270
339 size_t num_queued_swap_promises() const { return swap_promise_list_.size(); } 271 size_t num_queued_swap_promises() const { return swap_promise_list_.size(); }
340 272
341 void set_surface_client_id(uint32_t client_id); 273 void set_surface_client_id(uint32_t client_id);
342 SurfaceSequence CreateSurfaceSequence(); 274 SurfaceSequence CreateSurfaceSequence();
343 275
344 PropertyTrees* property_trees() { return &property_trees_; }
345 bool needs_meta_info_recomputation() {
346 return needs_meta_info_recomputation_;
347 }
348
349 void SetLayerTreeMutator(std::unique_ptr<LayerTreeMutator> mutator); 276 void SetLayerTreeMutator(std::unique_ptr<LayerTreeMutator> mutator);
350 277
351 Layer* LayerById(int id) const; 278 Layer* LayerById(int id) const;
352 279
353 Layer* LayerByElementId(ElementId element_id) const; 280 Layer* LayerByElementId(ElementId element_id) const;
354 void AddToElementMap(Layer* layer); 281 void AddToElementMap(Layer* layer);
355 void RemoveFromElementMap(Layer* layer); 282 void RemoveFromElementMap(Layer* layer);
356 283
357 // MutatorHostClient implementation. 284 // MutatorHostClient implementation.
358 bool IsElementInList(ElementId element_id, 285 bool IsElementInList(ElementId element_id,
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
415 } 342 }
416 343
417 EnginePictureCache* engine_picture_cache() const { 344 EnginePictureCache* engine_picture_cache() const {
418 return engine_picture_cache_ ? engine_picture_cache_.get() : nullptr; 345 return engine_picture_cache_ ? engine_picture_cache_.get() : nullptr;
419 } 346 }
420 347
421 ClientPictureCache* client_picture_cache() const { 348 ClientPictureCache* client_picture_cache() const {
422 return client_picture_cache_ ? client_picture_cache_.get() : nullptr; 349 return client_picture_cache_ ? client_picture_cache_.get() : nullptr;
423 } 350 }
424 351
425 LayerTree* GetLayerTree() { return &layer_tree_; } 352 LayerTree* GetLayerTree() { return layer_tree_.get(); }
426 const LayerTree* GetLayerTree() const { return &layer_tree_; } 353 const LayerTree* GetLayerTree() const { return layer_tree_.get(); }
354
355 void ResetGpuRasterizationTracking();
427 356
428 protected: 357 protected:
358 // Allow tests to inject the LayerTree.
359 LayerTreeHost(InitParams* params,
360 CompositorMode mode,
361 std::unique_ptr<LayerTree> layer_tree);
429 LayerTreeHost(InitParams* params, CompositorMode mode); 362 LayerTreeHost(InitParams* params, CompositorMode mode);
363
430 void InitializeThreaded( 364 void InitializeThreaded(
431 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, 365 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner,
432 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner, 366 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner,
433 std::unique_ptr<BeginFrameSource> external_begin_frame_source); 367 std::unique_ptr<BeginFrameSource> external_begin_frame_source);
434 void InitializeSingleThreaded( 368 void InitializeSingleThreaded(
435 LayerTreeHostSingleThreadClient* single_thread_client, 369 LayerTreeHostSingleThreadClient* single_thread_client,
436 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, 370 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner,
437 std::unique_ptr<BeginFrameSource> external_begin_frame_source); 371 std::unique_ptr<BeginFrameSource> external_begin_frame_source);
438 void InitializeRemoteServer( 372 void InitializeRemoteServer(
439 RemoteProtoChannel* remote_proto_channel, 373 RemoteProtoChannel* remote_proto_channel,
(...skipping 17 matching lines...) Expand all
457 // task_graph_runner() return valid values only until the LayerTreeHostImpl is 391 // task_graph_runner() return valid values only until the LayerTreeHostImpl is
458 // created in CreateLayerTreeHostImpl(). 392 // created in CreateLayerTreeHostImpl().
459 SharedBitmapManager* shared_bitmap_manager() const { 393 SharedBitmapManager* shared_bitmap_manager() const {
460 return shared_bitmap_manager_; 394 return shared_bitmap_manager_;
461 } 395 }
462 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager() const { 396 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager() const {
463 return gpu_memory_buffer_manager_; 397 return gpu_memory_buffer_manager_;
464 } 398 }
465 TaskGraphRunner* task_graph_runner() const { return task_graph_runner_; } 399 TaskGraphRunner* task_graph_runner() const { return task_graph_runner_; }
466 400
467 MicroBenchmarkController micro_benchmark_controller_;
468
469 void OnCommitForSwapPromises(); 401 void OnCommitForSwapPromises();
470 402
471 void RecordGpuRasterizationHistogram(); 403 void RecordGpuRasterizationHistogram();
472 404
405 MicroBenchmarkController micro_benchmark_controller_;
406
407 std::unique_ptr<LayerTree> layer_tree_;
408
473 private: 409 private:
474 friend class LayerTreeHostSerializationTest; 410 friend class LayerTreeHostSerializationTest;
475 411
476 // This is the number of consecutive frames in which we want the content to be 412 // This is the number of consecutive frames in which we want the content to be
477 // suitable for GPU rasterization before re-enabling it. 413 // suitable for GPU rasterization before re-enabling it.
478 enum { kNumFramesToConsiderBeforeGpuRasterization = 60 }; 414 enum { kNumFramesToConsiderBeforeGpuRasterization = 60 };
479 415
480 void ApplyViewportDeltas(ScrollAndScaleSet* info); 416 void ApplyViewportDeltas(ScrollAndScaleSet* info);
481 void InitializeProxy( 417 void InitializeProxy(
482 std::unique_ptr<Proxy> proxy, 418 std::unique_ptr<Proxy> proxy,
(...skipping 18 matching lines...) Expand all
501 UIResourceRequestQueue ui_resource_request_queue_; 437 UIResourceRequestQueue ui_resource_request_queue_;
502 438
503 void CalculateLCDTextMetricsCallback(Layer* layer); 439 void CalculateLCDTextMetricsCallback(Layer* layer);
504 440
505 void NotifySwapPromiseMonitorsOfSetNeedsCommit(); 441 void NotifySwapPromiseMonitorsOfSetNeedsCommit();
506 442
507 void SetPropertyTreesNeedRebuild(); 443 void SetPropertyTreesNeedRebuild();
508 444
509 const CompositorMode compositor_mode_; 445 const CompositorMode compositor_mode_;
510 446
511 bool needs_full_tree_sync_;
512 bool needs_meta_info_recomputation_;
513
514 LayerTreeHostClient* client_; 447 LayerTreeHostClient* client_;
515 std::unique_ptr<Proxy> proxy_; 448 std::unique_ptr<Proxy> proxy_;
516 std::unique_ptr<TaskRunnerProvider> task_runner_provider_; 449 std::unique_ptr<TaskRunnerProvider> task_runner_provider_;
517 450
518 int source_frame_number_; 451 int source_frame_number_;
519 std::unique_ptr<RenderingStatsInstrumentation> 452 std::unique_ptr<RenderingStatsInstrumentation>
520 rendering_stats_instrumentation_; 453 rendering_stats_instrumentation_;
521 454
522 // |current_output_surface_| can't be updated until we've successfully 455 // |current_output_surface_| can't be updated until we've successfully
523 // initialized a new output surface. |new_output_surface_| contains the 456 // initialized a new output surface. |new_output_surface_| contains the
524 // new output surface that is currently being initialized. If initialization 457 // new output surface that is currently being initialized. If initialization
525 // is successful then |new_output_surface_| replaces 458 // is successful then |new_output_surface_| replaces
526 // |current_output_surface_|. 459 // |current_output_surface_|.
527 std::unique_ptr<OutputSurface> new_output_surface_; 460 std::unique_ptr<OutputSurface> new_output_surface_;
528 std::unique_ptr<OutputSurface> current_output_surface_; 461 std::unique_ptr<OutputSurface> current_output_surface_;
529 bool output_surface_lost_; 462 bool output_surface_lost_;
530 463
531 scoped_refptr<Layer> root_layer_;
532 scoped_refptr<HeadsUpDisplayLayer> hud_layer_;
533
534 base::WeakPtr<InputHandler> input_handler_weak_ptr_; 464 base::WeakPtr<InputHandler> input_handler_weak_ptr_;
535 465
536 const LayerTreeSettings settings_; 466 const LayerTreeSettings settings_;
537 LayerTreeDebugState debug_state_; 467 LayerTreeDebugState debug_state_;
538 468
539 gfx::Size device_viewport_size_;
540 bool top_controls_shrink_blink_size_;
541 float top_controls_height_;
542 float top_controls_shown_ratio_;
543 float device_scale_factor_;
544 float painted_device_scale_factor_;
545
546 bool visible_; 469 bool visible_;
547 470
548 float page_scale_factor_;
549 float min_page_scale_factor_;
550 float max_page_scale_factor_;
551 gfx::Vector2dF elastic_overscroll_;
552 bool has_gpu_rasterization_trigger_; 471 bool has_gpu_rasterization_trigger_;
553 bool content_is_suitable_for_gpu_rasterization_; 472 bool content_is_suitable_for_gpu_rasterization_;
554 bool gpu_rasterization_histogram_recorded_; 473 bool gpu_rasterization_histogram_recorded_;
555 474
556 SkColor background_color_; 475 gfx::Vector2dF elastic_overscroll_;
557 bool has_transparent_background_;
558
559 bool have_scroll_event_handlers_;
560 EventListenerProperties event_listener_properties_[static_cast<size_t>(
561 EventListenerClass::kNumClasses)];
562
563 std::unique_ptr<PendingPageScaleAnimation> pending_page_scale_animation_;
564 476
565 // If set, then page scale animation has completed, but the client hasn't been 477 // If set, then page scale animation has completed, but the client hasn't been
566 // notified about it yet. 478 // notified about it yet.
567 bool did_complete_scale_animation_; 479 bool did_complete_scale_animation_;
568 480
569 int id_; 481 int id_;
570 bool next_commit_forces_redraw_; 482 bool next_commit_forces_redraw_;
571 483
572 scoped_refptr<Layer> overscroll_elasticity_layer_;
573 scoped_refptr<Layer> page_scale_layer_;
574 scoped_refptr<Layer> inner_viewport_scroll_layer_;
575 scoped_refptr<Layer> outer_viewport_scroll_layer_;
576
577 LayerSelection selection_;
578
579 SharedBitmapManager* shared_bitmap_manager_; 484 SharedBitmapManager* shared_bitmap_manager_;
580 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager_; 485 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager_;
581 TaskGraphRunner* task_graph_runner_; 486 TaskGraphRunner* task_graph_runner_;
582 487
583 ImageSerializationProcessor* image_serialization_processor_; 488 ImageSerializationProcessor* image_serialization_processor_;
584 std::unique_ptr<EnginePictureCache> engine_picture_cache_; 489 std::unique_ptr<EnginePictureCache> engine_picture_cache_;
585 std::unique_ptr<ClientPictureCache> client_picture_cache_; 490 std::unique_ptr<ClientPictureCache> client_picture_cache_;
586 491
587 std::vector<std::unique_ptr<SwapPromise>> swap_promise_list_; 492 std::vector<std::unique_ptr<SwapPromise>> swap_promise_list_;
588 std::set<SwapPromiseMonitor*> swap_promise_monitor_; 493 std::set<SwapPromiseMonitor*> swap_promise_monitor_;
589 494
590 PropertyTrees property_trees_;
591
592 using ElementLayersMap = std::unordered_map<ElementId, Layer*, ElementIdHash>; 495 using ElementLayersMap = std::unordered_map<ElementId, Layer*, ElementIdHash>;
593 ElementLayersMap element_layers_map_; 496 ElementLayersMap element_layers_map_;
594 497
595 uint32_t surface_client_id_; 498 uint32_t surface_client_id_;
596 uint32_t next_surface_sequence_; 499 uint32_t next_surface_sequence_;
597 uint32_t num_consecutive_frames_suitable_for_gpu_ = 0; 500 uint32_t num_consecutive_frames_suitable_for_gpu_ = 0;
598 501
599 // Layer tree that hold layers.
600 LayerTree layer_tree_;
601
602 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); 502 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost);
603 }; 503 };
604 504
605 } // namespace cc 505 } // namespace cc
606 506
607 #endif // CC_TREES_LAYER_TREE_HOST_H_ 507 #endif // CC_TREES_LAYER_TREE_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698