summaryrefslogtreecommitdiffstats
path: root/cc/render_surface.h
diff options
context:
space:
mode:
authordanakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-01 18:15:58 +0000
committerdanakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-01 18:15:58 +0000
commitaad0a007e1cd343892d7b13ce5ea8d90e8ef7f53 (patch)
tree24c9af166977bbf8f25aa5b129defb35f3f8ec05 /cc/render_surface.h
parent33432d8c37e3b929c60097c1eb7a53b13f364fb5 (diff)
downloadchromium_src-aad0a007e1cd343892d7b13ce5ea8d90e8ef7f53.zip
chromium_src-aad0a007e1cd343892d7b13ce5ea8d90e8ef7f53.tar.gz
chromium_src-aad0a007e1cd343892d7b13ce5ea8d90e8ef7f53.tar.bz2
cc: Use gfx:: Geometry types for positions, bounds, and related things.
This covers layers, layer tree hosts, and related classes. *phew* I intentionally avoided anything to do with scrolling or page scale. Those should be changed to be Vectors and need a bit more thought. This change should be pretty mindless. It converts to gfx Rect, Size, Vector, and Point classes. No change is made for FloatPoint3D or FloatQuad yet. I've added cc/geometry.h as a place for free functions that don't exist on gfx types yet, and that we should port over in the future. No change in behaviour; covered by existing tests. BUG=147395 R=enne Review URL: https://codereview.chromium.org/11264056 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@165434 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/render_surface.h')
-rw-r--r--cc/render_surface.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/cc/render_surface.h b/cc/render_surface.h
index a78b53f..02aa70a 100644
--- a/cc/render_surface.h
+++ b/cc/render_surface.h
@@ -8,8 +8,8 @@
#include "base/basictypes.h"
#include "base/memory/ref_counted.h"
-#include "FloatRect.h"
-#include "IntRect.h"
+#include "ui/gfx/rect.h"
+#include "ui/gfx/rect_f.h"
#include <public/WebTransformationMatrix.h>
#include <vector>
@@ -23,10 +23,10 @@ public:
~RenderSurface();
// Returns the rect that encloses the RenderSurfaceImpl including any reflection.
- FloatRect drawableContentRect() const;
+ gfx::RectF drawableContentRect() const;
- const IntRect& contentRect() const { return m_contentRect; }
- void setContentRect(const IntRect& contentRect) { m_contentRect = contentRect; }
+ const gfx::Rect& contentRect() const { return m_contentRect; }
+ void setContentRect(const gfx::Rect& contentRect) { m_contentRect = contentRect; }
float drawOpacity() const { return m_drawOpacity; }
void setDrawOpacity(float drawOpacity) { m_drawOpacity = drawOpacity; }
@@ -53,8 +53,8 @@ public:
bool screenSpaceTransformsAreAnimating() const { return m_screenSpaceTransformsAreAnimating; }
void setScreenSpaceTransformsAreAnimating(bool animating) { m_screenSpaceTransformsAreAnimating = animating; }
- const IntRect& clipRect() const { return m_clipRect; }
- void setClipRect(const IntRect& clipRect) { m_clipRect = clipRect; }
+ const gfx::Rect& clipRect() const { return m_clipRect; }
+ void setClipRect(const gfx::Rect& clipRect) { m_clipRect = clipRect; }
typedef std::vector<scoped_refptr<Layer> > LayerList;
LayerList& layerList() { return m_layerList; }
@@ -72,7 +72,7 @@ private:
Layer* m_owningLayer;
// Uses this surface's space.
- IntRect m_contentRect;
+ gfx::Rect m_contentRect;
float m_drawOpacity;
bool m_drawOpacityIsAnimating;
@@ -84,7 +84,7 @@ private:
bool m_screenSpaceTransformsAreAnimating;
// Uses the space of the surface's target surface.
- IntRect m_clipRect;
+ gfx::Rect m_clipRect;
LayerList m_layerList;