| OLD | NEW |
| 1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CCSchedulerTestCommon_h | 5 #ifndef CCSchedulerTestCommon_h |
| 6 #define CCSchedulerTestCommon_h | 6 #define CCSchedulerTestCommon_h |
| 7 | 7 |
| 8 #include "CCDelayBasedTimeSource.h" | 8 #include "CCDelayBasedTimeSource.h" |
| 9 #include "CCFrameRateController.h" | 9 #include "CCFrameRateController.h" |
| 10 #include "CCThread.h" | 10 #include "CCThread.h" |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 OwnPtr<Task> m_pendingTask; | 71 OwnPtr<Task> m_pendingTask; |
| 72 long long m_pendingTaskDelay; | 72 long long m_pendingTaskDelay; |
| 73 bool m_runPendingTaskOnOverwrite; | 73 bool m_runPendingTaskOnOverwrite; |
| 74 }; | 74 }; |
| 75 | 75 |
| 76 class FakeCCTimeSource : public WebCore::CCTimeSource { | 76 class FakeCCTimeSource : public WebCore::CCTimeSource { |
| 77 public: | 77 public: |
| 78 FakeCCTimeSource() | 78 FakeCCTimeSource() |
| 79 : m_active(false) | 79 : m_active(false) |
| 80 , m_nextTickTime(0) | 80 , m_nextTickTime(0) |
| 81 , m_client(0) { } | 81 , m_client(0) |
| 82 { |
| 83 turnOffVerifier(); |
| 84 } |
| 82 | 85 |
| 83 virtual ~FakeCCTimeSource() { } | 86 virtual ~FakeCCTimeSource() { } |
| 84 | 87 |
| 85 virtual void setClient(WebCore::CCTimeSourceClient* client) OVERRIDE { m_cli
ent = client; } | 88 virtual void setClient(WebCore::CCTimeSourceClient* client) OVERRIDE { m_cli
ent = client; } |
| 86 virtual void setActive(bool b) OVERRIDE { m_active = b; } | 89 virtual void setActive(bool b) OVERRIDE { m_active = b; } |
| 87 virtual bool active() const OVERRIDE { return m_active; } | 90 virtual bool active() const OVERRIDE { return m_active; } |
| 88 virtual void setTimebaseAndInterval(double timebase, double interval) OVERRI
DE { } | 91 virtual void setTimebaseAndInterval(double timebase, double interval) OVERRI
DE { } |
| 89 virtual double lastTickTime() OVERRIDE { return 0; } | 92 virtual double lastTickTime() OVERRIDE { return 0; } |
| 90 virtual double nextTickTimeIfActivated() OVERRIDE { return 0; } | 93 virtual double nextTickTimeIfActivated() OVERRIDE { return 0; } |
| 91 | 94 |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 class FakeCCFrameRateController : public WebCore::CCFrameRateController { | 128 class FakeCCFrameRateController : public WebCore::CCFrameRateController { |
| 126 public: | 129 public: |
| 127 FakeCCFrameRateController(PassRefPtr<WebCore::CCTimeSource> timer) : WebCore
::CCFrameRateController(timer) { } | 130 FakeCCFrameRateController(PassRefPtr<WebCore::CCTimeSource> timer) : WebCore
::CCFrameRateController(timer) { } |
| 128 | 131 |
| 129 int numFramesPending() const { return m_numFramesPending; } | 132 int numFramesPending() const { return m_numFramesPending; } |
| 130 }; | 133 }; |
| 131 | 134 |
| 132 } | 135 } |
| 133 | 136 |
| 134 #endif // CCSchedulerTestCommon_h | 137 #endif // CCSchedulerTestCommon_h |
| OLD | NEW |