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

Unified Diff: tests/TessellatingPathRendererTests.cpp

Issue 1265763002: Args structs to GrPathRenderer functions (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: more Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/GrTest.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/TessellatingPathRendererTests.cpp
diff --git a/tests/TessellatingPathRendererTests.cpp b/tests/TessellatingPathRendererTests.cpp
index bc2d0d1452cf7ccd6221003f3c0fc8c28bc4dfec..d6d33307e1cff4264fa50101f276a7751c08de6c 100644
--- a/tests/TessellatingPathRendererTests.cpp
+++ b/tests/TessellatingPathRendererTests.cpp
@@ -232,12 +232,22 @@ static SkPath create_path_15() {
return path;
}
-static void test_path(GrDrawTarget* dt, GrRenderTarget* rt, const SkPath& path) {
+static void test_path(GrDrawTarget* dt, GrRenderTarget* rt, GrResourceProvider* rp,
+ const SkPath& path) {
GrTessellatingPathRenderer tess;
GrPipelineBuilder pipelineBuilder;
pipelineBuilder.setRenderTarget(rt);
GrStrokeInfo stroke(SkStrokeRec::kFill_InitStyle);
- tess.drawPath(dt, &pipelineBuilder, SK_ColorWHITE, SkMatrix::I(), path, stroke, false);
+ GrPathRenderer::DrawPathArgs args;
+ args.fTarget = dt;
+ args.fPipelineBuilder = &pipelineBuilder;
+ args.fResourceProvider = rp;
+ args.fColor = GrColor_WHITE;
+ args.fViewMatrix = &SkMatrix::I();
+ args.fPath = &path;
+ args.fStroke = &stroke;
+ args.fAntiAlias = false;
+ tess.drawPath(args);
}
DEF_GPUTEST(TessellatingPathRendererTests, reporter, factory) {
@@ -257,22 +267,23 @@ DEF_GPUTEST(TessellatingPathRendererTests, reporter, factory) {
context->getTestTarget(&tt);
GrRenderTarget* rt = texture->asRenderTarget();
GrDrawTarget* dt = tt.target();
+ GrResourceProvider* rp = tt.resourceProvider();
- test_path(dt, rt, create_path_0());
- test_path(dt, rt, create_path_1());
- test_path(dt, rt, create_path_2());
- test_path(dt, rt, create_path_3());
- test_path(dt, rt, create_path_4());
- test_path(dt, rt, create_path_5());
- test_path(dt, rt, create_path_6());
- test_path(dt, rt, create_path_7());
- test_path(dt, rt, create_path_8());
- test_path(dt, rt, create_path_9());
- test_path(dt, rt, create_path_10());
- test_path(dt, rt, create_path_11());
- test_path(dt, rt, create_path_12());
- test_path(dt, rt, create_path_13());
- test_path(dt, rt, create_path_14());
- test_path(dt, rt, create_path_15());
+ test_path(dt, rt, rp, create_path_0());
+ test_path(dt, rt, rp, create_path_1());
+ test_path(dt, rt, rp, create_path_2());
+ test_path(dt, rt, rp, create_path_3());
+ test_path(dt, rt, rp, create_path_4());
+ test_path(dt, rt, rp, create_path_5());
+ test_path(dt, rt, rp, create_path_6());
+ test_path(dt, rt, rp, create_path_7());
+ test_path(dt, rt, rp, create_path_8());
+ test_path(dt, rt, rp, create_path_9());
+ test_path(dt, rt, rp, create_path_10());
+ test_path(dt, rt, rp, create_path_11());
+ test_path(dt, rt, rp, create_path_12());
+ test_path(dt, rt, rp, create_path_13());
+ test_path(dt, rt, rp, create_path_14());
+ test_path(dt, rt, rp, create_path_15());
}
#endif
« no previous file with comments | « src/gpu/GrTest.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698