OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "content/public/test/test_synchronous_compositor_android.h" | 5 #include "content/public/test/test_synchronous_compositor_android.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "cc/output/compositor_frame.h" | 9 #include "cc/output/compositor_frame.h" |
10 | 10 |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 void TestSynchronousCompositor::SwapReturnedResources(FrameAckArray* array) { | 48 void TestSynchronousCompositor::SwapReturnedResources(FrameAckArray* array) { |
49 DCHECK(array); | 49 DCHECK(array); |
50 frame_ack_array_.swap(*array); | 50 frame_ack_array_.swap(*array); |
51 } | 51 } |
52 | 52 |
53 bool TestSynchronousCompositor::DemandDrawSw(SkCanvas* canvas) { | 53 bool TestSynchronousCompositor::DemandDrawSw(SkCanvas* canvas) { |
54 DCHECK(canvas); | 54 DCHECK(canvas); |
55 return true; | 55 return true; |
56 } | 56 } |
57 | 57 |
58 void TestSynchronousCompositor::SetHardwareFrame( | 58 void TestSynchronousCompositor::SetHardwareFrame(uint32_t output_surface_id, |
59 uint32_t output_surface_id, | 59 cc::CompositorFrame frame) { |
60 std::unique_ptr<cc::CompositorFrame> frame) { | |
61 hardware_frame_.output_surface_id = output_surface_id; | 60 hardware_frame_.output_surface_id = output_surface_id; |
62 hardware_frame_.frame = std::move(frame); | 61 std::unique_ptr<cc::CompositorFrame> frame_copy(new cc::CompositorFrame); |
| 62 *frame_copy = std::move(frame); |
| 63 hardware_frame_.frame = std::move(frame_copy); |
63 } | 64 } |
64 | 65 |
65 TestSynchronousCompositor::ReturnedResources::ReturnedResources() | 66 TestSynchronousCompositor::ReturnedResources::ReturnedResources() |
66 : output_surface_id(0u) {} | 67 : output_surface_id(0u) {} |
67 | 68 |
68 TestSynchronousCompositor::ReturnedResources::ReturnedResources( | 69 TestSynchronousCompositor::ReturnedResources::ReturnedResources( |
69 const ReturnedResources& other) = default; | 70 const ReturnedResources& other) = default; |
70 | 71 |
71 TestSynchronousCompositor::ReturnedResources::~ReturnedResources() {} | 72 TestSynchronousCompositor::ReturnedResources::~ReturnedResources() {} |
72 | 73 |
73 } // namespace content | 74 } // namespace content |
OLD | NEW |