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

Unified Diff: cc/damage_tracker.h

Issue 11264056: cc: Use gfx:: Geometry types for positions, bounds, and related things. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ScaleAsVector 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/contents_scaling_layer_unittest.cc ('k') | cc/damage_tracker.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/damage_tracker.h
diff --git a/cc/damage_tracker.h b/cc/damage_tracker.h
index 59a134010675f593723dfc6079c3c2a90f9a45ff..4680662b94df556638447268629bf2ec387dd7ee 100644
--- a/cc/damage_tracker.h
+++ b/cc/damage_tracker.h
@@ -7,15 +7,19 @@
#include "base/hash_tables.h"
#include "base/memory/scoped_ptr.h"
-#include "FloatRect.h"
+#include "ui/gfx/rect_f.h"
#include <vector>
+class SkImageFilter;
+
+namespace gfx {
+class Rect;
+}
+
namespace WebKit {
class WebFilterOperations;
}
-class SkImageFilter;
-
namespace cc {
class LayerImpl;
@@ -28,34 +32,34 @@ public:
static scoped_ptr<DamageTracker> create();
~DamageTracker();
- void didDrawDamagedArea() { m_currentDamageRect = FloatRect(); }
+ void didDrawDamagedArea() { m_currentDamageRect = gfx::RectF(); }
void forceFullDamageNextUpdate() { m_forceFullDamageNextUpdate = true; }
- void updateDamageTrackingState(const std::vector<LayerImpl*>& layerList, int targetSurfaceLayerID, bool targetSurfacePropertyChangedOnlyFromDescendant, const IntRect& targetSurfaceContentRect, LayerImpl* targetSurfaceMaskLayer, const WebKit::WebFilterOperations&, SkImageFilter* filter);
+ void updateDamageTrackingState(const std::vector<LayerImpl*>& layerList, int targetSurfaceLayerID, bool targetSurfacePropertyChangedOnlyFromDescendant, const gfx::Rect& targetSurfaceContentRect, LayerImpl* targetSurfaceMaskLayer, const WebKit::WebFilterOperations&, SkImageFilter* filter);
- const FloatRect& currentDamageRect() { return m_currentDamageRect; }
+ const gfx::RectF& currentDamageRect() { return m_currentDamageRect; }
private:
DamageTracker();
- FloatRect trackDamageFromActiveLayers(const std::vector<LayerImpl*>& layerList, int targetSurfaceLayerID);
- FloatRect trackDamageFromSurfaceMask(LayerImpl* targetSurfaceMaskLayer);
- FloatRect trackDamageFromLeftoverRects();
+ gfx::RectF trackDamageFromActiveLayers(const std::vector<LayerImpl*>& layerList, int targetSurfaceLayerID);
+ gfx::RectF trackDamageFromSurfaceMask(LayerImpl* targetSurfaceMaskLayer);
+ gfx::RectF trackDamageFromLeftoverRects();
- FloatRect removeRectFromCurrentFrame(int layerID, bool& layerIsNew);
- void saveRectForNextFrame(int layerID, const FloatRect& targetSpaceRect);
+ gfx::RectF removeRectFromCurrentFrame(int layerID, bool& layerIsNew);
+ void saveRectForNextFrame(int layerID, const gfx::RectF& targetSpaceRect);
// These helper functions are used only in trackDamageFromActiveLayers().
- void extendDamageForLayer(LayerImpl*, FloatRect& targetDamageRect);
- void extendDamageForRenderSurface(LayerImpl*, FloatRect& targetDamageRect);
+ void extendDamageForLayer(LayerImpl*, gfx::RectF& targetDamageRect);
+ void extendDamageForRenderSurface(LayerImpl*, gfx::RectF& targetDamageRect);
// To correctly track exposed regions, two hashtables of rects are maintained.
// The "current" map is used to compute exposed regions of the current frame, while
// the "next" map is used to collect layer rects that are used in the next frame.
- typedef base::hash_map<int, FloatRect> RectMap;
+ typedef base::hash_map<int, gfx::RectF> RectMap;
scoped_ptr<RectMap> m_currentRectHistory;
scoped_ptr<RectMap> m_nextRectHistory;
- FloatRect m_currentDamageRect;
+ gfx::RectF m_currentDamageRect;
bool m_forceFullDamageNextUpdate;
};
« no previous file with comments | « cc/contents_scaling_layer_unittest.cc ('k') | cc/damage_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698