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

Side by Side Diff: cc/test/fake_output_surface.cc

Issue 1866203004: Convert //cc from scoped_ptr to std::unique_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: scopedptrcc: rebase Created 4 years, 8 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
« no previous file with comments | « cc/test/fake_output_surface.h ('k') | cc/test/fake_painted_scrollbar_layer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include "cc/test/fake_output_surface.h" 5 #include "cc/test/fake_output_surface.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "cc/output/compositor_frame_ack.h" 9 #include "cc/output/compositor_frame_ack.h"
10 #include "cc/output/output_surface_client.h" 10 #include "cc/output/output_surface_client.h"
(...skipping 24 matching lines...) Expand all
35 client_(NULL), 35 client_(NULL),
36 num_sent_frames_(0), 36 num_sent_frames_(0),
37 has_external_stencil_test_(false), 37 has_external_stencil_test_(false),
38 suspended_for_recycle_(false), 38 suspended_for_recycle_(false),
39 framebuffer_(0), 39 framebuffer_(0),
40 overlay_candidate_validator_(nullptr) { 40 overlay_candidate_validator_(nullptr) {
41 capabilities_.delegated_rendering = delegated_rendering; 41 capabilities_.delegated_rendering = delegated_rendering;
42 } 42 }
43 43
44 FakeOutputSurface::FakeOutputSurface( 44 FakeOutputSurface::FakeOutputSurface(
45 scoped_ptr<SoftwareOutputDevice> software_device, 45 std::unique_ptr<SoftwareOutputDevice> software_device,
46 bool delegated_rendering) 46 bool delegated_rendering)
47 : OutputSurface(std::move(software_device)), 47 : OutputSurface(std::move(software_device)),
48 client_(NULL), 48 client_(NULL),
49 num_sent_frames_(0), 49 num_sent_frames_(0),
50 has_external_stencil_test_(false), 50 has_external_stencil_test_(false),
51 suspended_for_recycle_(false), 51 suspended_for_recycle_(false),
52 framebuffer_(0), 52 framebuffer_(0),
53 overlay_candidate_validator_(nullptr) { 53 overlay_candidate_validator_(nullptr) {
54 capabilities_.delegated_rendering = delegated_rendering; 54 capabilities_.delegated_rendering = delegated_rendering;
55 } 55 }
56 56
57 FakeOutputSurface::FakeOutputSurface( 57 FakeOutputSurface::FakeOutputSurface(
58 scoped_refptr<ContextProvider> context_provider, 58 scoped_refptr<ContextProvider> context_provider,
59 scoped_ptr<SoftwareOutputDevice> software_device, 59 std::unique_ptr<SoftwareOutputDevice> software_device,
60 bool delegated_rendering) 60 bool delegated_rendering)
61 : OutputSurface(context_provider, std::move(software_device)), 61 : OutputSurface(context_provider, std::move(software_device)),
62 client_(NULL), 62 client_(NULL),
63 num_sent_frames_(0), 63 num_sent_frames_(0),
64 has_external_stencil_test_(false), 64 has_external_stencil_test_(false),
65 suspended_for_recycle_(false), 65 suspended_for_recycle_(false),
66 framebuffer_(0), 66 framebuffer_(0),
67 overlay_candidate_validator_(nullptr) { 67 overlay_candidate_validator_(nullptr) {
68 capabilities_.delegated_rendering = delegated_rendering; 68 capabilities_.delegated_rendering = delegated_rendering;
69 } 69 }
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 bool FakeOutputSurface::SurfaceIsSuspendForRecycle() const { 138 bool FakeOutputSurface::SurfaceIsSuspendForRecycle() const {
139 return suspended_for_recycle_; 139 return suspended_for_recycle_;
140 } 140 }
141 141
142 OverlayCandidateValidator* FakeOutputSurface::GetOverlayCandidateValidator() 142 OverlayCandidateValidator* FakeOutputSurface::GetOverlayCandidateValidator()
143 const { 143 const {
144 return overlay_candidate_validator_; 144 return overlay_candidate_validator_;
145 } 145 }
146 146
147 void FakeOutputSurface::SetMemoryPolicyToSetAtBind( 147 void FakeOutputSurface::SetMemoryPolicyToSetAtBind(
148 scoped_ptr<ManagedMemoryPolicy> memory_policy_to_set_at_bind) { 148 std::unique_ptr<ManagedMemoryPolicy> memory_policy_to_set_at_bind) {
149 memory_policy_to_set_at_bind_.swap(memory_policy_to_set_at_bind); 149 memory_policy_to_set_at_bind_.swap(memory_policy_to_set_at_bind);
150 } 150 }
151 151
152 } // namespace cc 152 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/fake_output_surface.h ('k') | cc/test/fake_painted_scrollbar_layer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698