diff options
author | robertphillips <robertphillips@google.com> | 2016-06-03 10:59:20 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-06-03 10:59:20 -0700 |
commit | 976f5f0dc5e907d1ca50685fad117bd15d7fc87b (patch) | |
tree | e1e1499da0cd5dfb990de560dcc1b6288c26616b /tests | |
parent | adf5afa628adb62a0ad451d07ef1442381a0ee20 (diff) |
Make GrClipMaskManager stateless and push GrPipelineBuilder construction downstack
This will be followed up with a CL to remove the GrRenderTarget from the GrPipelineBuilder.
Split out of:
https://codereview.chromium.org/1988923002/ (Declassify GrClipMaskManager and Remove GrRenderTarget and GrDrawTarget from GrPipelineBuilder)
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2035823002
Review-Url: https://codereview.chromium.org/2035823002
Diffstat (limited to 'tests')
-rw-r--r-- | tests/TessellatingPathRendererTests.cpp | 49 |
1 files changed, 24 insertions, 25 deletions
diff --git a/tests/TessellatingPathRendererTests.cpp b/tests/TessellatingPathRendererTests.cpp index 22779c2fca..6d562ea24d 100644 --- a/tests/TessellatingPathRendererTests.cpp +++ b/tests/TessellatingPathRendererTests.cpp @@ -232,18 +232,18 @@ static SkPath create_path_15() { return path; } -static void test_path(GrDrawTarget* dt, GrDrawContext* drawContext, - GrResourceProvider* rp, const SkPath& path) { +static void test_path(GrDrawContext* drawContext, GrResourceProvider* rp, const SkPath& path) { GrTessellatingPathRenderer tess; - GrPipelineBuilder pipelineBuilder; - pipelineBuilder.setXPFactory( - GrPorterDuffXPFactory::Create(SkXfermode::kSrc_Mode))->unref(); - pipelineBuilder.setRenderTarget(drawContext->accessRenderTarget()); + + GrPaint paint; + paint.setXPFactory(GrPorterDuffXPFactory::Create(SkXfermode::kSrc_Mode))->unref(); + GrNoClip noClip; GrStyle style(SkStrokeRec::kFill_InitStyle); GrPathRenderer::DrawPathArgs args; - args.fTarget = dt; - args.fPipelineBuilder = &pipelineBuilder; + args.fPaint = &paint; + args.fUserStencilSettings = &GrUserStencilSettings::kUnused; + args.fDrawContext = drawContext; args.fClip = &noClip; args.fResourceProvider = rp; args.fColor = GrColor_WHITE; @@ -266,24 +266,23 @@ DEF_GPUTEST_FOR_ALL_CONTEXTS(TessellatingPathRendererTests, reporter, ctxInfo) { GrTestTarget tt; ctxInfo.grContext()->getTestTarget(&tt, drawContext); - GrDrawTarget* dt = tt.target(); GrResourceProvider* rp = tt.resourceProvider(); - test_path(dt, drawContext.get(), rp, create_path_0()); - test_path(dt, drawContext.get(), rp, create_path_1()); - test_path(dt, drawContext.get(), rp, create_path_2()); - test_path(dt, drawContext.get(), rp, create_path_3()); - test_path(dt, drawContext.get(), rp, create_path_4()); - test_path(dt, drawContext.get(), rp, create_path_5()); - test_path(dt, drawContext.get(), rp, create_path_6()); - test_path(dt, drawContext.get(), rp, create_path_7()); - test_path(dt, drawContext.get(), rp, create_path_8()); - test_path(dt, drawContext.get(), rp, create_path_9()); - test_path(dt, drawContext.get(), rp, create_path_10()); - test_path(dt, drawContext.get(), rp, create_path_11()); - test_path(dt, drawContext.get(), rp, create_path_12()); - test_path(dt, drawContext.get(), rp, create_path_13()); - test_path(dt, drawContext.get(), rp, create_path_14()); - test_path(dt, drawContext.get(), rp, create_path_15()); + test_path(drawContext.get(), rp, create_path_0()); + test_path(drawContext.get(), rp, create_path_1()); + test_path(drawContext.get(), rp, create_path_2()); + test_path(drawContext.get(), rp, create_path_3()); + test_path(drawContext.get(), rp, create_path_4()); + test_path(drawContext.get(), rp, create_path_5()); + test_path(drawContext.get(), rp, create_path_6()); + test_path(drawContext.get(), rp, create_path_7()); + test_path(drawContext.get(), rp, create_path_8()); + test_path(drawContext.get(), rp, create_path_9()); + test_path(drawContext.get(), rp, create_path_10()); + test_path(drawContext.get(), rp, create_path_11()); + test_path(drawContext.get(), rp, create_path_12()); + test_path(drawContext.get(), rp, create_path_13()); + test_path(drawContext.get(), rp, create_path_14()); + test_path(drawContext.get(), rp, create_path_15()); } #endif |