OLD | NEW |
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 "testing/gtest/include/gtest/gtest.h" | 8 #include "testing/gtest/include/gtest/gtest.h" |
9 | 9 |
10 namespace gpu { | 10 namespace gpu { |
11 namespace gles2 { | 11 namespace gles2 { |
12 | 12 |
13 class VertexArrayObjectManagerTest : public testing::Test { | 13 class VertexArrayObjectManagerTest : public testing::Test { |
14 protected: | 14 protected: |
15 static const GLuint kMaxAttribs = 4; | 15 static const GLuint kMaxAttribs = 4; |
16 static const GLuint kClientSideArrayBuffer = 0x1234; | 16 static const GLuint kClientSideArrayBuffer = 0x1234; |
17 static const GLuint kClientSideElementArrayBuffer = 0x1235; | 17 static const GLuint kClientSideElementArrayBuffer = 0x1235; |
18 | 18 |
19 virtual void SetUp() { | 19 void SetUp() override { |
20 manager_.reset(new VertexArrayObjectManager( | 20 manager_.reset(new VertexArrayObjectManager( |
21 kMaxAttribs, | 21 kMaxAttribs, |
22 kClientSideArrayBuffer, | 22 kClientSideArrayBuffer, |
23 kClientSideElementArrayBuffer)); | 23 kClientSideElementArrayBuffer)); |
24 } | 24 } |
25 virtual void TearDown() { | 25 void TearDown() override {} |
26 } | |
27 | 26 |
28 scoped_ptr<VertexArrayObjectManager> manager_; | 27 scoped_ptr<VertexArrayObjectManager> manager_; |
29 }; | 28 }; |
30 | 29 |
31 // GCC requires these declarations, but MSVC requires they not be present | 30 // GCC requires these declarations, but MSVC requires they not be present |
32 #ifndef _MSC_VER | 31 #ifndef _MSC_VER |
33 const GLuint VertexArrayObjectManagerTest::kMaxAttribs; | 32 const GLuint VertexArrayObjectManagerTest::kMaxAttribs; |
34 const GLuint VertexArrayObjectManagerTest::kClientSideArrayBuffer; | 33 const GLuint VertexArrayObjectManagerTest::kClientSideArrayBuffer; |
35 const GLuint VertexArrayObjectManagerTest::kClientSideElementArrayBuffer; | 34 const GLuint VertexArrayObjectManagerTest::kClientSideElementArrayBuffer; |
36 #endif | 35 #endif |
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
253 EXPECT_TRUE(manager_->IsReservedId(kClientSideArrayBuffer)); | 252 EXPECT_TRUE(manager_->IsReservedId(kClientSideArrayBuffer)); |
254 EXPECT_TRUE(manager_->IsReservedId(kClientSideElementArrayBuffer)); | 253 EXPECT_TRUE(manager_->IsReservedId(kClientSideElementArrayBuffer)); |
255 EXPECT_FALSE(manager_->IsReservedId(0)); | 254 EXPECT_FALSE(manager_->IsReservedId(0)); |
256 EXPECT_FALSE(manager_->IsReservedId(1)); | 255 EXPECT_FALSE(manager_->IsReservedId(1)); |
257 EXPECT_FALSE(manager_->IsReservedId(2)); | 256 EXPECT_FALSE(manager_->IsReservedId(2)); |
258 } | 257 } |
259 | 258 |
260 } // namespace gles2 | 259 } // namespace gles2 |
261 } // namespace gpu | 260 } // namespace gpu |
262 | 261 |
OLD | NEW |