| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2012 Google Inc. | 3 * Copyright 2012 Google Inc. |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 #include "GrSoftwarePathRenderer.h" | 9 #include "GrSoftwarePathRenderer.h" |
| 10 #include "GrContext.h" | 10 #include "GrContext.h" |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 devClipBounds.fRight, devClipBounds.fBottom); | 109 devClipBounds.fRight, devClipBounds.fBottom); |
| 110 draw_non_aa_rect(target, *pipelineBuilder, color, SkMatrix::I(), rect, i
nvert); | 110 draw_non_aa_rect(target, *pipelineBuilder, color, SkMatrix::I(), rect, i
nvert); |
| 111 } | 111 } |
| 112 } | 112 } |
| 113 | 113 |
| 114 } | 114 } |
| 115 | 115 |
| 116 //////////////////////////////////////////////////////////////////////////////// | 116 //////////////////////////////////////////////////////////////////////////////// |
| 117 // return true on success; false on failure | 117 // return true on success; false on failure |
| 118 bool GrSoftwarePathRenderer::onDrawPath(const DrawPathArgs& args) { | 118 bool GrSoftwarePathRenderer::onDrawPath(const DrawPathArgs& args) { |
| 119 GR_AUDIT_TRAIL_AUTO_FRAME(args.fTarget->getAuditTrail(), "GrSoftwarePathRend
erer::onDrawPath"); |
| 119 if (nullptr == fContext) { | 120 if (nullptr == fContext) { |
| 120 return false; | 121 return false; |
| 121 } | 122 } |
| 122 | 123 |
| 123 SkIRect devPathBounds, devClipBounds; | 124 SkIRect devPathBounds, devClipBounds; |
| 124 if (!get_path_and_clip_bounds(args.fPipelineBuilder, *args.fPath, | 125 if (!get_path_and_clip_bounds(args.fPipelineBuilder, *args.fPath, |
| 125 *args.fViewMatrix, &devPathBounds, &devClipBou
nds)) { | 126 *args.fViewMatrix, &devPathBounds, &devClipBou
nds)) { |
| 126 if (args.fPath->isInverseFillType()) { | 127 if (args.fPath->isInverseFillType()) { |
| 127 draw_around_inv_path(args.fTarget, args.fPipelineBuilder, args.fColo
r, | 128 draw_around_inv_path(args.fTarget, args.fPipelineBuilder, args.fColo
r, |
| 128 *args.fViewMatrix, devClipBounds, devPathBounds
); | 129 *args.fViewMatrix, devClipBounds, devPathBounds
); |
| (...skipping 12 matching lines...) Expand all Loading... |
| 141 GrSWMaskHelper::DrawToTargetWithPathMask(texture, args.fTarget, args.fPipeli
neBuilder, | 142 GrSWMaskHelper::DrawToTargetWithPathMask(texture, args.fTarget, args.fPipeli
neBuilder, |
| 142 args.fColor, *args.fViewMatrix, dev
PathBounds); | 143 args.fColor, *args.fViewMatrix, dev
PathBounds); |
| 143 | 144 |
| 144 if (args.fPath->isInverseFillType()) { | 145 if (args.fPath->isInverseFillType()) { |
| 145 draw_around_inv_path(args.fTarget, args.fPipelineBuilder, args.fColor, *
args.fViewMatrix, | 146 draw_around_inv_path(args.fTarget, args.fPipelineBuilder, args.fColor, *
args.fViewMatrix, |
| 146 devClipBounds, devPathBounds); | 147 devClipBounds, devPathBounds); |
| 147 } | 148 } |
| 148 | 149 |
| 149 return true; | 150 return true; |
| 150 } | 151 } |
| OLD | NEW |