Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(232)

Side by Side Diff: gpu/command_buffer/client/gles2_implementation_unittest_autogen.h

Issue 169403005: command_buffer: Implement path rendering functions for CHROMIUM_path_rendering (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@nv-pr-02-texgen
Patch Set: address Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 3100 matching lines...) Expand 10 before | Expand all | Expand 10 after
3111 TEST_F(GLES2ImplementationTest, MatrixLoadIdentityCHROMIUM) { 3111 TEST_F(GLES2ImplementationTest, MatrixLoadIdentityCHROMIUM) {
3112 struct Cmds { 3112 struct Cmds {
3113 cmds::MatrixLoadIdentityCHROMIUM cmd; 3113 cmds::MatrixLoadIdentityCHROMIUM cmd;
3114 }; 3114 };
3115 Cmds expected; 3115 Cmds expected;
3116 expected.cmd.Init(GL_PATH_PROJECTION_CHROMIUM); 3116 expected.cmd.Init(GL_PATH_PROJECTION_CHROMIUM);
3117 3117
3118 gl_->MatrixLoadIdentityCHROMIUM(GL_PATH_PROJECTION_CHROMIUM); 3118 gl_->MatrixLoadIdentityCHROMIUM(GL_PATH_PROJECTION_CHROMIUM);
3119 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); 3119 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
3120 } 3120 }
3121 // TODO(zmo): Implement unit test for GenPathsCHROMIUM
3122
3123 TEST_F(GLES2ImplementationTest, DeletePathsCHROMIUM) {
3124 struct Cmds {
3125 cmds::DeletePathsCHROMIUM cmd;
3126 };
3127 Cmds expected;
3128 expected.cmd.Init(1, 2);
3129
3130 gl_->DeletePathsCHROMIUM(1, 2);
3131 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
3132 }
3133
3134 TEST_F(GLES2ImplementationTest, IsPathCHROMIUM) {
3135 struct Cmds {
3136 cmds::IsPathCHROMIUM cmd;
3137 };
3138
3139 Cmds expected;
3140 ExpectedMemoryInfo result1 =
3141 GetExpectedResultMemory(sizeof(cmds::IsPathCHROMIUM::Result));
3142 expected.cmd.Init(1, result1.id, result1.offset);
3143
3144 EXPECT_CALL(*command_buffer(), OnFlush())
3145 .WillOnce(SetMemory(result1.ptr, uint32_t(GL_TRUE)))
3146 .RetiresOnSaturation();
3147
3148 GLboolean result = gl_->IsPathCHROMIUM(1);
3149 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
3150 EXPECT_TRUE(result);
3151 }
3152 // TODO(zmo): Implement unit test for PathCommandsCHROMIUM
3153
3154 TEST_F(GLES2ImplementationTest, PathParameterfCHROMIUM) {
3155 struct Cmds {
3156 cmds::PathParameterfCHROMIUM cmd;
3157 };
3158 Cmds expected;
3159 expected.cmd.Init(1, GL_PATH_STROKE_WIDTH_CHROMIUM, 3);
3160
3161 gl_->PathParameterfCHROMIUM(1, GL_PATH_STROKE_WIDTH_CHROMIUM, 3);
3162 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
3163 }
3164
3165 TEST_F(GLES2ImplementationTest, PathParameteriCHROMIUM) {
3166 struct Cmds {
3167 cmds::PathParameteriCHROMIUM cmd;
3168 };
3169 Cmds expected;
3170 expected.cmd.Init(1, GL_PATH_STROKE_WIDTH_CHROMIUM, 3);
3171
3172 gl_->PathParameteriCHROMIUM(1, GL_PATH_STROKE_WIDTH_CHROMIUM, 3);
3173 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
3174 }
3175
3176 TEST_F(GLES2ImplementationTest, PathStencilFuncCHROMIUM) {
3177 struct Cmds {
3178 cmds::PathStencilFuncCHROMIUM cmd;
3179 };
3180 Cmds expected;
3181 expected.cmd.Init(GL_NEVER, 2, 3);
3182
3183 gl_->PathStencilFuncCHROMIUM(GL_NEVER, 2, 3);
3184 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
3185 }
3186
3187 TEST_F(GLES2ImplementationTest, StencilFillPathCHROMIUM) {
3188 struct Cmds {
3189 cmds::StencilFillPathCHROMIUM cmd;
3190 };
3191 Cmds expected;
3192 expected.cmd.Init(1, GL_INVERT, 3);
3193
3194 gl_->StencilFillPathCHROMIUM(1, GL_INVERT, 3);
3195 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
3196 }
3197
3198 TEST_F(GLES2ImplementationTest, StencilStrokePathCHROMIUM) {
3199 struct Cmds {
3200 cmds::StencilStrokePathCHROMIUM cmd;
3201 };
3202 Cmds expected;
3203 expected.cmd.Init(1, 2, 3);
3204
3205 gl_->StencilStrokePathCHROMIUM(1, 2, 3);
3206 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
3207 }
3208
3209 TEST_F(GLES2ImplementationTest, CoverFillPathCHROMIUM) {
3210 struct Cmds {
3211 cmds::CoverFillPathCHROMIUM cmd;
3212 };
3213 Cmds expected;
3214 expected.cmd.Init(1, GL_CONVEX_HULL_CHROMIUM);
3215
3216 gl_->CoverFillPathCHROMIUM(1, GL_CONVEX_HULL_CHROMIUM);
3217 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
3218 }
3219
3220 TEST_F(GLES2ImplementationTest, CoverStrokePathCHROMIUM) {
3221 struct Cmds {
3222 cmds::CoverStrokePathCHROMIUM cmd;
3223 };
3224 Cmds expected;
3225 expected.cmd.Init(1, GL_CONVEX_HULL_CHROMIUM);
3226
3227 gl_->CoverStrokePathCHROMIUM(1, GL_CONVEX_HULL_CHROMIUM);
3228 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
3229 }
3230
3231 TEST_F(GLES2ImplementationTest, StencilThenCoverFillPathCHROMIUM) {
3232 struct Cmds {
3233 cmds::StencilThenCoverFillPathCHROMIUM cmd;
3234 };
3235 Cmds expected;
3236 expected.cmd.Init(1, GL_INVERT, 3, GL_CONVEX_HULL_CHROMIUM);
3237
3238 gl_->StencilThenCoverFillPathCHROMIUM(1, GL_INVERT, 3,
3239 GL_CONVEX_HULL_CHROMIUM);
3240 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
3241 }
3242
3243 TEST_F(GLES2ImplementationTest, StencilThenCoverStrokePathCHROMIUM) {
3244 struct Cmds {
3245 cmds::StencilThenCoverStrokePathCHROMIUM cmd;
3246 };
3247 Cmds expected;
3248 expected.cmd.Init(1, 2, 3, GL_CONVEX_HULL_CHROMIUM);
3249
3250 gl_->StencilThenCoverStrokePathCHROMIUM(1, 2, 3, GL_CONVEX_HULL_CHROMIUM);
3251 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
3252 }
3121 #endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_UNITTEST_AUTOGEN_H_ 3253 #endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_UNITTEST_AUTOGEN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698