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

Side by Side Diff: cc/damage_tracker.h

Issue 11365025: Make cc a component (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix win?? 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
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 "cc/cc_export.h"
10 #include "FloatRect.h" 11 #include "FloatRect.h"
11 #include <vector> 12 #include <vector>
12 13
13 namespace WebKit { 14 namespace WebKit {
14 class WebFilterOperations; 15 class WebFilterOperations;
15 } 16 }
16 17
17 class SkImageFilter; 18 class SkImageFilter;
18 19
19 namespace cc { 20 namespace cc {
20 21
21 class LayerImpl; 22 class LayerImpl;
22 class RenderSurfaceImpl; 23 class RenderSurfaceImpl;
23 24
24 // Computes the region where pixels have actually changed on a RenderSurfaceImpl . This region is used 25 // Computes the region where pixels have actually changed on a RenderSurfaceImpl . This region is used
25 // to scissor what is actually drawn to the screen to save GPU computation and b andwidth. 26 // to scissor what is actually drawn to the screen to save GPU computation and b andwidth.
26 class DamageTracker { 27 class CC_EXPORT DamageTracker {
27 public: 28 public:
28 static scoped_ptr<DamageTracker> create(); 29 static scoped_ptr<DamageTracker> create();
29 ~DamageTracker(); 30 ~DamageTracker();
30 31
31 void didDrawDamagedArea() { m_currentDamageRect = FloatRect(); } 32 void didDrawDamagedArea() { m_currentDamageRect = FloatRect(); }
32 void forceFullDamageNextUpdate() { m_forceFullDamageNextUpdate = true; } 33 void forceFullDamageNextUpdate() { m_forceFullDamageNextUpdate = true; }
33 void updateDamageTrackingState(const std::vector<LayerImpl*>& layerList, int targetSurfaceLayerID, bool targetSurfacePropertyChangedOnlyFromDescendant, cons t IntRect& targetSurfaceContentRect, LayerImpl* targetSurfaceMaskLayer, const We bKit::WebFilterOperations&, SkImageFilter* filter); 34 void updateDamageTrackingState(const std::vector<LayerImpl*>& layerList, int targetSurfaceLayerID, bool targetSurfacePropertyChangedOnlyFromDescendant, cons t IntRect& targetSurfaceContentRect, LayerImpl* targetSurfaceMaskLayer, const We bKit::WebFilterOperations&, SkImageFilter* filter);
34 35
35 const FloatRect& currentDamageRect() { return m_currentDamageRect; } 36 const FloatRect& currentDamageRect() { return m_currentDamageRect; }
36 37
(...skipping 13 matching lines...) Expand all
50 51
51 // To correctly track exposed regions, two hashtables of rects are maintaine d. 52 // To correctly track exposed regions, two hashtables of rects are maintaine d.
52 // The "current" map is used to compute exposed regions of the current frame , while 53 // The "current" map is used to compute exposed regions of the current frame , while
53 // the "next" map is used to collect layer rects that are used in the next f rame. 54 // the "next" map is used to collect layer rects that are used in the next f rame.
54 typedef base::hash_map<int, FloatRect> RectMap; 55 typedef base::hash_map<int, FloatRect> RectMap;
55 scoped_ptr<RectMap> m_currentRectHistory; 56 scoped_ptr<RectMap> m_currentRectHistory;
56 scoped_ptr<RectMap> m_nextRectHistory; 57 scoped_ptr<RectMap> m_nextRectHistory;
57 58
58 FloatRect m_currentDamageRect; 59 FloatRect m_currentDamageRect;
59 bool m_forceFullDamageNextUpdate; 60 bool m_forceFullDamageNextUpdate;
61
62 DISALLOW_COPY_AND_ASSIGN(DamageTracker);
60 }; 63 };
61 64
62 } // namespace cc 65 } // namespace cc
63 66
64 #endif // CCDamageTracker_h 67 #endif // CCDamageTracker_h
OLDNEW
« no previous file with comments | « cc/content_layer_updater.h ('k') | cc/debug_border_draw_quad.h » ('j') | cc/occlusion_tracker.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698