OLD | NEW |
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2015 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 <GLES2/gl2.h> | 5 #include <GLES2/gl2.h> |
6 #include <GLES2/gl2ext.h> | 6 #include <GLES2/gl2ext.h> |
7 #include <GLES2/gl2extchromium.h> | 7 #include <GLES2/gl2extchromium.h> |
8 #include <GLES3/gl3.h> | 8 #include <GLES3/gl3.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 glClear(GL_COLOR_BUFFER_BIT); | 180 glClear(GL_COLOR_BUFFER_BIT); |
181 glDrawArrays(GL_TRIANGLES, 0, 6); | 181 glDrawArrays(GL_TRIANGLES, 0, 6); |
182 EXPECT_EQ(static_cast<GLenum>(GL_NO_ERROR), glGetError()); | 182 EXPECT_EQ(static_cast<GLenum>(GL_NO_ERROR), glGetError()); |
183 // Verify. | 183 // Verify. |
184 uint8_t color[4]; | 184 uint8_t color[4]; |
185 BlendEquationFuncAdd<GL_SRC1_COLOR_EXT, GL_SRC_ALPHA, | 185 BlendEquationFuncAdd<GL_SRC1_COLOR_EXT, GL_SRC_ALPHA, |
186 GL_ONE_MINUS_SRC1_COLOR_EXT, | 186 GL_ONE_MINUS_SRC1_COLOR_EXT, |
187 GL_ONE_MINUS_SRC1_ALPHA_EXT>(kDst, kSrc, kSrc1, color); | 187 GL_ONE_MINUS_SRC1_ALPHA_EXT>(kDst, kSrc, kSrc1, color); |
188 | 188 |
189 EXPECT_TRUE(GLTestHelper::CheckPixels(kWidth / 4, (3 * kHeight) / 4, 1, 1, | 189 EXPECT_TRUE(GLTestHelper::CheckPixels(kWidth / 4, (3 * kHeight) / 4, 1, 1, |
190 1, color)); | 190 1, color, nullptr)); |
191 EXPECT_TRUE(GLTestHelper::CheckPixels(kWidth - 1, 0, 1, 1, 1, color)); | 191 EXPECT_TRUE( |
| 192 GLTestHelper::CheckPixels(kWidth - 1, 0, 1, 1, 1, color, nullptr)); |
192 } | 193 } |
193 | 194 |
194 protected: | 195 protected: |
195 GLuint program_; | 196 GLuint program_; |
196 GLuint position_loc_; | 197 GLuint position_loc_; |
197 GLuint src_loc_; | 198 GLuint src_loc_; |
198 GLuint src1_loc_; | 199 GLuint src1_loc_; |
199 GLManager gl_; | 200 GLManager gl_; |
200 }; | 201 }; |
201 | 202 |
(...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
682 | 683 |
683 INSTANTIATE_TEST_CASE_P(TranslatorVariants, | 684 INSTANTIATE_TEST_CASE_P(TranslatorVariants, |
684 EXTBlendFuncExtendedDrawTest, | 685 EXTBlendFuncExtendedDrawTest, |
685 ::testing::Bool()); | 686 ::testing::Bool()); |
686 | 687 |
687 INSTANTIATE_TEST_CASE_P(TranslatorVariants, | 688 INSTANTIATE_TEST_CASE_P(TranslatorVariants, |
688 EXTBlendFuncExtendedES3DrawTest, | 689 EXTBlendFuncExtendedES3DrawTest, |
689 ::testing::Bool()); | 690 ::testing::Bool()); |
690 | 691 |
691 } // namespace gpu | 692 } // namespace gpu |
OLD | NEW |