OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 // This file is auto-generated from | 5 // This file is auto-generated from |
6 // gpu/command_buffer/build_gles2_cmd_buffer.py | 6 // gpu/command_buffer/build_gles2_cmd_buffer.py |
7 // It's formatted by clang-format using chromium coding style: | 7 // It's formatted by clang-format using chromium coding style: |
8 // clang-format -i -style=chromium filename | 8 // clang-format -i -style=chromium filename |
9 // DO NOT EDIT! | 9 // DO NOT EDIT! |
10 | 10 |
(...skipping 3101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3112 TEST_F(GLES2ImplementationTest, MatrixLoadIdentityCHROMIUM) { | 3112 TEST_F(GLES2ImplementationTest, MatrixLoadIdentityCHROMIUM) { |
3113 struct Cmds { | 3113 struct Cmds { |
3114 cmds::MatrixLoadIdentityCHROMIUM cmd; | 3114 cmds::MatrixLoadIdentityCHROMIUM cmd; |
3115 }; | 3115 }; |
3116 Cmds expected; | 3116 Cmds expected; |
3117 expected.cmd.Init(GL_PATH_PROJECTION_CHROMIUM); | 3117 expected.cmd.Init(GL_PATH_PROJECTION_CHROMIUM); |
3118 | 3118 |
3119 gl_->MatrixLoadIdentityCHROMIUM(GL_PATH_PROJECTION_CHROMIUM); | 3119 gl_->MatrixLoadIdentityCHROMIUM(GL_PATH_PROJECTION_CHROMIUM); |
3120 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); | 3120 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); |
3121 } | 3121 } |
| 3122 // TODO(zmo): Implement unit test for GenPathsCHROMIUM |
| 3123 |
| 3124 TEST_F(GLES2ImplementationTest, DeletePathsCHROMIUM) { |
| 3125 struct Cmds { |
| 3126 cmds::DeletePathsCHROMIUM cmd; |
| 3127 }; |
| 3128 Cmds expected; |
| 3129 expected.cmd.Init(1, 2); |
| 3130 |
| 3131 gl_->DeletePathsCHROMIUM(1, 2); |
| 3132 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); |
| 3133 } |
| 3134 |
| 3135 TEST_F(GLES2ImplementationTest, IsPathCHROMIUM) { |
| 3136 struct Cmds { |
| 3137 cmds::IsPathCHROMIUM cmd; |
| 3138 }; |
| 3139 |
| 3140 Cmds expected; |
| 3141 ExpectedMemoryInfo result1 = |
| 3142 GetExpectedResultMemory(sizeof(cmds::IsPathCHROMIUM::Result)); |
| 3143 expected.cmd.Init(1, result1.id, result1.offset); |
| 3144 |
| 3145 EXPECT_CALL(*command_buffer(), OnFlush()) |
| 3146 .WillOnce(SetMemory(result1.ptr, uint32_t(GL_TRUE))) |
| 3147 .RetiresOnSaturation(); |
| 3148 |
| 3149 GLboolean result = gl_->IsPathCHROMIUM(1); |
| 3150 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); |
| 3151 EXPECT_TRUE(result); |
| 3152 } |
| 3153 // TODO(zmo): Implement unit test for PathCommandsCHROMIUM |
| 3154 |
| 3155 TEST_F(GLES2ImplementationTest, PathParameterfCHROMIUM) { |
| 3156 struct Cmds { |
| 3157 cmds::PathParameterfCHROMIUM cmd; |
| 3158 }; |
| 3159 Cmds expected; |
| 3160 expected.cmd.Init(1, GL_PATH_STROKE_WIDTH_CHROMIUM, 3); |
| 3161 |
| 3162 gl_->PathParameterfCHROMIUM(1, GL_PATH_STROKE_WIDTH_CHROMIUM, 3); |
| 3163 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); |
| 3164 } |
| 3165 |
| 3166 TEST_F(GLES2ImplementationTest, PathParameteriCHROMIUM) { |
| 3167 struct Cmds { |
| 3168 cmds::PathParameteriCHROMIUM cmd; |
| 3169 }; |
| 3170 Cmds expected; |
| 3171 expected.cmd.Init(1, GL_PATH_STROKE_WIDTH_CHROMIUM, 3); |
| 3172 |
| 3173 gl_->PathParameteriCHROMIUM(1, GL_PATH_STROKE_WIDTH_CHROMIUM, 3); |
| 3174 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); |
| 3175 } |
| 3176 |
| 3177 TEST_F(GLES2ImplementationTest, PathStencilFuncCHROMIUM) { |
| 3178 struct Cmds { |
| 3179 cmds::PathStencilFuncCHROMIUM cmd; |
| 3180 }; |
| 3181 Cmds expected; |
| 3182 expected.cmd.Init(GL_NEVER, 2, 3); |
| 3183 |
| 3184 gl_->PathStencilFuncCHROMIUM(GL_NEVER, 2, 3); |
| 3185 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); |
| 3186 } |
| 3187 |
| 3188 TEST_F(GLES2ImplementationTest, StencilFillPathCHROMIUM) { |
| 3189 struct Cmds { |
| 3190 cmds::StencilFillPathCHROMIUM cmd; |
| 3191 }; |
| 3192 Cmds expected; |
| 3193 expected.cmd.Init(1, GL_INVERT, 3); |
| 3194 |
| 3195 gl_->StencilFillPathCHROMIUM(1, GL_INVERT, 3); |
| 3196 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); |
| 3197 } |
| 3198 |
| 3199 TEST_F(GLES2ImplementationTest, StencilStrokePathCHROMIUM) { |
| 3200 struct Cmds { |
| 3201 cmds::StencilStrokePathCHROMIUM cmd; |
| 3202 }; |
| 3203 Cmds expected; |
| 3204 expected.cmd.Init(1, 2, 3); |
| 3205 |
| 3206 gl_->StencilStrokePathCHROMIUM(1, 2, 3); |
| 3207 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); |
| 3208 } |
| 3209 |
| 3210 TEST_F(GLES2ImplementationTest, CoverFillPathCHROMIUM) { |
| 3211 struct Cmds { |
| 3212 cmds::CoverFillPathCHROMIUM cmd; |
| 3213 }; |
| 3214 Cmds expected; |
| 3215 expected.cmd.Init(1, GL_CONVEX_HULL_CHROMIUM); |
| 3216 |
| 3217 gl_->CoverFillPathCHROMIUM(1, GL_CONVEX_HULL_CHROMIUM); |
| 3218 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); |
| 3219 } |
| 3220 |
| 3221 TEST_F(GLES2ImplementationTest, CoverStrokePathCHROMIUM) { |
| 3222 struct Cmds { |
| 3223 cmds::CoverStrokePathCHROMIUM cmd; |
| 3224 }; |
| 3225 Cmds expected; |
| 3226 expected.cmd.Init(1, GL_CONVEX_HULL_CHROMIUM); |
| 3227 |
| 3228 gl_->CoverStrokePathCHROMIUM(1, GL_CONVEX_HULL_CHROMIUM); |
| 3229 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); |
| 3230 } |
| 3231 |
| 3232 TEST_F(GLES2ImplementationTest, StencilThenCoverFillPathCHROMIUM) { |
| 3233 struct Cmds { |
| 3234 cmds::StencilThenCoverFillPathCHROMIUM cmd; |
| 3235 }; |
| 3236 Cmds expected; |
| 3237 expected.cmd.Init(1, GL_INVERT, 3, GL_CONVEX_HULL_CHROMIUM); |
| 3238 |
| 3239 gl_->StencilThenCoverFillPathCHROMIUM(1, GL_INVERT, 3, |
| 3240 GL_CONVEX_HULL_CHROMIUM); |
| 3241 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); |
| 3242 } |
| 3243 |
| 3244 TEST_F(GLES2ImplementationTest, StencilThenCoverStrokePathCHROMIUM) { |
| 3245 struct Cmds { |
| 3246 cmds::StencilThenCoverStrokePathCHROMIUM cmd; |
| 3247 }; |
| 3248 Cmds expected; |
| 3249 expected.cmd.Init(1, 2, 3, GL_CONVEX_HULL_CHROMIUM); |
| 3250 |
| 3251 gl_->StencilThenCoverStrokePathCHROMIUM(1, 2, 3, GL_CONVEX_HULL_CHROMIUM); |
| 3252 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); |
| 3253 } |
3122 #endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_UNITTEST_AUTOGEN_H_ | 3254 #endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_UNITTEST_AUTOGEN_H_ |
OLD | NEW |