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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 bool GrSoftwarePathRenderer::onDrawPath(const DrawPathArgs& args) { | 123 bool GrSoftwarePathRenderer::onDrawPath(const DrawPathArgs& args) { |
124 GR_AUDIT_TRAIL_AUTO_FRAME(args.fDrawContext->auditTrail(), | 124 GR_AUDIT_TRAIL_AUTO_FRAME(args.fDrawContext->auditTrail(), |
125 "GrSoftwarePathRenderer::onDrawPath"); | 125 "GrSoftwarePathRenderer::onDrawPath"); |
126 if (!fTexProvider) { | 126 if (!fTexProvider) { |
127 return false; | 127 return false; |
128 } | 128 } |
129 | 129 |
130 // We really need to know if the shape will be inverse filled or not | 130 // We really need to know if the shape will be inverse filled or not |
131 bool inverseFilled = false; | 131 bool inverseFilled = false; |
132 SkTLazy<GrShape> tmpShape; | 132 SkTLazy<GrShape> tmpShape; |
133 SkASSERT(!args.fShape->style().applies()) | 133 SkASSERT(!args.fShape->style().applies()); |
134 inverseFilled = args.fShape->inverseFilled(); | 134 inverseFilled = args.fShape->inverseFilled(); |
135 | 135 |
136 SkIRect devShapeBounds, devClipBounds; | 136 SkIRect devShapeBounds, devClipBounds; |
137 if (!get_shape_and_clip_bounds(args.fDrawContext->width(), args.fDrawContext
->height(), | 137 if (!get_shape_and_clip_bounds(args.fDrawContext->width(), args.fDrawContext
->height(), |
138 *args.fClip, *args.fShape, | 138 *args.fClip, *args.fShape, |
139 *args.fViewMatrix, &devShapeBounds, &devClipB
ounds)) { | 139 *args.fViewMatrix, &devShapeBounds, &devClipB
ounds)) { |
140 if (inverseFilled) { | 140 if (inverseFilled) { |
141 DrawAroundInvPath(args.fDrawContext, *args.fPaint, *args.fUserStenci
lSettings, | 141 DrawAroundInvPath(args.fDrawContext, *args.fPaint, *args.fUserStenci
lSettings, |
142 *args.fClip, | 142 *args.fClip, |
143 *args.fViewMatrix, devClipBounds, devShapeBounds); | 143 *args.fViewMatrix, devClipBounds, devShapeBounds); |
(...skipping 15 matching lines...) Expand all Loading... |
159 devShapeBounds); | 159 devShapeBounds); |
160 | 160 |
161 if (inverseFilled) { | 161 if (inverseFilled) { |
162 DrawAroundInvPath(args.fDrawContext, *args.fPaint, *args.fUserStencilSet
tings, | 162 DrawAroundInvPath(args.fDrawContext, *args.fPaint, *args.fUserStencilSet
tings, |
163 *args.fClip, | 163 *args.fClip, |
164 *args.fViewMatrix, devClipBounds, devShapeBounds); | 164 *args.fViewMatrix, devClipBounds, devShapeBounds); |
165 } | 165 } |
166 | 166 |
167 return true; | 167 return true; |
168 } | 168 } |
OLD | NEW |