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

Unified Diff: cc/quads/draw_polygon.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/quads/draw_polygon.h ('k') | cc/quads/draw_polygon_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/quads/draw_polygon.cc
diff --git a/cc/quads/draw_polygon.cc b/cc/quads/draw_polygon.cc
index a300c92026a5d9e9b4db06e4d4f7b913c545880e..b0b6b4ae186554d432098b135668d5a7810aaa7b 100644
--- a/cc/quads/draw_polygon.cc
+++ b/cc/quads/draw_polygon.cc
@@ -78,8 +78,8 @@ DrawPolygon::DrawPolygon(const DrawQuad* original_ref,
DrawPolygon::~DrawPolygon() {
}
-scoped_ptr<DrawPolygon> DrawPolygon::CreateCopy() {
- scoped_ptr<DrawPolygon> new_polygon(new DrawPolygon());
+std::unique_ptr<DrawPolygon> DrawPolygon::CreateCopy() {
+ std::unique_ptr<DrawPolygon> new_polygon(new DrawPolygon());
new_polygon->order_index_ = order_index_;
new_polygon->original_ref_ = original_ref_;
new_polygon->points_.reserve(points_.size());
@@ -257,8 +257,8 @@ void DrawPolygon::TransformToLayerSpace(
}
bool DrawPolygon::Split(const DrawPolygon& splitter,
- scoped_ptr<DrawPolygon>* front,
- scoped_ptr<DrawPolygon>* back) {
+ std::unique_ptr<DrawPolygon>* front,
+ std::unique_ptr<DrawPolygon>* back) {
gfx::Point3F intersections[2];
std::vector<gfx::Point3F> out_points[2];
// vertex_before stores the index of the vertex before its matching
@@ -318,9 +318,9 @@ bool DrawPolygon::Split(const DrawPolygon& splitter,
// Give both polygons the original splitting polygon's ID, so that they'll
// still be sorted properly in co-planar instances.
- scoped_ptr<DrawPolygon> poly1(
+ std::unique_ptr<DrawPolygon> poly1(
new DrawPolygon(original_ref_, out_points[0], normal_, order_index_));
- scoped_ptr<DrawPolygon> poly2(
+ std::unique_ptr<DrawPolygon> poly2(
new DrawPolygon(original_ref_, out_points[1], normal_, order_index_));
DCHECK_GE(poly1->points().size(), 3u);
« no previous file with comments | « cc/quads/draw_polygon.h ('k') | cc/quads/draw_polygon_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698