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 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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->isUnified
Multisampled()); |
301 pipelineBuilder.setRenderTarget(args.fDrawContext->accessRenderTarget()); | |
302 pipelineBuilder.setUserStencil(args.fUserStencilSettings); | 301 pipelineBuilder.setUserStencil(args.fUserStencilSettings); |
303 | 302 |
304 args.fDrawContext->drawBatch(pipelineBuilder, *args.fClip, batch); | 303 args.fDrawContext->drawBatch(pipelineBuilder, *args.fClip, batch); |
305 | 304 |
306 return true; | 305 return true; |
307 } | 306 } |
308 | 307 |
309 ////////////////////////////////////////////////////////////////////////////////
/////////////////// | 308 ////////////////////////////////////////////////////////////////////////////////
/////////////////// |
310 | 309 |
311 #ifdef GR_TEST_UTILS | 310 #ifdef GR_TEST_UTILS |
(...skipping 10 matching lines...) Expand all Loading... |
322 } | 321 } |
323 vmi.mapRect(&clipBounds); | 322 vmi.mapRect(&clipBounds); |
324 GrStyle style; | 323 GrStyle style; |
325 do { | 324 do { |
326 GrTest::TestStyle(random, &style); | 325 GrTest::TestStyle(random, &style); |
327 } while (style.strokeRec().isHairlineStyle()); | 326 } while (style.strokeRec().isHairlineStyle()); |
328 return TessellatingPathBatch::Create(color, path, style, viewMatrix, clipBou
nds); | 327 return TessellatingPathBatch::Create(color, path, style, viewMatrix, clipBou
nds); |
329 } | 328 } |
330 | 329 |
331 #endif | 330 #endif |
OLD | NEW |