Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(185)

Side by Side Diff: content/public/test/test_synchronous_compositor_android.cc

Issue 2096493002: Make cc::CompositorFrames movable [Part 1 of 2] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Reduce android_webview changes Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698