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

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

Issue 935333002: Update from https://crrev.com/316786 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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
« no previous file with comments | « cc/trees/layer_tree_host_unittest_picture.cc ('k') | cc/trees/layer_tree_impl.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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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_IMPL_H_ 5 #ifndef CC_TREES_LAYER_TREE_IMPL_H_
6 #define CC_TREES_LAYER_TREE_IMPL_H_ 6 #define CC_TREES_LAYER_TREE_IMPL_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/containers/hash_tables.h" 12 #include "base/containers/hash_tables.h"
13 #include "base/values.h" 13 #include "base/values.h"
14 #include "cc/base/scoped_ptr_vector.h" 14 #include "cc/base/scoped_ptr_vector.h"
15 #include "cc/base/swap_promise.h" 15 #include "cc/base/swap_promise.h"
16 #include "cc/base/synced_property.h" 16 #include "cc/base/synced_property.h"
17 #include "cc/layers/layer_impl.h" 17 #include "cc/layers/layer_impl.h"
18 #include "cc/output/renderer.h" 18 #include "cc/output/renderer.h"
19 #include "cc/resources/ui_resource_client.h" 19 #include "cc/resources/ui_resource_client.h"
20 20
21 namespace base { 21 namespace base {
22 namespace trace_event { 22 namespace trace_event {
23 class TracedValue; 23 class TracedValue;
24 } 24 }
25
26 // TODO(ssid): remove these aliases after the tracing clients are moved to the
27 // new trace_event namespace. See crbug.com/451032. ETA: March 2015
28 namespace debug {
29 using ::base::trace_event::TracedValue;
30 } 25 }
31 } // namespace base
32 26
33 namespace cc { 27 namespace cc {
34 28
35 class ContextProvider; 29 class ContextProvider;
36 class DebugRectHistory; 30 class DebugRectHistory;
37 class FrameRateCounter; 31 class FrameRateCounter;
38 class HeadsUpDisplayLayerImpl; 32 class HeadsUpDisplayLayerImpl;
39 class LayerScrollOffsetDelegateProxy; 33 class LayerScrollOffsetDelegateProxy;
40 class LayerTreeDebugState; 34 class LayerTreeDebugState;
41 class LayerTreeHostImpl; 35 class LayerTreeHostImpl;
42 class LayerTreeImpl; 36 class LayerTreeImpl;
43 class LayerTreeSettings; 37 class LayerTreeSettings;
44 class MemoryHistory; 38 class MemoryHistory;
45 class OutputSurface; 39 class OutputSurface;
46 class PageScaleAnimation; 40 class PageScaleAnimation;
47 class PaintTimeCounter; 41 class PaintTimeCounter;
48 class PictureLayerImpl; 42 class PictureLayerImpl;
49 class Proxy; 43 class Proxy;
50 class ResourceProvider; 44 class ResourceProvider;
51 class TileManager; 45 class TileManager;
52 class UIResourceRequest; 46 class UIResourceRequest;
53 struct PendingPageScaleAnimation; 47 struct PendingPageScaleAnimation;
54 struct RendererCapabilities; 48 struct RendererCapabilities;
55 struct SelectionHandle; 49 struct SelectionHandle;
56 50
57 typedef std::vector<UIResourceRequest> UIResourceRequestQueue; 51 typedef std::vector<UIResourceRequest> UIResourceRequestQueue;
52 typedef SyncedProperty<AdditionGroup<float>> SyncedTopControls;
58 typedef SyncedProperty<AdditionGroup<gfx::Vector2dF>> SyncedElasticOverscroll; 53 typedef SyncedProperty<AdditionGroup<gfx::Vector2dF>> SyncedElasticOverscroll;
59 54
60 class CC_EXPORT LayerTreeImpl { 55 class CC_EXPORT LayerTreeImpl {
61 public: 56 public:
62 static scoped_ptr<LayerTreeImpl> create( 57 static scoped_ptr<LayerTreeImpl> create(
63 LayerTreeHostImpl* layer_tree_host_impl, 58 LayerTreeHostImpl* layer_tree_host_impl,
64 scoped_refptr<SyncedProperty<ScaleGroup>> page_scale_factor, 59 scoped_refptr<SyncedProperty<ScaleGroup>> page_scale_factor,
60 scoped_refptr<SyncedTopControls> top_controls_shown_ratio,
65 scoped_refptr<SyncedElasticOverscroll> elastic_overscroll) { 61 scoped_refptr<SyncedElasticOverscroll> elastic_overscroll) {
66 return make_scoped_ptr(new LayerTreeImpl( 62 return make_scoped_ptr(
67 layer_tree_host_impl, page_scale_factor, elastic_overscroll)); 63 new LayerTreeImpl(layer_tree_host_impl, page_scale_factor,
64 top_controls_shown_ratio, elastic_overscroll));
68 } 65 }
69 virtual ~LayerTreeImpl(); 66 virtual ~LayerTreeImpl();
70 67
71 void Shutdown(); 68 void Shutdown();
72 void ReleaseResources(); 69 void ReleaseResources();
73 void RecreateResources(); 70 void RecreateResources();
74 71
75 // Methods called by the layer tree that pass-through or access LTHI. 72 // Methods called by the layer tree that pass-through or access LTHI.
76 // --------------------------------------------------------------------------- 73 // ---------------------------------------------------------------------------
77 const LayerTreeSettings& settings() const; 74 const LayerTreeSettings& settings() const;
75 const LayerTreeDebugState& debug_state() const;
78 const RendererCapabilitiesImpl& GetRendererCapabilities() const; 76 const RendererCapabilitiesImpl& GetRendererCapabilities() const;
79 ContextProvider* context_provider() const; 77 ContextProvider* context_provider() const;
80 OutputSurface* output_surface() const; 78 OutputSurface* output_surface() const;
81 ResourceProvider* resource_provider() const; 79 ResourceProvider* resource_provider() const;
82 TileManager* tile_manager() const; 80 TileManager* tile_manager() const;
83 FrameRateCounter* frame_rate_counter() const; 81 FrameRateCounter* frame_rate_counter() const;
84 PaintTimeCounter* paint_time_counter() const; 82 PaintTimeCounter* paint_time_counter() const;
85 MemoryHistory* memory_history() const; 83 MemoryHistory* memory_history() const;
86 gfx::Size device_viewport_size() const; 84 gfx::Size device_viewport_size() const;
85 float device_scale_factor() const;
86 DebugRectHistory* debug_rect_history() const;
87 bool IsActiveTree() const; 87 bool IsActiveTree() const;
88 bool IsPendingTree() const; 88 bool IsPendingTree() const;
89 bool IsRecycleTree() const; 89 bool IsRecycleTree() const;
90 LayerImpl* FindActiveTreeLayerById(int id); 90 LayerImpl* FindActiveTreeLayerById(int id);
91 LayerImpl* FindPendingTreeLayerById(int id); 91 LayerImpl* FindPendingTreeLayerById(int id);
92 bool PinchGestureActive() const; 92 bool PinchGestureActive() const;
93 BeginFrameArgs CurrentBeginFrameArgs() const; 93 BeginFrameArgs CurrentBeginFrameArgs() const;
94 base::TimeDelta begin_impl_frame_interval() const; 94 base::TimeDelta begin_impl_frame_interval() const;
95 void SetNeedsCommit(); 95 void SetNeedsCommit();
96 gfx::Rect DeviceViewport() const; 96 gfx::Rect DeviceViewport() const;
97 gfx::Size DrawViewportSize() const; 97 gfx::Size DrawViewportSize() const;
98 const gfx::Rect ViewportRectForTilePriority() const; 98 const gfx::Rect ViewportRectForTilePriority() const;
99 scoped_ptr<ScrollbarAnimationController> CreateScrollbarAnimationController( 99 scoped_ptr<ScrollbarAnimationController> CreateScrollbarAnimationController(
100 LayerImpl* scrolling_layer); 100 LayerImpl* scrolling_layer);
101 void DidAnimateScrollOffset(); 101 void DidAnimateScrollOffset();
102 void InputScrollAnimationFinished(); 102 void InputScrollAnimationFinished();
103 bool use_gpu_rasterization() const; 103 bool use_gpu_rasterization() const;
104 GpuRasterizationStatus GetGpuRasterizationStatus() const; 104 GpuRasterizationStatus GetGpuRasterizationStatus() const;
105 bool create_low_res_tiling() const; 105 bool create_low_res_tiling() const;
106 BlockingTaskRunner* BlockingMainThreadTaskRunner() const; 106 BlockingTaskRunner* BlockingMainThreadTaskRunner() const;
107 bool RequiresHighResToDraw() const; 107 bool RequiresHighResToDraw() const;
108 bool SmoothnessTakesPriority() const; 108 bool SmoothnessTakesPriority() const;
109 109
110 // Tree specific methods exposed to layer-impl tree. 110 // Tree specific methods exposed to layer-impl tree.
111 // --------------------------------------------------------------------------- 111 // ---------------------------------------------------------------------------
112 void SetNeedsRedraw(); 112 void SetNeedsRedraw();
113 113
114 // TODO(nduca): These are implemented in cc files temporarily, but will become 114 // Tracing methods.
115 // trivial accessors in a followup patch. 115 // ---------------------------------------------------------------------------
116 const LayerTreeDebugState& debug_state() const;
117 float device_scale_factor() const;
118 DebugRectHistory* debug_rect_history() const;
119 void GetAllTilesForTracing(std::set<const Tile*>* tiles) const; 116 void GetAllTilesForTracing(std::set<const Tile*>* tiles) const;
120 void AsValueInto(base::debug::TracedValue* dict) const; 117 void AsValueInto(base::trace_event::TracedValue* dict) const;
121 118
122 // Other public methods 119 // Other public methods
123 // --------------------------------------------------------------------------- 120 // ---------------------------------------------------------------------------
124 LayerImpl* root_layer() const { return root_layer_.get(); } 121 LayerImpl* root_layer() const { return root_layer_.get(); }
125 void SetRootLayer(scoped_ptr<LayerImpl>); 122 void SetRootLayer(scoped_ptr<LayerImpl>);
126 scoped_ptr<LayerImpl> DetachLayerTree(); 123 scoped_ptr<LayerImpl> DetachLayerTree();
127 124
128 void PushPropertiesTo(LayerTreeImpl* tree_impl); 125 void PushPropertiesTo(LayerTreeImpl* tree_impl);
129 126
130 int source_frame_number() const { return source_frame_number_; } 127 int source_frame_number() const { return source_frame_number_; }
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 SyncedProperty<ScaleGroup>* page_scale_factor(); 182 SyncedProperty<ScaleGroup>* page_scale_factor();
186 const SyncedProperty<ScaleGroup>* page_scale_factor() const; 183 const SyncedProperty<ScaleGroup>* page_scale_factor() const;
187 184
188 SyncedElasticOverscroll* elastic_overscroll() { 185 SyncedElasticOverscroll* elastic_overscroll() {
189 return elastic_overscroll_.get(); 186 return elastic_overscroll_.get();
190 } 187 }
191 const SyncedElasticOverscroll* elastic_overscroll() const { 188 const SyncedElasticOverscroll* elastic_overscroll() const {
192 return elastic_overscroll_.get(); 189 return elastic_overscroll_.get();
193 } 190 }
194 191
192 SyncedTopControls* top_controls_shown_ratio() {
193 return top_controls_shown_ratio_.get();
194 }
195 const SyncedTopControls* top_controls_shown_ratio() const {
196 return top_controls_shown_ratio_.get();
197 }
198
195 // Updates draw properties and render surface layer list, as well as tile 199 // Updates draw properties and render surface layer list, as well as tile
196 // priorities. Returns false if it was unable to update. 200 // priorities. Returns false if it was unable to update.
197 bool UpdateDrawProperties(); 201 bool UpdateDrawProperties();
198 202
199 void set_needs_update_draw_properties() { 203 void set_needs_update_draw_properties() {
200 needs_update_draw_properties_ = true; 204 needs_update_draw_properties_ = true;
201 } 205 }
202 bool needs_update_draw_properties() const { 206 bool needs_update_draw_properties() const {
203 return needs_update_draw_properties_; 207 return needs_update_draw_properties_;
204 } 208 }
205 209
206 void set_needs_full_tree_sync(bool needs) { needs_full_tree_sync_ = needs; } 210 void set_needs_full_tree_sync(bool needs) { needs_full_tree_sync_ = needs; }
207 bool needs_full_tree_sync() const { return needs_full_tree_sync_; } 211 bool needs_full_tree_sync() const { return needs_full_tree_sync_; }
208 212
209 void ForceRedrawNextActivation() { next_activation_forces_redraw_ = true; } 213 void ForceRedrawNextActivation() { next_activation_forces_redraw_ = true; }
210 214
211 void set_has_ever_been_drawn(bool has_drawn) { 215 void set_has_ever_been_drawn(bool has_drawn) {
212 has_ever_been_drawn_ = has_drawn; 216 has_ever_been_drawn_ = has_drawn;
213 } 217 }
214 bool has_ever_been_drawn() const { return has_ever_been_drawn_; } 218 bool has_ever_been_drawn() const { return has_ever_been_drawn_; }
215 219
216 void set_ui_resource_request_queue(const UIResourceRequestQueue& queue); 220 void set_ui_resource_request_queue(const UIResourceRequestQueue& queue);
217 221
218 const LayerImplList& RenderSurfaceLayerList() const; 222 const LayerImplList& RenderSurfaceLayerList() const;
223 const Region& UnoccludedScreenSpaceRegion() const;
219 224
220 // These return the size of the root scrollable area and the size of 225 // These return the size of the root scrollable area and the size of
221 // the user-visible scrolling viewport, in CSS layout coordinates. 226 // the user-visible scrolling viewport, in CSS layout coordinates.
222 gfx::Size ScrollableSize() const; 227 gfx::Size ScrollableSize() const;
223 gfx::SizeF ScrollableViewportSize() const; 228 gfx::SizeF ScrollableViewportSize() const;
224 229
225 gfx::Rect RootScrollLayerDeviceViewportBounds() const; 230 gfx::Rect RootScrollLayerDeviceViewportBounds() const;
226 231
227 LayerImpl* LayerById(int id); 232 LayerImpl* LayerById(int id);
228 233
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 void FinishSwapPromises(CompositorFrameMetadata* metadata); 271 void FinishSwapPromises(CompositorFrameMetadata* metadata);
267 void BreakSwapPromises(SwapPromise::DidNotSwapReason reason); 272 void BreakSwapPromises(SwapPromise::DidNotSwapReason reason);
268 273
269 void DidModifyTilePriorities(); 274 void DidModifyTilePriorities();
270 275
271 ResourceProvider::ResourceId ResourceIdForUIResource(UIResourceId uid) const; 276 ResourceProvider::ResourceId ResourceIdForUIResource(UIResourceId uid) const;
272 void ProcessUIResourceRequestQueue(); 277 void ProcessUIResourceRequestQueue();
273 278
274 bool IsUIResourceOpaque(UIResourceId uid) const; 279 bool IsUIResourceOpaque(UIResourceId uid) const;
275 280
281 void RegisterPictureLayerImpl(PictureLayerImpl* layer);
282 void UnregisterPictureLayerImpl(PictureLayerImpl* layer);
283 const std::vector<PictureLayerImpl*>& picture_layers() const {
284 return picture_layers_;
285 }
286
276 void AddLayerWithCopyOutputRequest(LayerImpl* layer); 287 void AddLayerWithCopyOutputRequest(LayerImpl* layer);
277 void RemoveLayerWithCopyOutputRequest(LayerImpl* layer); 288 void RemoveLayerWithCopyOutputRequest(LayerImpl* layer);
278 const std::vector<LayerImpl*>& LayersWithCopyOutputRequest() const; 289 const std::vector<LayerImpl*>& LayersWithCopyOutputRequest() const;
279 290
280 int current_render_surface_list_id() const { 291 int current_render_surface_list_id() const {
281 return render_surface_layer_list_id_; 292 return render_surface_layer_list_id_;
282 } 293 }
283 294
284 LayerImpl* FindFirstScrollingLayerThatIsHitByPoint( 295 LayerImpl* FindFirstScrollingLayerThatIsHitByPoint(
285 const gfx::PointF& screen_space_point); 296 const gfx::PointF& screen_space_point);
286 297
287 LayerImpl* FindLayerThatIsHitByPoint(const gfx::PointF& screen_space_point); 298 LayerImpl* FindLayerThatIsHitByPoint(const gfx::PointF& screen_space_point);
288 299
289 LayerImpl* FindLayerWithWheelHandlerThatIsHitByPoint( 300 LayerImpl* FindLayerWithWheelHandlerThatIsHitByPoint(
290 const gfx::PointF& screen_space_point); 301 const gfx::PointF& screen_space_point);
291 302
292 LayerImpl* FindLayerThatIsHitByPointInTouchHandlerRegion( 303 LayerImpl* FindLayerThatIsHitByPointInTouchHandlerRegion(
293 const gfx::PointF& screen_space_point); 304 const gfx::PointF& screen_space_point);
294 305
295 void RegisterSelection(const LayerSelectionBound& start, 306 void RegisterSelection(const LayerSelectionBound& start,
296 const LayerSelectionBound& end); 307 const LayerSelectionBound& end);
297 308
298 // Compute the current selection handle location and visbility with respect to 309 // Compute the current selection handle location and visbility with respect to
299 // the viewport. 310 // the viewport.
300 void GetViewportSelection(ViewportSelectionBound* start, 311 void GetViewportSelection(ViewportSelectionBound* start,
301 ViewportSelectionBound* end); 312 ViewportSelectionBound* end);
302 313
303 void RegisterPictureLayerImpl(PictureLayerImpl* layer); 314 void set_top_controls_shrink_blink_size(bool shrink);
304 void UnregisterPictureLayerImpl(PictureLayerImpl* layer);
305
306 void set_top_controls_shrink_blink_size(bool shrink) {
307 top_controls_shrink_blink_size_ = shrink;
308 }
309 void set_top_controls_height(float height) { top_controls_height_ = height; }
310 void set_top_controls_content_offset(float offset) {
311 top_controls_content_offset_ = offset;
312 }
313 void set_top_controls_delta(float delta) {
314 top_controls_delta_ = delta;
315 }
316 void set_sent_top_controls_delta(float sent_delta) {
317 sent_top_controls_delta_ = sent_delta;
318 }
319
320 bool top_controls_shrink_blink_size() const { 315 bool top_controls_shrink_blink_size() const {
321 return top_controls_shrink_blink_size_; 316 return top_controls_shrink_blink_size_;
322 } 317 }
318 bool SetCurrentTopControlsShownRatio(float ratio);
319 float CurrentTopControlsShownRatio() const {
320 return top_controls_shown_ratio_->Current(IsActiveTree());
321 }
322 void set_top_controls_height(float top_controls_height);
323 float top_controls_height() const { return top_controls_height_; } 323 float top_controls_height() const { return top_controls_height_; }
324 float top_controls_content_offset() const { 324 void PushTopControlsFromMainThread(float top_controls_shown_ratio);
325 return top_controls_content_offset_;
326 }
327 float top_controls_delta() const {
328 return top_controls_delta_;
329 }
330 float sent_top_controls_delta() const {
331 return sent_top_controls_delta_;
332 }
333 float total_top_controls_content_offset() const {
334 return top_controls_content_offset_ + top_controls_delta_;
335 }
336 325
337 void SetPendingPageScaleAnimation( 326 void SetPendingPageScaleAnimation(
338 scoped_ptr<PendingPageScaleAnimation> pending_animation); 327 scoped_ptr<PendingPageScaleAnimation> pending_animation);
339 scoped_ptr<PendingPageScaleAnimation> TakePendingPageScaleAnimation(); 328 scoped_ptr<PendingPageScaleAnimation> TakePendingPageScaleAnimation();
340 329
341 protected: 330 protected:
342 explicit LayerTreeImpl( 331 explicit LayerTreeImpl(
343 LayerTreeHostImpl* layer_tree_host_impl, 332 LayerTreeHostImpl* layer_tree_host_impl,
344 scoped_refptr<SyncedProperty<ScaleGroup>> page_scale_factor, 333 scoped_refptr<SyncedProperty<ScaleGroup>> page_scale_factor,
334 scoped_refptr<SyncedTopControls> top_controls_shown_ratio,
345 scoped_refptr<SyncedElasticOverscroll> elastic_overscroll); 335 scoped_refptr<SyncedElasticOverscroll> elastic_overscroll);
346 void ProcessLayersRecursive(LayerImpl* current, 336 void ProcessLayersRecursive(LayerImpl* current,
347 void (LayerImpl::*function)()); 337 void (LayerImpl::*function)());
348 float ClampPageScaleFactorToLimits(float page_scale_factor) const; 338 float ClampPageScaleFactorToLimits(float page_scale_factor) const;
349 void PushPageScaleFactorAndLimits(const float* page_scale_factor, 339 void PushPageScaleFactorAndLimits(const float* page_scale_factor,
350 float min_page_scale_factor, 340 float min_page_scale_factor,
351 float max_page_scale_factor); 341 float max_page_scale_factor);
352 bool SetPageScaleFactorLimits(float min_page_scale_factor, 342 bool SetPageScaleFactorLimits(float min_page_scale_factor,
353 float max_page_scale_factor); 343 float max_page_scale_factor);
354 void DidUpdatePageScale(); 344 void DidUpdatePageScale();
355 void HideInnerViewportScrollbarsIfNearMinimumScale(); 345 void HideInnerViewportScrollbarsIfNearMinimumScale();
356 346 void PushTopControls(const float* top_controls_shown_ratio);
357 LayerTreeHostImpl* layer_tree_host_impl_; 347 LayerTreeHostImpl* layer_tree_host_impl_;
358 int source_frame_number_; 348 int source_frame_number_;
359 scoped_ptr<LayerImpl> root_layer_; 349 scoped_ptr<LayerImpl> root_layer_;
360 HeadsUpDisplayLayerImpl* hud_layer_; 350 HeadsUpDisplayLayerImpl* hud_layer_;
361 LayerImpl* currently_scrolling_layer_; 351 LayerImpl* currently_scrolling_layer_;
362 LayerScrollOffsetDelegate* root_layer_scroll_offset_delegate_; 352 LayerScrollOffsetDelegate* root_layer_scroll_offset_delegate_;
363 scoped_ptr<LayerScrollOffsetDelegateProxy> 353 scoped_ptr<LayerScrollOffsetDelegateProxy>
364 inner_viewport_scroll_delegate_proxy_; 354 inner_viewport_scroll_delegate_proxy_;
365 scoped_ptr<LayerScrollOffsetDelegateProxy> 355 scoped_ptr<LayerScrollOffsetDelegateProxy>
366 outer_viewport_scroll_delegate_proxy_; 356 outer_viewport_scroll_delegate_proxy_;
(...skipping 10 matching lines...) Expand all
377 367
378 scoped_refptr<SyncedProperty<ScaleGroup>> page_scale_factor_; 368 scoped_refptr<SyncedProperty<ScaleGroup>> page_scale_factor_;
379 float min_page_scale_factor_; 369 float min_page_scale_factor_;
380 float max_page_scale_factor_; 370 float max_page_scale_factor_;
381 371
382 scoped_refptr<SyncedElasticOverscroll> elastic_overscroll_; 372 scoped_refptr<SyncedElasticOverscroll> elastic_overscroll_;
383 373
384 typedef base::hash_map<int, LayerImpl*> LayerIdMap; 374 typedef base::hash_map<int, LayerImpl*> LayerIdMap;
385 LayerIdMap layer_id_map_; 375 LayerIdMap layer_id_map_;
386 376
377 std::vector<PictureLayerImpl*> picture_layers_;
387 std::vector<LayerImpl*> layers_with_copy_output_request_; 378 std::vector<LayerImpl*> layers_with_copy_output_request_;
388 379
389 // Persisted state for non-impl-side-painting. 380 // Persisted state for non-impl-side-painting.
390 int scrolling_layer_id_from_previous_tree_; 381 int scrolling_layer_id_from_previous_tree_;
391 382
392 // List of visible layers for the most recently prepared frame. 383 // List of visible layers for the most recently prepared frame.
393 LayerImplList render_surface_layer_list_; 384 LayerImplList render_surface_layer_list_;
385 // After drawing the |render_surface_layer_list_| the areas in this region
386 // would not be fully covered by opaque content.
387 Region unoccluded_screen_space_region_;
394 388
395 bool contents_textures_purged_; 389 bool contents_textures_purged_;
396 bool viewport_size_invalid_; 390 bool viewport_size_invalid_;
397 bool needs_update_draw_properties_; 391 bool needs_update_draw_properties_;
398 392
399 // In impl-side painting mode, this is true when the tree may contain 393 // In impl-side painting mode, this is true when the tree may contain
400 // structural differences relative to the active tree. 394 // structural differences relative to the active tree.
401 bool needs_full_tree_sync_; 395 bool needs_full_tree_sync_;
402 396
403 bool next_activation_forces_redraw_; 397 bool next_activation_forces_redraw_;
404 398
405 bool has_ever_been_drawn_; 399 bool has_ever_been_drawn_;
406 400
407 ScopedPtrVector<SwapPromise> swap_promise_list_; 401 ScopedPtrVector<SwapPromise> swap_promise_list_;
408 402
409 UIResourceRequestQueue ui_resource_request_queue_; 403 UIResourceRequestQueue ui_resource_request_queue_;
410 404
411 int render_surface_layer_list_id_; 405 int render_surface_layer_list_id_;
412 406
413 // Whether or not Blink's viewport size was shrunk by the height of the top 407 // Whether or not Blink's viewport size was shrunk by the height of the top
414 // controls at the time of the last layout. 408 // controls at the time of the last layout.
415 bool top_controls_shrink_blink_size_; 409 bool top_controls_shrink_blink_size_;
416 410
417 float top_controls_height_; 411 float top_controls_height_;
418 412
419 // The up-to-date content offset of the top controls, i.e. the amount that the 413 // The amount that the top controls are shown from 0 (hidden) to 1 (fully
420 // web contents have been shifted down from the top of the device viewport. 414 // shown).
421 float top_controls_content_offset_; 415 scoped_refptr<SyncedTopControls> top_controls_shown_ratio_;
422 float top_controls_delta_;
423 float sent_top_controls_delta_;
424 416
425 scoped_ptr<PendingPageScaleAnimation> pending_page_scale_animation_; 417 scoped_ptr<PendingPageScaleAnimation> pending_page_scale_animation_;
426 418
427 private: 419 private:
428 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl); 420 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl);
429 }; 421 };
430 422
431 } // namespace cc 423 } // namespace cc
432 424
433 #endif // CC_TREES_LAYER_TREE_IMPL_H_ 425 #endif // CC_TREES_LAYER_TREE_IMPL_H_
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_unittest_picture.cc ('k') | cc/trees/layer_tree_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698