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

Unified Diff: cc/trees/layer_tree_host_common_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/trees/layer_tree_host_common.h ('k') | cc/trees/layer_tree_host_common_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_common_perftest.cc
diff --git a/cc/trees/layer_tree_host_common_perftest.cc b/cc/trees/layer_tree_host_common_perftest.cc
index 3b6176814af64b5c9c75f2331376fcade808163d..1ec729269b2bcff198e26da8a0202607821e2c47 100644
--- a/cc/trees/layer_tree_host_common_perftest.cc
+++ b/cc/trees/layer_tree_host_common_perftest.cc
@@ -2,16 +2,14 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "cc/trees/layer_tree_host_common.h"
-
#include <stddef.h>
#include <deque>
+#include <memory>
#include <sstream>
#include "base/files/file_path.h"
#include "base/files/file_util.h"
-#include "base/memory/scoped_ptr.h"
#include "base/path_service.h"
#include "base/strings/string_piece.h"
#include "base/threading/thread.h"
@@ -26,6 +24,7 @@
#include "cc/test/layer_tree_json_parser.h"
#include "cc/test/layer_tree_test.h"
#include "cc/test/paths.h"
+#include "cc/trees/layer_tree_host_common.h"
#include "cc/trees/layer_tree_impl.h"
#include "testing/perf/perf_test.h"
@@ -154,18 +153,18 @@ class BspTreePerfTest : public CalcDrawPropsTest {
BuildLayerImplList(active_tree->root_layer(), &base_list);
int polygon_counter = 0;
- std::vector<scoped_ptr<DrawPolygon>> polygon_list;
+ std::vector<std::unique_ptr<DrawPolygon>> polygon_list;
for (LayerImplList::iterator it = base_list.begin(); it != base_list.end();
++it) {
DrawPolygon* draw_polygon = new DrawPolygon(
NULL, gfx::RectF(gfx::SizeF((*it)->bounds())),
(*it)->draw_properties().target_space_transform, polygon_counter++);
- polygon_list.push_back(scoped_ptr<DrawPolygon>(draw_polygon));
+ polygon_list.push_back(std::unique_ptr<DrawPolygon>(draw_polygon));
}
timer_.Reset();
do {
- std::deque<scoped_ptr<DrawPolygon>> test_list;
+ std::deque<std::unique_ptr<DrawPolygon>> test_list;
for (int i = 0; i < num_duplicates_; i++) {
for (size_t i = 0; i < polygon_list.size(); i++) {
test_list.push_back(polygon_list[i]->CreateCopy());
« no previous file with comments | « cc/trees/layer_tree_host_common.h ('k') | cc/trees/layer_tree_host_common_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698