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

Side by Side Diff: gpu/command_buffer/service/vertex_array_manager_unittest.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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <stdint.h> 5 #include <stdint.h>
6 6
7 #include <memory>
8
7 #include "gpu/command_buffer/service/vertex_array_manager.h" 9 #include "gpu/command_buffer/service/vertex_array_manager.h"
8 #include "gpu/command_buffer/service/vertex_attrib_manager.h" 10 #include "gpu/command_buffer/service/vertex_attrib_manager.h"
9 11
10 #include "base/memory/scoped_ptr.h"
11 #include "gpu/command_buffer/service/feature_info.h" 12 #include "gpu/command_buffer/service/feature_info.h"
12 #include "gpu/command_buffer/service/gpu_service_test.h" 13 #include "gpu/command_buffer/service/gpu_service_test.h"
13 #include "gpu/command_buffer/service/test_helper.h" 14 #include "gpu/command_buffer/service/test_helper.h"
14 #include "testing/gtest/include/gtest/gtest.h" 15 #include "testing/gtest/include/gtest/gtest.h"
15 #include "ui/gl/gl_mock.h" 16 #include "ui/gl/gl_mock.h"
16 17
17 using ::testing::Pointee; 18 using ::testing::Pointee;
18 using ::testing::_; 19 using ::testing::_;
19 20
20 namespace gpu { 21 namespace gpu {
(...skipping 12 matching lines...) Expand all
33 void SetUp() override { 34 void SetUp() override {
34 GpuServiceTest::SetUpWithGLVersion("2.1", "GL_ARB_vertex_array_object"); 35 GpuServiceTest::SetUpWithGLVersion("2.1", "GL_ARB_vertex_array_object");
35 manager_.reset(new VertexArrayManager()); 36 manager_.reset(new VertexArrayManager());
36 } 37 }
37 38
38 void TearDown() override { 39 void TearDown() override {
39 manager_.reset(); 40 manager_.reset();
40 GpuServiceTest::TearDown(); 41 GpuServiceTest::TearDown();
41 } 42 }
42 43
43 scoped_ptr<VertexArrayManager> manager_; 44 std::unique_ptr<VertexArrayManager> manager_;
44 }; 45 };
45 46
46 // GCC requires these declarations, but MSVC requires they not be present 47 // GCC requires these declarations, but MSVC requires they not be present
47 #ifndef COMPILER_MSVC 48 #ifndef COMPILER_MSVC
48 const uint32_t VertexArrayManagerTest::kNumVertexAttribs; 49 const uint32_t VertexArrayManagerTest::kNumVertexAttribs;
49 #endif 50 #endif
50 51
51 TEST_F(VertexArrayManagerTest, Basic) { 52 TEST_F(VertexArrayManagerTest, Basic) {
52 const GLuint kClient1Id = 1; 53 const GLuint kClient1Id = 1;
53 const GLuint kService1Id = 11; 54 const GLuint kService1Id = 11;
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 manager.Destroy(true); 93 manager.Destroy(true);
93 // Check that resources got freed. 94 // Check that resources got freed.
94 info1 = manager.GetVertexAttribManager(kClient1Id); 95 info1 = manager.GetVertexAttribManager(kClient1Id);
95 ASSERT_TRUE(info1 == NULL); 96 ASSERT_TRUE(info1 == NULL);
96 } 97 }
97 98
98 } // namespace gles2 99 } // namespace gles2
99 } // namespace gpu 100 } // namespace gpu
100 101
101 102
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/vertex_array_manager.h ('k') | gpu/command_buffer/service/vertex_attrib_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698