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/gles2_cmd_decoder_unittest_base.h" | 5 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
435 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd1)); | 435 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd1)); |
436 if (str) { | 436 if (str) { |
437 memcpy(shared_memory_address_, str, size); | 437 memcpy(shared_memory_address_, str, size); |
438 cmd::SetBucketData cmd2; | 438 cmd::SetBucketData cmd2; |
439 cmd2.Init(bucket_id, 0, size, kSharedMemoryId, kSharedMemoryOffset); | 439 cmd2.Init(bucket_id, 0, size, kSharedMemoryId, kSharedMemoryOffset); |
440 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd2)); | 440 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd2)); |
441 ClearSharedMemory(); | 441 ClearSharedMemory(); |
442 } | 442 } |
443 } | 443 } |
444 | 444 |
445 void GLES2DecoderTestBase::SetupClearTextureExpections( | 445 void GLES2DecoderTestBase::SetupClearTextureExpectations( |
446 GLuint service_id, | 446 GLuint service_id, |
447 GLuint old_service_id, | 447 GLuint old_service_id, |
448 GLenum bind_target, | 448 GLenum bind_target, |
449 GLenum target, | 449 GLenum target, |
450 GLint level, | 450 GLint level, |
| 451 GLenum internal_format, |
451 GLenum format, | 452 GLenum format, |
452 GLenum type, | 453 GLenum type, |
453 GLsizei width, | 454 GLsizei width, |
454 GLsizei height) { | 455 GLsizei height) { |
455 EXPECT_CALL(*gl_, BindTexture(bind_target, service_id)) | 456 EXPECT_CALL(*gl_, BindTexture(bind_target, service_id)) |
456 .Times(1) | 457 .Times(1) |
457 .RetiresOnSaturation(); | 458 .RetiresOnSaturation(); |
458 EXPECT_CALL(*gl_, TexImage2D( | 459 EXPECT_CALL(*gl_, TexImage2D( |
459 target, level, format, width, height, 0, format, type, _)) | 460 target, level, internal_format, width, height, 0, format, type, _)) |
460 .Times(1) | 461 .Times(1) |
461 .RetiresOnSaturation(); | 462 .RetiresOnSaturation(); |
462 EXPECT_CALL(*gl_, BindTexture(bind_target, old_service_id)) | 463 EXPECT_CALL(*gl_, BindTexture(bind_target, old_service_id)) |
463 .Times(1) | 464 .Times(1) |
464 .RetiresOnSaturation(); | 465 .RetiresOnSaturation(); |
465 } | 466 } |
466 | 467 |
467 void GLES2DecoderTestBase::SetupExpectationsForFramebufferClearing( | 468 void GLES2DecoderTestBase::SetupExpectationsForFramebufferClearing( |
468 GLenum target, | 469 GLenum target, |
469 GLuint clear_bits, | 470 GLuint clear_bits, |
(...skipping 987 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1457 SetupDefaultProgram(); | 1458 SetupDefaultProgram(); |
1458 } | 1459 } |
1459 | 1460 |
1460 // Include the auto-generated part of this file. We split this because it means | 1461 // Include the auto-generated part of this file. We split this because it means |
1461 // we can easily edit the non-auto generated parts right here in this file | 1462 // we can easily edit the non-auto generated parts right here in this file |
1462 // instead of having to edit some template or the code generator. | 1463 // instead of having to edit some template or the code generator. |
1463 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_0_autogen.h" | 1464 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_0_autogen.h" |
1464 | 1465 |
1465 } // namespace gles2 | 1466 } // namespace gles2 |
1466 } // namespace gpu | 1467 } // namespace gpu |
OLD | NEW |