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

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

Issue 1869983003: cc: Clean up helper function from layer tree host common (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@targetid
Patch Set: rebase Created 4 years, 8 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/layers/layer_iterator.h ('k') | cc/trees/damage_tracker.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_DAMAGE_TRACKER_H_ 5 #ifndef CC_TREES_DAMAGE_TRACKER_H_
6 #define CC_TREES_DAMAGE_TRACKER_H_ 6 #define CC_TREES_DAMAGE_TRACKER_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 21 matching lines...) Expand all
32 public: 32 public:
33 static std::unique_ptr<DamageTracker> Create(); 33 static std::unique_ptr<DamageTracker> Create();
34 ~DamageTracker(); 34 ~DamageTracker();
35 35
36 void DidDrawDamagedArea() { current_damage_rect_ = gfx::Rect(); } 36 void DidDrawDamagedArea() { current_damage_rect_ = gfx::Rect(); }
37 void AddDamageNextUpdate(const gfx::Rect& dmg) { 37 void AddDamageNextUpdate(const gfx::Rect& dmg) {
38 current_damage_rect_.Union(dmg); 38 current_damage_rect_.Union(dmg);
39 } 39 }
40 void UpdateDamageTrackingState( 40 void UpdateDamageTrackingState(
41 const LayerImplList& layer_list, 41 const LayerImplList& layer_list,
42 int target_surface_layer_id, 42 const RenderSurfaceImpl* target_surface,
43 bool target_surface_property_changed_only_from_descendant, 43 bool target_surface_property_changed_only_from_descendant,
44 const gfx::Rect& target_surface_content_rect, 44 const gfx::Rect& target_surface_content_rect,
45 LayerImpl* target_surface_mask_layer, 45 LayerImpl* target_surface_mask_layer,
46 const FilterOperations& filters); 46 const FilterOperations& filters);
47 47
48 gfx::Rect current_damage_rect() { return current_damage_rect_; } 48 gfx::Rect current_damage_rect() { return current_damage_rect_; }
49 49
50 private: 50 private:
51 DamageTracker(); 51 DamageTracker();
52 52
53 gfx::Rect TrackDamageFromActiveLayers(const LayerImplList& layer_list, 53 gfx::Rect TrackDamageFromActiveLayers(
54 int target_surface_layer_id); 54 const LayerImplList& layer_list,
55 const RenderSurfaceImpl* target_surface);
55 gfx::Rect TrackDamageFromSurfaceMask(LayerImpl* target_surface_mask_layer); 56 gfx::Rect TrackDamageFromSurfaceMask(LayerImpl* target_surface_mask_layer);
56 gfx::Rect TrackDamageFromLeftoverRects(); 57 gfx::Rect TrackDamageFromLeftoverRects();
57 58
58 void PrepareRectHistoryForUpdate(); 59 void PrepareRectHistoryForUpdate();
59 60
60 // These helper functions are used only in TrackDamageFromActiveLayers(). 61 // These helper functions are used only in TrackDamageFromActiveLayers().
61 void ExtendDamageForLayer(LayerImpl* layer, gfx::Rect* target_damage_rect); 62 void ExtendDamageForLayer(LayerImpl* layer, gfx::Rect* target_damage_rect);
62 void ExtendDamageForRenderSurface(LayerImpl* layer, 63 void ExtendDamageForRenderSurface(LayerImpl* layer,
63 gfx::Rect* target_damage_rect); 64 gfx::Rect* target_damage_rect);
64 65
(...skipping 21 matching lines...) Expand all
86 87
87 unsigned int mailboxId_; 88 unsigned int mailboxId_;
88 gfx::Rect current_damage_rect_; 89 gfx::Rect current_damage_rect_;
89 90
90 DISALLOW_COPY_AND_ASSIGN(DamageTracker); 91 DISALLOW_COPY_AND_ASSIGN(DamageTracker);
91 }; 92 };
92 93
93 } // namespace cc 94 } // namespace cc
94 95
95 #endif // CC_TREES_DAMAGE_TRACKER_H_ 96 #endif // CC_TREES_DAMAGE_TRACKER_H_
OLDNEW
« no previous file with comments | « cc/layers/layer_iterator.h ('k') | cc/trees/damage_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698