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

Side by Side Diff: tests/DFPathRendererTest.cpp

Issue 2164363002: Add SkColorSpace to GrDrawContext (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Remove ':' from comment 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 | « 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
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> drawContext(ctxInfo.grContext()->newDrawContext(SkBacki ngFit::kApprox,
67 800, 80 0, 67 800, 80 0,
68 kSkia88 88_GrPixelConfig, 68 kSkia88 88_GrPixelConfig,
69 nullptr ,
69 0, 70 0,
70 kTopLef t_GrSurfaceOrigin)); 71 kTopLef t_GrSurfaceOrigin));
71 if (!drawContext) { 72 if (!drawContext) {
72 return; 73 return;
73 } 74 }
74 75
75 GrAADistanceFieldPathRenderer dfpr; 76 GrAADistanceFieldPathRenderer dfpr;
76 GrTestTarget tt; 77 GrTestTarget tt;
77 ctxInfo.grContext()->getTestTarget(&tt, drawContext); 78 ctxInfo.grContext()->getTestTarget(&tt, drawContext);
78 GrResourceProvider* rp = tt.resourceProvider(); 79 GrResourceProvider* rp = tt.resourceProvider();
79 80
80 test_far_from_origin(drawContext.get(), &dfpr, rp); 81 test_far_from_origin(drawContext.get(), &dfpr, rp);
81 ctxInfo.grContext()->flush(); 82 ctxInfo.grContext()->flush();
82 } 83 }
83 #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