OLD | NEW |
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 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
239 paint.setXPFactory(GrPorterDuffXPFactory::Make(SkXfermode::kSrc_Mode)); | 239 paint.setXPFactory(GrPorterDuffXPFactory::Make(SkXfermode::kSrc_Mode)); |
240 | 240 |
241 GrNoClip noClip; | 241 GrNoClip noClip; |
242 GrStyle style(SkStrokeRec::kFill_InitStyle); | 242 GrStyle style(SkStrokeRec::kFill_InitStyle); |
243 GrPathRenderer::DrawPathArgs args; | 243 GrPathRenderer::DrawPathArgs args; |
244 args.fPaint = &paint; | 244 args.fPaint = &paint; |
245 args.fUserStencilSettings = &GrUserStencilSettings::kUnused; | 245 args.fUserStencilSettings = &GrUserStencilSettings::kUnused; |
246 args.fDrawContext = drawContext; | 246 args.fDrawContext = drawContext; |
247 args.fClip = &noClip; | 247 args.fClip = &noClip; |
248 args.fResourceProvider = rp; | 248 args.fResourceProvider = rp; |
249 args.fColor = GrColor_WHITE; | |
250 args.fViewMatrix = &SkMatrix::I(); | 249 args.fViewMatrix = &SkMatrix::I(); |
251 GrShape shape(path, style); | 250 GrShape shape(path, style); |
252 args.fShape = &shape; | 251 args.fShape = &shape; |
253 args.fAntiAlias = false; | 252 args.fAntiAlias = false; |
254 tess.drawPath(args); | 253 tess.drawPath(args); |
255 } | 254 } |
256 | 255 |
257 DEF_GPUTEST_FOR_ALL_CONTEXTS(TessellatingPathRendererTests, reporter, ctxInfo) { | 256 DEF_GPUTEST_FOR_ALL_CONTEXTS(TessellatingPathRendererTests, reporter, ctxInfo) { |
258 sk_sp<GrDrawContext> drawContext(ctxInfo.grContext()->newDrawContext(SkBacki
ngFit::kApprox, | 257 sk_sp<GrDrawContext> drawContext(ctxInfo.grContext()->newDrawContext(SkBacki
ngFit::kApprox, |
259 800, 80
0, | 258 800, 80
0, |
(...skipping 19 matching lines...) Expand all Loading... |
279 test_path(drawContext.get(), rp, create_path_8()); | 278 test_path(drawContext.get(), rp, create_path_8()); |
280 test_path(drawContext.get(), rp, create_path_9()); | 279 test_path(drawContext.get(), rp, create_path_9()); |
281 test_path(drawContext.get(), rp, create_path_10()); | 280 test_path(drawContext.get(), rp, create_path_10()); |
282 test_path(drawContext.get(), rp, create_path_11()); | 281 test_path(drawContext.get(), rp, create_path_11()); |
283 test_path(drawContext.get(), rp, create_path_12()); | 282 test_path(drawContext.get(), rp, create_path_12()); |
284 test_path(drawContext.get(), rp, create_path_13()); | 283 test_path(drawContext.get(), rp, create_path_13()); |
285 test_path(drawContext.get(), rp, create_path_14()); | 284 test_path(drawContext.get(), rp, create_path_14()); |
286 test_path(drawContext.get(), rp, create_path_15()); | 285 test_path(drawContext.get(), rp, create_path_15()); |
287 } | 286 } |
288 #endif | 287 #endif |
OLD | NEW |