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

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

Issue 23686011: CC: Fix missing swap-used-incomplete-tile updates (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add test. Created 7 years, 3 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_IMPL_H_ 5 #ifndef CC_TREES_LAYER_TREE_HOST_IMPL_H_
6 #define CC_TREES_LAYER_TREE_HOST_IMPL_H_ 6 #define CC_TREES_LAYER_TREE_HOST_IMPL_H_
7 7
8 #include <list> 8 #include <list>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 void SetNeedsManageTiles() { manage_tiles_needed_ = true; } 264 void SetNeedsManageTiles() { manage_tiles_needed_ = true; }
265 265
266 void Readback(void* pixels, gfx::Rect rect_in_device_viewport); 266 void Readback(void* pixels, gfx::Rect rect_in_device_viewport);
267 267
268 LayerTreeImpl* active_tree() { return active_tree_.get(); } 268 LayerTreeImpl* active_tree() { return active_tree_.get(); }
269 const LayerTreeImpl* active_tree() const { return active_tree_.get(); } 269 const LayerTreeImpl* active_tree() const { return active_tree_.get(); }
270 LayerTreeImpl* pending_tree() { return pending_tree_.get(); } 270 LayerTreeImpl* pending_tree() { return pending_tree_.get(); }
271 const LayerTreeImpl* pending_tree() const { return pending_tree_.get(); } 271 const LayerTreeImpl* pending_tree() const { return pending_tree_.get(); }
272 const LayerTreeImpl* recycle_tree() const { return recycle_tree_.get(); } 272 const LayerTreeImpl* recycle_tree() const { return recycle_tree_.get(); }
273 virtual void CreatePendingTree(); 273 virtual void CreatePendingTree();
274 void UpdateVisibleTiles(); 274 virtual void UpdateVisibleTiles();
275 virtual void ActivatePendingTree(); 275 virtual void ActivatePendingTree();
276 276
277 // Shortcuts to layers on the active tree. 277 // Shortcuts to layers on the active tree.
278 LayerImpl* RootLayer() const; 278 LayerImpl* RootLayer() const;
279 LayerImpl* RootScrollLayer() const; 279 LayerImpl* RootScrollLayer() const;
280 LayerImpl* CurrentlyScrollingLayer() const; 280 LayerImpl* CurrentlyScrollingLayer() const;
281 281
282 virtual void SetVisible(bool visible); 282 virtual void SetVisible(bool visible);
283 bool visible() const { return visible_; } 283 bool visible() const { return visible_; }
284 284
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
406 bool page_scale_animation_active() const { return !!page_scale_animation_; } 406 bool page_scale_animation_active() const { return !!page_scale_animation_; }
407 407
408 void CreateUIResource(UIResourceId uid, 408 void CreateUIResource(UIResourceId uid,
409 scoped_refptr<UIResourceBitmap> bitmap); 409 scoped_refptr<UIResourceBitmap> bitmap);
410 // Deletes a UI resource. May safely be called more than once. 410 // Deletes a UI resource. May safely be called more than once.
411 void DeleteUIResource(UIResourceId uid); 411 void DeleteUIResource(UIResourceId uid);
412 void DeleteAllUIResources(); 412 void DeleteAllUIResources();
413 413
414 ResourceProvider::ResourceId ResourceIdForUIResource(UIResourceId uid) const; 414 ResourceProvider::ResourceId ResourceIdForUIResource(UIResourceId uid) const;
415 415
416 void DidInitializeVisibleTile();
epennerAtGoogle 2013/09/07 00:06:11 Oops. I'm fixing the test to not need this.
epenner 2013/09/07 01:52:23 Done.
417
416 protected: 418 protected:
417 LayerTreeHostImpl( 419 LayerTreeHostImpl(
418 const LayerTreeSettings& settings, 420 const LayerTreeSettings& settings,
419 LayerTreeHostImplClient* client, 421 LayerTreeHostImplClient* client,
420 Proxy* proxy, 422 Proxy* proxy,
421 RenderingStatsInstrumentation* rendering_stats_instrumentation); 423 RenderingStatsInstrumentation* rendering_stats_instrumentation);
422 424
423 // Virtual for testing. 425 // Virtual for testing.
424 virtual void AnimateLayers(base::TimeTicks monotonic_time, 426 virtual void AnimateLayers(base::TimeTicks monotonic_time,
425 base::Time wall_clock_time); 427 base::Time wall_clock_time);
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
476 void AnimateScrollbarsRecursive(LayerImpl* layer, 478 void AnimateScrollbarsRecursive(LayerImpl* layer,
477 base::TimeTicks time); 479 base::TimeTicks time);
478 480
479 void UpdateCurrentFrameTime(base::TimeTicks* ticks, base::Time* now) const; 481 void UpdateCurrentFrameTime(base::TimeTicks* ticks, base::Time* now) const;
480 482
481 void StartScrollbarAnimationRecursive(LayerImpl* layer, base::TimeTicks time); 483 void StartScrollbarAnimationRecursive(LayerImpl* layer, base::TimeTicks time);
482 void SetManagedMemoryPolicy(const ManagedMemoryPolicy& policy, 484 void SetManagedMemoryPolicy(const ManagedMemoryPolicy& policy,
483 bool zero_budget); 485 bool zero_budget);
484 void EnforceManagedMemoryPolicy(const ManagedMemoryPolicy& policy); 486 void EnforceManagedMemoryPolicy(const ManagedMemoryPolicy& policy);
485 487
486 void DidInitializeVisibleTile(); 488
487 489
488 typedef base::hash_map<UIResourceId, ResourceProvider::ResourceId> 490 typedef base::hash_map<UIResourceId, ResourceProvider::ResourceId>
489 UIResourceMap; 491 UIResourceMap;
490 UIResourceMap ui_resource_map_; 492 UIResourceMap ui_resource_map_;
491 493
492 scoped_ptr<OutputSurface> output_surface_; 494 scoped_ptr<OutputSurface> output_surface_;
493 scoped_refptr<ContextProvider> offscreen_context_provider_; 495 scoped_refptr<ContextProvider> offscreen_context_provider_;
494 496
495 // |resource_provider_| and |tile_manager_| can be NULL, e.g. when using tile- 497 // |resource_provider_| and |tile_manager_| can be NULL, e.g. when using tile-
496 // free rendering - see OutputSurface::ForcedDrawToSoftwareDevice(). 498 // free rendering - see OutputSurface::ForcedDrawToSoftwareDevice().
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
601 603
602 // Optional callback to notify of new tree activations. 604 // Optional callback to notify of new tree activations.
603 base::Closure tree_activation_callback_; 605 base::Closure tree_activation_callback_;
604 606
605 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); 607 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl);
606 }; 608 };
607 609
608 } // namespace cc 610 } // namespace cc
609 611
610 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ 612 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698