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

Side by Side Diff: gpu/command_buffer/client/vertex_array_object_manager_unittest.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 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 "gpu/command_buffer/client/vertex_array_object_manager.h" 5 #include "gpu/command_buffer/client/vertex_array_object_manager.h"
6 6
7 #include <GLES2/gl2ext.h> 7 #include <GLES2/gl2ext.h>
8 #include <GLES3/gl3.h> 8 #include <GLES3/gl3.h>
9 #include <stddef.h> 9 #include <stddef.h>
10 #include <stdint.h> 10 #include <stdint.h>
no sievers 2016/04/05 19:02:40 #include <memory>
Mostyn Bramley-Moore 2016/04/05 21:35:31 Done.
11 #include "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/include/gtest/gtest.h"
12 12
13 namespace gpu { 13 namespace gpu {
14 namespace gles2 { 14 namespace gles2 {
15 15
16 class VertexArrayObjectManagerTest : public testing::Test { 16 class VertexArrayObjectManagerTest : public testing::Test {
17 protected: 17 protected:
18 static const GLuint kMaxAttribs = 4; 18 static const GLuint kMaxAttribs = 4;
19 static const GLuint kClientSideArrayBuffer = 0x1234; 19 static const GLuint kClientSideArrayBuffer = 0x1234;
20 static const GLuint kClientSideElementArrayBuffer = 0x1235; 20 static const GLuint kClientSideElementArrayBuffer = 0x1235;
21 static const bool kSupportClientSideArrays = true; 21 static const bool kSupportClientSideArrays = true;
22 22
23 void SetUp() override { 23 void SetUp() override {
24 manager_.reset(new VertexArrayObjectManager( 24 manager_.reset(new VertexArrayObjectManager(
25 kMaxAttribs, 25 kMaxAttribs,
26 kClientSideArrayBuffer, 26 kClientSideArrayBuffer,
27 kClientSideElementArrayBuffer, 27 kClientSideElementArrayBuffer,
28 kSupportClientSideArrays)); 28 kSupportClientSideArrays));
29 } 29 }
30 void TearDown() override {} 30 void TearDown() override {}
31 31
32 scoped_ptr<VertexArrayObjectManager> manager_; 32 std::unique_ptr<VertexArrayObjectManager> manager_;
33 }; 33 };
34 34
35 // GCC requires these declarations, but MSVC requires they not be present 35 // GCC requires these declarations, but MSVC requires they not be present
36 #ifndef _MSC_VER 36 #ifndef _MSC_VER
37 const GLuint VertexArrayObjectManagerTest::kMaxAttribs; 37 const GLuint VertexArrayObjectManagerTest::kMaxAttribs;
38 const GLuint VertexArrayObjectManagerTest::kClientSideArrayBuffer; 38 const GLuint VertexArrayObjectManagerTest::kClientSideArrayBuffer;
39 const GLuint VertexArrayObjectManagerTest::kClientSideElementArrayBuffer; 39 const GLuint VertexArrayObjectManagerTest::kClientSideElementArrayBuffer;
40 #endif 40 #endif
41 41
42 TEST_F(VertexArrayObjectManagerTest, Basic) { 42 TEST_F(VertexArrayObjectManagerTest, Basic) {
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 EXPECT_TRUE(manager_->IsReservedId(kClientSideArrayBuffer)); 264 EXPECT_TRUE(manager_->IsReservedId(kClientSideArrayBuffer));
265 EXPECT_TRUE(manager_->IsReservedId(kClientSideElementArrayBuffer)); 265 EXPECT_TRUE(manager_->IsReservedId(kClientSideElementArrayBuffer));
266 EXPECT_FALSE(manager_->IsReservedId(0)); 266 EXPECT_FALSE(manager_->IsReservedId(0));
267 EXPECT_FALSE(manager_->IsReservedId(1)); 267 EXPECT_FALSE(manager_->IsReservedId(1));
268 EXPECT_FALSE(manager_->IsReservedId(2)); 268 EXPECT_FALSE(manager_->IsReservedId(2));
269 } 269 }
270 270
271 } // namespace gles2 271 } // namespace gles2
272 } // namespace gpu 272 } // namespace gpu
273 273
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698