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/service/vertex_attrib_manager.h" | 5 #include "gpu/command_buffer/service/vertex_attrib_manager.h" |
6 | 6 |
7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
8 #include "gpu/command_buffer/service/buffer_manager.h" | 8 #include "gpu/command_buffer/service/buffer_manager.h" |
9 #include "gpu/command_buffer/service/error_state_mock.h" | 9 #include "gpu/command_buffer/service/error_state_mock.h" |
10 #include "gpu/command_buffer/service/feature_info.h" | 10 #include "gpu/command_buffer/service/feature_info.h" |
11 #include "gpu/command_buffer/service/gpu_service_test.h" | 11 #include "gpu/command_buffer/service/gpu_service_test.h" |
12 #include "gpu/command_buffer/service/test_helper.h" | 12 #include "gpu/command_buffer/service/test_helper.h" |
13 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
14 #include "ui/gl/gl_mock.h" | 14 #include "ui/gl/gl_mock.h" |
15 | 15 |
16 using ::testing::Pointee; | 16 using ::testing::Pointee; |
17 using ::testing::_; | 17 using ::testing::_; |
18 | 18 |
19 namespace gpu { | 19 namespace gpu { |
20 namespace gles2 { | 20 namespace gles2 { |
21 | 21 |
22 class VertexAttribManagerTest : public GpuServiceTest { | 22 class VertexAttribManagerTest : public GpuServiceTest { |
23 public: | 23 public: |
24 static const uint32 kNumVertexAttribs = 8; | 24 static const uint32 kNumVertexAttribs = 8; |
25 | 25 |
26 VertexAttribManagerTest() { | 26 VertexAttribManagerTest() { |
27 } | 27 } |
28 | 28 |
29 virtual ~VertexAttribManagerTest() { | 29 ~VertexAttribManagerTest() override {} |
30 } | |
31 | 30 |
32 protected: | 31 protected: |
33 virtual void SetUp() { | 32 void SetUp() override { |
34 GpuServiceTest::SetUp(); | 33 GpuServiceTest::SetUp(); |
35 | 34 |
36 for (uint32 ii = 0; ii < kNumVertexAttribs; ++ii) { | 35 for (uint32 ii = 0; ii < kNumVertexAttribs; ++ii) { |
37 EXPECT_CALL(*gl_, VertexAttrib4f(ii, 0.0f, 0.0f, 0.0f, 1.0f)) | 36 EXPECT_CALL(*gl_, VertexAttrib4f(ii, 0.0f, 0.0f, 0.0f, 1.0f)) |
38 .Times(1) | 37 .Times(1) |
39 .RetiresOnSaturation(); | 38 .RetiresOnSaturation(); |
40 } | 39 } |
41 | 40 |
42 manager_ = new VertexAttribManager(); | 41 manager_ = new VertexAttribManager(); |
43 manager_->Initialize(kNumVertexAttribs, true); | 42 manager_->Initialize(kNumVertexAttribs, true); |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 buffer_manager.Destroy(false); | 215 buffer_manager.Destroy(false); |
217 } | 216 } |
218 | 217 |
219 // TODO(gman): Test ValidateBindings | 218 // TODO(gman): Test ValidateBindings |
220 // TODO(gman): Test ValidateBindings with client side arrays. | 219 // TODO(gman): Test ValidateBindings with client side arrays. |
221 | 220 |
222 } // namespace gles2 | 221 } // namespace gles2 |
223 } // namespace gpu | 222 } // namespace gpu |
224 | 223 |
225 | 224 |
OLD | NEW |