OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 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 "GrSoftwarePathRenderer.h" | 8 #include "GrSoftwarePathRenderer.h" |
9 #include "GrAuditTrail.h" | 9 #include "GrAuditTrail.h" |
10 #include "GrClip.h" | 10 #include "GrClip.h" |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 const GrUserStencilSettings* userSten
cilSettings, | 64 const GrUserStencilSettings* userSten
cilSettings, |
65 const GrClip& clip, | 65 const GrClip& clip, |
66 GrColor color, | 66 GrColor color, |
67 const SkMatrix& viewMatrix, | 67 const SkMatrix& viewMatrix, |
68 const SkRect& rect, | 68 const SkRect& rect, |
69 const SkMatrix& localMatrix) { | 69 const SkMatrix& localMatrix) { |
70 SkAutoTUnref<GrDrawBatch> batch(GrRectBatchFactory::CreateNonAAFill(color, v
iewMatrix, rect, | 70 SkAutoTUnref<GrDrawBatch> batch(GrRectBatchFactory::CreateNonAAFill(color, v
iewMatrix, rect, |
71 nullptr,
&localMatrix)); | 71 nullptr,
&localMatrix)); |
72 | 72 |
73 GrPipelineBuilder pipelineBuilder(*paint, drawContext->isUnifiedMultisampled
()); | 73 GrPipelineBuilder pipelineBuilder(*paint, drawContext->isUnifiedMultisampled
()); |
74 pipelineBuilder.setRenderTarget(drawContext->accessRenderTarget()); | |
75 pipelineBuilder.setUserStencil(userStencilSettings); | 74 pipelineBuilder.setUserStencil(userStencilSettings); |
76 | 75 |
77 drawContext->drawBatch(pipelineBuilder, clip, batch); | 76 drawContext->drawBatch(pipelineBuilder, clip, batch); |
78 } | 77 } |
79 | 78 |
80 void GrSoftwarePathRenderer::DrawAroundInvPath(GrDrawContext* drawContext, | 79 void GrSoftwarePathRenderer::DrawAroundInvPath(GrDrawContext* drawContext, |
81 const GrPaint* paint, | 80 const GrPaint* paint, |
82 const GrUserStencilSettings* user
StencilSettings, | 81 const GrUserStencilSettings* user
StencilSettings, |
83 const GrClip& clip, | 82 const GrClip& clip, |
84 GrColor color, | 83 GrColor color, |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 devPathBounds); | 151 devPathBounds); |
153 | 152 |
154 if (args.fPath->isInverseFillType()) { | 153 if (args.fPath->isInverseFillType()) { |
155 DrawAroundInvPath(args.fDrawContext, args.fPaint, args.fUserStencilSetti
ngs, | 154 DrawAroundInvPath(args.fDrawContext, args.fPaint, args.fUserStencilSetti
ngs, |
156 *args.fClip, args.fColor, | 155 *args.fClip, args.fColor, |
157 *args.fViewMatrix, devClipBounds, devPathBounds); | 156 *args.fViewMatrix, devClipBounds, devPathBounds); |
158 } | 157 } |
159 | 158 |
160 return true; | 159 return true; |
161 } | 160 } |
OLD | NEW |