| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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 CC_TEST_FAKE_COMPOSITOR_FRAME_SINK_H_ | 5 #ifndef CC_TEST_FAKE_COMPOSITOR_FRAME_SINK_H_ |
| 6 #define CC_TEST_FAKE_COMPOSITOR_FRAME_SINK_H_ | 6 #define CC_TEST_FAKE_COMPOSITOR_FRAME_SINK_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 return base::WrapUnique(new FakeCompositorFrameSink( | 56 return base::WrapUnique(new FakeCompositorFrameSink( |
| 57 std::move(context_provider), TestContextProvider::CreateWorker())); | 57 std::move(context_provider), TestContextProvider::CreateWorker())); |
| 58 } | 58 } |
| 59 | 59 |
| 60 static std::unique_ptr<FakeCompositorFrameSink> CreateSoftware() { | 60 static std::unique_ptr<FakeCompositorFrameSink> CreateSoftware() { |
| 61 return base::WrapUnique(new FakeCompositorFrameSink(nullptr, nullptr)); | 61 return base::WrapUnique(new FakeCompositorFrameSink(nullptr, nullptr)); |
| 62 } | 62 } |
| 63 | 63 |
| 64 // CompositorFrameSink implementation. | 64 // CompositorFrameSink implementation. |
| 65 void SubmitCompositorFrame(CompositorFrame frame) override; | 65 void SubmitCompositorFrame(CompositorFrame frame) override; |
| 66 void BeginFrameDidNotProduceFrame(const BeginFrameAck& ack) override; |
| 66 bool BindToClient(CompositorFrameSinkClient* client) override; | 67 bool BindToClient(CompositorFrameSinkClient* client) override; |
| 67 void DetachFromClient() override; | 68 void DetachFromClient() override; |
| 68 | 69 |
| 69 CompositorFrame* last_sent_frame() { return last_sent_frame_.get(); } | 70 CompositorFrame* last_sent_frame() { return last_sent_frame_.get(); } |
| 70 size_t num_sent_frames() { return num_sent_frames_; } | 71 size_t num_sent_frames() { return num_sent_frames_; } |
| 71 | 72 |
| 72 CompositorFrameSinkClient* client() { return client_; } | 73 CompositorFrameSinkClient* client() { return client_; } |
| 73 | 74 |
| 74 const TransferableResourceArray& resources_held_by_parent() { | 75 const TransferableResourceArray& resources_held_by_parent() { |
| 75 return resources_held_by_parent_; | 76 return resources_held_by_parent_; |
| (...skipping 21 matching lines...) Expand all Loading... |
| 97 private: | 98 private: |
| 98 void DidReceiveCompositorFrameAck(); | 99 void DidReceiveCompositorFrameAck(); |
| 99 | 100 |
| 100 std::unique_ptr<BeginFrameSource> begin_frame_source_; | 101 std::unique_ptr<BeginFrameSource> begin_frame_source_; |
| 101 base::WeakPtrFactory<FakeCompositorFrameSink> weak_ptr_factory_; | 102 base::WeakPtrFactory<FakeCompositorFrameSink> weak_ptr_factory_; |
| 102 }; | 103 }; |
| 103 | 104 |
| 104 } // namespace cc | 105 } // namespace cc |
| 105 | 106 |
| 106 #endif // CC_TEST_FAKE_COMPOSITOR_FRAME_SINK_H_ | 107 #endif // CC_TEST_FAKE_COMPOSITOR_FRAME_SINK_H_ |
| OLD | NEW |