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

Side by Side Diff: tests/DFPathRendererTest.cpp

Issue 2157933003: Initialize fGammaCorrect in DF Path Renderer unit test (Closed) Base URL: https://chromium.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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2016 Google Inc. 2 * Copyright 2016 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 "Test.h" 8 #include "Test.h"
9 9
10 #if SK_SUPPORT_GPU 10 #if SK_SUPPORT_GPU
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 GrNoClip noClip; 44 GrNoClip noClip;
45 GrPathRenderer::DrawPathArgs args; 45 GrPathRenderer::DrawPathArgs args;
46 args.fPaint = &paint; 46 args.fPaint = &paint;
47 args.fUserStencilSettings = &GrUserStencilSettings::kUnused; 47 args.fUserStencilSettings = &GrUserStencilSettings::kUnused;
48 args.fDrawContext = drawContext; 48 args.fDrawContext = drawContext;
49 args.fClip = &noClip; 49 args.fClip = &noClip;
50 args.fResourceProvider = rp; 50 args.fResourceProvider = rp;
51 args.fViewMatrix = &matrix; 51 args.fViewMatrix = &matrix;
52 args.fShape = &shape; 52 args.fShape = &shape;
53 args.fAntiAlias = true; 53 args.fAntiAlias = true;
54 54 args.fGammaCorrect = false;
55 pr->drawPath(args); 55 pr->drawPath(args);
56 } 56 }
57 57
58 DEF_GPUTEST_FOR_ALL_GL_CONTEXTS(AADistanceFieldPathRenderer, reporter, ctxInfo) { 58 DEF_GPUTEST_FOR_ALL_GL_CONTEXTS(AADistanceFieldPathRenderer, reporter, ctxInfo) {
59 // The DF PR only works with contexts that support derivatives 59 // The DF PR only works with contexts that support derivatives
60 if (!ctxInfo.grContext()->caps()->shaderCaps()->shaderDerivativeSupport()) { 60 if (!ctxInfo.grContext()->caps()->shaderCaps()->shaderDerivativeSupport()) {
61 return; 61 return;
62 } 62 }
63 sk_sp<GrDrawContext> drawContext(ctxInfo.grContext()->newDrawContext(SkBacki ngFit::kApprox, 63 sk_sp<GrDrawContext> drawContext(ctxInfo.grContext()->newDrawContext(SkBacki ngFit::kApprox,
64 800, 80 0, 64 800, 80 0,
65 kSkia88 88_GrPixelConfig, 65 kSkia88 88_GrPixelConfig,
66 0, 66 0,
67 kTopLef t_GrSurfaceOrigin)); 67 kTopLef t_GrSurfaceOrigin));
68 if (!drawContext) { 68 if (!drawContext) {
69 return; 69 return;
70 } 70 }
71 71
72 GrAADistanceFieldPathRenderer dfpr; 72 GrAADistanceFieldPathRenderer dfpr;
73 GrTestTarget tt; 73 GrTestTarget tt;
74 ctxInfo.grContext()->getTestTarget(&tt, drawContext); 74 ctxInfo.grContext()->getTestTarget(&tt, drawContext);
75 GrResourceProvider* rp = tt.resourceProvider(); 75 GrResourceProvider* rp = tt.resourceProvider();
76 76
77 test_far_from_origin(drawContext.get(), &dfpr, rp); 77 test_far_from_origin(drawContext.get(), &dfpr, rp);
78 ctxInfo.grContext()->flush(); 78 ctxInfo.grContext()->flush();
79 } 79 }
80 #endif 80 #endif
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698