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

Unified Diff: Source/platform/graphics/GraphicsLayer.cpp

Issue 802383003: Run CSSOM smooth scroll animations on the compositor when possible (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add comment Created 5 years, 11 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
Index: Source/platform/graphics/GraphicsLayer.cpp
diff --git a/Source/platform/graphics/GraphicsLayer.cpp b/Source/platform/graphics/GraphicsLayer.cpp
index 8ded5786aeb13716b7758912872265f5c089c28f..92fb981e15aaff4962f619e654a319342dc30e26 100644
--- a/Source/platform/graphics/GraphicsLayer.cpp
+++ b/Source/platform/graphics/GraphicsLayer.cpp
@@ -1085,16 +1085,19 @@ void GraphicsLayer::notifyAnimationStarted(double monotonicTime, int group)
m_client->notifyAnimationStarted(this, monotonicTime, group);
}
-void GraphicsLayer::notifyAnimationFinished(double, int)
+void GraphicsLayer::notifyAnimationFinished(double, int group)
{
+ if (m_scrollableArea)
+ m_scrollableArea->notifyCompositorAnimationFinished(group);
}
void GraphicsLayer::didScroll()
{
if (m_scrollableArea) {
DoublePoint newPosition = m_scrollableArea->minimumScrollPosition() + toDoubleSize(m_layer->layer()->scrollPositionDouble());
+ bool cancelProgrammaticAnimations = false;
// FIXME: Remove the toFloatPoint(). crbug.com/414283.
- m_scrollableArea->scrollToOffsetWithoutAnimation(toFloatPoint(newPosition));
+ m_scrollableArea->scrollToOffsetWithoutAnimation(toFloatPoint(newPosition), cancelProgrammaticAnimations);
}
}
« no previous file with comments | « Source/core/rendering/compositing/RenderLayerCompositor.cpp ('k') | Source/platform/scroll/ProgrammaticScrollAnimator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698