skia.committer@gmail.com | 3e50e99 | 2013-05-21 07:01:40 +0000 | [diff] [blame] | 1 | |
bsalomon@google.com | dfe75bc | 2011-03-25 12:31:16 +0000 | [diff] [blame] | 2 | /* |
epoger@google.com | ec3ed6a | 2011-07-28 14:26:00 +0000 | [diff] [blame] | 3 | * Copyright 2011 Google Inc. |
| 4 | * |
| 5 | * Use of this source code is governed by a BSD-style license that can be |
| 6 | * found in the LICENSE file. |
bsalomon@google.com | dfe75bc | 2011-03-25 12:31:16 +0000 | [diff] [blame] | 7 | */ |
| 8 | |
| 9 | #ifndef GrPathRenderer_DEFINED |
| 10 | #define GrPathRenderer_DEFINED |
| 11 | |
| 12 | #include "GrDrawTarget.h" |
bsalomon@google.com | 3008519 | 2011-08-19 15:42:31 +0000 | [diff] [blame] | 13 | #include "GrPathRendererChain.h" |
bsalomon@google.com | 45a15f5 | 2012-12-10 19:10:17 +0000 | [diff] [blame] | 14 | #include "GrStencil.h" |
kkinnunen | 1899651 | 2015-04-26 23:18:49 -0700 | [diff] [blame] | 15 | #include "GrStrokeInfo.h" |
bsalomon@google.com | dfe75bc | 2011-03-25 12:31:16 +0000 | [diff] [blame] | 16 | |
commit-bot@chromium.org | e0a868c | 2013-11-22 07:02:11 +0000 | [diff] [blame] | 17 | #include "SkDrawProcs.h" |
bsalomon@google.com | 49313f6 | 2011-09-14 13:54:05 +0000 | [diff] [blame] | 18 | #include "SkTArray.h" |
| 19 | |
reed@google.com | 07f3ee1 | 2011-05-16 17:21:57 +0000 | [diff] [blame] | 20 | class SkPath; |
bsalomon@google.com | 3008519 | 2011-08-19 15:42:31 +0000 | [diff] [blame] | 21 | |
bsalomon@google.com | dfe75bc | 2011-03-25 12:31:16 +0000 | [diff] [blame] | 22 | struct GrPoint; |
| 23 | |
| 24 | /** |
| 25 | * Base class for drawing paths into a GrDrawTarget. |
robertphillips@google.com | bf5cad4 | 2012-05-10 12:40:40 +0000 | [diff] [blame] | 26 | * |
egdaniel | 8dd688b | 2015-01-22 10:16:09 -0800 | [diff] [blame] | 27 | * Derived classes can use stages GrPaint::kTotalStages through GrPipelineBuilder::kNumStages-1. |
| 28 | * The stages before GrPaint::kTotalStages are reserved for setting up the draw (i.e., textures and |
bsalomon@google.com | 45a15f5 | 2012-12-10 19:10:17 +0000 | [diff] [blame] | 29 | * filter masks). |
bsalomon@google.com | dfe75bc | 2011-03-25 12:31:16 +0000 | [diff] [blame] | 30 | */ |
commit-bot@chromium.org | a4de8c2 | 2013-09-09 13:38:37 +0000 | [diff] [blame] | 31 | class SK_API GrPathRenderer : public SkRefCnt { |
bsalomon@google.com | dfe75bc | 2011-03-25 12:31:16 +0000 | [diff] [blame] | 32 | public: |
reed@google.com | fa35e3d | 2012-06-26 20:16:17 +0000 | [diff] [blame] | 33 | SK_DECLARE_INST_COUNT(GrPathRenderer) |
bsalomon@google.com | 3008519 | 2011-08-19 15:42:31 +0000 | [diff] [blame] | 34 | |
| 35 | /** |
bsalomon@google.com | 45a15f5 | 2012-12-10 19:10:17 +0000 | [diff] [blame] | 36 | * This is called to install custom path renderers in every GrContext at create time. The |
| 37 | * default implementation in GrCreatePathRenderer_none.cpp does not add any additional |
| 38 | * renderers. Link against another implementation to install your own. The first added is the |
| 39 | * most preferred path renderer, second is second most preferred, etc. |
bsalomon@google.com | 3008519 | 2011-08-19 15:42:31 +0000 | [diff] [blame] | 40 | * |
| 41 | * @param context the context that will use the path renderer |
bsalomon@google.com | 3008519 | 2011-08-19 15:42:31 +0000 | [diff] [blame] | 42 | * @param prChain the chain to add path renderers to. |
| 43 | */ |
bsalomon@google.com | 45a15f5 | 2012-12-10 19:10:17 +0000 | [diff] [blame] | 44 | static void AddPathRenderers(GrContext* context, GrPathRendererChain* prChain); |
bsalomon@google.com | 3008519 | 2011-08-19 15:42:31 +0000 | [diff] [blame] | 45 | |
| 46 | |
bsalomon@google.com | c2099d2 | 2012-03-02 21:26:50 +0000 | [diff] [blame] | 47 | GrPathRenderer(); |
bsalomon@google.com | dfe75bc | 2011-03-25 12:31:16 +0000 | [diff] [blame] | 48 | |
| 49 | /** |
bsalomon@google.com | 45a15f5 | 2012-12-10 19:10:17 +0000 | [diff] [blame] | 50 | * A caller may wish to use a path renderer to draw a path into the stencil buffer. However, |
| 51 | * the path renderer itself may require use of the stencil buffer. Also a path renderer may |
joshualitt | b0a8a37 | 2014-09-23 09:50:21 -0700 | [diff] [blame] | 52 | * use a GrProcessor coverage stage that sets coverage to zero to eliminate pixels that are |
| 53 | * covered by bounding geometry but outside the path. These exterior pixels would still be |
| 54 | * rendered into the stencil. |
bsalomon@google.com | 45a15f5 | 2012-12-10 19:10:17 +0000 | [diff] [blame] | 55 | * |
| 56 | * A GrPathRenderer can provide three levels of support for stenciling paths: |
egdaniel | 8dd688b | 2015-01-22 10:16:09 -0800 | [diff] [blame] | 57 | * 1) kNoRestriction: This is the most general. The caller sets up the GrPipelineBuilder on the target |
bsalomon@google.com | 45a15f5 | 2012-12-10 19:10:17 +0000 | [diff] [blame] | 58 | * and calls drawPath(). The path is rendered exactly as the draw state |
| 59 | * indicates including support for simultaneous color and stenciling with |
| 60 | * arbitrary stenciling rules. Pixels partially covered by AA paths are |
| 61 | * affected by the stencil settings. |
| 62 | * 2) kStencilOnly: The path renderer cannot apply arbitrary stencil rules nor shade and stencil |
| 63 | * simultaneously. The path renderer does support the stencilPath() function |
| 64 | * which performs no color writes and writes a non-zero stencil value to pixels |
| 65 | * covered by the path. |
| 66 | * 3) kNoSupport: This path renderer cannot be used to stencil the path. |
| 67 | */ |
| 68 | typedef GrPathRendererChain::StencilSupport StencilSupport; |
| 69 | static const StencilSupport kNoSupport_StencilSupport = |
| 70 | GrPathRendererChain::kNoSupport_StencilSupport; |
| 71 | static const StencilSupport kStencilOnly_StencilSupport = |
| 72 | GrPathRendererChain::kStencilOnly_StencilSupport; |
| 73 | static const StencilSupport kNoRestriction_StencilSupport = |
| 74 | GrPathRendererChain::kNoRestriction_StencilSupport; |
| 75 | |
| 76 | /** |
robertphillips@google.com | e79f320 | 2014-02-11 16:30:21 +0000 | [diff] [blame] | 77 | * This function is to get the stencil support for a particular path. The path's fill must |
bsalomon@google.com | 45a15f5 | 2012-12-10 19:10:17 +0000 | [diff] [blame] | 78 | * not be an inverse type. |
bsalomon@google.com | dfe75bc | 2011-03-25 12:31:16 +0000 | [diff] [blame] | 79 | * |
robertphillips@google.com | 3e0c64a | 2014-02-10 16:46:23 +0000 | [diff] [blame] | 80 | * @param target target that the path will be rendered to |
robertphillips@google.com | e79f320 | 2014-02-11 16:30:21 +0000 | [diff] [blame] | 81 | * @param path the path that will be drawn |
| 82 | * @param stroke the stroke information (width, join, cap). |
bsalomon@google.com | dfe75bc | 2011-03-25 12:31:16 +0000 | [diff] [blame] | 83 | */ |
joshualitt | 9853cce | 2014-11-17 14:22:48 -0800 | [diff] [blame] | 84 | StencilSupport getStencilSupport(const GrDrawTarget* target, |
egdaniel | 8dd688b | 2015-01-22 10:16:09 -0800 | [diff] [blame] | 85 | const GrPipelineBuilder* pipelineBuilder, |
joshualitt | 9853cce | 2014-11-17 14:22:48 -0800 | [diff] [blame] | 86 | const SkPath& path, |
kkinnunen | 1899651 | 2015-04-26 23:18:49 -0700 | [diff] [blame] | 87 | const GrStrokeInfo& stroke) const { |
robertphillips@google.com | e79f320 | 2014-02-11 16:30:21 +0000 | [diff] [blame] | 88 | SkASSERT(!path.isInverseFillType()); |
egdaniel | 8dd688b | 2015-01-22 10:16:09 -0800 | [diff] [blame] | 89 | return this->onGetStencilSupport(target, pipelineBuilder, path, stroke); |
bsalomon@google.com | c2099d2 | 2012-03-02 21:26:50 +0000 | [diff] [blame] | 90 | } |
bsalomon@google.com | dfe75bc | 2011-03-25 12:31:16 +0000 | [diff] [blame] | 91 | |
bsalomon@google.com | 208236d | 2012-03-12 13:15:33 +0000 | [diff] [blame] | 92 | /** |
robertphillips@google.com | e79f320 | 2014-02-11 16:30:21 +0000 | [diff] [blame] | 93 | * Returns true if this path renderer is able to render the path. Returning false allows the |
| 94 | * caller to fallback to another path renderer This function is called when searching for a path |
| 95 | * renderer capable of rendering a path. |
bsalomon@google.com | 208236d | 2012-03-12 13:15:33 +0000 | [diff] [blame] | 96 | * |
egdaniel | 8dd688b | 2015-01-22 10:16:09 -0800 | [diff] [blame] | 97 | * @param target The target that the path will be rendered to |
| 98 | * @param pipelineBuilder The pipelineBuilder |
| 99 | * @param viewMatrix The viewMatrix |
| 100 | * @param path The path to draw |
| 101 | * @param stroke The stroke information (width, join, cap) |
| 102 | * @param antiAlias True if anti-aliasing is required. |
bsalomon@google.com | 208236d | 2012-03-12 13:15:33 +0000 | [diff] [blame] | 103 | * |
| 104 | * @return true if the path can be drawn by this object, false otherwise. |
| 105 | */ |
joshualitt | 9853cce | 2014-11-17 14:22:48 -0800 | [diff] [blame] | 106 | virtual bool canDrawPath(const GrDrawTarget* target, |
egdaniel | 8dd688b | 2015-01-22 10:16:09 -0800 | [diff] [blame] | 107 | const GrPipelineBuilder* pipelineBuilder, |
joshualitt | 8059eb9 | 2014-12-29 15:10:07 -0800 | [diff] [blame] | 108 | const SkMatrix& viewMatrix, |
joshualitt | 9853cce | 2014-11-17 14:22:48 -0800 | [diff] [blame] | 109 | const SkPath& path, |
kkinnunen | 1899651 | 2015-04-26 23:18:49 -0700 | [diff] [blame] | 110 | const GrStrokeInfo& rec, |
bsalomon@google.com | c2099d2 | 2012-03-02 21:26:50 +0000 | [diff] [blame] | 111 | bool antiAlias) const = 0; |
bsalomon@google.com | ee43512 | 2011-07-01 14:57:55 +0000 | [diff] [blame] | 112 | /** |
robertphillips@google.com | e79f320 | 2014-02-11 16:30:21 +0000 | [diff] [blame] | 113 | * Draws the path into the draw target. If getStencilSupport() would return kNoRestriction then |
| 114 | * the subclass must respect the stencil settings of the target's draw state. |
bsalomon@google.com | ee43512 | 2011-07-01 14:57:55 +0000 | [diff] [blame] | 115 | * |
joshualitt | 8059eb9 | 2014-12-29 15:10:07 -0800 | [diff] [blame] | 116 | * @param target The target that the path will be rendered to |
egdaniel | 8dd688b | 2015-01-22 10:16:09 -0800 | [diff] [blame] | 117 | * @param pipelineBuilder The pipelineBuilder |
joshualitt | 8059eb9 | 2014-12-29 15:10:07 -0800 | [diff] [blame] | 118 | * @param viewMatrix The viewMatrix |
robertphillips@google.com | e79f320 | 2014-02-11 16:30:21 +0000 | [diff] [blame] | 119 | * @param path the path to draw. |
sugoi@google.com | 12b4e27 | 2012-12-06 20:13:11 +0000 | [diff] [blame] | 120 | * @param stroke the stroke information (width, join, cap) |
bsalomon@google.com | 208236d | 2012-03-12 13:15:33 +0000 | [diff] [blame] | 121 | * @param antiAlias true if anti-aliasing is required. |
bsalomon@google.com | ee43512 | 2011-07-01 14:57:55 +0000 | [diff] [blame] | 122 | */ |
joshualitt | 9853cce | 2014-11-17 14:22:48 -0800 | [diff] [blame] | 123 | bool drawPath(GrDrawTarget* target, |
egdaniel | 8dd688b | 2015-01-22 10:16:09 -0800 | [diff] [blame] | 124 | GrPipelineBuilder* ds, |
joshualitt | 2e3b3e3 | 2014-12-09 13:31:14 -0800 | [diff] [blame] | 125 | GrColor color, |
joshualitt | 8059eb9 | 2014-12-29 15:10:07 -0800 | [diff] [blame] | 126 | const SkMatrix& viewMatrix, |
joshualitt | 9853cce | 2014-11-17 14:22:48 -0800 | [diff] [blame] | 127 | const SkPath& path, |
kkinnunen | 1899651 | 2015-04-26 23:18:49 -0700 | [diff] [blame] | 128 | const GrStrokeInfo& stroke, |
bsalomon@google.com | 45a15f5 | 2012-12-10 19:10:17 +0000 | [diff] [blame] | 129 | bool antiAlias) { |
robertphillips@google.com | e79f320 | 2014-02-11 16:30:21 +0000 | [diff] [blame] | 130 | SkASSERT(!path.isEmpty()); |
joshualitt | 8059eb9 | 2014-12-29 15:10:07 -0800 | [diff] [blame] | 131 | SkASSERT(this->canDrawPath(target, ds, viewMatrix, path, stroke, antiAlias)); |
joshualitt | 9853cce | 2014-11-17 14:22:48 -0800 | [diff] [blame] | 132 | SkASSERT(ds->getStencil().isDisabled() || |
| 133 | kNoRestriction_StencilSupport == this->getStencilSupport(target, ds, path, |
| 134 | stroke)); |
joshualitt | 8059eb9 | 2014-12-29 15:10:07 -0800 | [diff] [blame] | 135 | return this->onDrawPath(target, ds, color, viewMatrix, path, stroke, antiAlias); |
bsalomon@google.com | c2099d2 | 2012-03-02 21:26:50 +0000 | [diff] [blame] | 136 | } |
bsalomon@google.com | ee43512 | 2011-07-01 14:57:55 +0000 | [diff] [blame] | 137 | |
| 138 | /** |
robertphillips@google.com | e79f320 | 2014-02-11 16:30:21 +0000 | [diff] [blame] | 139 | * Draws the path to the stencil buffer. Assume the writable stencil bits are already |
| 140 | * initialized to zero. The pixels inside the path will have non-zero stencil values afterwards. |
bsalomon@google.com | 208236d | 2012-03-12 13:15:33 +0000 | [diff] [blame] | 141 | * |
robertphillips@google.com | e79f320 | 2014-02-11 16:30:21 +0000 | [diff] [blame] | 142 | * @param path the path to draw. |
sugoi@google.com | 12b4e27 | 2012-12-06 20:13:11 +0000 | [diff] [blame] | 143 | * @param stroke the stroke information (width, join, cap) |
bsalomon@google.com | 208236d | 2012-03-12 13:15:33 +0000 | [diff] [blame] | 144 | * @param target target that the path will be rendered to |
bsalomon@google.com | 45a15f5 | 2012-12-10 19:10:17 +0000 | [diff] [blame] | 145 | */ |
joshualitt | 9853cce | 2014-11-17 14:22:48 -0800 | [diff] [blame] | 146 | void stencilPath(GrDrawTarget* target, |
egdaniel | 8dd688b | 2015-01-22 10:16:09 -0800 | [diff] [blame] | 147 | GrPipelineBuilder* ds, |
joshualitt | 8059eb9 | 2014-12-29 15:10:07 -0800 | [diff] [blame] | 148 | const SkMatrix& viewMatrix, |
joshualitt | 9853cce | 2014-11-17 14:22:48 -0800 | [diff] [blame] | 149 | const SkPath& path, |
kkinnunen | 1899651 | 2015-04-26 23:18:49 -0700 | [diff] [blame] | 150 | const GrStrokeInfo& stroke) { |
robertphillips@google.com | e79f320 | 2014-02-11 16:30:21 +0000 | [diff] [blame] | 151 | SkASSERT(!path.isEmpty()); |
joshualitt | 9853cce | 2014-11-17 14:22:48 -0800 | [diff] [blame] | 152 | SkASSERT(kNoSupport_StencilSupport != this->getStencilSupport(target, ds, path, stroke)); |
joshualitt | 8059eb9 | 2014-12-29 15:10:07 -0800 | [diff] [blame] | 153 | this->onStencilPath(target, ds, viewMatrix, path, stroke); |
bsalomon@google.com | 45a15f5 | 2012-12-10 19:10:17 +0000 | [diff] [blame] | 154 | } |
| 155 | |
commit-bot@chromium.org | e0a868c | 2013-11-22 07:02:11 +0000 | [diff] [blame] | 156 | // Helper for determining if we can treat a thin stroke as a hairline w/ coverage. |
| 157 | // If we can, we draw lots faster (raster device does this same test). |
kkinnunen | 1899651 | 2015-04-26 23:18:49 -0700 | [diff] [blame] | 158 | static bool IsStrokeHairlineOrEquivalent(const GrStrokeInfo& stroke, const SkMatrix& matrix, |
commit-bot@chromium.org | e0a868c | 2013-11-22 07:02:11 +0000 | [diff] [blame] | 159 | SkScalar* outCoverage) { |
kkinnunen | 1899651 | 2015-04-26 23:18:49 -0700 | [diff] [blame] | 160 | if (stroke.isDashed()) { |
| 161 | return false; |
| 162 | } |
kkinnunen | d156d36 | 2015-05-18 22:23:54 -0700 | [diff] [blame^] | 163 | if (stroke.isHairlineStyle()) { |
bsalomon | 49f085d | 2014-09-05 13:34:00 -0700 | [diff] [blame] | 164 | if (outCoverage) { |
commit-bot@chromium.org | e0a868c | 2013-11-22 07:02:11 +0000 | [diff] [blame] | 165 | *outCoverage = SK_Scalar1; |
| 166 | } |
| 167 | return true; |
| 168 | } |
kkinnunen | d156d36 | 2015-05-18 22:23:54 -0700 | [diff] [blame^] | 169 | return stroke.getStyle() == SkStrokeRec::kStroke_Style && |
| 170 | SkDrawTreatAAStrokeAsHairline(stroke.getWidth(), matrix, outCoverage); |
commit-bot@chromium.org | e0a868c | 2013-11-22 07:02:11 +0000 | [diff] [blame] | 171 | } |
| 172 | |
bsalomon@google.com | 45a15f5 | 2012-12-10 19:10:17 +0000 | [diff] [blame] | 173 | protected: |
| 174 | /** |
| 175 | * Subclass overrides if it has any limitations of stenciling support. |
| 176 | */ |
joshualitt | 9853cce | 2014-11-17 14:22:48 -0800 | [diff] [blame] | 177 | virtual StencilSupport onGetStencilSupport(const GrDrawTarget*, |
egdaniel | 8dd688b | 2015-01-22 10:16:09 -0800 | [diff] [blame] | 178 | const GrPipelineBuilder*, |
joshualitt | 9853cce | 2014-11-17 14:22:48 -0800 | [diff] [blame] | 179 | const SkPath&, |
kkinnunen | 1899651 | 2015-04-26 23:18:49 -0700 | [diff] [blame] | 180 | const GrStrokeInfo&) const { |
bsalomon@google.com | 45a15f5 | 2012-12-10 19:10:17 +0000 | [diff] [blame] | 181 | return kNoRestriction_StencilSupport; |
| 182 | } |
| 183 | |
| 184 | /** |
| 185 | * Subclass implementation of drawPath() |
bsalomon@google.com | 208236d | 2012-03-12 13:15:33 +0000 | [diff] [blame] | 186 | */ |
joshualitt | 9853cce | 2014-11-17 14:22:48 -0800 | [diff] [blame] | 187 | virtual bool onDrawPath(GrDrawTarget*, |
egdaniel | 8dd688b | 2015-01-22 10:16:09 -0800 | [diff] [blame] | 188 | GrPipelineBuilder*, |
joshualitt | 2e3b3e3 | 2014-12-09 13:31:14 -0800 | [diff] [blame] | 189 | GrColor, |
joshualitt | 8059eb9 | 2014-12-29 15:10:07 -0800 | [diff] [blame] | 190 | const SkMatrix& viewMatrix, |
joshualitt | 9853cce | 2014-11-17 14:22:48 -0800 | [diff] [blame] | 191 | const SkPath&, |
kkinnunen | 1899651 | 2015-04-26 23:18:49 -0700 | [diff] [blame] | 192 | const GrStrokeInfo&, |
bsalomon@google.com | c2099d2 | 2012-03-02 21:26:50 +0000 | [diff] [blame] | 193 | bool antiAlias) = 0; |
tomhudson@google.com | d22b6e4 | 2011-06-24 15:53:40 +0000 | [diff] [blame] | 194 | |
bsalomon@google.com | 45a15f5 | 2012-12-10 19:10:17 +0000 | [diff] [blame] | 195 | /** |
| 196 | * Subclass implementation of stencilPath(). Subclass must override iff it ever returns |
| 197 | * kStencilOnly in onGetStencilSupport(). |
| 198 | */ |
joshualitt | 9853cce | 2014-11-17 14:22:48 -0800 | [diff] [blame] | 199 | virtual void onStencilPath(GrDrawTarget* target, |
egdaniel | 8dd688b | 2015-01-22 10:16:09 -0800 | [diff] [blame] | 200 | GrPipelineBuilder* pipelineBuilder, |
joshualitt | 8059eb9 | 2014-12-29 15:10:07 -0800 | [diff] [blame] | 201 | const SkMatrix& viewMatrix, |
joshualitt | 9853cce | 2014-11-17 14:22:48 -0800 | [diff] [blame] | 202 | const SkPath& path, |
kkinnunen | 1899651 | 2015-04-26 23:18:49 -0700 | [diff] [blame] | 203 | const GrStrokeInfo& stroke) { |
bsalomon@google.com | 45a15f5 | 2012-12-10 19:10:17 +0000 | [diff] [blame] | 204 | GR_STATIC_CONST_SAME_STENCIL(kIncrementStencil, |
| 205 | kReplace_StencilOp, |
| 206 | kReplace_StencilOp, |
| 207 | kAlways_StencilFunc, |
| 208 | 0xffff, |
| 209 | 0xffff, |
| 210 | 0xffff); |
egdaniel | 8dd688b | 2015-01-22 10:16:09 -0800 | [diff] [blame] | 211 | pipelineBuilder->setStencil(kIncrementStencil); |
| 212 | pipelineBuilder->setDisableColorXPFactory(); |
| 213 | this->drawPath(target, pipelineBuilder, GrColor_WHITE, viewMatrix, path, stroke, false); |
bsalomon@google.com | 45a15f5 | 2012-12-10 19:10:17 +0000 | [diff] [blame] | 214 | } |
| 215 | |
bsalomon@google.com | 1dd9baa | 2013-05-20 16:49:06 +0000 | [diff] [blame] | 216 | // Helper for getting the device bounds of a path. Inverse filled paths will have bounds set |
| 217 | // by devSize. Non-inverse path bounds will not necessarily be clipped to devSize. |
| 218 | static void GetPathDevBounds(const SkPath& path, |
| 219 | int devW, |
| 220 | int devH, |
| 221 | const SkMatrix& matrix, |
| 222 | SkRect* bounds); |
| 223 | |
| 224 | // Helper version that gets the dev width and height from a GrSurface. |
| 225 | static void GetPathDevBounds(const SkPath& path, |
| 226 | const GrSurface* device, |
| 227 | const SkMatrix& matrix, |
| 228 | SkRect* bounds) { |
| 229 | GetPathDevBounds(path, device->width(), device->height(), matrix, bounds); |
| 230 | } |
| 231 | |
bsalomon@google.com | dfe75bc | 2011-03-25 12:31:16 +0000 | [diff] [blame] | 232 | private: |
| 233 | |
commit-bot@chromium.org | a4de8c2 | 2013-09-09 13:38:37 +0000 | [diff] [blame] | 234 | typedef SkRefCnt INHERITED; |
bsalomon@google.com | dfe75bc | 2011-03-25 12:31:16 +0000 | [diff] [blame] | 235 | }; |
| 236 | |
bsalomon@google.com | dfe75bc | 2011-03-25 12:31:16 +0000 | [diff] [blame] | 237 | #endif |