| 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 #ifndef GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_BASE_H_ | 5 #ifndef GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_BASE_H_ |
| 6 #define GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_BASE_H_ | 6 #define GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_BASE_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 461 | 461 |
| 462 void AddExpectationsForSimulatedAttrib0( | 462 void AddExpectationsForSimulatedAttrib0( |
| 463 GLsizei num_vertices, GLuint buffer_id); | 463 GLsizei num_vertices, GLuint buffer_id); |
| 464 | 464 |
| 465 void AddExpectationsForGenVertexArraysOES(); | 465 void AddExpectationsForGenVertexArraysOES(); |
| 466 void AddExpectationsForDeleteVertexArraysOES(); | 466 void AddExpectationsForDeleteVertexArraysOES(); |
| 467 void AddExpectationsForDeleteBoundVertexArraysOES(); | 467 void AddExpectationsForDeleteBoundVertexArraysOES(); |
| 468 void AddExpectationsForBindVertexArrayOES(); | 468 void AddExpectationsForBindVertexArrayOES(); |
| 469 void AddExpectationsForRestoreAttribState(GLuint attrib); | 469 void AddExpectationsForRestoreAttribState(GLuint attrib); |
| 470 | 470 |
| 471 void DoInitializeDiscardableTextureCHROMIUM(GLuint texture_id); |
| 472 void DoUnlockDiscardableTextureCHROMIUM(GLuint texture_id); |
| 473 bool IsDiscardableTextureUnlocked(GLuint texture_id); |
| 474 |
| 471 GLvoid* BufferOffset(unsigned i) { return static_cast<int8_t*>(NULL) + (i); } | 475 GLvoid* BufferOffset(unsigned i) { return static_cast<int8_t*>(NULL) + (i); } |
| 472 | 476 |
| 473 template <typename Command, typename Result> | 477 template <typename Command, typename Result> |
| 474 bool IsObjectHelper(GLuint client_id) { | 478 bool IsObjectHelper(GLuint client_id) { |
| 475 Result* result = static_cast<Result*>(shared_memory_address_); | 479 Result* result = static_cast<Result*>(shared_memory_address_); |
| 476 Command cmd; | 480 Command cmd; |
| 477 cmd.Init(client_id, kSharedMemoryId, kSharedMemoryOffset); | 481 cmd.Init(client_id, kSharedMemoryId, kSharedMemoryOffset); |
| 478 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); | 482 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); |
| 479 bool isObject = static_cast<bool>(*result); | 483 bool isObject = static_cast<bool>(*result); |
| 480 EXPECT_EQ(GL_NO_ERROR, GetGLError()); | 484 EXPECT_EQ(GL_NO_ERROR, GetGLError()); |
| (...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 789 if (arg[i] != array[i]) | 793 if (arg[i] != array[i]) |
| 790 return false; | 794 return false; |
| 791 } | 795 } |
| 792 return true; | 796 return true; |
| 793 } | 797 } |
| 794 | 798 |
| 795 } // namespace gles2 | 799 } // namespace gles2 |
| 796 } // namespace gpu | 800 } // namespace gpu |
| 797 | 801 |
| 798 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_BASE_H_ | 802 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_BASE_H_ |
| OLD | NEW |