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

Unified Diff: cc/animation/keyframed_animation_curve.cc

Issue 1437413002: cc: Remove ScopedPtrVector and cc::remove_if. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: just the vector Created 5 years, 1 month 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: cc/animation/keyframed_animation_curve.cc
diff --git a/cc/animation/keyframed_animation_curve.cc b/cc/animation/keyframed_animation_curve.cc
index f8f6021b1881e70f26ebcdcb6bc57bd62ce31c3f..7e62a4fb1cdbad92cc336c5597d982dc1bd91396 100644
--- a/cc/animation/keyframed_animation_curve.cc
+++ b/cc/animation/keyframed_animation_curve.cc
@@ -15,7 +15,7 @@ namespace {
template <class KeyframeType>
void InsertKeyframe(scoped_ptr<KeyframeType> keyframe,
- ScopedPtrVector<KeyframeType>* keyframes) {
+ std::vector<scoped_ptr<KeyframeType>>* keyframes) {
// Usually, the keyframes will be added in order, so this loop would be
// unnecessary and we should skip it if possible.
if (!keyframes->empty() && keyframe->Time() < keyframes->back()->Time()) {
@@ -32,7 +32,7 @@ void InsertKeyframe(scoped_ptr<KeyframeType> keyframe,
template <typename KeyframeType>
base::TimeDelta TransformedAnimationTime(
- const ScopedPtrVector<KeyframeType>& keyframes,
+ const std::vector<scoped_ptr<KeyframeType>>& keyframes,
const scoped_ptr<TimingFunction>& timing_function,
base::TimeDelta time) {
if (timing_function) {
@@ -49,7 +49,7 @@ base::TimeDelta TransformedAnimationTime(
}
template <typename KeyframeType>
-size_t GetActiveKeyframe(const ScopedPtrVector<KeyframeType>& keyframes,
+size_t GetActiveKeyframe(const std::vector<scoped_ptr<KeyframeType>>& keyframes,
base::TimeDelta time) {
DCHECK_GE(keyframes.size(), 2ul);
size_t i = 0;
@@ -63,7 +63,7 @@ size_t GetActiveKeyframe(const ScopedPtrVector<KeyframeType>& keyframes,
template <typename KeyframeType>
double TransformedKeyframeProgress(
- const ScopedPtrVector<KeyframeType>& keyframes,
+ const std::vector<scoped_ptr<KeyframeType>>& keyframes,
base::TimeDelta time,
size_t i) {
double progress =

Powered by Google App Engine
This is Rietveld 408576698