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

Side by Side Diff: cc/test/animation_timelines_test_common.cc

Issue 2261113002: CC Animation: Introduce some dirty flags to optimize PushProperties on commit (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Do not change SetNeedsCommit invalidation, leave it as-is. Created 4 years, 3 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
« no previous file with comments | « cc/test/animation_timelines_test_common.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/test/animation_timelines_test_common.h" 5 #include "cc/test/animation_timelines_test_common.h"
6 6
7 #include "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #include "cc/animation/animation_events.h" 8 #include "cc/animation/animation_events.h"
9 #include "cc/animation/animation_id_provider.h" 9 #include "cc/animation/animation_id_provider.h"
10 #include "cc/animation/animation_player.h" 10 #include "cc/animation/animation_player.h"
(...skipping 500 matching lines...) Expand 10 before | Expand all | Expand 10 after
511 &element_animations->players_list()) 511 &element_animations->players_list())
512 .GetNext() 512 .GetNext()
513 : nullptr; 513 : nullptr;
514 } 514 }
515 515
516 int AnimationTimelinesTest::NextTestLayerId() { 516 int AnimationTimelinesTest::NextTestLayerId() {
517 next_test_layer_id_++; 517 next_test_layer_id_++;
518 return next_test_layer_id_; 518 return next_test_layer_id_;
519 } 519 }
520 520
521 bool AnimationTimelinesTest::CheckPlayerTimelineNeedsPushProperties(
522 bool needs_push_properties) const {
523 DCHECK(player_);
524 DCHECK(timeline_);
525
526 bool result = true;
527
528 if (player_->needs_push_properties() != needs_push_properties) {
529 ADD_FAILURE() << "player_->needs_push_properties() expected to be "
530 << needs_push_properties;
531 result = false;
532 }
533 if (timeline_->needs_push_properties() != needs_push_properties) {
534 ADD_FAILURE() << "timeline_->needs_push_properties() expected to be "
535 << needs_push_properties;
536 result = false;
537 }
538 if (player_->element_animations() &&
539 player_->element_animations()->needs_push_properties() !=
540 needs_push_properties) {
541 ADD_FAILURE() << "player_->element_animations()->needs_push_properties() "
542 "expected to be "
543 << needs_push_properties;
544 result = false;
545 }
546
547 return result;
548 }
549
521 } // namespace cc 550 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/animation_timelines_test_common.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698