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

Unified Diff: cc/render_surface_impl.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/render_surface.cc ('k') | cc/render_surface_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/render_surface_impl.h
diff --git a/cc/render_surface_impl.h b/cc/render_surface_impl.h
index f74e420436f042481ff28b1bde205e2a7b7e96fa..ec0fde90fac695a392fa7388bc68a4161984df69 100644
--- a/cc/render_surface_impl.h
+++ b/cc/render_surface_impl.h
@@ -5,12 +5,12 @@
#ifndef CCRenderSurface_h
#define CCRenderSurface_h
-#include "FloatRect.h"
-#include "IntRect.h"
#include "base/basictypes.h"
#include "base/memory/scoped_ptr.h"
#include "cc/render_pass.h"
#include "cc/shared_quad_state.h"
+#include "ui/gfx/rect.h"
+#include "ui/gfx/rect_f.h"
#include <public/WebTransformationMatrix.h>
namespace cc {
@@ -31,10 +31,10 @@ public:
std::string name() const;
void dumpSurface(std::string*, int indent) const;
- FloatPoint contentRectCenter() const { return FloatRect(m_contentRect).center(); }
+ gfx::PointF contentRectCenter() const { return gfx::RectF(m_contentRect).CenterPoint(); }
// Returns the rect that encloses the RenderSurfaceImpl including any reflection.
- FloatRect drawableContentRect() const;
+ gfx::RectF drawableContentRect() const;
float drawOpacity() const { return m_drawOpacity; }
void setDrawOpacity(float opacity) { m_drawOpacity = opacity; }
@@ -62,13 +62,13 @@ public:
bool screenSpaceTransformsAreAnimating() const { return m_screenSpaceTransformsAreAnimating; }
void setScreenSpaceTransformsAreAnimating(bool animating) { m_screenSpaceTransformsAreAnimating = animating; }
- void setClipRect(const IntRect&);
- const IntRect& clipRect() const { return m_clipRect; }
+ void setClipRect(const gfx::Rect&);
+ const gfx::Rect& clipRect() const { return m_clipRect; }
bool contentsChanged() const;
- void setContentRect(const IntRect&);
- const IntRect& contentRect() const { return m_contentRect; }
+ void setContentRect(const gfx::Rect&);
+ const gfx::Rect& contentRect() const { return m_contentRect; }
std::vector<LayerImpl*>& layerList() { return m_layerList; }
void addContributingDelegatedRenderPassLayer(LayerImpl*);
@@ -91,7 +91,7 @@ private:
LayerImpl* m_owningLayer;
// Uses this surface's space.
- IntRect m_contentRect;
+ gfx::Rect m_contentRect;
bool m_surfacePropertyChanged;
float m_drawOpacity;
@@ -104,7 +104,7 @@ private:
bool m_screenSpaceTransformsAreAnimating;
// Uses the space of the surface's target surface.
- IntRect m_clipRect;
+ gfx::Rect m_clipRect;
std::vector<LayerImpl*> m_layerList;
std::vector<DelegatedRendererLayerImpl*> m_contributingDelegatedRenderPassLayerList;
« no previous file with comments | « cc/render_surface.cc ('k') | cc/render_surface_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698