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

Unified Diff: cc/surfaces/surface_aggregator_perftest.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/surfaces/surface_aggregator.cc ('k') | cc/surfaces/surface_aggregator_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/surfaces/surface_aggregator_perftest.cc
diff --git a/cc/surfaces/surface_aggregator_perftest.cc b/cc/surfaces/surface_aggregator_perftest.cc
index b79bd881f55565850152492efa951142bc60958b..e09de6b270b08e23bf546bfbabaaa76ff90ede30 100644
--- a/cc/surfaces/surface_aggregator_perftest.cc
+++ b/cc/surfaces/surface_aggregator_perftest.cc
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "base/memory/ptr_util.h"
#include "cc/debug/lap_timer.h"
#include "cc/output/compositor_frame.h"
#include "cc/output/delegated_frame_data.h"
@@ -31,7 +32,7 @@ class SurfaceAggregatorPerfTest : public testing::Test {
public:
SurfaceAggregatorPerfTest() : factory_(&manager_, &empty_client_) {
output_surface_ = FakeOutputSurface::CreateSoftware(
- make_scoped_ptr(new SoftwareOutputDevice));
+ base::WrapUnique(new SoftwareOutputDevice));
output_surface_->BindToClient(&output_surface_client_);
shared_bitmap_manager_.reset(new TestSharedBitmapManager);
@@ -49,8 +50,8 @@ class SurfaceAggregatorPerfTest : public testing::Test {
optimize_damage));
for (int i = 1; i <= num_surfaces; i++) {
factory_.Create(SurfaceId(i));
- scoped_ptr<RenderPass> pass(RenderPass::Create());
- scoped_ptr<DelegatedFrameData> frame_data(new DelegatedFrameData);
+ std::unique_ptr<RenderPass> pass(RenderPass::Create());
+ std::unique_ptr<DelegatedFrameData> frame_data(new DelegatedFrameData);
SharedQuadState* sqs = pass->CreateAndAppendSharedQuadState();
for (int j = 0; j < num_textures; j++) {
@@ -89,7 +90,7 @@ class SurfaceAggregatorPerfTest : public testing::Test {
}
frame_data->render_pass_list.push_back(std::move(pass));
- scoped_ptr<CompositorFrame> frame(new CompositorFrame);
+ std::unique_ptr<CompositorFrame> frame(new CompositorFrame);
frame->delegated_frame_data = std::move(frame_data);
factory_.SubmitCompositorFrame(SurfaceId(i), std::move(frame),
SurfaceFactory::DrawCallback());
@@ -98,8 +99,8 @@ class SurfaceAggregatorPerfTest : public testing::Test {
factory_.Create(SurfaceId(num_surfaces + 1));
timer_.Reset();
do {
- scoped_ptr<RenderPass> pass(RenderPass::Create());
- scoped_ptr<DelegatedFrameData> frame_data(new DelegatedFrameData);
+ std::unique_ptr<RenderPass> pass(RenderPass::Create());
+ std::unique_ptr<DelegatedFrameData> frame_data(new DelegatedFrameData);
SharedQuadState* sqs = pass->CreateAndAppendSharedQuadState();
SurfaceDrawQuad* surface_quad =
@@ -113,13 +114,13 @@ class SurfaceAggregatorPerfTest : public testing::Test {
pass->damage_rect = gfx::Rect(0, 0, 1, 1);
frame_data->render_pass_list.push_back(std::move(pass));
- scoped_ptr<CompositorFrame> frame(new CompositorFrame);
+ std::unique_ptr<CompositorFrame> frame(new CompositorFrame);
frame->delegated_frame_data = std::move(frame_data);
factory_.SubmitCompositorFrame(SurfaceId(num_surfaces + 1),
std::move(frame),
SurfaceFactory::DrawCallback());
- scoped_ptr<CompositorFrame> aggregated =
+ std::unique_ptr<CompositorFrame> aggregated =
aggregator_->Aggregate(SurfaceId(num_surfaces + 1));
timer_.NextLap();
} while (!timer_.HasTimeLimitExpired());
@@ -137,10 +138,10 @@ class SurfaceAggregatorPerfTest : public testing::Test {
EmptySurfaceFactoryClient empty_client_;
SurfaceFactory factory_;
FakeOutputSurfaceClient output_surface_client_;
- scoped_ptr<OutputSurface> output_surface_;
- scoped_ptr<SharedBitmapManager> shared_bitmap_manager_;
- scoped_ptr<ResourceProvider> resource_provider_;
- scoped_ptr<SurfaceAggregator> aggregator_;
+ std::unique_ptr<OutputSurface> output_surface_;
+ std::unique_ptr<SharedBitmapManager> shared_bitmap_manager_;
+ std::unique_ptr<ResourceProvider> resource_provider_;
+ std::unique_ptr<SurfaceAggregator> aggregator_;
LapTimer timer_;
};
« no previous file with comments | « cc/surfaces/surface_aggregator.cc ('k') | cc/surfaces/surface_aggregator_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698