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

Unified Diff: cc/test/test_web_graphics_context_3d.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/test/test_web_graphics_context_3d.h ('k') | cc/test/test_web_graphics_context_3d_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/test/test_web_graphics_context_3d.cc
diff --git a/cc/test/test_web_graphics_context_3d.cc b/cc/test/test_web_graphics_context_3d.cc
index b3cd7b8aef605628395ea211f0c4e6e7d2f917a9..0e1ea25c95c2f7b06da0a61c50953d88cb19fad5 100644
--- a/cc/test/test_web_graphics_context_3d.cc
+++ b/cc/test/test_web_graphics_context_3d.cc
@@ -13,6 +13,7 @@
#include "base/bind.h"
#include "base/lazy_instance.h"
#include "base/logging.h"
+#include "base/memory/ptr_util.h"
#include "base/message_loop/message_loop.h"
#include "base/numerics/safe_conversions.h"
#include "cc/test/test_context_support.h"
@@ -46,8 +47,8 @@ TestWebGraphicsContext3D::Namespace::~Namespace() {
}
// static
-scoped_ptr<TestWebGraphicsContext3D> TestWebGraphicsContext3D::Create() {
- return make_scoped_ptr(new TestWebGraphicsContext3D());
+std::unique_ptr<TestWebGraphicsContext3D> TestWebGraphicsContext3D::Create() {
+ return base::WrapUnique(new TestWebGraphicsContext3D());
}
TestWebGraphicsContext3D::TestWebGraphicsContext3D()
@@ -526,10 +527,10 @@ void TestWebGraphicsContext3D::bindBuffer(GLenum target,
DCHECK_LT(buffer_id, namespace_->next_buffer_id);
DCHECK_EQ(context_id, context_id_);
- std::unordered_map<unsigned, scoped_ptr<Buffer>>& buffers =
+ std::unordered_map<unsigned, std::unique_ptr<Buffer>>& buffers =
namespace_->buffers;
if (buffers.count(bound_buffer_) == 0)
- buffers[bound_buffer_] = make_scoped_ptr(new Buffer);
+ buffers[bound_buffer_] = base::WrapUnique(new Buffer);
buffers[bound_buffer_]->target = target;
}
@@ -539,7 +540,7 @@ void TestWebGraphicsContext3D::bufferData(GLenum target,
const void* data,
GLenum usage) {
base::AutoLock lock(namespace_->lock);
- std::unordered_map<unsigned, scoped_ptr<Buffer>>& buffers =
+ std::unordered_map<unsigned, std::unique_ptr<Buffer>>& buffers =
namespace_->buffers;
DCHECK_GT(buffers.count(bound_buffer_), 0u);
DCHECK_EQ(target, buffers[bound_buffer_]->target);
@@ -589,7 +590,7 @@ void TestWebGraphicsContext3D::pixelStorei(GLenum pname, GLint param) {
void* TestWebGraphicsContext3D::mapBufferCHROMIUM(GLenum target,
GLenum access) {
base::AutoLock lock(namespace_->lock);
- std::unordered_map<unsigned, scoped_ptr<Buffer>>& buffers =
+ std::unordered_map<unsigned, std::unique_ptr<Buffer>>& buffers =
namespace_->buffers;
DCHECK_GT(buffers.count(bound_buffer_), 0u);
DCHECK_EQ(target, buffers[bound_buffer_]->target);
@@ -606,7 +607,7 @@ void* TestWebGraphicsContext3D::mapBufferCHROMIUM(GLenum target,
GLboolean TestWebGraphicsContext3D::unmapBufferCHROMIUM(
GLenum target) {
base::AutoLock lock(namespace_->lock);
- std::unordered_map<unsigned, scoped_ptr<Buffer>>& buffers =
+ std::unordered_map<unsigned, std::unique_ptr<Buffer>>& buffers =
namespace_->buffers;
DCHECK_GT(buffers.count(bound_buffer_), 0u);
DCHECK_EQ(target, buffers[bound_buffer_]->target);
« no previous file with comments | « cc/test/test_web_graphics_context_3d.h ('k') | cc/test/test_web_graphics_context_3d_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698