Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1065)

Side by Side Diff: cc/CCLayerImpl.h

Issue 10916279: Chromium compositor change implementing page-scale driven pinch-zoom. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | cc/CCLayerImpl.cpp » ('j') | cc/CCLayerTreeHost.cpp » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "CCRenderSurface.h" 10 #include "CCRenderSurface.h"
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 167
168 const IntPoint& scrollPosition() const { return m_scrollPosition; } 168 const IntPoint& scrollPosition() const { return m_scrollPosition; }
169 void setScrollPosition(const IntPoint&); 169 void setScrollPosition(const IntPoint&);
170 170
171 const IntSize& maxScrollPosition() const {return m_maxScrollPosition; } 171 const IntSize& maxScrollPosition() const {return m_maxScrollPosition; }
172 void setMaxScrollPosition(const IntSize&); 172 void setMaxScrollPosition(const IntSize&);
173 173
174 const FloatSize& scrollDelta() const { return m_scrollDelta; } 174 const FloatSize& scrollDelta() const { return m_scrollDelta; }
175 void setScrollDelta(const FloatSize&); 175 void setScrollDelta(const FloatSize&);
176 176
177 const FloatSize& localOffset() const { return m_localOffset; }
178 void setLocalOffset(const FloatSize&);
179
177 float pageScaleDelta() const { return m_pageScaleDelta; } 180 float pageScaleDelta() const { return m_pageScaleDelta; }
178 void setPageScaleDelta(float); 181 void setPageScaleDelta(float);
179 182
183 float pageScaleFactor() const { return m_pageScaleFactor; }
184 void setPageScaleFactor(float scale) { m_pageScaleFactor = scale; }
185
180 const IntSize& sentScrollDelta() const { return m_sentScrollDelta; } 186 const IntSize& sentScrollDelta() const { return m_sentScrollDelta; }
181 void setSentScrollDelta(const IntSize& sentScrollDelta) { m_sentScrollDelta = sentScrollDelta; } 187 void setSentScrollDelta(const IntSize& sentScrollDelta) { m_sentScrollDelta = sentScrollDelta; }
182 188
183 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);
184 191
185 bool scrollable() const { return m_scrollable; } 192 bool scrollable() const { return m_scrollable; }
186 void setScrollable(bool scrollable) { m_scrollable = scrollable; } 193 void setScrollable(bool scrollable) { m_scrollable = scrollable; }
187 194
188 bool shouldScrollOnMainThread() const { return m_shouldScrollOnMainThread; } 195 bool shouldScrollOnMainThread() const { return m_shouldScrollOnMainThread; }
189 void setShouldScrollOnMainThread(bool shouldScrollOnMainThread) { m_shouldSc rollOnMainThread = shouldScrollOnMainThread; } 196 void setShouldScrollOnMainThread(bool shouldScrollOnMainThread) { m_shouldSc rollOnMainThread = shouldScrollOnMainThread; }
190 197
191 bool haveWheelEventHandlers() const { return m_haveWheelEventHandlers; } 198 bool haveWheelEventHandlers() const { return m_haveWheelEventHandlers; }
192 void setHaveWheelEventHandlers(bool haveWheelEventHandlers) { m_haveWheelEve ntHandlers = haveWheelEventHandlers; } 199 void setHaveWheelEventHandlers(bool haveWheelEventHandlers) { m_haveWheelEve ntHandlers = haveWheelEventHandlers; }
193 200
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 333
327 // Set for the layer that other layers are fixed to. 334 // Set for the layer that other layers are fixed to.
328 bool m_isContainerForFixedPositionLayers; 335 bool m_isContainerForFixedPositionLayers;
329 // This is true if the layer should be fixed to the closest ancestor contain er. 336 // This is true if the layer should be fixed to the closest ancestor contain er.
330 bool m_fixedToContainerLayer; 337 bool m_fixedToContainerLayer;
331 338
332 FloatSize m_scrollDelta; 339 FloatSize m_scrollDelta;
333 IntSize m_sentScrollDelta; 340 IntSize m_sentScrollDelta;
334 IntSize m_maxScrollPosition; 341 IntSize m_maxScrollPosition;
335 float m_pageScaleDelta; 342 float m_pageScaleDelta;
343 float m_pageScaleFactor;
344 FloatSize m_localOffset;
336 345
337 // 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
338 // 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
339 // layer. 348 // layer.
340 CCLayerImpl* m_renderTarget; 349 CCLayerImpl* m_renderTarget;
341 350
342 // 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
343 // to sort layers from back to front. 352 // to sort layers from back to front.
344 float m_drawDepth; 353 float m_drawDepth;
345 float m_drawOpacity; 354 float m_drawOpacity;
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 391
383 // Manages scrollbars for this layer 392 // Manages scrollbars for this layer
384 OwnPtr<CCScrollbarAnimationController> m_scrollbarAnimationController; 393 OwnPtr<CCScrollbarAnimationController> m_scrollbarAnimationController;
385 }; 394 };
386 395
387 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*);
388 397
389 } 398 }
390 399
391 #endif // CCLayerImpl_h 400 #endif // CCLayerImpl_h
OLDNEW
« no previous file with comments | « no previous file | cc/CCLayerImpl.cpp » ('j') | cc/CCLayerTreeHost.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698