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

Unified Diff: gpu/command_buffer/tests/gl_test_utils.cc

Issue 1859703002: convert //gpu to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: undo part of clang-format 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/tests/gl_test_utils.cc
diff --git a/gpu/command_buffer/tests/gl_test_utils.cc b/gpu/command_buffer/tests/gl_test_utils.cc
index d9a30ce9b96b10b6a12d4387597c237375b6c285..b68320fc59572874f73cc43cf3da68e12f0d83c0 100644
--- a/gpu/command_buffer/tests/gl_test_utils.cc
+++ b/gpu/command_buffer/tests/gl_test_utils.cc
@@ -8,9 +8,9 @@
#include <stdint.h>
#include <stdio.h>
+#include <memory>
#include <string>
-#include "base/memory/scoped_ptr.h"
#include "base/strings/stringize_macros.h"
#include "base/strings/stringprintf.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -201,7 +201,7 @@ bool GLTestHelper::CheckPixels(GLint x,
GLint tolerance,
const uint8_t* color) {
GLsizei size = width * height * 4;
- scoped_ptr<uint8_t[]> pixels(new uint8_t[size]);
+ std::unique_ptr<uint8_t[]> pixels(new uint8_t[size]);
memset(pixels.get(), kCheckClearValue, size);
glReadPixels(x, y, width, height, GL_RGBA, GL_UNSIGNED_BYTE, pixels.get());
int bad_count = 0;
@@ -273,7 +273,7 @@ bool GLTestHelper::SaveBackbufferAsBMP(
glPixelStorei(GL_PACK_ALIGNMENT, 1);
int num_pixels = width * height;
int size = num_pixels * 4;
- scoped_ptr<uint8_t[]> data(new uint8_t[size]);
+ std::unique_ptr<uint8_t[]> data(new uint8_t[size]);
uint8_t* pixels = data.get();
glReadPixels(0, 0, width, height, GL_RGBA, GL_UNSIGNED_BYTE, pixels);

Powered by Google App Engine
This is Rietveld 408576698