reed@google.com | ac10a2d | 2010-12-22 21:39:39 +0000 | [diff] [blame] | 1 | /* |
epoger@google.com | ec3ed6a | 2011-07-28 14:26:00 +0000 | [diff] [blame] | 2 | * Copyright 2010 Google Inc. |
| 3 | * |
| 4 | * Use of this source code is governed by a BSD-style license that can be |
| 5 | * found in the LICENSE file. |
reed@google.com | ac10a2d | 2010-12-22 21:39:39 +0000 | [diff] [blame] | 6 | */ |
| 7 | |
reed@google.com | ac10a2d | 2010-12-22 21:39:39 +0000 | [diff] [blame] | 8 | #ifndef GrDrawTarget_DEFINED |
| 9 | #define GrDrawTarget_DEFINED |
| 10 | |
joshualitt | f6d259b | 2015-10-02 11:27:14 -0700 | [diff] [blame] | 11 | #include "GrBatchFlushState.h" |
joshualitt | 44701df | 2015-02-23 14:44:57 -0800 | [diff] [blame] | 12 | #include "GrClip.h" |
joshualitt | 6db519c | 2014-10-29 08:48:18 -0700 | [diff] [blame] | 13 | #include "GrClipMaskManager.h" |
commit-bot@chromium.org | 2a05de0 | 2014-03-25 15:17:32 +0000 | [diff] [blame] | 14 | #include "GrContext.h" |
joshualitt | 8072caa | 2015-02-12 14:20:52 -0800 | [diff] [blame] | 15 | #include "GrPathProcessor.h" |
| 16 | #include "GrPrimitiveProcessor.h" |
bsalomon@google.com | 934c570 | 2012-03-20 21:17:58 +0000 | [diff] [blame] | 17 | #include "GrIndexBuffer.h" |
kkinnunen | ccdaa04 | 2014-08-20 01:36:23 -0700 | [diff] [blame] | 18 | #include "GrPathRendering.h" |
egdaniel | 8dd688b | 2015-01-22 10:16:09 -0800 | [diff] [blame] | 19 | #include "GrPipelineBuilder.h" |
bsalomon | a387a11 | 2015-08-11 14:47:42 -0700 | [diff] [blame] | 20 | #include "GrPipeline.h" |
joshualitt | 7eb8c7b | 2014-11-18 14:24:27 -0800 | [diff] [blame] | 21 | #include "GrVertexBuffer.h" |
bsalomon | 6a44c6a | 2015-05-26 09:49:05 -0700 | [diff] [blame] | 22 | #include "GrXferProcessor.h" |
reed@google.com | ac10a2d | 2010-12-22 21:39:39 +0000 | [diff] [blame] | 23 | |
bsalomon | 473addf | 2015-10-02 07:49:05 -0700 | [diff] [blame] | 24 | #include "batches/GrDrawBatch.h" |
| 25 | |
bsalomon@google.com | 8d67c07 | 2012-12-13 20:38:14 +0000 | [diff] [blame] | 26 | #include "SkClipStack.h" |
commit-bot@chromium.org | a4de8c2 | 2013-09-09 13:38:37 +0000 | [diff] [blame] | 27 | #include "SkMatrix.h" |
sugoi@google.com | 12b4e27 | 2012-12-06 20:13:11 +0000 | [diff] [blame] | 28 | #include "SkPath.h" |
reed | 1b55a96 | 2015-09-17 20:16:13 -0700 | [diff] [blame] | 29 | #include "SkStringUtils.h" |
commit-bot@chromium.org | 9b62aa1 | 2014-03-25 11:59:40 +0000 | [diff] [blame] | 30 | #include "SkStrokeRec.h" |
robertphillips@google.com | a2d7148 | 2012-08-01 20:08:47 +0000 | [diff] [blame] | 31 | #include "SkTArray.h" |
commit-bot@chromium.org | a4de8c2 | 2013-09-09 13:38:37 +0000 | [diff] [blame] | 32 | #include "SkTLazy.h" |
commit-bot@chromium.org | a0b4028 | 2013-09-18 13:00:55 +0000 | [diff] [blame] | 33 | #include "SkTypes.h" |
bsalomon@google.com | 8d67c07 | 2012-12-13 20:38:14 +0000 | [diff] [blame] | 34 | #include "SkXfermode.h" |
Scroggo | 97c88c2 | 2011-05-11 14:05:25 +0000 | [diff] [blame] | 35 | |
bsalomon | 5346983 | 2015-08-18 09:20:09 -0700 | [diff] [blame] | 36 | class GrBatch; |
joshualitt | f6d259b | 2015-10-02 11:27:14 -0700 | [diff] [blame] | 37 | class GrBatchFlushState; |
joshualitt | 44701df | 2015-02-23 14:44:57 -0800 | [diff] [blame] | 38 | class GrClip; |
bsalomon | 4b91f76 | 2015-05-19 09:29:46 -0700 | [diff] [blame] | 39 | class GrCaps; |
bsalomon@google.com | 64aef2b | 2012-06-11 15:36:13 +0000 | [diff] [blame] | 40 | class GrPath; |
bsalomon | 1fcc01c | 2015-09-09 09:48:06 -0700 | [diff] [blame] | 41 | class GrDrawPathBatchBase; |
| 42 | class GrPathRangeDraw; |
sugoi@google.com | 12b4e27 | 2012-12-06 20:13:11 +0000 | [diff] [blame] | 43 | |
bsalomon | b3b9aec | 2015-09-10 11:16:35 -0700 | [diff] [blame] | 44 | class GrDrawTarget final : public SkRefCnt { |
bsalomon@google.com | f660187 | 2012-08-28 21:11:35 +0000 | [diff] [blame] | 45 | public: |
bsalomon@google.com | 6e4e650 | 2013-02-25 20:12:45 +0000 | [diff] [blame] | 46 | // The context may not be fully constructed and should not be used during GrDrawTarget |
| 47 | // construction. |
bsalomon | 4061b12 | 2015-05-29 10:26:19 -0700 | [diff] [blame] | 48 | GrDrawTarget(GrGpu* gpu, GrResourceProvider*); |
bsalomon | a73239a | 2015-04-28 13:35:17 -0700 | [diff] [blame] | 49 | |
bsalomon | 512be53 | 2015-09-10 10:42:55 -0700 | [diff] [blame] | 50 | ~GrDrawTarget() override; |
reed@google.com | ac10a2d | 2010-12-22 21:39:39 +0000 | [diff] [blame] | 51 | |
| 52 | /** |
bsalomon | a73239a | 2015-04-28 13:35:17 -0700 | [diff] [blame] | 53 | * Empties the draw buffer of any queued up draws. |
| 54 | */ |
bsalomon | 512be53 | 2015-09-10 10:42:55 -0700 | [diff] [blame] | 55 | void reset(); |
bsalomon | a73239a | 2015-04-28 13:35:17 -0700 | [diff] [blame] | 56 | |
| 57 | /** |
| 58 | * This plays any queued up draws to its GrGpu target. It also resets this object (i.e. flushing |
| 59 | * is destructive). |
| 60 | */ |
| 61 | void flush(); |
| 62 | |
| 63 | /** |
bsalomon@google.com | 18c9c19 | 2011-09-22 21:01:31 +0000 | [diff] [blame] | 64 | * Gets the capabilities of the draw target. |
| 65 | */ |
bsalomon | b3b9aec | 2015-09-10 11:16:35 -0700 | [diff] [blame] | 66 | const GrCaps* caps() const { return fGpu->caps(); } |
bsalomon@google.com | 18c9c19 | 2011-09-22 21:01:31 +0000 | [diff] [blame] | 67 | |
bsalomon | abd30f5 | 2015-08-13 13:34:48 -0700 | [diff] [blame] | 68 | void drawBatch(const GrPipelineBuilder&, GrDrawBatch*); |
joshualitt | 4d8da81 | 2015-01-28 12:53:54 -0800 | [diff] [blame] | 69 | |
bsalomon@google.com | 86afc2a | 2011-02-16 16:12:19 +0000 | [diff] [blame] | 70 | /** |
bsalomon@google.com | 64aef2b | 2012-06-11 15:36:13 +0000 | [diff] [blame] | 71 | * Draws path into the stencil buffer. The fill must be either even/odd or |
| 72 | * winding (not inverse or hairline). It will respect the HW antialias flag |
egdaniel | 8dd688b | 2015-01-22 10:16:09 -0800 | [diff] [blame] | 73 | * on the GrPipelineBuilder (if possible in the 3D API). Note, we will never have an inverse |
| 74 | * fill with stencil path |
bsalomon@google.com | 64aef2b | 2012-06-11 15:36:13 +0000 | [diff] [blame] | 75 | */ |
joshualitt | f238469 | 2015-09-10 11:00:51 -0700 | [diff] [blame] | 76 | void stencilPath(const GrPipelineBuilder&, const SkMatrix& viewMatrix, const GrPath*, |
egdaniel | 8dd688b | 2015-01-22 10:16:09 -0800 | [diff] [blame] | 77 | GrPathRendering::FillType); |
bsalomon@google.com | 64aef2b | 2012-06-11 15:36:13 +0000 | [diff] [blame] | 78 | |
| 79 | /** |
commit-bot@chromium.org | 32184d8 | 2013-10-09 15:14:18 +0000 | [diff] [blame] | 80 | * Draws a path. Fill must not be a hairline. It will respect the HW |
egdaniel | 8dd688b | 2015-01-22 10:16:09 -0800 | [diff] [blame] | 81 | * antialias flag on the GrPipelineBuilder (if possible in the 3D API). |
bsalomon | 1fcc01c | 2015-09-09 09:48:06 -0700 | [diff] [blame] | 82 | * |
| 83 | * TODO: Remove this function and construct the batch outside GrDrawTarget. |
commit-bot@chromium.org | c4dc0ad | 2013-10-09 14:11:33 +0000 | [diff] [blame] | 84 | */ |
joshualitt | f238469 | 2015-09-10 11:00:51 -0700 | [diff] [blame] | 85 | void drawPath(const GrPipelineBuilder&, const SkMatrix& viewMatrix, GrColor color, |
| 86 | const GrPath*, GrPathRendering::FillType); |
commit-bot@chromium.org | c4dc0ad | 2013-10-09 14:11:33 +0000 | [diff] [blame] | 87 | |
| 88 | /** |
cdalton | 55b24af | 2014-11-25 11:00:56 -0800 | [diff] [blame] | 89 | * Draws the aggregate path from combining multiple. Note that this will not |
| 90 | * always be equivalent to back-to-back calls to drawPath(). It will respect |
egdaniel | 8dd688b | 2015-01-22 10:16:09 -0800 | [diff] [blame] | 91 | * the HW antialias flag on the GrPipelineBuilder (if possible in the 3D API). |
commit-bot@chromium.org | 9b62aa1 | 2014-03-25 11:59:40 +0000 | [diff] [blame] | 92 | * |
bsalomon | 1fcc01c | 2015-09-09 09:48:06 -0700 | [diff] [blame] | 93 | * TODO: Remove this function and construct the batch outside GrDrawTarget. |
| 94 | * |
| 95 | * @param draw The range, transforms, and indices for the draw. |
| 96 | * This object must only be drawn once. The draw |
| 97 | * may modify its contents. |
cdalton | b85a0aa | 2014-07-21 15:32:44 -0700 | [diff] [blame] | 98 | * @param fill Fill type for drawing all the paths |
commit-bot@chromium.org | 9b62aa1 | 2014-03-25 11:59:40 +0000 | [diff] [blame] | 99 | */ |
bsalomon | 1fcc01c | 2015-09-09 09:48:06 -0700 | [diff] [blame] | 100 | void drawPathsFromRange(const GrPipelineBuilder&, |
joshualitt | f238469 | 2015-09-10 11:00:51 -0700 | [diff] [blame] | 101 | const SkMatrix& viewMatrix, |
| 102 | const SkMatrix& localMatrix, |
| 103 | GrColor color, |
bsalomon | 1fcc01c | 2015-09-09 09:48:06 -0700 | [diff] [blame] | 104 | GrPathRangeDraw* draw, |
| 105 | GrPathRendering::FillType fill); |
cdalton | b85a0aa | 2014-07-21 15:32:44 -0700 | [diff] [blame] | 106 | |
commit-bot@chromium.org | 9b62aa1 | 2014-03-25 11:59:40 +0000 | [diff] [blame] | 107 | /** |
bsalomon | 72e3ae4 | 2015-04-28 08:08:46 -0700 | [diff] [blame] | 108 | * Helper function for drawing rects. |
skia.committer@gmail.com | 044679e | 2013-02-15 07:16:57 +0000 | [diff] [blame] | 109 | * |
bsalomon@google.com | c781888 | 2013-03-20 19:19:53 +0000 | [diff] [blame] | 110 | * @param rect the rect to draw |
bsalomon@google.com | c781888 | 2013-03-20 19:19:53 +0000 | [diff] [blame] | 111 | * @param localRect optional rect that specifies local coords to map onto |
halcanary | 96fcdcc | 2015-08-27 07:41:13 -0700 | [diff] [blame] | 112 | * rect. If nullptr then rect serves as the local coords. |
joshualitt | 8fc6c2d | 2014-12-22 15:27:05 -0800 | [diff] [blame] | 113 | * @param localMatrix Optional local matrix. The local coordinates are specified by localRect, |
halcanary | 96fcdcc | 2015-08-27 07:41:13 -0700 | [diff] [blame] | 114 | * or if it is nullptr by rect. This matrix applies to the coordinate implied by |
joshualitt | 8fc6c2d | 2014-12-22 15:27:05 -0800 | [diff] [blame] | 115 | * that rectangle before it is input to GrCoordTransforms that read local |
| 116 | * coordinates |
bsalomon@google.com | 86afc2a | 2011-02-16 16:12:19 +0000 | [diff] [blame] | 117 | */ |
joshualitt | d2b23e0 | 2015-08-21 10:53:34 -0700 | [diff] [blame] | 118 | void drawNonAARect(const GrPipelineBuilder& pipelineBuilder, |
| 119 | GrColor color, |
| 120 | const SkMatrix& viewMatrix, |
| 121 | const SkRect& rect); |
joshualitt | b6b513b | 2015-08-21 10:25:18 -0700 | [diff] [blame] | 122 | |
joshualitt | d2b23e0 | 2015-08-21 10:53:34 -0700 | [diff] [blame] | 123 | void drawNonAARect(const GrPipelineBuilder& pipelineBuilder, |
| 124 | GrColor color, |
| 125 | const SkMatrix& viewMatrix, |
| 126 | const SkRect& rect, |
| 127 | const SkMatrix& localMatrix); |
joshualitt | b6b513b | 2015-08-21 10:25:18 -0700 | [diff] [blame] | 128 | |
joshualitt | d2b23e0 | 2015-08-21 10:53:34 -0700 | [diff] [blame] | 129 | void drawNonAARect(const GrPipelineBuilder& pipelineBuilder, |
| 130 | GrColor color, |
| 131 | const SkMatrix& viewMatrix, |
| 132 | const SkRect& rect, |
| 133 | const SkRect& localRect); |
jvanverth@google.com | 3976825 | 2013-02-14 15:25:44 +0000 | [diff] [blame] | 134 | |
joshualitt | d2b23e0 | 2015-08-21 10:53:34 -0700 | [diff] [blame] | 135 | void drawNonAARect(const GrPipelineBuilder& ds, |
| 136 | GrColor color, |
| 137 | const SkMatrix& viewM, |
| 138 | const SkIRect& irect) { |
reed@google.com | 4469938 | 2013-10-31 17:28:30 +0000 | [diff] [blame] | 139 | SkRect rect = SkRect::Make(irect); |
joshualitt | d2b23e0 | 2015-08-21 10:53:34 -0700 | [diff] [blame] | 140 | this->drawNonAARect(ds, color, viewM, rect); |
bsalomon@google.com | cf939ae | 2012-12-13 19:59:23 +0000 | [diff] [blame] | 141 | } |
bsalomon@google.com | 86afc2a | 2011-02-16 16:12:19 +0000 | [diff] [blame] | 142 | |
joshualitt | 1c73548 | 2015-07-13 08:08:25 -0700 | [diff] [blame] | 143 | void drawAARect(const GrPipelineBuilder& pipelineBuilder, |
robertphillips | ea46150 | 2015-05-26 11:38:03 -0700 | [diff] [blame] | 144 | GrColor color, |
| 145 | const SkMatrix& viewMatrix, |
| 146 | const SkRect& rect, |
| 147 | const SkRect& devRect); |
bsalomon@google.com | 934c570 | 2012-03-20 21:17:58 +0000 | [diff] [blame] | 148 | |
| 149 | /** |
egdaniel | 8dd688b | 2015-01-22 10:16:09 -0800 | [diff] [blame] | 150 | * Clear the passed in render target. Ignores the GrPipelineBuilder and clip. Clears the whole |
halcanary | 96fcdcc | 2015-08-27 07:41:13 -0700 | [diff] [blame] | 151 | * thing if rect is nullptr, otherwise just the rect. If canIgnoreRect is set then the entire |
egdaniel | 8dd688b | 2015-01-22 10:16:09 -0800 | [diff] [blame] | 152 | * render target can be optionally cleared. |
bsalomon@google.com | 0b335c1 | 2011-04-25 19:17:44 +0000 | [diff] [blame] | 153 | */ |
joshualitt | 9853cce | 2014-11-17 14:22:48 -0800 | [diff] [blame] | 154 | void clear(const SkIRect* rect, |
| 155 | GrColor color, |
| 156 | bool canIgnoreRect, |
bsalomon | 63b2196 | 2014-11-05 07:05:34 -0800 | [diff] [blame] | 157 | GrRenderTarget* renderTarget); |
skia.committer@gmail.com | a9493a3 | 2013-04-04 07:01:12 +0000 | [diff] [blame] | 158 | |
bsalomon | 5346983 | 2015-08-18 09:20:09 -0700 | [diff] [blame] | 159 | /** Discards the contents render target. */ |
| 160 | void discard(GrRenderTarget*); |
commit-bot@chromium.org | 28361fa | 2014-03-28 16:08:05 +0000 | [diff] [blame] | 161 | |
| 162 | /** |
bsalomon@google.com | e4617bf | 2013-04-03 14:56:40 +0000 | [diff] [blame] | 163 | * Copies a pixel rectangle from one surface to another. This call may finalize |
| 164 | * reserved vertex/index data (as though a draw call was made). The src pixels |
| 165 | * copied are specified by srcRect. They are copied to a rect of the same |
| 166 | * size in dst with top left at dstPoint. If the src rect is clipped by the |
| 167 | * src bounds then pixel values in the dst rect corresponding to area clipped |
bsalomon | 6df8640 | 2015-06-01 10:41:49 -0700 | [diff] [blame] | 168 | * by the src rect are not overwritten. This method is not guaranteed to succeed |
bsalomon@google.com | e4617bf | 2013-04-03 14:56:40 +0000 | [diff] [blame] | 169 | * depending on the type of surface, configs, etc, and the backend-specific |
bsalomon | 6df8640 | 2015-06-01 10:41:49 -0700 | [diff] [blame] | 170 | * limitations. |
bsalomon@google.com | e4617bf | 2013-04-03 14:56:40 +0000 | [diff] [blame] | 171 | */ |
bsalomon | 6df8640 | 2015-06-01 10:41:49 -0700 | [diff] [blame] | 172 | void copySurface(GrSurface* dst, |
bsalomon | f90a02b | 2014-11-26 12:28:00 -0800 | [diff] [blame] | 173 | GrSurface* src, |
| 174 | const SkIRect& srcRect, |
| 175 | const SkIPoint& dstPoint); |
robertphillips@google.com | ff17584 | 2012-05-14 19:31:39 +0000 | [diff] [blame] | 176 | |
bsalomon | 4061b12 | 2015-05-29 10:26:19 -0700 | [diff] [blame] | 177 | bool programUnitTest(GrContext* owner, int maxStages); |
joshualitt | 2c93efe | 2014-11-06 12:57:13 -0800 | [diff] [blame] | 178 | |
bsalomon | b3b9aec | 2015-09-10 11:16:35 -0700 | [diff] [blame] | 179 | /** Provides access to internal functions to GrClipMaskManager without friending all of |
| 180 | GrDrawTarget to CMM. */ |
| 181 | class CMMAccess { |
| 182 | public: |
| 183 | CMMAccess(GrDrawTarget* drawTarget) : fDrawTarget(drawTarget) {} |
| 184 | private: |
| 185 | void clearStencilClip(const SkIRect& rect, bool insideClip, GrRenderTarget* rt) const { |
| 186 | fDrawTarget->clearStencilClip(rect, insideClip, rt); |
| 187 | } |
bsalomon | a73239a | 2015-04-28 13:35:17 -0700 | [diff] [blame] | 188 | |
bsalomon | b3b9aec | 2015-09-10 11:16:35 -0700 | [diff] [blame] | 189 | GrContext* context() const { return fDrawTarget->fContext; } |
| 190 | GrResourceProvider* resourceProvider() const { return fDrawTarget->fResourceProvider; } |
| 191 | GrDrawTarget* fDrawTarget; |
| 192 | friend class GrClipMaskManager; |
| 193 | }; |
| 194 | |
| 195 | const CMMAccess cmmAccess() { return CMMAccess(this); } |
bsalomon | 5ea0363 | 2015-08-18 10:33:30 -0700 | [diff] [blame] | 196 | |
bsalomon@google.com | 02ddc8b | 2013-01-28 15:35:28 +0000 | [diff] [blame] | 197 | private: |
bsalomon | b3b9aec | 2015-09-10 11:16:35 -0700 | [diff] [blame] | 198 | void recordBatch(GrBatch*); |
bsalomon | ad792c1 | 2015-09-10 11:10:50 -0700 | [diff] [blame] | 199 | bool installPipelineInDrawBatch(const GrPipelineBuilder* pipelineBuilder, |
| 200 | const GrScissorState* scissor, |
| 201 | GrDrawBatch* batch); |
| 202 | |
| 203 | // Makes a copy of the dst if it is necessary for the draw. Returns false if a copy is required |
| 204 | // but couldn't be made. Otherwise, returns true. This method needs to be protected because it |
| 205 | // needs to be accessed by GLPrograms to setup a correct drawstate |
| 206 | bool setupDstReadIfNecessary(const GrPipelineBuilder&, |
| 207 | const GrProcOptInfo& colorPOI, |
| 208 | const GrProcOptInfo& coveragePOI, |
| 209 | GrXferProcessor::DstTexture*, |
| 210 | const SkRect& batchBounds); |
| 211 | |
bsalomon | 1fcc01c | 2015-09-09 09:48:06 -0700 | [diff] [blame] | 212 | void drawPathBatch(const GrPipelineBuilder& pipelineBuilder, GrDrawPathBatchBase* batch, |
| 213 | GrPathRendering::FillType fill); |
commit-bot@chromium.org | a8916ff | 2013-08-16 15:53:46 +0000 | [diff] [blame] | 214 | // Check to see if this set of draw commands has been sent out |
joshualitt | 9853cce | 2014-11-17 14:22:48 -0800 | [diff] [blame] | 215 | void getPathStencilSettingsForFilltype(GrPathRendering::FillType, |
egdaniel | 8dc7c3a | 2015-04-16 11:22:42 -0700 | [diff] [blame] | 216 | const GrStencilAttachment*, |
joshualitt | 9853cce | 2014-11-17 14:22:48 -0800 | [diff] [blame] | 217 | GrStencilSettings*); |
bsalomon | b3b9aec | 2015-09-10 11:16:35 -0700 | [diff] [blame] | 218 | bool setupClip(const GrPipelineBuilder&, |
joshualitt | 4421a4c | 2015-07-13 09:36:41 -0700 | [diff] [blame] | 219 | GrPipelineBuilder::AutoRestoreFragmentProcessorState*, |
bsalomon | 6be6f7c | 2015-02-26 13:05:21 -0800 | [diff] [blame] | 220 | GrPipelineBuilder::AutoRestoreStencil*, |
| 221 | GrScissorState*, |
bsalomon | b3b9aec | 2015-09-10 11:16:35 -0700 | [diff] [blame] | 222 | const SkRect* devBounds); |
skia.committer@gmail.com | 7475811 | 2013-08-17 07:01:54 +0000 | [diff] [blame] | 223 | |
bsalomon | b3b9aec | 2015-09-10 11:16:35 -0700 | [diff] [blame] | 224 | // Used only by CMM. |
bsalomon | 5ea0363 | 2015-08-18 10:33:30 -0700 | [diff] [blame] | 225 | void clearStencilClip(const SkIRect&, bool insideClip, GrRenderTarget*); |
joshualitt | 6db519c | 2014-10-29 08:48:18 -0700 | [diff] [blame] | 226 | |
bsalomon | b3b9aec | 2015-09-10 11:16:35 -0700 | [diff] [blame] | 227 | SkSTArray<256, SkAutoTUnref<GrBatch>, true> fBatches; |
| 228 | SkAutoTDelete<GrClipMaskManager> fClipMaskManager; |
| 229 | // The context is only in service of the clip mask manager, remove once CMM doesn't need this. |
| 230 | GrContext* fContext; |
| 231 | GrGpu* fGpu; |
| 232 | GrResourceProvider* fResourceProvider; |
joshualitt | f6d259b | 2015-10-02 11:27:14 -0700 | [diff] [blame] | 233 | GrBatchFlushState fFlushState; |
bsalomon | b3b9aec | 2015-09-10 11:16:35 -0700 | [diff] [blame] | 234 | bool fFlushing; |
joshualitt | f6d259b | 2015-10-02 11:27:14 -0700 | [diff] [blame] | 235 | int fFirstUnpreparedBatch; |
joshualitt | 3bdd7dc | 2014-10-31 08:27:39 -0700 | [diff] [blame] | 236 | |
bsalomon | b3b9aec | 2015-09-10 11:16:35 -0700 | [diff] [blame] | 237 | typedef SkRefCnt INHERITED; |
joshualitt | 6db519c | 2014-10-29 08:48:18 -0700 | [diff] [blame] | 238 | }; |
| 239 | |
reed@google.com | ac10a2d | 2010-12-22 21:39:39 +0000 | [diff] [blame] | 240 | #endif |