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

Side by Side Diff: tests/TessellatingPathRendererTests.cpp

Issue 1100073003: Extract gpu line dashing to GrDashLinePathRenderer (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: address review comments Created 5 years, 7 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 | « src/gpu/effects/GrDashingEffect.cpp ('k') | 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 2015 Google Inc. 2 * Copyright 2015 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 "SkPath.h" 8 #include "SkPath.h"
9 9
10 #if SK_SUPPORT_GPU 10 #if SK_SUPPORT_GPU
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 path.lineTo( 0.0f, -1.0f); 229 path.lineTo( 0.0f, -1.0f);
230 path.lineTo(10000.0f, 0.000001f); 230 path.lineTo(10000.0f, 0.000001f);
231 path.lineTo( 0.0f, -30.0f); 231 path.lineTo( 0.0f, -30.0f);
232 return path; 232 return path;
233 } 233 }
234 234
235 static void test_path(GrDrawTarget* dt, GrRenderTarget* rt, const SkPath& path) { 235 static void test_path(GrDrawTarget* dt, GrRenderTarget* rt, const SkPath& path) {
236 GrTessellatingPathRenderer tess; 236 GrTessellatingPathRenderer tess;
237 GrPipelineBuilder pipelineBuilder; 237 GrPipelineBuilder pipelineBuilder;
238 pipelineBuilder.setRenderTarget(rt); 238 pipelineBuilder.setRenderTarget(rt);
239 SkStrokeRec stroke(SkStrokeRec::kFill_InitStyle); 239 GrStrokeInfo stroke(SkStrokeRec::kFill_InitStyle);
240 tess.drawPath(dt, &pipelineBuilder, SK_ColorWHITE, SkMatrix::I(), path, stro ke, false); 240 tess.drawPath(dt, &pipelineBuilder, SK_ColorWHITE, SkMatrix::I(), path, stro ke, false);
241 } 241 }
242 242
243 DEF_GPUTEST(TessellatingPathRendererTests, reporter, factory) { 243 DEF_GPUTEST(TessellatingPathRendererTests, reporter, factory) {
244 GrContext* context = factory->get(static_cast<GrContextFactory::GLContextTyp e>(0)); 244 GrContext* context = factory->get(static_cast<GrContextFactory::GLContextTyp e>(0));
245 if (NULL == context) { 245 if (NULL == context) {
246 return; 246 return;
247 } 247 }
248 GrSurfaceDesc desc; 248 GrSurfaceDesc desc;
249 desc.fFlags = kRenderTarget_GrSurfaceFlag; 249 desc.fFlags = kRenderTarget_GrSurfaceFlag;
(...skipping 20 matching lines...) Expand all
270 test_path(dt, rt, create_path_8()); 270 test_path(dt, rt, create_path_8());
271 test_path(dt, rt, create_path_9()); 271 test_path(dt, rt, create_path_9());
272 test_path(dt, rt, create_path_10()); 272 test_path(dt, rt, create_path_10());
273 test_path(dt, rt, create_path_11()); 273 test_path(dt, rt, create_path_11());
274 test_path(dt, rt, create_path_12()); 274 test_path(dt, rt, create_path_12());
275 test_path(dt, rt, create_path_13()); 275 test_path(dt, rt, create_path_13());
276 test_path(dt, rt, create_path_14()); 276 test_path(dt, rt, create_path_14());
277 test_path(dt, rt, create_path_15()); 277 test_path(dt, rt, create_path_15());
278 } 278 }
279 #endif 279 #endif
OLDNEW
« no previous file with comments | « src/gpu/effects/GrDashingEffect.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698