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

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

Issue 2877033002: Fix cc scrollbar layer issues with initialization, and use element ids throughout. (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 734 matching lines...) Expand 10 before | Expand all | Expand 10 after
745 745
746 // If the optional element id set has no value we must be in SPv1 mode in 746 // If the optional element id set has no value we must be in SPv1 mode in
747 // which case we trust the compositing logic will create a layer if needed. 747 // which case we trust the compositing logic will create a layer if needed.
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 = CompositorElementIdFromDOMNodeId(
756 CreateCompositorElementId(DOMNodeIds::IdForNode(target_element), 756 DOMNodeIds::IdForNode(target_element),
757 CompositorSubElementId::kPrimary); 757 CompositorElementIdNamespace::kPrimary);
758 if (!composited_element_ids->Contains(target_element_id)) 758 if (!composited_element_ids->Contains(target_element_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))
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after
1201 DCHECK(!compositor_player_); 1201 DCHECK(!compositor_player_);
1202 } 1202 }
1203 1203
1204 void Animation::CompositorAnimationPlayerHolder::Detach() { 1204 void Animation::CompositorAnimationPlayerHolder::Detach() {
1205 DCHECK(compositor_player_); 1205 DCHECK(compositor_player_);
1206 compositor_player_->SetAnimationDelegate(nullptr); 1206 compositor_player_->SetAnimationDelegate(nullptr);
1207 animation_ = nullptr; 1207 animation_ = nullptr;
1208 compositor_player_.reset(); 1208 compositor_player_.reset();
1209 } 1209 }
1210 } // namespace blink 1210 } // namespace blink
OLDNEW
« no previous file with comments | « cc/trees/property_tree_builder.cc ('k') | third_party/WebKit/Source/core/animation/AnimationTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698