Chromium Code Reviews| Index: cc/pinch_zoom_viewport.h |
| diff --git a/cc/pinch_zoom_viewport.h b/cc/pinch_zoom_viewport.h |
| index 9efe38667345bcbece241c50e5f493250ebe1319..1c8af8a0346632f704005cf9d1e9852e19a13f6b 100644 |
| --- a/cc/pinch_zoom_viewport.h |
| +++ b/cc/pinch_zoom_viewport.h |
| @@ -11,10 +11,6 @@ |
| namespace cc { |
| -// PinchZoomViewport models the bounds and offset of the viewport that is used |
| -// during a pinch-zoom operation. It tracks the layout-space dimensions of the |
| -// viewport before any applied scale, and then tracks the layout-space |
| -// coordinates of the viewport respecting the pinch settings. |
| class CC_EXPORT PinchZoomViewport { |
| public: |
| PinchZoomViewport(); |
| @@ -47,15 +43,6 @@ class CC_EXPORT PinchZoomViewport { |
| float min_page_scale_factor, |
| float max_page_scale_factor); |
| - // Returns the zoomed viewport in layout space. The rect's position is an |
| - // offset from the root layer's scroll position (therefore, zero if fully |
| - // zoomed out). |
| - gfx::RectF ZoomedViewport() const; |
| - |
| - const gfx::Vector2dF& zoomed_viewport_offset() const { |
| - return zoomed_viewport_offset_; |
| - } |
| - |
| void set_layout_viewport_size(const gfx::SizeF& size) { |
| layout_viewport_size_ = size; |
| } |
| @@ -66,18 +53,13 @@ class CC_EXPORT PinchZoomViewport { |
| device_viewport_size_ = size; |
| } |
| - // Apply the scroll offset in layout space to the offset of the pinch-zoom |
| - // viewport. The viewport cannot be scrolled outside of the layout viewport |
| - // bounds. Returns the component of the scroll that is un-applied due to this |
| - // constraint. |
| - gfx::Vector2dF ApplyScroll(const gfx::Vector2dF); |
| - |
| - // The implTransform goes from the origin of the unzoomedDeviceViewport to the |
| - // origin of the zoomedDeviceViewport. |
| + // The implTransform applies the page scale transformation. |
| // |
| - // implTransform = S[pageScale] * Tr[-zoomedDeviceViewportOffset] |
| + // implTransform = S[pageScaleFactor] * S[pageScaleDelta] |
| gfx::Transform ImplTransform(bool page_scale_pinch_zoom_enabled) const; |
|
wjmaclean
2013/01/22 16:56:39
Do we really need to keep an entire matrix around
danakj
2013/01/22 23:42:15
+1. Can we just use total_page_scale_factor?
wjmaclean
2013/01/23 16:27:02
Sorry to do this to you, but I now think this shou
|
| + gfx::SizeF LayoutSpaceViewportSize() const; |
|
danakj
2013/01/22 23:42:15
This is basically the same name as layout_viewport
|
| + |
| private: |
| float page_scale_factor_; |
| float page_scale_delta_; |
| @@ -86,7 +68,6 @@ class CC_EXPORT PinchZoomViewport { |
| float min_page_scale_factor_; |
| float device_scale_factor_; |
| - gfx::Vector2dF zoomed_viewport_offset_; |
| gfx::SizeF layout_viewport_size_; |
| gfx::SizeF device_viewport_size_; |
| }; |