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

Unified Diff: ui/gl/gpu_timing_unittest.cc

Issue 1868363002: Replace scoped_ptr with std::unique_ptr in //ui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@scopedptrcc
Patch Set: scopedptrui: rebase-make_scoped_ptr 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 | « ui/gl/gpu_timing.cc ('k') | ui/gl/test/egl_initialization_displays_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/gpu_timing_unittest.cc
diff --git a/ui/gl/gpu_timing_unittest.cc b/ui/gl/gpu_timing_unittest.cc
index 22f6562e43b567b2e9b11b9d61c53932a7d4495b..ed6abebb08a8be4eeda55e29243a081cc1bc69cb 100644
--- a/ui/gl/gpu_timing_unittest.cc
+++ b/ui/gl/gpu_timing_unittest.cc
@@ -2,16 +2,18 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "ui/gl/gpu_timing.h"
+
#include <stdint.h>
+#include <memory>
+
#include "base/bind.h"
-#include "base/memory/scoped_ptr.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/gl/gl_context_stub_with_extensions.h"
#include "ui/gl/gl_implementation.h"
#include "ui/gl/gl_mock.h"
#include "ui/gl/gpu_preference.h"
-#include "ui/gl/gpu_timing.h"
#include "ui/gl/gpu_timing_fake.h"
#include "ui/gl/test/gl_surface_test_support.h"
@@ -74,7 +76,7 @@ class GPUTimingTest : public testing::Test {
protected:
bool setup_ = false;
bool cpu_time_bounded_ = false;
- scoped_ptr< ::testing::StrictMock<MockGLInterface> > gl_;
+ std::unique_ptr<::testing::StrictMock<MockGLInterface>> gl_;
scoped_refptr<GLContextStubWithExtensions> context_;
GPUTimingFake gpu_timing_fake_queries_;
};
@@ -111,7 +113,7 @@ TEST_F(GPUTimingTest, ForceTimeElapsedQuery) {
TEST_F(GPUTimingTest, QueryTimeStampTest) {
SetupGLContext("3.2", "GL_ARB_timer_query");
scoped_refptr<GPUTimingClient> client = CreateGPUTimingClient();
- scoped_ptr<GPUTimer> gpu_timer = client->CreateGPUTimer(false);
+ std::unique_ptr<GPUTimer> gpu_timer = client->CreateGPUTimer(false);
const int64_t begin_cpu_time = 1230;
const int64_t begin_gl_time = 10 * base::Time::kNanosecondsPerMicrosecond;
@@ -145,7 +147,7 @@ TEST_F(GPUTimingTest, QueryTimeStampUsingElapsedTest) {
// timestamp queries. Internally we fall back to time elapsed queries.
SetupGLContext("3.2", "GL_EXT_timer_query");
scoped_refptr<GPUTimingClient> client = CreateGPUTimingClient();
- scoped_ptr<GPUTimer> gpu_timer = client->CreateGPUTimer(false);
+ std::unique_ptr<GPUTimer> gpu_timer = client->CreateGPUTimer(false);
ASSERT_TRUE(client->IsForceTimeElapsedQuery());
const int64_t begin_cpu_time = 123;
@@ -175,7 +177,7 @@ TEST_F(GPUTimingTest, QueryTimestampUsingElapsedARBTest) {
// support for timestamp queries
SetupGLContext("3.2", "GL_ARB_timer_query");
scoped_refptr<GPUTimingClient> client = CreateGPUTimingClient();
- scoped_ptr<GPUTimer> gpu_timer = client->CreateGPUTimer(false);
+ std::unique_ptr<GPUTimer> gpu_timer = client->CreateGPUTimer(false);
const int64_t begin_cpu_time = 123;
const int64_t begin_gl_time = 10 * base::Time::kNanosecondsPerMicrosecond;
« no previous file with comments | « ui/gl/gpu_timing.cc ('k') | ui/gl/test/egl_initialization_displays_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698