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 3089 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3100 TEST_F(GLES2ImplementationTest, MatrixLoadIdentityCHROMIUM) { | 3100 TEST_F(GLES2ImplementationTest, MatrixLoadIdentityCHROMIUM) { |
3101 struct Cmds { | 3101 struct Cmds { |
3102 cmds::MatrixLoadIdentityCHROMIUM cmd; | 3102 cmds::MatrixLoadIdentityCHROMIUM cmd; |
3103 }; | 3103 }; |
3104 Cmds expected; | 3104 Cmds expected; |
3105 expected.cmd.Init(GL_PATH_PROJECTION_CHROMIUM); | 3105 expected.cmd.Init(GL_PATH_PROJECTION_CHROMIUM); |
3106 | 3106 |
3107 gl_->MatrixLoadIdentityCHROMIUM(GL_PATH_PROJECTION_CHROMIUM); | 3107 gl_->MatrixLoadIdentityCHROMIUM(GL_PATH_PROJECTION_CHROMIUM); |
3108 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); | 3108 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); |
3109 } | 3109 } |
| 3110 // TODO(zmo): Implement unit test for GenPathsCHROMIUM |
| 3111 |
| 3112 TEST_F(GLES2ImplementationTest, DeletePathsCHROMIUM) { |
| 3113 struct Cmds { |
| 3114 cmds::DeletePathsCHROMIUM cmd; |
| 3115 }; |
| 3116 Cmds expected; |
| 3117 expected.cmd.Init(1, 2); |
| 3118 |
| 3119 gl_->DeletePathsCHROMIUM(1, 2); |
| 3120 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); |
| 3121 } |
| 3122 |
| 3123 TEST_F(GLES2ImplementationTest, IsPathCHROMIUM) { |
| 3124 struct Cmds { |
| 3125 cmds::IsPathCHROMIUM cmd; |
| 3126 }; |
| 3127 |
| 3128 Cmds expected; |
| 3129 ExpectedMemoryInfo result1 = |
| 3130 GetExpectedResultMemory(sizeof(cmds::IsPathCHROMIUM::Result)); |
| 3131 expected.cmd.Init(1, result1.id, result1.offset); |
| 3132 |
| 3133 EXPECT_CALL(*command_buffer(), OnFlush()) |
| 3134 .WillOnce(SetMemory(result1.ptr, uint32_t(GL_TRUE))) |
| 3135 .RetiresOnSaturation(); |
| 3136 |
| 3137 GLboolean result = gl_->IsPathCHROMIUM(1); |
| 3138 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); |
| 3139 EXPECT_TRUE(result); |
| 3140 } |
| 3141 // TODO(zmo): Implement unit test for PathCommandsCHROMIUM |
| 3142 |
| 3143 TEST_F(GLES2ImplementationTest, PathParameterfCHROMIUM) { |
| 3144 struct Cmds { |
| 3145 cmds::PathParameterfCHROMIUM cmd; |
| 3146 }; |
| 3147 Cmds expected; |
| 3148 expected.cmd.Init(1, GL_PATH_STROKE_WIDTH_CHROMIUM, 3); |
| 3149 |
| 3150 gl_->PathParameterfCHROMIUM(1, GL_PATH_STROKE_WIDTH_CHROMIUM, 3); |
| 3151 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); |
| 3152 } |
| 3153 |
| 3154 TEST_F(GLES2ImplementationTest, PathParameteriCHROMIUM) { |
| 3155 struct Cmds { |
| 3156 cmds::PathParameteriCHROMIUM cmd; |
| 3157 }; |
| 3158 Cmds expected; |
| 3159 expected.cmd.Init(1, GL_PATH_STROKE_WIDTH_CHROMIUM, 3); |
| 3160 |
| 3161 gl_->PathParameteriCHROMIUM(1, GL_PATH_STROKE_WIDTH_CHROMIUM, 3); |
| 3162 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); |
| 3163 } |
| 3164 |
| 3165 TEST_F(GLES2ImplementationTest, PathStencilFuncCHROMIUM) { |
| 3166 struct Cmds { |
| 3167 cmds::PathStencilFuncCHROMIUM cmd; |
| 3168 }; |
| 3169 Cmds expected; |
| 3170 expected.cmd.Init(GL_NEVER, 2, 3); |
| 3171 |
| 3172 gl_->PathStencilFuncCHROMIUM(GL_NEVER, 2, 3); |
| 3173 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); |
| 3174 } |
| 3175 |
| 3176 TEST_F(GLES2ImplementationTest, StencilFillPathCHROMIUM) { |
| 3177 struct Cmds { |
| 3178 cmds::StencilFillPathCHROMIUM cmd; |
| 3179 }; |
| 3180 Cmds expected; |
| 3181 expected.cmd.Init(1, GL_INVERT, 3); |
| 3182 |
| 3183 gl_->StencilFillPathCHROMIUM(1, GL_INVERT, 3); |
| 3184 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); |
| 3185 } |
| 3186 |
| 3187 TEST_F(GLES2ImplementationTest, StencilStrokePathCHROMIUM) { |
| 3188 struct Cmds { |
| 3189 cmds::StencilStrokePathCHROMIUM cmd; |
| 3190 }; |
| 3191 Cmds expected; |
| 3192 expected.cmd.Init(1, 2, 3); |
| 3193 |
| 3194 gl_->StencilStrokePathCHROMIUM(1, 2, 3); |
| 3195 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); |
| 3196 } |
| 3197 |
| 3198 TEST_F(GLES2ImplementationTest, CoverFillPathCHROMIUM) { |
| 3199 struct Cmds { |
| 3200 cmds::CoverFillPathCHROMIUM cmd; |
| 3201 }; |
| 3202 Cmds expected; |
| 3203 expected.cmd.Init(1, GL_CONVEX_HULL_CHROMIUM); |
| 3204 |
| 3205 gl_->CoverFillPathCHROMIUM(1, GL_CONVEX_HULL_CHROMIUM); |
| 3206 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); |
| 3207 } |
| 3208 |
| 3209 TEST_F(GLES2ImplementationTest, CoverStrokePathCHROMIUM) { |
| 3210 struct Cmds { |
| 3211 cmds::CoverStrokePathCHROMIUM cmd; |
| 3212 }; |
| 3213 Cmds expected; |
| 3214 expected.cmd.Init(1, GL_CONVEX_HULL_CHROMIUM); |
| 3215 |
| 3216 gl_->CoverStrokePathCHROMIUM(1, GL_CONVEX_HULL_CHROMIUM); |
| 3217 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); |
| 3218 } |
| 3219 |
| 3220 TEST_F(GLES2ImplementationTest, StencilThenCoverFillPathCHROMIUM) { |
| 3221 struct Cmds { |
| 3222 cmds::StencilThenCoverFillPathCHROMIUM cmd; |
| 3223 }; |
| 3224 Cmds expected; |
| 3225 expected.cmd.Init(1, GL_INVERT, 3, GL_CONVEX_HULL_CHROMIUM); |
| 3226 |
| 3227 gl_->StencilThenCoverFillPathCHROMIUM(1, GL_INVERT, 3, |
| 3228 GL_CONVEX_HULL_CHROMIUM); |
| 3229 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); |
| 3230 } |
| 3231 |
| 3232 TEST_F(GLES2ImplementationTest, StencilThenCoverStrokePathCHROMIUM) { |
| 3233 struct Cmds { |
| 3234 cmds::StencilThenCoverStrokePathCHROMIUM cmd; |
| 3235 }; |
| 3236 Cmds expected; |
| 3237 expected.cmd.Init(1, 2, 3, GL_CONVEX_HULL_CHROMIUM); |
| 3238 |
| 3239 gl_->StencilThenCoverStrokePathCHROMIUM(1, 2, 3, GL_CONVEX_HULL_CHROMIUM); |
| 3240 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); |
| 3241 } |
3110 #endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_UNITTEST_AUTOGEN_H_ | 3242 #endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_UNITTEST_AUTOGEN_H_ |
OLD | NEW |