| 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" | 
| 11 #include "GrSWMaskHelper.h" | 11 #include "GrSWMaskHelper.h" | 
| 12 #include "GrVertexBuffer.h" | 12 #include "GrVertexBuffer.h" | 
| 13 | 13 | 
| 14 //////////////////////////////////////////////////////////////////////////////// | 14 //////////////////////////////////////////////////////////////////////////////// | 
| 15 bool GrSoftwarePathRenderer::onCanDrawPath(const CanDrawPathArgs& args) const { | 15 bool GrSoftwarePathRenderer::onCanDrawPath(const CanDrawPathArgs& args) const { | 
| 16     if (NULL == fContext) { | 16     if (NULL == fContext) { | 
| 17         return false; | 17         return false; | 
| 18     } | 18     } | 
| 19     if (args.fStroke->isDashed()) { | 19     if (args.fStroke->isDashed()) { | 
| 20         return false; | 20         return false; | 
| 21     } | 21     } | 
| 22     return true; | 22     return true; | 
| 23 } | 23 } | 
| 24 | 24 | 
| 25 GrPathRenderer::StencilSupport |  | 
| 26 GrSoftwarePathRenderer::onGetStencilSupport(const GrDrawTarget*, |  | 
| 27                                             const GrPipelineBuilder*, |  | 
| 28                                             const SkPath&, |  | 
| 29                                             const GrStrokeInfo&) const { |  | 
| 30     return GrPathRenderer::kNoSupport_StencilSupport; |  | 
| 31 } |  | 
| 32 |  | 
| 33 namespace { | 25 namespace { | 
| 34 | 26 | 
| 35 //////////////////////////////////////////////////////////////////////////////// | 27 //////////////////////////////////////////////////////////////////////////////// | 
| 36 // gets device coord bounds of path (not considering the fill) and clip. The | 28 // gets device coord bounds of path (not considering the fill) and clip. The | 
| 37 // path bounds will be a subset of the clip bounds. returns false if | 29 // path bounds will be a subset of the clip bounds. returns false if | 
| 38 // path bounds would be empty. | 30 // path bounds would be empty. | 
| 39 bool get_path_and_clip_bounds(const GrDrawTarget* target, | 31 bool get_path_and_clip_bounds(const GrDrawTarget* target, | 
| 40                               const GrPipelineBuilder* pipelineBuilder, | 32                               const GrPipelineBuilder* pipelineBuilder, | 
| 41                               const SkPath& path, | 33                               const SkPath& path, | 
| 42                               const SkMatrix& matrix, | 34                               const SkMatrix& matrix, | 
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 138     GrSWMaskHelper::DrawToTargetWithPathMask(texture, args.fTarget, args.fPipeli
     neBuilder, | 130     GrSWMaskHelper::DrawToTargetWithPathMask(texture, args.fTarget, args.fPipeli
     neBuilder, | 
| 139                                              args.fColor, *args.fViewMatrix, dev
     PathBounds); | 131                                              args.fColor, *args.fViewMatrix, dev
     PathBounds); | 
| 140 | 132 | 
| 141     if (args.fPath->isInverseFillType()) { | 133     if (args.fPath->isInverseFillType()) { | 
| 142         draw_around_inv_path(args.fTarget, args.fPipelineBuilder, args.fColor, *
     args.fViewMatrix, | 134         draw_around_inv_path(args.fTarget, args.fPipelineBuilder, args.fColor, *
     args.fViewMatrix, | 
| 143                              devClipBounds, devPathBounds); | 135                              devClipBounds, devPathBounds); | 
| 144     } | 136     } | 
| 145 | 137 | 
| 146     return true; | 138     return true; | 
| 147 } | 139 } | 
| OLD | NEW | 
|---|