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

Unified Diff: cc/output/bsp_tree.h

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/output/begin_frame_args.cc ('k') | cc/output/bsp_tree.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/output/bsp_tree.h
diff --git a/cc/output/bsp_tree.h b/cc/output/bsp_tree.h
index 695c47e5b9fbddc85e934ab421ecdecdae684277..3c703d21a267e1537fd8f165f80131e6b24fe348 100644
--- a/cc/output/bsp_tree.h
+++ b/cc/output/bsp_tree.h
@@ -8,9 +8,9 @@
#include <stddef.h>
#include <deque>
+#include <memory>
#include <vector>
-#include "base/memory/scoped_ptr.h"
#include "cc/output/bsp_compare_result.h"
#include "cc/quads/draw_polygon.h"
@@ -18,22 +18,22 @@ namespace cc {
struct BspNode {
// This represents the splitting plane.
- scoped_ptr<DrawPolygon> node_data;
+ std::unique_ptr<DrawPolygon> node_data;
// This represents any coplanar geometry we found while building the BSP.
- std::vector<scoped_ptr<DrawPolygon>> coplanars_front;
- std::vector<scoped_ptr<DrawPolygon>> coplanars_back;
+ std::vector<std::unique_ptr<DrawPolygon>> coplanars_front;
+ std::vector<std::unique_ptr<DrawPolygon>> coplanars_back;
- scoped_ptr<BspNode> back_child;
- scoped_ptr<BspNode> front_child;
+ std::unique_ptr<BspNode> back_child;
+ std::unique_ptr<BspNode> front_child;
- explicit BspNode(scoped_ptr<DrawPolygon> data);
+ explicit BspNode(std::unique_ptr<DrawPolygon> data);
~BspNode();
};
class CC_EXPORT BspTree {
public:
- explicit BspTree(std::deque<scoped_ptr<DrawPolygon>>* list);
- scoped_ptr<BspNode>& root() { return root_; }
+ explicit BspTree(std::deque<std::unique_ptr<DrawPolygon>>* list);
+ std::unique_ptr<BspNode>& root() { return root_; }
template <typename ActionHandlerType>
void TraverseWithActionHandler(ActionHandlerType* action_handler) const {
@@ -45,10 +45,10 @@ class CC_EXPORT BspTree {
~BspTree();
private:
- scoped_ptr<BspNode> root_;
+ std::unique_ptr<BspNode> root_;
- void FromList(std::vector<scoped_ptr<DrawPolygon>>* list);
- void BuildTree(BspNode* node, std::deque<scoped_ptr<DrawPolygon>>* data);
+ void FromList(std::vector<std::unique_ptr<DrawPolygon>>* list);
+ void BuildTree(BspNode* node, std::deque<std::unique_ptr<DrawPolygon>>* data);
template <typename ActionHandlerType>
void WalkInOrderAction(ActionHandlerType* action_handler,
@@ -62,8 +62,8 @@ class CC_EXPORT BspTree {
const BspNode* node,
const BspNode* first_child,
const BspNode* second_child,
- const std::vector<scoped_ptr<DrawPolygon>>& first_coplanars,
- const std::vector<scoped_ptr<DrawPolygon>>& second_coplanars) const {
+ const std::vector<std::unique_ptr<DrawPolygon>>& first_coplanars,
+ const std::vector<std::unique_ptr<DrawPolygon>>& second_coplanars) const {
if (first_child) {
WalkInOrderRecursion(action_handler, first_child);
}
« no previous file with comments | « cc/output/begin_frame_args.cc ('k') | cc/output/bsp_tree.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698