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

Side by Side Diff: tests/DFPathRendererTest.cpp

Issue 2186073002: Rename GrContext's newDrawContext & drawContext to makeDrawContext (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 4 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 | « tests/ClearTest.cpp ('k') | tests/GLProgramsTest.cpp » ('j') | 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 args.fAntiAlias = true; 56 args.fAntiAlias = true;
57 args.fGammaCorrect = false; 57 args.fGammaCorrect = false;
58 pr->drawPath(args); 58 pr->drawPath(args);
59 } 59 }
60 60
61 DEF_GPUTEST_FOR_ALL_GL_CONTEXTS(AADistanceFieldPathRenderer, reporter, ctxInfo) { 61 DEF_GPUTEST_FOR_ALL_GL_CONTEXTS(AADistanceFieldPathRenderer, reporter, ctxInfo) {
62 // The DF PR only works with contexts that support derivatives 62 // The DF PR only works with contexts that support derivatives
63 if (!ctxInfo.grContext()->caps()->shaderCaps()->shaderDerivativeSupport()) { 63 if (!ctxInfo.grContext()->caps()->shaderCaps()->shaderDerivativeSupport()) {
64 return; 64 return;
65 } 65 }
66 sk_sp<GrDrawContext> drawContext(ctxInfo.grContext()->newDrawContext(SkBacki ngFit::kApprox, 66 sk_sp<GrDrawContext> dc(ctxInfo.grContext()->makeDrawContext(SkBackingFit::k Approx,
67 800, 80 0, 67 800, 800,
68 kSkia88 88_GrPixelConfig, 68 kSkia8888_GrPix elConfig,
69 nullptr , 69 nullptr,
70 0, 70 0,
71 kTopLef t_GrSurfaceOrigin)); 71 kTopLeft_GrSurf aceOrigin));
72 if (!drawContext) { 72 if (!dc) {
73 return; 73 return;
74 } 74 }
75 75
76 GrAADistanceFieldPathRenderer dfpr; 76 GrAADistanceFieldPathRenderer dfpr;
77 GrTestTarget tt; 77 GrTestTarget tt;
78 ctxInfo.grContext()->getTestTarget(&tt, drawContext); 78 ctxInfo.grContext()->getTestTarget(&tt, dc);
79 GrResourceProvider* rp = tt.resourceProvider(); 79 GrResourceProvider* rp = tt.resourceProvider();
80 80
81 test_far_from_origin(drawContext.get(), &dfpr, rp); 81 test_far_from_origin(dc.get(), &dfpr, rp);
82 ctxInfo.grContext()->flush(); 82 ctxInfo.grContext()->flush();
83 } 83 }
84 #endif 84 #endif
OLDNEW
« no previous file with comments | « tests/ClearTest.cpp ('k') | tests/GLProgramsTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698