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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 const GrPaint* paint, | 63 const GrPaint* paint, |
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->mustUseHWAA(*paint)); |
74 pipelineBuilder.setUserStencil(userStencilSettings); | 74 pipelineBuilder.setUserStencil(userStencilSettings); |
75 | 75 |
76 drawContext->drawBatch(pipelineBuilder, clip, batch); | 76 drawContext->drawBatch(pipelineBuilder, clip, batch); |
77 } | 77 } |
78 | 78 |
79 void GrSoftwarePathRenderer::DrawAroundInvPath(GrDrawContext* drawContext, | 79 void GrSoftwarePathRenderer::DrawAroundInvPath(GrDrawContext* drawContext, |
80 const GrPaint* paint, | 80 const GrPaint* paint, |
81 const GrUserStencilSettings* user
StencilSettings, | 81 const GrUserStencilSettings* user
StencilSettings, |
82 const GrClip& clip, | 82 const GrClip& clip, |
83 GrColor color, | 83 GrColor color, |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 devPathBounds); | 151 devPathBounds); |
152 | 152 |
153 if (args.fPath->isInverseFillType()) { | 153 if (args.fPath->isInverseFillType()) { |
154 DrawAroundInvPath(args.fDrawContext, args.fPaint, args.fUserStencilSetti
ngs, | 154 DrawAroundInvPath(args.fDrawContext, args.fPaint, args.fUserStencilSetti
ngs, |
155 *args.fClip, args.fColor, | 155 *args.fClip, args.fColor, |
156 *args.fViewMatrix, devClipBounds, devPathBounds); | 156 *args.fViewMatrix, devClipBounds, devPathBounds); |
157 } | 157 } |
158 | 158 |
159 return true; | 159 return true; |
160 } | 160 } |
OLD | NEW |