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

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: rebase on master 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 51af934edff9f519fabbaa4d40992bce785dee2a..12010b18d8d89db15ed0d1b9293076736f7c179d 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>
@@ -647,7 +648,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;
@@ -1989,8 +1990,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