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

Side by Side Diff: third_party/WebKit/Source/core/animation/Animation.cpp

Issue 2570463005: Retire ThreadState::registerPreFinalizer<T>() (Closed)
Patch Set: Created 4 years 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/css/CSSCrossfadeValue.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 1113 matching lines...) Expand 10 before | Expand all | Expand 10 after
1124 } 1124 }
1125 1125
1126 Animation::CompositorAnimationPlayerHolder* 1126 Animation::CompositorAnimationPlayerHolder*
1127 Animation::CompositorAnimationPlayerHolder::create(Animation* animation) { 1127 Animation::CompositorAnimationPlayerHolder::create(Animation* animation) {
1128 return new CompositorAnimationPlayerHolder(animation); 1128 return new CompositorAnimationPlayerHolder(animation);
1129 } 1129 }
1130 1130
1131 Animation::CompositorAnimationPlayerHolder::CompositorAnimationPlayerHolder( 1131 Animation::CompositorAnimationPlayerHolder::CompositorAnimationPlayerHolder(
1132 Animation* animation) 1132 Animation* animation)
1133 : m_animation(animation) { 1133 : m_animation(animation) {
1134 ThreadState::current()->registerPreFinalizer(this);
1135 m_compositorPlayer = CompositorAnimationPlayer::create(); 1134 m_compositorPlayer = CompositorAnimationPlayer::create();
1136 m_compositorPlayer->setAnimationDelegate(m_animation); 1135 m_compositorPlayer->setAnimationDelegate(m_animation);
1137 } 1136 }
1138 1137
1139 void Animation::CompositorAnimationPlayerHolder::dispose() { 1138 void Animation::CompositorAnimationPlayerHolder::dispose() {
1140 if (!m_animation) 1139 if (!m_animation)
1141 return; 1140 return;
1142 m_animation->dispose(); 1141 m_animation->dispose();
1143 DCHECK(!m_animation); 1142 DCHECK(!m_animation);
1144 DCHECK(!m_compositorPlayer); 1143 DCHECK(!m_compositorPlayer);
1145 } 1144 }
1146 1145
1147 void Animation::CompositorAnimationPlayerHolder::detach() { 1146 void Animation::CompositorAnimationPlayerHolder::detach() {
1148 DCHECK(m_compositorPlayer); 1147 DCHECK(m_compositorPlayer);
1149 m_compositorPlayer->setAnimationDelegate(nullptr); 1148 m_compositorPlayer->setAnimationDelegate(nullptr);
1150 m_animation = nullptr; 1149 m_animation = nullptr;
1151 m_compositorPlayer.reset(); 1150 m_compositorPlayer.reset();
1152 } 1151 }
1153 } // namespace blink 1152 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/css/CSSCrossfadeValue.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698