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 "GrTessellatingPathRenderer.h" | 8 #include "GrTessellatingPathRenderer.h" |
9 | 9 |
10 #include "GrAuditTrail.h" | 10 #include "GrAuditTrail.h" |
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
290 SkRect clipBounds = SkRect::Make(clipBoundsI); | 290 SkRect clipBounds = SkRect::Make(clipBoundsI); |
291 SkMatrix vmi; | 291 SkMatrix vmi; |
292 if (!args.fViewMatrix->invert(&vmi)) { | 292 if (!args.fViewMatrix->invert(&vmi)) { |
293 return false; | 293 return false; |
294 } | 294 } |
295 vmi.mapRect(&clipBounds); | 295 vmi.mapRect(&clipBounds); |
296 SkAutoTUnref<GrDrawBatch> batch(TessellatingPathBatch::Create(args.fColor, *
args.fPath, | 296 SkAutoTUnref<GrDrawBatch> batch(TessellatingPathBatch::Create(args.fColor, *
args.fPath, |
297 *args.fStyle,
*args.fViewMatrix, | 297 *args.fStyle,
*args.fViewMatrix, |
298 clipBounds)); | 298 clipBounds)); |
299 | 299 |
300 GrPipelineBuilder pipelineBuilder(*args.fPaint, args.fDrawContext->isUnified
Multisampled()); | 300 GrPipelineBuilder pipelineBuilder(*args.fPaint, args.fDrawContext->mustUseHW
AA(*args.fPaint)); |
301 pipelineBuilder.setUserStencil(args.fUserStencilSettings); | 301 pipelineBuilder.setUserStencil(args.fUserStencilSettings); |
302 | 302 |
303 args.fDrawContext->drawBatch(pipelineBuilder, *args.fClip, batch); | 303 args.fDrawContext->drawBatch(pipelineBuilder, *args.fClip, batch); |
304 | 304 |
305 return true; | 305 return true; |
306 } | 306 } |
307 | 307 |
308 ////////////////////////////////////////////////////////////////////////////////
/////////////////// | 308 ////////////////////////////////////////////////////////////////////////////////
/////////////////// |
309 | 309 |
310 #ifdef GR_TEST_UTILS | 310 #ifdef GR_TEST_UTILS |
(...skipping 10 matching lines...) Expand all Loading... |
321 } | 321 } |
322 vmi.mapRect(&clipBounds); | 322 vmi.mapRect(&clipBounds); |
323 GrStyle style; | 323 GrStyle style; |
324 do { | 324 do { |
325 GrTest::TestStyle(random, &style); | 325 GrTest::TestStyle(random, &style); |
326 } while (style.strokeRec().isHairlineStyle()); | 326 } while (style.strokeRec().isHairlineStyle()); |
327 return TessellatingPathBatch::Create(color, path, style, viewMatrix, clipBou
nds); | 327 return TessellatingPathBatch::Create(color, path, style, viewMatrix, clipBou
nds); |
328 } | 328 } |
329 | 329 |
330 #endif | 330 #endif |
OLD | NEW |