OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #include "cc/test/pixel_test_delegating_output_surface.h" | 5 #include "cc/test/pixel_test_delegating_output_surface.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 #include <memory> | 8 #include <memory> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
11 #include "base/memory/ptr_util.h" | 11 #include "base/memory/ptr_util.h" |
12 #include "base/threading/thread_task_runner_handle.h" | 12 #include "base/threading/thread_task_runner_handle.h" |
13 #include "cc/output/begin_frame_args.h" | 13 #include "cc/output/begin_frame_args.h" |
14 #include "cc/output/compositor_frame_ack.h" | |
15 #include "cc/output/direct_renderer.h" | 14 #include "cc/output/direct_renderer.h" |
16 #include "cc/output/texture_mailbox_deleter.h" | 15 #include "cc/output/texture_mailbox_deleter.h" |
17 #include "cc/scheduler/begin_frame_source.h" | 16 #include "cc/scheduler/begin_frame_source.h" |
18 #include "cc/scheduler/delay_based_time_source.h" | 17 #include "cc/scheduler/delay_based_time_source.h" |
19 #include "cc/test/begin_frame_args_test.h" | 18 #include "cc/test/begin_frame_args_test.h" |
20 #include "cc/test/pixel_test_output_surface.h" | 19 #include "cc/test/pixel_test_output_surface.h" |
21 #include "cc/test/pixel_test_software_output_device.h" | 20 #include "cc/test/pixel_test_software_output_device.h" |
22 #include "cc/test/test_in_process_context_provider.h" | 21 #include "cc/test/test_in_process_context_provider.h" |
23 | 22 |
24 static constexpr uint32_t kCompositorClientId = 1; | 23 static constexpr uint32_t kCompositorClientId = 1; |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 } | 166 } |
168 | 167 |
169 uint32_t PixelTestDelegatingOutputSurface::GetFramebufferCopyTextureFormat() { | 168 uint32_t PixelTestDelegatingOutputSurface::GetFramebufferCopyTextureFormat() { |
170 // This is a delegating output surface, no framebuffer/direct drawing support. | 169 // This is a delegating output surface, no framebuffer/direct drawing support. |
171 NOTREACHED(); | 170 NOTREACHED(); |
172 return 0; | 171 return 0; |
173 } | 172 } |
174 | 173 |
175 void PixelTestDelegatingOutputSurface::ReturnResources( | 174 void PixelTestDelegatingOutputSurface::ReturnResources( |
176 const ReturnedResourceArray& resources) { | 175 const ReturnedResourceArray& resources) { |
177 CompositorFrameAck ack; | 176 client_->ReclaimResources(resources); |
178 ack.resources = resources; | |
179 client_->ReclaimResources(&ack); | |
180 } | 177 } |
181 | 178 |
182 void PixelTestDelegatingOutputSurface::SetBeginFrameSource( | 179 void PixelTestDelegatingOutputSurface::SetBeginFrameSource( |
183 BeginFrameSource* begin_frame_source) { | 180 BeginFrameSource* begin_frame_source) { |
184 client_->SetBeginFrameSource(begin_frame_source); | 181 client_->SetBeginFrameSource(begin_frame_source); |
185 } | 182 } |
186 | 183 |
187 } // namespace cc | 184 } // namespace cc |
OLD | NEW |