OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 | 9 |
10 #include "base/string_number_conversions.h" | 10 #include "base/string_number_conversions.h" |
(...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
478 BindFramebuffer cmd; | 478 BindFramebuffer cmd; |
479 cmd.Init(target, client_id); | 479 cmd.Init(target, client_id); |
480 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); | 480 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); |
481 } | 481 } |
482 | 482 |
483 bool GLES2DecoderTestBase::DoIsFramebuffer(GLuint client_id) { | 483 bool GLES2DecoderTestBase::DoIsFramebuffer(GLuint client_id) { |
484 return IsObjectHelper<IsFramebuffer, IsFramebuffer::Result>(client_id); | 484 return IsObjectHelper<IsFramebuffer, IsFramebuffer::Result>(client_id); |
485 } | 485 } |
486 | 486 |
487 void GLES2DecoderTestBase::DoDeleteFramebuffer( | 487 void GLES2DecoderTestBase::DoDeleteFramebuffer( |
488 GLuint client_id, GLuint service_id) { | 488 GLuint client_id, GLuint service_id, |
| 489 bool reset_draw, GLenum draw_target, GLuint draw_id, |
| 490 bool reset_read, GLenum read_target, GLuint read_id) { |
| 491 if (reset_draw) { |
| 492 EXPECT_CALL(*gl_, BindFramebufferEXT(draw_target, draw_id)) |
| 493 .Times(1) |
| 494 .RetiresOnSaturation(); |
| 495 } |
| 496 if (reset_read) { |
| 497 EXPECT_CALL(*gl_, BindFramebufferEXT(read_target, read_id)) |
| 498 .Times(1) |
| 499 .RetiresOnSaturation(); |
| 500 } |
489 EXPECT_CALL(*gl_, DeleteFramebuffersEXT(1, Pointee(service_id))) | 501 EXPECT_CALL(*gl_, DeleteFramebuffersEXT(1, Pointee(service_id))) |
490 .Times(1) | 502 .Times(1) |
491 .RetiresOnSaturation(); | 503 .RetiresOnSaturation(); |
492 DeleteFramebuffers cmd; | 504 DeleteFramebuffers cmd; |
493 cmd.Init(1, shared_memory_id_, shared_memory_offset_); | 505 cmd.Init(1, shared_memory_id_, shared_memory_offset_); |
494 memcpy(shared_memory_address_, &client_id, sizeof(client_id)); | 506 memcpy(shared_memory_address_, &client_id, sizeof(client_id)); |
495 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); | 507 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); |
496 } | 508 } |
497 | 509 |
498 void GLES2DecoderTestBase::DoBindRenderbuffer( | 510 void GLES2DecoderTestBase::DoBindRenderbuffer( |
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
894 | 906 |
895 const char* GLES2DecoderWithShaderTestBase::kAttrib1Name = "attrib1"; | 907 const char* GLES2DecoderWithShaderTestBase::kAttrib1Name = "attrib1"; |
896 const char* GLES2DecoderWithShaderTestBase::kAttrib2Name = "attrib2"; | 908 const char* GLES2DecoderWithShaderTestBase::kAttrib2Name = "attrib2"; |
897 const char* GLES2DecoderWithShaderTestBase::kAttrib3Name = "attrib3"; | 909 const char* GLES2DecoderWithShaderTestBase::kAttrib3Name = "attrib3"; |
898 const char* GLES2DecoderWithShaderTestBase::kUniform1Name = "uniform1"; | 910 const char* GLES2DecoderWithShaderTestBase::kUniform1Name = "uniform1"; |
899 const char* GLES2DecoderWithShaderTestBase::kUniform2Name = "uniform2[0]"; | 911 const char* GLES2DecoderWithShaderTestBase::kUniform2Name = "uniform2[0]"; |
900 const char* GLES2DecoderWithShaderTestBase::kUniform3Name = "uniform3[0]"; | 912 const char* GLES2DecoderWithShaderTestBase::kUniform3Name = "uniform3[0]"; |
901 | 913 |
902 } // namespace gles2 | 914 } // namespace gles2 |
903 } // namespace gpu | 915 } // namespace gpu |
OLD | NEW |