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

Unified Diff: cc/CCLayerImpl.cpp

Issue 10916279: Chromium compositor change implementing page-scale driven pinch-zoom. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Rebaselined to 160422. Created 8 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/CCLayerImpl.h ('k') | cc/CCLayerImplTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/CCLayerImpl.cpp
===================================================================
--- cc/CCLayerImpl.cpp (revision 160422)
+++ cc/CCLayerImpl.cpp (working copy)
@@ -48,7 +48,6 @@
, m_forceRenderSurface(false)
, m_isContainerForFixedPositionLayers(false)
, m_fixedToContainerLayer(false)
- , m_pageScaleDelta(1)
, m_renderTarget(0)
, m_drawDepth(0)
, m_drawOpacity(0)
@@ -175,20 +174,23 @@
return 0;
}
-void CCLayerImpl::scrollBy(const FloatSize& scroll)
+FloatSize CCLayerImpl::scrollBy(const FloatSize& scroll)
{
IntSize minDelta = -toSize(m_scrollPosition);
IntSize maxDelta = m_maxScrollPosition - toSize(m_scrollPosition);
// Clamp newDelta so that position + delta stays within scroll bounds.
FloatSize newDelta = (m_scrollDelta + scroll).expandedTo(minDelta).shrunkTo(maxDelta);
+ FloatSize unscrolled = m_scrollDelta + scroll - newDelta;
if (m_scrollDelta == newDelta)
- return;
+ return unscrolled;
m_scrollDelta = newDelta;
if (m_scrollbarAnimationController)
m_scrollbarAnimationController->updateScrollOffset(this);
noteLayerPropertyChangedForSubtree();
+
+ return unscrolled;
}
CCInputHandlerClient::ScrollStatus CCLayerImpl::tryScroll(const IntPoint& viewportPoint, CCInputHandlerClient::ScrollInputType type) const
@@ -613,12 +615,12 @@
noteLayerPropertyChangedForSubtree();
}
-void CCLayerImpl::setPageScaleDelta(float pageScaleDelta)
+void CCLayerImpl::setImplTransform(const WebKit::WebTransformationMatrix& transform)
{
- if (m_pageScaleDelta == pageScaleDelta)
+ if (m_implTransform == transform)
return;
- m_pageScaleDelta = pageScaleDelta;
+ m_implTransform = transform;
noteLayerPropertyChangedForSubtree();
}
« no previous file with comments | « cc/CCLayerImpl.h ('k') | cc/CCLayerImplTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698