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

Unified Diff: cc/test/animation_timelines_test_common.cc

Issue 2110683004: cc: Move filters to the effect tree (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address review comments Created 4 years, 5 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
« no previous file with comments | « cc/test/animation_timelines_test_common.h ('k') | cc/trees/damage_tracker_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/test/animation_timelines_test_common.cc
diff --git a/cc/test/animation_timelines_test_common.cc b/cc/test/animation_timelines_test_common.cc
index 2d164afc8d833513698a0275fa3f53c322ee4279..e9377635582c17dcfc4ceeaad7445f4a76c15594 100644
--- a/cc/test/animation_timelines_test_common.cc
+++ b/cc/test/animation_timelines_test_common.cc
@@ -33,6 +33,8 @@ void TestLayer::ClearMutatedProperties() {
transform_is_currently_animating_ = false;
has_potential_opacity_animation_ = false;
opacity_is_currently_animating_ = false;
+ has_potential_filter_animation_ = false;
+ filter_is_currently_animating_ = false;
for (int i = 0; i <= TargetProperty::LAST_TARGET_PROPERTY; ++i)
mutated_properties_[i] = false;
@@ -168,6 +170,28 @@ void TestHostClient::ElementOpacityIsAnimatingChanged(
}
}
+void TestHostClient::ElementFilterIsAnimatingChanged(
+ ElementId element_id,
+ ElementListType list_type,
+ AnimationChangeType change_type,
+ bool is_animating) {
+ TestLayer* layer = FindTestLayer(element_id, list_type);
+ if (layer) {
+ switch (change_type) {
+ case AnimationChangeType::POTENTIAL:
+ layer->set_has_potential_filter_animation(is_animating);
+ break;
+ case AnimationChangeType::RUNNING:
+ layer->set_filter_is_currently_animating(is_animating);
+ break;
+ case AnimationChangeType::BOTH:
+ layer->set_has_potential_filter_animation(is_animating);
+ layer->set_filter_is_currently_animating(is_animating);
+ break;
+ }
+ }
+}
+
void TestHostClient::SetScrollOffsetForAnimation(
const gfx::ScrollOffset& scroll_offset) {
scroll_offset_ = scroll_offset;
@@ -272,6 +296,22 @@ bool TestHostClient::GetHasPotentialOpacityAnimation(
return layer->has_potential_opacity_animation();
}
+bool TestHostClient::GetFilterIsCurrentlyAnimating(
+ ElementId element_id,
+ ElementListType list_type) const {
+ TestLayer* layer = FindTestLayer(element_id, list_type);
+ EXPECT_TRUE(layer);
+ return layer->filter_is_currently_animating();
+}
+
+bool TestHostClient::GetHasPotentialFilterAnimation(
+ ElementId element_id,
+ ElementListType list_type) const {
+ TestLayer* layer = FindTestLayer(element_id, list_type);
+ EXPECT_TRUE(layer);
+ return layer->has_potential_filter_animation();
+}
+
void TestHostClient::ExpectFilterPropertyMutated(ElementId element_id,
ElementListType list_type,
float brightness) const {
« no previous file with comments | « cc/test/animation_timelines_test_common.h ('k') | cc/trees/damage_tracker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698