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

Unified Diff: ui/compositor/layer_animation_sequence.cc

Issue 12226080: Thread ui transform animations (Closed) Base URL: http://git.chromium.org/chromium/src.git@DefineThreadedLayerAnimationElements
Patch Set: Address review comments Created 7 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: ui/compositor/layer_animation_sequence.cc
diff --git a/ui/compositor/layer_animation_sequence.cc b/ui/compositor/layer_animation_sequence.cc
index d0408e0d9d325e3a9b935380417cd155e8e99b83..688320f20679fe7fa47d9cec95a030b79d70cd75 100644
--- a/ui/compositor/layer_animation_sequence.cc
+++ b/ui/compositor/layer_animation_sequence.cc
@@ -173,7 +173,7 @@ void LayerAnimationSequence::AddElement(LayerAnimationElement* element) {
elements_.push_back(make_linked_ptr(element));
}
-bool LayerAnimationSequence::HasCommonProperty(
+bool LayerAnimationSequence::HasConflictingProperty(
const LayerAnimationElement::AnimatableProperties& other) const {
LayerAnimationElement::AnimatableProperties intersection;
std::insert_iterator<LayerAnimationElement::AnimatableProperties> ii(
@@ -181,7 +181,18 @@ bool LayerAnimationSequence::HasCommonProperty(
std::set_intersection(properties_.begin(), properties_.end(),
other.begin(), other.end(),
ii);
- return intersection.size() > 0;
+ if (intersection.size() > 0)
+ return true;
+
+ if (properties_.find(LayerAnimationElement::TRANSFORM) != properties_.end() &&
+ other.find(LayerAnimationElement::BOUNDS) != other.end())
+ return true;
+
+ if (properties_.find(LayerAnimationElement::BOUNDS) != properties_.end() &&
+ other.find(LayerAnimationElement::TRANSFORM) != other.end())
+ return true;
+
+ return false;
}
bool LayerAnimationSequence::IsFirstElementThreaded() const {

Powered by Google App Engine
This is Rietveld 408576698