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

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

Issue 2860293002: Change cc::ElementId to be a uint64_t (Closed)
Patch Set: none Created 3 years, 7 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 737 matching lines...) Expand 10 before | Expand all | Expand 10 after
748 if (composited_element_ids.has_value()) { 748 if (composited_element_ids.has_value()) {
749 DCHECK(RuntimeEnabledFeatures::slimmingPaintV2Enabled()); 749 DCHECK(RuntimeEnabledFeatures::slimmingPaintV2Enabled());
750 Element* target_element = 750 Element* target_element =
751 ToKeyframeEffectReadOnly(content_.Get())->Target(); 751 ToKeyframeEffectReadOnly(content_.Get())->Target();
752 if (!target_element) 752 if (!target_element)
753 return false; 753 return false;
754 754
755 CompositorElementId target_element_id = 755 CompositorElementId target_element_id =
756 CreateCompositorElementId(DOMNodeIds::IdForNode(target_element), 756 CreateCompositorElementId(DOMNodeIds::IdForNode(target_element),
757 CompositorSubElementId::kPrimary); 757 CompositorSubElementId::kPrimary);
758 if (!composited_element_ids->Contains(target_element_id)) 758 if (!composited_element_ids->Contains(target_element_id.id))
759 return false; 759 return false;
760 } 760 }
761 761
762 return Playing(); 762 return Playing();
763 } 763 }
764 764
765 bool Animation::IsCandidateForAnimationOnCompositor( 765 bool Animation::IsCandidateForAnimationOnCompositor(
766 const Optional<CompositorElementIdSet>& composited_element_ids) const { 766 const Optional<CompositorElementIdSet>& composited_element_ids) const {
767 if (!CanStartAnimationOnCompositor(composited_element_ids)) 767 if (!CanStartAnimationOnCompositor(composited_element_ids))
768 return false; 768 return false;
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after
1182 DCHECK(!compositor_player_); 1182 DCHECK(!compositor_player_);
1183 } 1183 }
1184 1184
1185 void Animation::CompositorAnimationPlayerHolder::Detach() { 1185 void Animation::CompositorAnimationPlayerHolder::Detach() {
1186 DCHECK(compositor_player_); 1186 DCHECK(compositor_player_);
1187 compositor_player_->SetAnimationDelegate(nullptr); 1187 compositor_player_->SetAnimationDelegate(nullptr);
1188 animation_ = nullptr; 1188 animation_ = nullptr;
1189 compositor_player_.reset(); 1189 compositor_player_.reset();
1190 } 1190 }
1191 } // namespace blink 1191 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698