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

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

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

Powered by Google App Engine
This is Rietveld 408576698