| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 1021 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1032 cmds::BindFramebuffer cmd; | 1032 cmds::BindFramebuffer cmd; |
| 1033 cmd.Init(target, client_id); | 1033 cmd.Init(target, client_id); |
| 1034 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); | 1034 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); |
| 1035 } | 1035 } |
| 1036 | 1036 |
| 1037 bool GLES2DecoderTestBase::DoIsFramebuffer(GLuint client_id) { | 1037 bool GLES2DecoderTestBase::DoIsFramebuffer(GLuint client_id) { |
| 1038 return IsObjectHelper<cmds::IsFramebuffer, cmds::IsFramebuffer::Result>( | 1038 return IsObjectHelper<cmds::IsFramebuffer, cmds::IsFramebuffer::Result>( |
| 1039 client_id); | 1039 client_id); |
| 1040 } | 1040 } |
| 1041 | 1041 |
| 1042 void GLES2DecoderTestBase::DoDeleteFramebuffer( | 1042 void GLES2DecoderTestBase::DoDeleteFramebuffer(GLuint client_id, |
| 1043 GLuint client_id, GLuint service_id, | 1043 GLuint service_id) { |
| 1044 bool reset_draw, GLenum draw_target, GLuint draw_id, | |
| 1045 bool reset_read, GLenum read_target, GLuint read_id) { | |
| 1046 if (reset_draw) { | |
| 1047 EXPECT_CALL(*gl_, BindFramebufferEXT(draw_target, draw_id)) | |
| 1048 .Times(1) | |
| 1049 .RetiresOnSaturation(); | |
| 1050 } | |
| 1051 if (reset_read) { | |
| 1052 EXPECT_CALL(*gl_, BindFramebufferEXT(read_target, read_id)) | |
| 1053 .Times(1) | |
| 1054 .RetiresOnSaturation(); | |
| 1055 } | |
| 1056 EXPECT_CALL(*gl_, DeleteFramebuffersEXT(1, Pointee(service_id))) | 1044 EXPECT_CALL(*gl_, DeleteFramebuffersEXT(1, Pointee(service_id))) |
| 1057 .Times(1) | 1045 .Times(1) |
| 1058 .RetiresOnSaturation(); | 1046 .RetiresOnSaturation(); |
| 1059 GenHelper<cmds::DeleteFramebuffersImmediate>(client_id); | 1047 GenHelper<cmds::DeleteFramebuffersImmediate>(client_id); |
| 1060 } | 1048 } |
| 1061 | 1049 |
| 1062 void GLES2DecoderTestBase::DoBindRenderbuffer( | 1050 void GLES2DecoderTestBase::DoBindRenderbuffer( |
| 1063 GLenum target, GLuint client_id, GLuint service_id) { | 1051 GLenum target, GLuint client_id, GLuint service_id) { |
| 1064 service_renderbuffer_id_ = service_id; | 1052 service_renderbuffer_id_ = service_id; |
| 1065 service_renderbuffer_valid_ = true; | 1053 service_renderbuffer_valid_ = true; |
| (...skipping 966 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2032 SetupDefaultProgram(); | 2020 SetupDefaultProgram(); |
| 2033 } | 2021 } |
| 2034 | 2022 |
| 2035 // Include the auto-generated part of this file. We split this because it means | 2023 // Include the auto-generated part of this file. We split this because it means |
| 2036 // we can easily edit the non-auto generated parts right here in this file | 2024 // we can easily edit the non-auto generated parts right here in this file |
| 2037 // instead of having to edit some template or the code generator. | 2025 // instead of having to edit some template or the code generator. |
| 2038 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_0_autogen.h" | 2026 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_0_autogen.h" |
| 2039 | 2027 |
| 2040 } // namespace gles2 | 2028 } // namespace gles2 |
| 2041 } // namespace gpu | 2029 } // namespace gpu |
| OLD | NEW |