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

Unified Diff: cc/test/tiled_layer_test_common.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: some missed intstuff 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 side-by-side diff with in-line comments
Download patch
Index: cc/test/tiled_layer_test_common.h
diff --git a/cc/test/tiled_layer_test_common.h b/cc/test/tiled_layer_test_common.h
index e82a1f07d41cd677783be62a1a87a207618ed36e..7452e9d3b3fd8d725514d98ffd0ed93c8caa70bc 100644
--- a/cc/test/tiled_layer_test_common.h
+++ b/cc/test/tiled_layer_test_common.h
@@ -5,8 +5,6 @@
#ifndef CCTiledLayerTestCommon_h
#define CCTiledLayerTestCommon_h
-#include "IntRect.h"
-#include "IntSize.h"
#include "Region.h"
#include "cc/layer_updater.h"
#include "cc/prioritized_texture.h"
@@ -16,6 +14,8 @@
#include "cc/texture_uploader.h"
#include "cc/tiled_layer.h"
#include "cc/tiled_layer_impl.h"
+#include "ui/gfx/rect.h"
+#include "ui/gfx/size.h"
namespace WebKitTests {
@@ -42,7 +42,7 @@ public:
virtual void prepareToUpdate(const gfx::Rect& contentRect, const gfx::Size&, float, float, gfx::Rect& resultingOpaqueRect, cc::RenderingStats&) OVERRIDE;
// Sets the rect to invalidate during the next call to prepareToUpdate(). After the next
// call to prepareToUpdate() the rect is reset.
- void setRectToInvalidate(const cc::IntRect&, FakeTiledLayer*);
+ void setRectToInvalidate(const gfx::Rect&, FakeTiledLayer*);
// Last rect passed to prepareToUpdate().
const gfx::Rect& lastUpdateRect() const { return m_lastUpdateRect; }
@@ -63,7 +63,7 @@ protected:
private:
int m_prepareCount;
int m_updateCount;
- cc::IntRect m_rectToInvalidate;
+ gfx::Rect m_rectToInvalidate;
gfx::Rect m_lastUpdateRect;
gfx::Rect m_opaquePaintRect;
scoped_refptr<FakeTiledLayer> m_layer;
@@ -82,7 +82,7 @@ class FakeTiledLayer : public cc::TiledLayer {
public:
explicit FakeTiledLayer(cc::PrioritizedTextureManager*);
- static cc::IntSize tileSize() { return cc::IntSize(100, 100); }
+ static gfx::Size tileSize() { return gfx::Size(100, 100); }
using cc::TiledLayer::invalidateContentRect;
using cc::TiledLayer::needsIdlePaint;
@@ -90,14 +90,14 @@ public:
using cc::TiledLayer::numPaintedTiles;
using cc::TiledLayer::idlePaintRect;
- virtual void setNeedsDisplayRect(const cc::FloatRect&) OVERRIDE;
- const cc::FloatRect& lastNeedsDisplayRect() const { return m_lastNeedsDisplayRect; }
+ virtual void setNeedsDisplayRect(const gfx::RectF&) OVERRIDE;
+ const gfx::RectF& lastNeedsDisplayRect() const { return m_lastNeedsDisplayRect; }
virtual void setTexturePriorities(const cc::PriorityCalculator&) OVERRIDE;
virtual cc::PrioritizedTextureManager* textureManager() const OVERRIDE;
FakeLayerUpdater* fakeLayerUpdater() { return m_fakeUpdater.get(); }
- cc::FloatRect updateRect() { return m_updateRect; }
+ gfx::RectF updateRect() { return m_updateRect; }
protected:
virtual cc::LayerUpdater* updater() const OVERRIDE;
@@ -107,19 +107,19 @@ protected:
private:
scoped_refptr<FakeLayerUpdater> m_fakeUpdater;
cc::PrioritizedTextureManager* m_textureManager;
- cc::FloatRect m_lastNeedsDisplayRect;
+ gfx::RectF m_lastNeedsDisplayRect;
};
class FakeTiledLayerWithScaledBounds : public FakeTiledLayer {
public:
explicit FakeTiledLayerWithScaledBounds(cc::PrioritizedTextureManager*);
- void setContentBounds(const cc::IntSize& contentBounds) { m_forcedContentBounds = contentBounds; }
- virtual cc::IntSize contentBounds() const OVERRIDE;
+ void setContentBounds(const gfx::Size& contentBounds) { m_forcedContentBounds = contentBounds; }
+ virtual gfx::Size contentBounds() const OVERRIDE;
protected:
virtual ~FakeTiledLayerWithScaledBounds();
- cc::IntSize m_forcedContentBounds;
+ gfx::Size m_forcedContentBounds;
};
}

Powered by Google App Engine
This is Rietveld 408576698