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

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 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') | cc/damage_tracker.cc » ('J')
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 CCLayerImpl; 21 class CCLayerImpl;
20 class CCRenderSurface; 22 class CCRenderSurface;
21 23
22 // Computes the region where pixels have actually changed on a RenderSurface. Th is region is used 24 // Computes the region where pixels have actually changed on a RenderSurface. Th is 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 CCDamageTracker { 26 class CCDamageTracker {
25 public: 27 public:
26 static scoped_ptr<CCDamageTracker> create(); 28 static scoped_ptr<CCDamageTracker> create();
27 ~CCDamageTracker(); 29 ~CCDamageTracker();
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<CCLayerImpl*>& layerList, i nt targetSurfaceLayerID, bool targetSurfacePropertyChangedOnlyFromDescendant, co nst IntRect& targetSurfaceContentRect, CCLayerImpl* targetSurfaceMaskLayer, cons t WebKit::WebFilterOperations&); 33 void updateDamageTrackingState(const std::vector<CCLayerImpl*>& layerList, i nt targetSurfaceLayerID, bool targetSurfacePropertyChangedOnlyFromDescendant, co nst IntRect& targetSurfaceContentRect, CCLayerImpl* targetSurfaceMaskLayer, cons t WebKit::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 CCDamageTracker(); 38 CCDamageTracker();
37 39
38 FloatRect trackDamageFromActiveLayers(const std::vector<CCLayerImpl*>& layer List, int targetSurfaceLayerID); 40 FloatRect trackDamageFromActiveLayers(const std::vector<CCLayerImpl*>& layer List, int targetSurfaceLayerID);
39 FloatRect trackDamageFromSurfaceMask(CCLayerImpl* targetSurfaceMaskLayer); 41 FloatRect trackDamageFromSurfaceMask(CCLayerImpl* 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') | cc/damage_tracker.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698