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

Unified Diff: gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc

Issue 1859703002: convert //gpu to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: convert newly added scoped_ptr's 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
Index: gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc
index cbe3112b391c27784afa0907da0db34d7d83b70c..a2b81ad9cf807ca8f6b475bbca011bf69081c40c 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc
@@ -8,6 +8,7 @@
#include <stdint.h>
#include <algorithm>
+#include <memory>
#include <string>
#include <vector>
@@ -645,7 +646,7 @@ void GLES2DecoderTestBase::SetBucketAsCStrings(uint32_t bucket_id,
char str_end) {
uint32_t header_size = sizeof(GLint) * (count + 1);
uint32_t total_size = header_size;
- scoped_ptr<GLint[]> header(new GLint[count + 1]);
+ std::unique_ptr<GLint[]> header(new GLint[count + 1]);
header[0] = static_cast<GLint>(count_in_header);
for (GLsizei ii = 0; ii < count; ++ii) {
header[ii + 1] = str && str[ii] ? strlen(str[ii]) : 0;
@@ -1987,8 +1988,7 @@ void GLES2DecoderTestBase::SetupInitStateManualExpectations(bool es3_capable) {
GLES2DecoderWithShaderTestBase::MockCommandBufferEngine::
MockCommandBufferEngine() {
-
- scoped_ptr<base::SharedMemory> shm(new base::SharedMemory());
+ std::unique_ptr<base::SharedMemory> shm(new base::SharedMemory());
shm->CreateAndMapAnonymous(kSharedBufferSize);
valid_buffer_ = MakeBufferFromSharedMemory(std::move(shm), kSharedBufferSize);

Powered by Google App Engine
This is Rietveld 408576698