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

Unified Diff: cc/test/layer_tree_test.cc

Issue 23593003: cc: Avoid updating animations in the background without an active tree (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: nits Created 7 years, 4 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/layer_tree_test.h ('k') | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/test/layer_tree_test.cc
diff --git a/cc/test/layer_tree_test.cc b/cc/test/layer_tree_test.cc
index 4933e0089b89abab1e0b25cf371a8edb4bdb7ae3..9afe3c4f8cf8e0d1b5e0d2644d50efdbc173f97a 100644
--- a/cc/test/layer_tree_test.cc
+++ b/cc/test/layer_tree_test.cc
@@ -37,6 +37,10 @@ bool TestHooks::PrepareToDrawOnThread(LayerTreeHostImpl* host_impl,
return true;
}
+base::TimeDelta TestHooks::LowFrequencyAnimationInterval() const {
+ return base::TimeDelta::FromMilliseconds(16);
+}
+
// Adapts LayerTreeHostImpl for test. Runs real code, then invokes test hooks.
class LayerTreeHostImplForTesting : public LayerTreeHostImpl {
public:
@@ -169,7 +173,7 @@ class LayerTreeHostImplForTesting : public LayerTreeHostImpl {
}
virtual base::TimeDelta LowFrequencyAnimationInterval() const OVERRIDE {
- return base::TimeDelta::FromMilliseconds(16);
+ return test_hooks_->LowFrequencyAnimationInterval();
}
private:
« no previous file with comments | « cc/test/layer_tree_test.h ('k') | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698