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 CCLayerImpl_h | 5 #ifndef CCLayerImpl_h |
6 #define CCLayerImpl_h | 6 #define CCLayerImpl_h |
7 | 7 |
8 #include "CCInputHandler.h" | 8 #include "CCInputHandler.h" |
9 #include "CCLayerAnimationController.h" | 9 #include "CCLayerAnimationController.h" |
10 #include "CCRenderPass.h" | 10 #include "CCRenderPass.h" |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 | 173 |
174 const IntPoint& scrollPosition() const { return m_scrollPosition; } | 174 const IntPoint& scrollPosition() const { return m_scrollPosition; } |
175 void setScrollPosition(const IntPoint&); | 175 void setScrollPosition(const IntPoint&); |
176 | 176 |
177 const IntSize& maxScrollPosition() const {return m_maxScrollPosition; } | 177 const IntSize& maxScrollPosition() const {return m_maxScrollPosition; } |
178 void setMaxScrollPosition(const IntSize&); | 178 void setMaxScrollPosition(const IntSize&); |
179 | 179 |
180 const FloatSize& scrollDelta() const { return m_scrollDelta; } | 180 const FloatSize& scrollDelta() const { return m_scrollDelta; } |
181 void setScrollDelta(const FloatSize&); | 181 void setScrollDelta(const FloatSize&); |
182 | 182 |
183 float pageScaleDelta() const { return m_pageScaleDelta; } | 183 const WebKit::WebTransformationMatrix& implTransform() const { return m_impl
Transform; } |
184 void setPageScaleDelta(float); | 184 void setImplTransform(const WebKit::WebTransformationMatrix& transform); |
185 | 185 |
186 const IntSize& sentScrollDelta() const { return m_sentScrollDelta; } | 186 const IntSize& sentScrollDelta() const { return m_sentScrollDelta; } |
187 void setSentScrollDelta(const IntSize& sentScrollDelta) { m_sentScrollDelta
= sentScrollDelta; } | 187 void setSentScrollDelta(const IntSize& sentScrollDelta) { m_sentScrollDelta
= sentScrollDelta; } |
188 | 188 |
189 void scrollBy(const FloatSize& scroll); | 189 // Returns the delta of the scroll that was outside of the bounds of the ini
tial scroll |
| 190 FloatSize scrollBy(const FloatSize& scroll); |
190 | 191 |
191 bool scrollable() const { return m_scrollable; } | 192 bool scrollable() const { return m_scrollable; } |
192 void setScrollable(bool scrollable) { m_scrollable = scrollable; } | 193 void setScrollable(bool scrollable) { m_scrollable = scrollable; } |
193 | 194 |
194 bool shouldScrollOnMainThread() const { return m_shouldScrollOnMainThread; } | 195 bool shouldScrollOnMainThread() const { return m_shouldScrollOnMainThread; } |
195 void setShouldScrollOnMainThread(bool shouldScrollOnMainThread) { m_shouldSc
rollOnMainThread = shouldScrollOnMainThread; } | 196 void setShouldScrollOnMainThread(bool shouldScrollOnMainThread) { m_shouldSc
rollOnMainThread = shouldScrollOnMainThread; } |
196 | 197 |
197 bool haveWheelEventHandlers() const { return m_haveWheelEventHandlers; } | 198 bool haveWheelEventHandlers() const { return m_haveWheelEventHandlers; } |
198 void setHaveWheelEventHandlers(bool haveWheelEventHandlers) { m_haveWheelEve
ntHandlers = haveWheelEventHandlers; } | 199 void setHaveWheelEventHandlers(bool haveWheelEventHandlers) { m_haveWheelEve
ntHandlers = haveWheelEventHandlers; } |
199 | 200 |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
333 bool m_forceRenderSurface; | 334 bool m_forceRenderSurface; |
334 | 335 |
335 // Set for the layer that other layers are fixed to. | 336 // Set for the layer that other layers are fixed to. |
336 bool m_isContainerForFixedPositionLayers; | 337 bool m_isContainerForFixedPositionLayers; |
337 // This is true if the layer should be fixed to the closest ancestor contain
er. | 338 // This is true if the layer should be fixed to the closest ancestor contain
er. |
338 bool m_fixedToContainerLayer; | 339 bool m_fixedToContainerLayer; |
339 | 340 |
340 FloatSize m_scrollDelta; | 341 FloatSize m_scrollDelta; |
341 IntSize m_sentScrollDelta; | 342 IntSize m_sentScrollDelta; |
342 IntSize m_maxScrollPosition; | 343 IntSize m_maxScrollPosition; |
343 float m_pageScaleDelta; | 344 WebKit::WebTransformationMatrix m_implTransform; |
344 | 345 |
345 // The layer whose coordinate space this layer draws into. This can be | 346 // The layer whose coordinate space this layer draws into. This can be |
346 // either the same layer (m_renderTarget == this) or an ancestor of this | 347 // either the same layer (m_renderTarget == this) or an ancestor of this |
347 // layer. | 348 // layer. |
348 CCLayerImpl* m_renderTarget; | 349 CCLayerImpl* m_renderTarget; |
349 | 350 |
350 // The global depth value of the center of the layer. This value is used | 351 // The global depth value of the center of the layer. This value is used |
351 // to sort layers from back to front. | 352 // to sort layers from back to front. |
352 float m_drawDepth; | 353 float m_drawDepth; |
353 float m_drawOpacity; | 354 float m_drawOpacity; |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
390 | 391 |
391 // Manages scrollbars for this layer | 392 // Manages scrollbars for this layer |
392 OwnPtr<CCScrollbarAnimationController> m_scrollbarAnimationController; | 393 OwnPtr<CCScrollbarAnimationController> m_scrollbarAnimationController; |
393 }; | 394 }; |
394 | 395 |
395 void sortLayers(Vector<CCLayerImpl*>::iterator first, Vector<CCLayerImpl*>::iter
ator end, CCLayerSorter*); | 396 void sortLayers(Vector<CCLayerImpl*>::iterator first, Vector<CCLayerImpl*>::iter
ator end, CCLayerSorter*); |
396 | 397 |
397 } | 398 } |
398 | 399 |
399 #endif // CCLayerImpl_h | 400 #endif // CCLayerImpl_h |
OLD | NEW |