summaryrefslogtreecommitdiffstats
path: root/cc/page_scale_animation.h
diff options
context:
space:
mode:
authorphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-05 17:17:34 +0000
committerphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-05 17:17:34 +0000
commitcf817fb1eddd3ab76b074029739828c4072b567b (patch)
treea0b699950f8538305df7b420406b8d7a821768cb /cc/page_scale_animation.h
parent3c6aa86510b3724b6c3c83c090f22775f8d4fa0e (diff)
downloadchromium_src-cf817fb1eddd3ab76b074029739828c4072b567b.zip
chromium_src-cf817fb1eddd3ab76b074029739828c4072b567b.tar.gz
chromium_src-cf817fb1eddd3ab76b074029739828c4072b567b.tar.bz2
Revert "cc: Remove all remaining use of WebCore Rect/Point/Size types from the compositor."
This reverts commit a76cb24ab8de742f70b83f6c045c2c23545eaae7. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@165949 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/page_scale_animation.h')
-rw-r--r--cc/page_scale_animation.h23
1 files changed, 11 insertions, 12 deletions
diff --git a/cc/page_scale_animation.h b/cc/page_scale_animation.h
index c4c2940..5f4bbac 100644
--- a/cc/page_scale_animation.h
+++ b/cc/page_scale_animation.h
@@ -6,8 +6,7 @@
#define CC_PAGE_SCALE_ANIMATION_H_
#include "base/memory/scoped_ptr.h"
-#include "ui/gfx/size.h"
-#include "ui/gfx/vector2d.h"
+#include "IntSize.h"
namespace cc {
@@ -20,7 +19,7 @@ public:
// Construct with the starting page scale and scroll offset (which is in
// pageScaleStart space). The window size is the user-viewable area
// in pixels.
- static scoped_ptr<PageScaleAnimation> create(gfx::Vector2d scrollStart, float pageScaleStart, const gfx::Size& windowSize, const gfx::Size& contentSize, double startTime);
+ static scoped_ptr<PageScaleAnimation> create(const IntSize& scrollStart, float pageScaleStart, const gfx::Size& windowSize, const gfx::Size& contentSize, double startTime);
~PageScaleAnimation();
// The following methods initialize the animation. Call one of them
@@ -28,16 +27,16 @@ public:
// Zoom while explicitly specifying the top-left scroll position. The
// scroll offset is in finalPageScale coordinates.
- void zoomTo(gfx::Vector2d finalScroll, float finalPageScale, double duration);
+ void zoomTo(const IntSize& finalScroll, float finalPageScale, double duration);
// Zoom based on a specified onscreen anchor, which will remain at the same
// position on the screen throughout the animation. The anchor is in local
// space relative to scrollStart.
- void zoomWithAnchor(gfx::Vector2d anchor, float finalPageScale, double duration);
+ void zoomWithAnchor(const IntSize& anchor, float finalPageScale, double duration);
// Call these functions while the animation is in progress to output the
// current state.
- gfx::Vector2d scrollOffsetAtTime(double time) const;
+ IntSize scrollOffsetAtTime(double time) const;
float pageScaleAtTime(double time) const;
bool isAnimationCompleteAtTime(double time) const;
@@ -46,25 +45,25 @@ public:
double startTime() const { return m_startTime; }
double duration() const { return m_duration; }
double endTime() const { return m_startTime + m_duration; }
- gfx::Vector2d finalScrollOffset() const { return m_scrollEnd; }
+ const IntSize& finalScrollOffset() const { return m_scrollEnd; }
float finalPageScale() const { return m_pageScaleEnd; }
protected:
- PageScaleAnimation(gfx::Vector2d scrollStart, float pageScaleStart, const gfx::Size& windowSize, const gfx::Size& contentSize, double startTime);
+ PageScaleAnimation(const IntSize& scrollStart, float pageScaleStart, const gfx::Size& windowSize, const gfx::Size& contentSize, double startTime);
private:
float progressRatioForTime(double time) const;
- gfx::Vector2d scrollOffsetAtRatio(float ratio) const;
+ IntSize scrollOffsetAtRatio(float ratio) const;
float pageScaleAtRatio(float ratio) const;
- gfx::Vector2d m_scrollStart;
+ IntSize m_scrollStart;
float m_pageScaleStart;
gfx::Size m_windowSize;
gfx::Size m_contentSize;
bool m_anchorMode;
- gfx::Vector2d m_anchor;
- gfx::Vector2d m_scrollEnd;
+ IntSize m_anchor;
+ IntSize m_scrollEnd;
float m_pageScaleEnd;
double m_startTime;