| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/gles2_cmd_decoder.h" | 5 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/strings/string_number_conversions.h" | 8 #include "base/strings/string_number_conversions.h" |
| 9 #include "gpu/command_buffer/common/gles2_cmd_format.h" | 9 #include "gpu/command_buffer/common/gles2_cmd_format.h" |
| 10 #include "gpu/command_buffer/common/gles2_cmd_utils.h" | 10 #include "gpu/command_buffer/common/gles2_cmd_utils.h" |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 using ::testing::SetArgPointee; | 47 using ::testing::SetArgPointee; |
| 48 using ::testing::StrEq; | 48 using ::testing::StrEq; |
| 49 using ::testing::StrictMock; | 49 using ::testing::StrictMock; |
| 50 | 50 |
| 51 namespace gpu { | 51 namespace gpu { |
| 52 namespace gles2 { | 52 namespace gles2 { |
| 53 | 53 |
| 54 using namespace cmds; | 54 using namespace cmds; |
| 55 | 55 |
| 56 TEST_P(GLES2DecoderWithShaderTest, GetVertexAttribPointervSucceeds) { | 56 TEST_P(GLES2DecoderWithShaderTest, GetVertexAttribPointervSucceeds) { |
| 57 const float dummy = 0; | 57 const GLuint kOffsetToTestFor = sizeof(float) * 4; |
| 58 const GLuint kOffsetToTestFor = sizeof(dummy) * 4; | |
| 59 const GLuint kIndexToTest = 1; | 58 const GLuint kIndexToTest = 1; |
| 60 GetVertexAttribPointerv::Result* result = | 59 GetVertexAttribPointerv::Result* result = |
| 61 static_cast<GetVertexAttribPointerv::Result*>(shared_memory_address_); | 60 static_cast<GetVertexAttribPointerv::Result*>(shared_memory_address_); |
| 62 result->size = 0; | 61 result->size = 0; |
| 63 const GLuint* result_value = result->GetData(); | 62 const GLuint* result_value = result->GetData(); |
| 64 // Test that initial value is 0. | 63 // Test that initial value is 0. |
| 65 GetVertexAttribPointerv cmd; | 64 GetVertexAttribPointerv cmd; |
| 66 cmd.Init(kIndexToTest, | 65 cmd.Init(kIndexToTest, |
| 67 GL_VERTEX_ATTRIB_ARRAY_POINTER, | 66 GL_VERTEX_ATTRIB_ARRAY_POINTER, |
| 68 shared_memory_id_, | 67 shared_memory_id_, |
| (...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 475 // TODO(gman): BufferData | 474 // TODO(gman): BufferData |
| 476 | 475 |
| 477 // TODO(gman): BufferDataImmediate | 476 // TODO(gman): BufferDataImmediate |
| 478 | 477 |
| 479 // TODO(gman): BufferSubData | 478 // TODO(gman): BufferSubData |
| 480 | 479 |
| 481 // TODO(gman): BufferSubDataImmediate | 480 // TODO(gman): BufferSubDataImmediate |
| 482 | 481 |
| 483 } // namespace gles2 | 482 } // namespace gles2 |
| 484 } // namespace gpu | 483 } // namespace gpu |
| OLD | NEW |