OLD | NEW |
1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CCPageScaleAnimation_h | 5 #ifndef CCPageScaleAnimation_h |
6 #define CCPageScaleAnimation_h | 6 #define CCPageScaleAnimation_h |
7 | 7 |
8 #include "IntSize.h" | 8 #include "IntSize.h" |
9 #include <wtf/PassOwnPtr.h> | 9 #include <wtf/PassOwnPtr.h> |
10 | 10 |
11 namespace WebCore { | 11 namespace cc { |
12 | 12 |
13 // A small helper class that does the math for zoom animations, primarily for | 13 // A small helper class that does the math for zoom animations, primarily for |
14 // double-tap zoom. Initialize it with starting and ending scroll/page scale | 14 // double-tap zoom. Initialize it with starting and ending scroll/page scale |
15 // positions and an animation length time, then call ...AtTime() at every frame | 15 // positions and an animation length time, then call ...AtTime() at every frame |
16 // to obtain the current interpolated position. | 16 // to obtain the current interpolated position. |
17 class CCPageScaleAnimation { | 17 class CCPageScaleAnimation { |
18 public: | 18 public: |
19 // Construct with the starting page scale and scroll offset (which is in | 19 // Construct with the starting page scale and scroll offset (which is in |
20 // pageScaleStart space). The window size is the user-viewable area | 20 // pageScaleStart space). The window size is the user-viewable area |
21 // in pixels. | 21 // in pixels. |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 | 62 |
63 bool m_anchorMode; | 63 bool m_anchorMode; |
64 IntSize m_anchor; | 64 IntSize m_anchor; |
65 IntSize m_scrollEnd; | 65 IntSize m_scrollEnd; |
66 float m_pageScaleEnd; | 66 float m_pageScaleEnd; |
67 | 67 |
68 double m_startTime; | 68 double m_startTime; |
69 double m_duration; | 69 double m_duration; |
70 }; | 70 }; |
71 | 71 |
72 } // namespace WebCore | 72 } // namespace cc |
73 | 73 |
74 #endif | 74 #endif |
OLD | NEW |