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

Unified Diff: third_party/WebKit/Source/core/animation/Animation.cpp

Issue 2188623006: Add pre finalizer to Animation to ensure compositor handles get cleaned up (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove AnimationTimeline pre-finalizer Created 4 years, 5 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: third_party/WebKit/Source/core/animation/Animation.cpp
diff --git a/third_party/WebKit/Source/core/animation/Animation.cpp b/third_party/WebKit/Source/core/animation/Animation.cpp
index 62bb7c8f1af396eea05e5455e3b9f1c75de9b6d8..235ea4e2cf9190095d1ed00442a23a16b275e969 100644
--- a/third_party/WebKit/Source/core/animation/Animation.cpp
+++ b/third_party/WebKit/Source/core/animation/Animation.cpp
@@ -903,6 +903,9 @@ void Animation::endUpdatingState()
void Animation::createCompositorPlayer()
{
if (Platform::current()->isThreadedAnimationEnabled() && !m_compositorPlayer) {
+ // We only need to pre-finalize if we are running animations on the compositor.
+ ThreadState::current()->registerPreFinalizer(this);
+
ASSERT(Platform::current()->compositorSupport());
m_compositorPlayer = CompositorAnimationPlayer::create();
ASSERT(m_compositorPlayer);

Powered by Google App Engine
This is Rietveld 408576698