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