Chromium Code Reviews| Index: cc/test/test_begin_frame_ack_tracker.h |
| diff --git a/cc/test/test_begin_frame_ack_tracker.h b/cc/test/test_begin_frame_ack_tracker.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..1bacc8fb9688c06f74c1dd0163af83c465ba1487 |
| --- /dev/null |
| +++ b/cc/test/test_begin_frame_ack_tracker.h |
| @@ -0,0 +1,35 @@ |
| +// Copyright 2017 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CC_TEST_TEST_BEGIN_FRAME_ACK_TRACKER_H_ |
| +#define CC_TEST_TEST_BEGIN_FRAME_ACK_TRACKER_H_ |
| + |
| +#include "cc/output/begin_frame_args.h" |
| +#include "cc/surfaces/surface_observer.h" |
| + |
| +namespace cc { |
| + |
| +class TestBeginFrameAckTracker : public SurfaceObserver { |
|
sunnyps
2017/05/25 20:49:13
nit: Can we rename this to FakeSurfaceObserver and
Eric Seckler
2017/05/26 10:57:52
Done.
|
| + public: |
| + const BeginFrameAck& last_ack() { |
| + return last_ack_; |
| + } |
| + |
| + private: |
| + // SurfaceObserver implementation: |
| + void OnSurfaceDamaged(const SurfaceId& surface, |
| + const BeginFrameAck& ack, |
| + bool* changed) override; |
| + void OnSurfaceCreated(const SurfaceInfo& surface_info) override {} |
| + void OnSurfaceDiscarded(const SurfaceId& surface_id) override {} |
| + void OnSurfaceDestroyed(const SurfaceId& surface_id) override {} |
| + void OnSurfaceDamageExpected(const SurfaceId& surface_id, |
| + const BeginFrameArgs& args) override {} |
| + |
| + BeginFrameAck last_ack_; |
| +}; |
| + |
| +} // namespace cc |
| + |
| +#endif // CC_TEST_TEST_BEGIN_FRAME_ACK_TRACKER_H_ |