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

Side by Side Diff: tests/TessellatingPathRendererTests.cpp

Issue 2126083002: Remove fColor from PathRenderer DrawPathArgs struct (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 5 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 /* 1 /*
2 * Copyright 2015 Google Inc. 2 * Copyright 2015 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "SkPath.h" 8 #include "SkPath.h"
9 9
10 #if SK_SUPPORT_GPU 10 #if SK_SUPPORT_GPU
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 path.lineTo( 0.0f, -1.0f); 229 path.lineTo( 0.0f, -1.0f);
230 path.lineTo(10000.0f, 0.000001f); 230 path.lineTo(10000.0f, 0.000001f);
231 path.lineTo( 0.0f, -30.0f); 231 path.lineTo( 0.0f, -30.0f);
232 return path; 232 return path;
233 } 233 }
234 234
235 static void test_path(GrDrawContext* drawContext, GrResourceProvider* rp, const SkPath& path) { 235 static void test_path(GrDrawContext* drawContext, GrResourceProvider* rp, const SkPath& path) {
236 GrTessellatingPathRenderer tess; 236 GrTessellatingPathRenderer tess;
237 237
238 GrPaint paint; 238 GrPaint paint;
239 paint.setColor4f(GrColor4f(1.0f, 1.0f, 1.0f, 1.0f));
239 paint.setXPFactory(GrPorterDuffXPFactory::Make(SkXfermode::kSrc_Mode)); 240 paint.setXPFactory(GrPorterDuffXPFactory::Make(SkXfermode::kSrc_Mode));
240 241
241 GrNoClip noClip; 242 GrNoClip noClip;
242 GrStyle style(SkStrokeRec::kFill_InitStyle); 243 GrStyle style(SkStrokeRec::kFill_InitStyle);
243 GrPathRenderer::DrawPathArgs args; 244 GrPathRenderer::DrawPathArgs args;
244 args.fPaint = &paint; 245 args.fPaint = &paint;
245 args.fUserStencilSettings = &GrUserStencilSettings::kUnused; 246 args.fUserStencilSettings = &GrUserStencilSettings::kUnused;
246 args.fDrawContext = drawContext; 247 args.fDrawContext = drawContext;
247 args.fClip = &noClip; 248 args.fClip = &noClip;
248 args.fResourceProvider = rp; 249 args.fResourceProvider = rp;
249 args.fColor = GrColor_WHITE;
250 args.fViewMatrix = &SkMatrix::I(); 250 args.fViewMatrix = &SkMatrix::I();
251 GrShape shape(path, style); 251 GrShape shape(path, style);
252 args.fShape = &shape; 252 args.fShape = &shape;
253 args.fAntiAlias = false; 253 args.fAntiAlias = false;
254 tess.drawPath(args); 254 tess.drawPath(args);
255 } 255 }
256 256
257 DEF_GPUTEST_FOR_ALL_CONTEXTS(TessellatingPathRendererTests, reporter, ctxInfo) { 257 DEF_GPUTEST_FOR_ALL_CONTEXTS(TessellatingPathRendererTests, reporter, ctxInfo) {
258 sk_sp<GrDrawContext> drawContext(ctxInfo.grContext()->newDrawContext(SkBacki ngFit::kApprox, 258 sk_sp<GrDrawContext> drawContext(ctxInfo.grContext()->newDrawContext(SkBacki ngFit::kApprox,
259 800, 80 0, 259 800, 80 0,
(...skipping 19 matching lines...) Expand all
279 test_path(drawContext.get(), rp, create_path_8()); 279 test_path(drawContext.get(), rp, create_path_8());
280 test_path(drawContext.get(), rp, create_path_9()); 280 test_path(drawContext.get(), rp, create_path_9());
281 test_path(drawContext.get(), rp, create_path_10()); 281 test_path(drawContext.get(), rp, create_path_10());
282 test_path(drawContext.get(), rp, create_path_11()); 282 test_path(drawContext.get(), rp, create_path_11());
283 test_path(drawContext.get(), rp, create_path_12()); 283 test_path(drawContext.get(), rp, create_path_12());
284 test_path(drawContext.get(), rp, create_path_13()); 284 test_path(drawContext.get(), rp, create_path_13());
285 test_path(drawContext.get(), rp, create_path_14()); 285 test_path(drawContext.get(), rp, create_path_14());
286 test_path(drawContext.get(), rp, create_path_15()); 286 test_path(drawContext.get(), rp, create_path_15());
287 } 287 }
288 #endif 288 #endif
OLDNEW
« src/gpu/GrClipMaskManager.cpp ('K') | « src/gpu/batches/GrTessellatingPathRenderer.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698