summaryrefslogtreecommitdiffstats
path: root/cc/input
diff options
context:
space:
mode:
authormiletus <miletus@chromium.org>2014-10-01 12:38:13 -0700
committerCommit bot <commit-bot@chromium.org>2014-10-01 19:38:44 +0000
commitf57925d399f2eda19fdaab9191257e51a3af04a0 (patch)
treefe4a309c3f5af49155e2711671f644fc4fb130e0 /cc/input
parentcc40100c7c9b5be5ae9f13b888e875d63f2844cd (diff)
downloadchromium_src-f57925d399f2eda19fdaab9191257e51a3af04a0.zip
chromium_src-f57925d399f2eda19fdaab9191257e51a3af04a0.tar.gz
chromium_src-f57925d399f2eda19fdaab9191257e51a3af04a0.tar.bz2
Use ScrollOffset instead of vector2d to track scroll offset in cc
This is for preparing converting blink side scroll offset to be double type. Assuming blink side starts to use double scroll offset, it can be passed back from main/blink to compositor without converting to int type. BUG=414283 Review URL: https://codereview.chromium.org/584503005 Cr-Commit-Position: refs/heads/master@{#297692}
Diffstat (limited to 'cc/input')
-rw-r--r--cc/input/layer_scroll_offset_delegate.h17
1 files changed, 9 insertions, 8 deletions
diff --git a/cc/input/layer_scroll_offset_delegate.h b/cc/input/layer_scroll_offset_delegate.h
index ba11c38..f7ca485 100644
--- a/cc/input/layer_scroll_offset_delegate.h
+++ b/cc/input/layer_scroll_offset_delegate.h
@@ -6,8 +6,8 @@
#define CC_INPUT_LAYER_SCROLL_OFFSET_DELEGATE_H_
#include "base/basictypes.h"
+#include "ui/gfx/geometry/scroll_offset.h"
#include "ui/gfx/size_f.h"
-#include "ui/gfx/vector2d_f.h"
namespace cc {
@@ -24,7 +24,7 @@ class LayerScrollOffsetDelegate {
// The return value is not required to be related to the values passed in to
// the SetTotalScrollOffset method in any way however it is required to be no
// more than the value passed to the most recent SetMaxScrollOffset call.
- virtual gfx::Vector2dF GetTotalScrollOffset() = 0;
+ virtual gfx::ScrollOffset GetTotalScrollOffset() = 0;
// This is called by the compositor to notify the delegate of any change to
// the following parameters:
@@ -34,12 +34,13 @@ class LayerScrollOffsetDelegate {
// |page_scale_factor| current page scale,
// |min_page_scale_factor| page scale lower limit,
// |max_page_scale_factor| page scale upper limit.
- virtual void UpdateRootLayerState(const gfx::Vector2dF& total_scroll_offset,
- const gfx::Vector2dF& max_scroll_offset,
- const gfx::SizeF& scrollable_size,
- float page_scale_factor,
- float min_page_scale_factor,
- float max_page_scale_factor) = 0;
+ virtual void UpdateRootLayerState(
+ const gfx::ScrollOffset& total_scroll_offset,
+ const gfx::ScrollOffset& max_scroll_offset,
+ const gfx::SizeF& scrollable_size,
+ float page_scale_factor,
+ float min_page_scale_factor,
+ float max_page_scale_factor) = 0;
// This is called by the compositor to check whether a delegate-managed fling
// is active or not.