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

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

Issue 2724083002: [SPv2] Decomposite otherwise-compositable animations that paint nothing. (Closed)
Patch Set: More include tweaks. Created 3 years, 9 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 unified diff | Download patch
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 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 EXPECT_EQ(to->offset(), 1.0); 266 EXPECT_EQ(to->offset(), 1.0);
267 } 267 }
268 if (!HasFatalFailure()) { 268 if (!HasFatalFailure()) {
269 return AnimatableValueKeyframeEffectModel::create(frames); 269 return AnimatableValueKeyframeEffectModel::create(frames);
270 } 270 }
271 return nullptr; 271 return nullptr;
272 } 272 }
273 273
274 void simulateFrame(double time) { 274 void simulateFrame(double time) {
275 m_document->animationClock().updateTime(time); 275 m_document->animationClock().updateTime(time);
276 m_document->compositorPendingAnimations().update(false); 276 m_document->compositorPendingAnimations().update(
277 Optional<CompositorElementIdSet>(), false);
277 m_timeline->serviceAnimations(TimingUpdateForAnimationFrame); 278 m_timeline->serviceAnimations(TimingUpdateForAnimationFrame);
278 } 279 }
279 280
280 std::unique_ptr<CompositorAnimation> convertToCompositorAnimation( 281 std::unique_ptr<CompositorAnimation> convertToCompositorAnimation(
281 AnimatableValueKeyframeEffectModel& effect, 282 AnimatableValueKeyframeEffectModel& effect,
282 double playerPlaybackRate) { 283 double playerPlaybackRate) {
283 Vector<std::unique_ptr<CompositorAnimation>> result; 284 Vector<std::unique_ptr<CompositorAnimation>> result;
284 getAnimationOnCompositor(m_timing, effect, result, playerPlaybackRate); 285 getAnimationOnCompositor(m_timing, effect, result, playerPlaybackRate);
285 DCHECK_EQ(1U, result.size()); 286 DCHECK_EQ(1U, result.size());
286 return std::move(result[0]); 287 return std::move(result[0]);
(...skipping 1034 matching lines...) Expand 10 before | Expand all | Expand 10 after
1321 1322
1322 // Clearing the effect node entirely should also produce false. 1323 // Clearing the effect node entirely should also produce false.
1323 properties.clearEffect(); 1324 properties.clearEffect();
1324 EXPECT_FALSE(CompositorAnimations::canStartAnimationOnCompositor(*element)); 1325 EXPECT_FALSE(CompositorAnimations::canStartAnimationOnCompositor(*element));
1325 1326
1326 element->setLayoutObject(nullptr); 1327 element->setLayoutObject(nullptr);
1327 LayoutObjectProxy::dispose(layoutObject); 1328 LayoutObjectProxy::dispose(layoutObject);
1328 } 1329 }
1329 1330
1330 } // namespace blink 1331 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698