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

Unified Diff: trunk/src/cc/test/scheduler_test_common.h

Issue 17204002: Revert 206020 "cc: Emulate BeginFrame in OutputSurfaces that don..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 6 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 | « trunk/src/cc/test/layer_tree_test.cc ('k') | trunk/src/cc/test/scheduler_test_common.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/cc/test/scheduler_test_common.h
===================================================================
--- trunk/src/cc/test/scheduler_test_common.h (revision 206654)
+++ trunk/src/cc/test/scheduler_test_common.h (working copy)
@@ -62,6 +62,36 @@
bool run_pending_task_on_overwrite_;
};
+class FakeTimeSource : public cc::TimeSource {
+ public:
+ FakeTimeSource() : active_(false), client_(0) {}
+
+ virtual void SetClient(cc::TimeSourceClient* client) OVERRIDE;
+ virtual void SetActive(bool b) OVERRIDE;
+ virtual bool Active() const OVERRIDE;
+ virtual void SetTimebaseAndInterval(base::TimeTicks timebase,
+ base::TimeDelta interval) OVERRIDE {}
+ virtual base::TimeTicks LastTickTime() OVERRIDE;
+ virtual base::TimeTicks NextTickTime() OVERRIDE;
+
+ void Tick() {
+ ASSERT_TRUE(active_);
+ if (client_)
+ client_->OnTimerTick();
+ }
+
+ void SetNextTickTime(base::TimeTicks next_tick_time) {
+ next_tick_time_ = next_tick_time;
+ }
+
+ protected:
+ virtual ~FakeTimeSource() {}
+
+ bool active_;
+ base::TimeTicks next_tick_time_;
+ cc::TimeSourceClient* client_;
+};
+
class FakeDelayBasedTimeSource : public cc::DelayBasedTimeSource {
public:
static scoped_refptr<FakeDelayBasedTimeSource> Create(
« no previous file with comments | « trunk/src/cc/test/layer_tree_test.cc ('k') | trunk/src/cc/test/scheduler_test_common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698