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 21 matching lines...) Expand all Loading... |
32 const gfx::Transform& transform_for_tile_priority) { | 32 const gfx::Transform& transform_for_tile_priority) { |
33 return std::move(hardware_frame_); | 33 return std::move(hardware_frame_); |
34 } | 34 } |
35 | 35 |
36 void TestSynchronousCompositor::DemandDrawHwAsync( | 36 void TestSynchronousCompositor::DemandDrawHwAsync( |
37 const gfx::Size& viewport_size, | 37 const gfx::Size& viewport_size, |
38 const gfx::Rect& viewport_rect_for_tile_priority, | 38 const gfx::Rect& viewport_rect_for_tile_priority, |
39 const gfx::Transform& transform_for_tile_priority) {} | 39 const gfx::Transform& transform_for_tile_priority) {} |
40 | 40 |
41 void TestSynchronousCompositor::ReturnResources( | 41 void TestSynchronousCompositor::ReturnResources( |
42 uint32_t output_surface_id, | 42 uint32_t compositor_frame_sink_id, |
43 const cc::ReturnedResourceArray& resources) { | 43 const cc::ReturnedResourceArray& resources) { |
44 ReturnedResources returned_resources; | 44 ReturnedResources returned_resources; |
45 returned_resources.output_surface_id = output_surface_id; | 45 returned_resources.compositor_frame_sink_id = compositor_frame_sink_id; |
46 returned_resources.resources = resources; | 46 returned_resources.resources = resources; |
47 frame_ack_array_.push_back(returned_resources); | 47 frame_ack_array_.push_back(returned_resources); |
48 } | 48 } |
49 | 49 |
50 void TestSynchronousCompositor::SwapReturnedResources(FrameAckArray* array) { | 50 void TestSynchronousCompositor::SwapReturnedResources(FrameAckArray* array) { |
51 DCHECK(array); | 51 DCHECK(array); |
52 frame_ack_array_.swap(*array); | 52 frame_ack_array_.swap(*array); |
53 } | 53 } |
54 | 54 |
55 bool TestSynchronousCompositor::DemandDrawSw(SkCanvas* canvas) { | 55 bool TestSynchronousCompositor::DemandDrawSw(SkCanvas* canvas) { |
56 DCHECK(canvas); | 56 DCHECK(canvas); |
57 return true; | 57 return true; |
58 } | 58 } |
59 | 59 |
60 void TestSynchronousCompositor::SetHardwareFrame( | 60 void TestSynchronousCompositor::SetHardwareFrame( |
61 uint32_t output_surface_id, | 61 uint32_t compositor_frame_sink_id, |
62 std::unique_ptr<cc::CompositorFrame> frame) { | 62 std::unique_ptr<cc::CompositorFrame> frame) { |
63 hardware_frame_.output_surface_id = output_surface_id; | 63 hardware_frame_.compositor_frame_sink_id = compositor_frame_sink_id; |
64 hardware_frame_.frame = std::move(frame); | 64 hardware_frame_.frame = std::move(frame); |
65 } | 65 } |
66 | 66 |
67 TestSynchronousCompositor::ReturnedResources::ReturnedResources() | 67 TestSynchronousCompositor::ReturnedResources::ReturnedResources() |
68 : output_surface_id(0u) {} | 68 : compositor_frame_sink_id(0u) {} |
69 | 69 |
70 TestSynchronousCompositor::ReturnedResources::ReturnedResources( | 70 TestSynchronousCompositor::ReturnedResources::ReturnedResources( |
71 const ReturnedResources& other) = default; | 71 const ReturnedResources& other) = default; |
72 | 72 |
73 TestSynchronousCompositor::ReturnedResources::~ReturnedResources() {} | 73 TestSynchronousCompositor::ReturnedResources::~ReturnedResources() {} |
74 | 74 |
75 } // namespace content | 75 } // namespace content |
OLD | NEW |