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

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

Issue 754433003: Update from https://crrev.com/305340 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 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/test/test_in_process_context_provider.cc ('k') | cc/trees/layer_tree_host.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_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 <limits> 8 #include <limits>
9 #include <list> 9 #include <list>
10 #include <set> 10 #include <set>
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 class LayerTreeHostSingleThreadClient; 56 class LayerTreeHostSingleThreadClient;
57 class PrioritizedResource; 57 class PrioritizedResource;
58 class PrioritizedResourceManager; 58 class PrioritizedResourceManager;
59 class Region; 59 class Region;
60 class RenderingStatsInstrumentation; 60 class RenderingStatsInstrumentation;
61 class ResourceProvider; 61 class ResourceProvider;
62 class ResourceUpdateQueue; 62 class ResourceUpdateQueue;
63 class SharedBitmapManager; 63 class SharedBitmapManager;
64 class TopControlsManager; 64 class TopControlsManager;
65 class UIResourceRequest; 65 class UIResourceRequest;
66 struct PendingPageScaleAnimation;
66 struct RenderingStats; 67 struct RenderingStats;
67 struct ScrollAndScaleSet; 68 struct ScrollAndScaleSet;
68 69
69 // Provides information on an Impl's rendering capabilities back to the 70 // Provides information on an Impl's rendering capabilities back to the
70 // LayerTreeHost. 71 // LayerTreeHost.
71 struct CC_EXPORT RendererCapabilities { 72 struct CC_EXPORT RendererCapabilities {
72 RendererCapabilities(ResourceFormat best_texture_format, 73 RendererCapabilities(ResourceFormat best_texture_format,
73 bool allow_partial_texture_updates, 74 bool allow_partial_texture_updates,
74 int max_texture_size, 75 int max_texture_size,
75 bool using_shared_memory_resources); 76 bool using_shared_memory_resources);
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 173
173 void SetNextCommitWaitsForActivation(); 174 void SetNextCommitWaitsForActivation();
174 175
175 void SetNextCommitForcesRedraw(); 176 void SetNextCommitForcesRedraw();
176 177
177 void SetAnimationEvents(scoped_ptr<AnimationEventsVector> events); 178 void SetAnimationEvents(scoped_ptr<AnimationEventsVector> events);
178 179
179 void SetRootLayer(scoped_refptr<Layer> root_layer); 180 void SetRootLayer(scoped_refptr<Layer> root_layer);
180 Layer* root_layer() { return root_layer_.get(); } 181 Layer* root_layer() { return root_layer_.get(); }
181 const Layer* root_layer() const { return root_layer_.get(); } 182 const Layer* root_layer() const { return root_layer_.get(); }
183 const Layer* overscroll_elasticity_layer() const {
184 return overscroll_elasticity_layer_.get();
185 }
182 const Layer* page_scale_layer() const { return page_scale_layer_.get(); } 186 const Layer* page_scale_layer() const { return page_scale_layer_.get(); }
183 void RegisterViewportLayers( 187 void RegisterViewportLayers(scoped_refptr<Layer> overscroll_elasticity_layer,
184 scoped_refptr<Layer> page_scale_layer, 188 scoped_refptr<Layer> page_scale_layer,
185 scoped_refptr<Layer> inner_viewport_scroll_layer, 189 scoped_refptr<Layer> inner_viewport_scroll_layer,
186 scoped_refptr<Layer> outer_viewport_scroll_layer); 190 scoped_refptr<Layer> outer_viewport_scroll_layer);
187 Layer* inner_viewport_scroll_layer() const { 191 Layer* inner_viewport_scroll_layer() const {
188 return inner_viewport_scroll_layer_.get(); 192 return inner_viewport_scroll_layer_.get();
189 } 193 }
190 Layer* outer_viewport_scroll_layer() const { 194 Layer* outer_viewport_scroll_layer() const {
191 return outer_viewport_scroll_layer_.get(); 195 return outer_viewport_scroll_layer_.get();
192 } 196 }
193 197
194 void RegisterSelection(const LayerSelectionBound& start, 198 void RegisterSelection(const LayerSelectionBound& start,
195 const LayerSelectionBound& end); 199 const LayerSelectionBound& end);
196 200
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 // See swap_promise.h for how to use SwapPromise. 311 // See swap_promise.h for how to use SwapPromise.
308 void QueueSwapPromise(scoped_ptr<SwapPromise> swap_promise); 312 void QueueSwapPromise(scoped_ptr<SwapPromise> swap_promise);
309 313
310 void BreakSwapPromises(SwapPromise::DidNotSwapReason reason); 314 void BreakSwapPromises(SwapPromise::DidNotSwapReason reason);
311 315
312 size_t num_queued_swap_promises() const { return swap_promise_list_.size(); } 316 size_t num_queued_swap_promises() const { return swap_promise_list_.size(); }
313 317
314 void set_surface_id_namespace(uint32_t id_namespace); 318 void set_surface_id_namespace(uint32_t id_namespace);
315 SurfaceSequence CreateSurfaceSequence(); 319 SurfaceSequence CreateSurfaceSequence();
316 320
321 void SetChildrenNeedBeginFrames(bool children_need_begin_frames) const;
322 void SendBeginFramesToChildren(const BeginFrameArgs& args) const;
323
317 protected: 324 protected:
318 LayerTreeHost(LayerTreeHostClient* client, 325 LayerTreeHost(LayerTreeHostClient* client,
319 SharedBitmapManager* shared_bitmap_manager, 326 SharedBitmapManager* shared_bitmap_manager,
320 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager, 327 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager,
321 const LayerTreeSettings& settings); 328 const LayerTreeSettings& settings);
322 void InitializeThreaded( 329 void InitializeThreaded(
323 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, 330 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner,
324 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner, 331 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner,
325 scoped_ptr<BeginFrameSource> external_begin_frame_source); 332 scoped_ptr<BeginFrameSource> external_begin_frame_source);
326 void InitializeSingleThreaded( 333 void InitializeSingleThreaded(
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
426 433
427 // If set, this texture is used to fill in the parts of the screen not 434 // If set, this texture is used to fill in the parts of the screen not
428 // covered by layers. 435 // covered by layers.
429 scoped_ptr<ScopedUIResource> overhang_ui_resource_; 436 scoped_ptr<ScopedUIResource> overhang_ui_resource_;
430 437
431 typedef ScopedPtrVector<PrioritizedResource> TextureList; 438 typedef ScopedPtrVector<PrioritizedResource> TextureList;
432 size_t partial_texture_update_requests_; 439 size_t partial_texture_update_requests_;
433 440
434 scoped_ptr<AnimationRegistrar> animation_registrar_; 441 scoped_ptr<AnimationRegistrar> animation_registrar_;
435 442
436 struct PendingPageScaleAnimation {
437 gfx::Vector2d target_offset;
438 bool use_anchor;
439 float scale;
440 base::TimeDelta duration;
441 };
442 scoped_ptr<PendingPageScaleAnimation> pending_page_scale_animation_; 443 scoped_ptr<PendingPageScaleAnimation> pending_page_scale_animation_;
443 444
444 bool in_paint_layer_contents_; 445 bool in_paint_layer_contents_;
445 446
446 static const int kTotalFramesToUseForLCDTextMetrics = 50; 447 static const int kTotalFramesToUseForLCDTextMetrics = 50;
447 int total_frames_used_for_lcd_text_metrics_; 448 int total_frames_used_for_lcd_text_metrics_;
448 449
449 struct LCDTextMetrics { 450 struct LCDTextMetrics {
450 LCDTextMetrics() 451 LCDTextMetrics()
451 : total_num_cc_layers(0), 452 : total_num_cc_layers(0),
452 total_num_cc_layers_can_use_lcd_text(0), 453 total_num_cc_layers_can_use_lcd_text(0),
453 total_num_cc_layers_will_use_lcd_text(0) {} 454 total_num_cc_layers_will_use_lcd_text(0) {}
454 455
455 int64 total_num_cc_layers; 456 int64 total_num_cc_layers;
456 int64 total_num_cc_layers_can_use_lcd_text; 457 int64 total_num_cc_layers_can_use_lcd_text;
457 int64 total_num_cc_layers_will_use_lcd_text; 458 int64 total_num_cc_layers_will_use_lcd_text;
458 }; 459 };
459 LCDTextMetrics lcd_text_metrics_; 460 LCDTextMetrics lcd_text_metrics_;
460 int id_; 461 int id_;
461 bool next_commit_forces_redraw_; 462 bool next_commit_forces_redraw_;
462 463
464 scoped_refptr<Layer> overscroll_elasticity_layer_;
463 scoped_refptr<Layer> page_scale_layer_; 465 scoped_refptr<Layer> page_scale_layer_;
464 scoped_refptr<Layer> inner_viewport_scroll_layer_; 466 scoped_refptr<Layer> inner_viewport_scroll_layer_;
465 scoped_refptr<Layer> outer_viewport_scroll_layer_; 467 scoped_refptr<Layer> outer_viewport_scroll_layer_;
466 468
467 LayerSelectionBound selection_start_; 469 LayerSelectionBound selection_start_;
468 LayerSelectionBound selection_end_; 470 LayerSelectionBound selection_end_;
469 471
470 SharedBitmapManager* shared_bitmap_manager_; 472 SharedBitmapManager* shared_bitmap_manager_;
471 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager_; 473 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager_;
472 474
473 ScopedPtrVector<SwapPromise> swap_promise_list_; 475 ScopedPtrVector<SwapPromise> swap_promise_list_;
474 std::set<SwapPromiseMonitor*> swap_promise_monitor_; 476 std::set<SwapPromiseMonitor*> swap_promise_monitor_;
475 477
476 uint32_t surface_id_namespace_; 478 uint32_t surface_id_namespace_;
477 uint32_t next_surface_sequence_; 479 uint32_t next_surface_sequence_;
478 480
479 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); 481 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost);
480 }; 482 };
481 483
482 } // namespace cc 484 } // namespace cc
483 485
484 #endif // CC_TREES_LAYER_TREE_HOST_H_ 486 #endif // CC_TREES_LAYER_TREE_HOST_H_
OLDNEW
« no previous file with comments | « cc/test/test_in_process_context_provider.cc ('k') | cc/trees/layer_tree_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698