OLD | NEW |
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...) Loading... |
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...) Loading... |
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 |
OLD | NEW |