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

Side by Side Diff: cc/damage_tracker.h

Issue 11418117: cc: Increment the ref count when assigning the SkImageFilter (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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_unittest.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 CC_DAMAGE_TRACKER_H_ 5 #ifndef CC_DAMAGE_TRACKER_H_
6 #define CC_DAMAGE_TRACKER_H_ 6 #define CC_DAMAGE_TRACKER_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 "cc/cc_export.h" 10 #include "cc/cc_export.h"
11 #include "third_party/skia/include/core/SkImageFilter.h"
12 #include "third_party/skia/include/core/SkRefCnt.h"
11 #include "ui/gfx/rect_f.h" 13 #include "ui/gfx/rect_f.h"
12 #include <vector> 14 #include <vector>
13 15
14 class SkImageFilter;
15
16 namespace gfx { 16 namespace gfx {
17 class Rect; 17 class Rect;
18 } 18 }
19 19
20 namespace WebKit { 20 namespace WebKit {
21 class WebFilterOperations; 21 class WebFilterOperations;
22 } 22 }
23 23
24 namespace cc { 24 namespace cc {
25 25
26 class LayerImpl; 26 class LayerImpl;
27 class RenderSurfaceImpl; 27 class RenderSurfaceImpl;
28 28
29 // Computes the region where pixels have actually changed on a RenderSurfaceImpl . This region is used 29 // Computes the region where pixels have actually changed on a RenderSurfaceImpl . This region is used
30 // to scissor what is actually drawn to the screen to save GPU computation and b andwidth. 30 // to scissor what is actually drawn to the screen to save GPU computation and b andwidth.
31 class CC_EXPORT DamageTracker { 31 class CC_EXPORT DamageTracker {
32 public: 32 public:
33 static scoped_ptr<DamageTracker> create(); 33 static scoped_ptr<DamageTracker> create();
34 ~DamageTracker(); 34 ~DamageTracker();
35 35
36 void didDrawDamagedArea() { m_currentDamageRect = gfx::RectF(); } 36 void didDrawDamagedArea() { m_currentDamageRect = gfx::RectF(); }
37 void forceFullDamageNextUpdate() { m_forceFullDamageNextUpdate = true; } 37 void forceFullDamageNextUpdate() { m_forceFullDamageNextUpdate = true; }
38 void updateDamageTrackingState(const std::vector<LayerImpl*>& layerList, int targetSurfaceLayerID, bool targetSurfacePropertyChangedOnlyFromDescendant, cons t gfx::Rect& targetSurfaceContentRect, LayerImpl* targetSurfaceMaskLayer, const WebKit::WebFilterOperations&, SkImageFilter* filter); 38 void updateDamageTrackingState(const std::vector<LayerImpl*>& layerList, int targetSurfaceLayerID, bool targetSurfacePropertyChangedOnlyFromDescendant, cons t gfx::Rect& targetSurfaceContentRect, LayerImpl* targetSurfaceMaskLayer, const WebKit::WebFilterOperations&, const SkRefPtr<SkImageFilter>& filter);
39 39
40 const gfx::RectF& currentDamageRect() { return m_currentDamageRect; } 40 const gfx::RectF& currentDamageRect() { return m_currentDamageRect; }
41 41
42 private: 42 private:
43 DamageTracker(); 43 DamageTracker();
44 44
45 gfx::RectF trackDamageFromActiveLayers(const std::vector<LayerImpl*>& layerL ist, int targetSurfaceLayerID); 45 gfx::RectF trackDamageFromActiveLayers(const std::vector<LayerImpl*>& layerL ist, int targetSurfaceLayerID);
46 gfx::RectF trackDamageFromSurfaceMask(LayerImpl* targetSurfaceMaskLayer); 46 gfx::RectF trackDamageFromSurfaceMask(LayerImpl* targetSurfaceMaskLayer);
47 gfx::RectF trackDamageFromLeftoverRects(); 47 gfx::RectF trackDamageFromLeftoverRects();
48 48
(...skipping 13 matching lines...) Expand all
62 62
63 gfx::RectF m_currentDamageRect; 63 gfx::RectF m_currentDamageRect;
64 bool m_forceFullDamageNextUpdate; 64 bool m_forceFullDamageNextUpdate;
65 65
66 DISALLOW_COPY_AND_ASSIGN(DamageTracker); 66 DISALLOW_COPY_AND_ASSIGN(DamageTracker);
67 }; 67 };
68 68
69 } // namespace cc 69 } // namespace cc
70 70
71 #endif // CC_DAMAGE_TRACKER_H_ 71 #endif // CC_DAMAGE_TRACKER_H_
OLDNEW
« no previous file with comments | « no previous file | cc/damage_tracker.cc » ('j') | cc/damage_tracker_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698