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

Side by Side Diff: cc/damage_tracker.h

Issue 11175009: Implement SkImageFilter support in the compositor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Updated to ToT (past the Great Renaming) Created 8 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | cc/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 CCDamageTracker_h 5 #ifndef CCDamageTracker_h
6 #define CCDamageTracker_h 6 #define CCDamageTracker_h
7 7
8 #include "base/hash_tables.h" 8 #include "base/hash_tables.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "FloatRect.h" 10 #include "FloatRect.h"
11 #include <vector> 11 #include <vector>
12 12
13 namespace WebKit { 13 namespace WebKit {
14 class WebFilterOperations; 14 class WebFilterOperations;
15 } 15 }
16 16
17 class SkImageFilter;
18
17 namespace cc { 19 namespace cc {
18 20
19 class LayerImpl; 21 class LayerImpl;
20 class RenderSurfaceImpl; 22 class RenderSurfaceImpl;
21 23
22 // Computes the region where pixels have actually changed on a RenderSurfaceImpl . This region is used 24 // Computes the region where pixels have actually changed on a RenderSurfaceImpl . This region is used
23 // to scissor what is actually drawn to the screen to save GPU computation and b andwidth. 25 // to scissor what is actually drawn to the screen to save GPU computation and b andwidth.
24 class DamageTracker { 26 class DamageTracker {
25 public: 27 public:
26 static scoped_ptr<DamageTracker> create(); 28 static scoped_ptr<DamageTracker> create();
27 ~DamageTracker(); 29 ~DamageTracker();
28 30
29 void didDrawDamagedArea() { m_currentDamageRect = FloatRect(); } 31 void didDrawDamagedArea() { m_currentDamageRect = FloatRect(); }
30 void forceFullDamageNextUpdate() { m_forceFullDamageNextUpdate = true; } 32 void forceFullDamageNextUpdate() { m_forceFullDamageNextUpdate = true; }
31 void updateDamageTrackingState(const std::vector<LayerImpl*>& layerList, int targetSurfaceLayerID, bool targetSurfacePropertyChangedOnlyFromDescendant, cons t IntRect& targetSurfaceContentRect, LayerImpl* targetSurfaceMaskLayer, const We bKit::WebFilterOperations&); 33 void updateDamageTrackingState(const std::vector<LayerImpl*>& layerList, int targetSurfaceLayerID, bool targetSurfacePropertyChangedOnlyFromDescendant, cons t IntRect& targetSurfaceContentRect, LayerImpl* targetSurfaceMaskLayer, const We bKit::WebFilterOperations&, SkImageFilter* filter);
32 34
33 const FloatRect& currentDamageRect() { return m_currentDamageRect; } 35 const FloatRect& currentDamageRect() { return m_currentDamageRect; }
34 36
35 private: 37 private:
36 DamageTracker(); 38 DamageTracker();
37 39
38 FloatRect trackDamageFromActiveLayers(const std::vector<LayerImpl*>& layerLi st, int targetSurfaceLayerID); 40 FloatRect trackDamageFromActiveLayers(const std::vector<LayerImpl*>& layerLi st, int targetSurfaceLayerID);
39 FloatRect trackDamageFromSurfaceMask(LayerImpl* targetSurfaceMaskLayer); 41 FloatRect trackDamageFromSurfaceMask(LayerImpl* targetSurfaceMaskLayer);
40 FloatRect trackDamageFromLeftoverRects(); 42 FloatRect trackDamageFromLeftoverRects();
41 43
(...skipping 11 matching lines...) Expand all
53 scoped_ptr<RectMap> m_currentRectHistory; 55 scoped_ptr<RectMap> m_currentRectHistory;
54 scoped_ptr<RectMap> m_nextRectHistory; 56 scoped_ptr<RectMap> m_nextRectHistory;
55 57
56 FloatRect m_currentDamageRect; 58 FloatRect m_currentDamageRect;
57 bool m_forceFullDamageNextUpdate; 59 bool m_forceFullDamageNextUpdate;
58 }; 60 };
59 61
60 } // namespace cc 62 } // namespace cc
61 63
62 #endif // CCDamageTracker_h 64 #endif // CCDamageTracker_h
OLDNEW
« no previous file with comments | « no previous file | cc/damage_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698