blob: 3d7d526531036b51a7fc39956c8a97ddb788a336 [file] [log] [blame]
reed@google.comac10a2d2010-12-22 21:39:39 +00001/*
epoger@google.comec3ed6a2011-07-28 14:26:00 +00002 * Copyright 2011 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.comac10a2d2010-12-22 21:39:39 +00006 */
7
reed@google.comac10a2d2010-12-22 21:39:39 +00008#ifndef GrInOrderDrawBuffer_DEFINED
9#define GrInOrderDrawBuffer_DEFINED
10
11#include "GrDrawTarget.h"
12#include "GrAllocPool.h"
13#include "GrAllocator.h"
bsalomonb3e3a952014-09-19 11:10:40 -070014#include "GrIndexBuffer.h"
15#include "GrRenderTarget.h"
bsalomon@google.comded4f4b2012-06-28 18:48:06 +000016#include "GrPath.h"
bsalomonb3e3a952014-09-19 11:10:40 -070017#include "GrPathRange.h"
18#include "GrSurface.h"
cdalton6819df32014-10-15 13:43:48 -070019#include "GrTRecorder.h"
bsalomonb3e3a952014-09-19 11:10:40 -070020#include "GrVertexBuffer.h"
reed@google.comac10a2d2010-12-22 21:39:39 +000021
robertphillips@google.com641f8b12012-07-31 19:15:58 +000022#include "SkClipStack.h"
bsalomon@google.comded4f4b2012-06-28 18:48:06 +000023#include "SkTemplates.h"
commit-bot@chromium.orga0b40282013-09-18 13:00:55 +000024#include "SkTypes.h"
bsalomon@google.comded4f4b2012-06-28 18:48:06 +000025
bsalomon@google.com471d4712011-08-23 15:45:25 +000026class GrGpu;
bsalomon@google.com1c13c962011-02-14 16:51:21 +000027class GrIndexBufferAllocPool;
bsalomon@google.com471d4712011-08-23 15:45:25 +000028class GrVertexBufferAllocPool;
reed@google.comac10a2d2010-12-22 21:39:39 +000029
bsalomon@google.com1c13c962011-02-14 16:51:21 +000030/**
bsalomon@google.com55e4a202013-01-11 13:54:21 +000031 * GrInOrderDrawBuffer is an implementation of GrDrawTarget that queues up draws for eventual
32 * playback into a GrGpu. In theory one draw buffer could playback into another. When index or
33 * vertex buffers are used as geometry sources it is the callers the draw buffer only holds
34 * references to the buffers. It is the callers responsibility to ensure that the data is still
35 * valid when the draw buffer is played back into a GrGpu. Similarly, it is the caller's
36 * responsibility to ensure that all referenced textures, buffers, and render-targets are associated
37 * in the GrGpu object that the buffer is played back into. The buffer requires VB and IB pools to
38 * store geometry.
skia.committer@gmail.com07d3a652013-04-10 07:01:15 +000039 */
joshualitt6db519c2014-10-29 08:48:18 -070040class GrInOrderDrawBuffer : public GrClipTarget {
reed@google.comac10a2d2010-12-22 21:39:39 +000041public:
42
bsalomon@google.com86afc2a2011-02-16 16:12:19 +000043 /**
44 * Creates a GrInOrderDrawBuffer
45 *
bsalomon@google.com6e4e6502013-02-25 20:12:45 +000046 * @param gpu the gpu object that this draw buffer flushes to.
bsalomon@google.com86afc2a2011-02-16 16:12:19 +000047 * @param vertexPool pool where vertices for queued draws will be saved when
48 * the vertex source is either reserved or array.
49 * @param indexPool pool where indices for queued draws will be saved when
50 * the index source is either reserved or array.
51 */
bsalomon@google.com6e4e6502013-02-25 20:12:45 +000052 GrInOrderDrawBuffer(GrGpu* gpu,
bsalomon@google.com471d4712011-08-23 15:45:25 +000053 GrVertexBufferAllocPool* vertexPool,
bsalomon@google.com1c13c962011-02-14 16:51:21 +000054 GrIndexBufferAllocPool* indexPool);
reed@google.comac10a2d2010-12-22 21:39:39 +000055
56 virtual ~GrInOrderDrawBuffer();
57
bsalomon@google.com86afc2a2011-02-16 16:12:19 +000058 /**
bsalomon@google.com55e4a202013-01-11 13:54:21 +000059 * Empties the draw buffer of any queued up draws. This must not be called while inside an
60 * unbalanced pushGeometrySource(). The current draw state and clip are preserved.
bsalomon@google.com86afc2a2011-02-16 16:12:19 +000061 */
62 void reset();
63
64 /**
bsalomon@google.com6e4e6502013-02-25 20:12:45 +000065 * This plays the queued up draws to its GrGpu target. It also resets this object (i.e. flushing
bsalomon@google.com55e4a202013-01-11 13:54:21 +000066 * is destructive). This buffer must not have an active reserved vertex or index source. Any
67 * reserved geometry on the target will be finalized because it's geometry source will be pushed
68 * before flushing and popped afterwards.
bsalomon@google.com86afc2a2011-02-16 16:12:19 +000069 */
robertphillips@google.com1267fbd2013-07-03 18:37:27 +000070 void flush();
bsalomon@google.com97805382012-03-13 14:32:07 +000071
commit-bot@chromium.orga8916ff2013-08-16 15:53:46 +000072 // tracking for draws
73 virtual DrawToken getCurrentDrawToken() { return DrawToken(this, fDrawID); }
74
bsalomon@google.com86afc2a2011-02-16 16:12:19 +000075 // overrides from GrDrawTarget
jvanverth@google.comb75b0a02013-02-05 20:33:30 +000076 virtual bool geometryHints(int* vertexCount,
bsalomon@google.com97805382012-03-13 14:32:07 +000077 int* indexCount) const SK_OVERRIDE;
joshualitt6db519c2014-10-29 08:48:18 -070078
joshualitta7024152014-11-03 14:16:35 -080079 virtual bool copySurface(GrSurface* dst,
80 GrSurface* src,
81 const SkIRect& srcRect,
82 const SkIPoint& dstPoint) SK_OVERRIDE;
83
84 virtual bool canCopySurface(GrSurface* dst,
85 GrSurface* src,
86 const SkIRect& srcRect,
87 const SkIPoint& dstPoint) SK_OVERRIDE;
88
joshualitt6db519c2014-10-29 08:48:18 -070089 virtual void clearStencilClip(const SkIRect& rect,
90 bool insideClip,
91 GrRenderTarget* renderTarget) SK_OVERRIDE;
92
commit-bot@chromium.org28361fa2014-03-28 16:08:05 +000093 virtual void discard(GrRenderTarget*) SK_OVERRIDE;
bsalomon@google.com0b335c12011-04-25 19:17:44 +000094
bsalomonf2703d82014-10-28 14:33:06 -070095 virtual void initCopySurfaceDstDesc(const GrSurface* src, GrSurfaceDesc* desc) SK_OVERRIDE;
bsalomon@google.comeb851172013-04-15 13:51:00 +000096
bsalomon@google.com97805382012-03-13 14:32:07 +000097protected:
bsalomon@google.com02ddc8b2013-01-28 15:35:28 +000098 virtual void clipWillBeSet(const GrClipData* newClip) SK_OVERRIDE;
99
reed@google.comac10a2d2010-12-22 21:39:39 +0000100private:
cdalton6819df32014-10-15 13:43:48 -0700101 enum {
bsalomon@google.comded4f4b2012-06-28 18:48:06 +0000102 kDraw_Cmd = 1,
103 kStencilPath_Cmd = 2,
104 kSetState_Cmd = 3,
105 kSetClip_Cmd = 4,
106 kClear_Cmd = 5,
bsalomon@google.com116ad842013-04-09 15:38:19 +0000107 kCopySurface_Cmd = 6,
commit-bot@chromium.org32184d82013-10-09 15:14:18 +0000108 kDrawPath_Cmd = 7,
commit-bot@chromium.org9b62aa12014-03-25 11:59:40 +0000109 kDrawPaths_Cmd = 8,
bsalomon@google.coma4f6b102012-06-26 21:04:22 +0000110 };
111
cdalton6819df32014-10-15 13:43:48 -0700112 struct Cmd : ::SkNoncopyable {
113 Cmd(uint8_t type) : fType(type) {}
114 virtual ~Cmd() {}
115
joshualitt6db519c2014-10-29 08:48:18 -0700116 virtual void execute(GrClipTarget*) = 0;
cdalton6819df32014-10-15 13:43:48 -0700117
118 uint8_t fType;
119 };
120
121 struct Draw : public Cmd {
bsalomonb3e3a952014-09-19 11:10:40 -0700122 Draw(const DrawInfo& info, const GrVertexBuffer* vb, const GrIndexBuffer* ib)
cdalton6819df32014-10-15 13:43:48 -0700123 : Cmd(kDraw_Cmd)
124 , fInfo(info)
bsalomon45725db2014-09-19 11:48:02 -0700125 , fVertexBuffer(vb)
126 , fIndexBuffer(ib) {}
bsalomonb3e3a952014-09-19 11:10:40 -0700127
128 const GrVertexBuffer* vertexBuffer() const { return fVertexBuffer.get(); }
129 const GrIndexBuffer* indexBuffer() const { return fIndexBuffer.get(); }
130
joshualitt6db519c2014-10-29 08:48:18 -0700131 virtual void execute(GrClipTarget*);
cdalton6819df32014-10-15 13:43:48 -0700132
133 DrawInfo fInfo;
134
bsalomonb3e3a952014-09-19 11:10:40 -0700135 private:
bsalomonbcf0a522014-10-08 08:40:09 -0700136 GrPendingIOResource<const GrVertexBuffer, kRead_GrIOType> fVertexBuffer;
137 GrPendingIOResource<const GrIndexBuffer, kRead_GrIOType> fIndexBuffer;
reed@google.comac10a2d2010-12-22 21:39:39 +0000138 };
139
cdalton6819df32014-10-15 13:43:48 -0700140 struct StencilPath : public Cmd {
141 StencilPath(const GrPath* path) : Cmd(kStencilPath_Cmd), fPath(path) {}
sugoi@google.com5f74cf82012-12-17 21:16:45 +0000142
bsalomonb3e3a952014-09-19 11:10:40 -0700143 const GrPath* path() const { return fPath.get(); }
144
joshualitt6db519c2014-10-29 08:48:18 -0700145 virtual void execute(GrClipTarget*);
cdalton6819df32014-10-15 13:43:48 -0700146
joshualitt92e496f2014-10-31 13:56:50 -0700147 GrPathRendering::FillType fFill;
bsalomonb3e3a952014-09-19 11:10:40 -0700148
149 private:
bsalomonbcf0a522014-10-08 08:40:09 -0700150 GrPendingIOResource<const GrPath, kRead_GrIOType> fPath;
bsalomon@google.comded4f4b2012-06-28 18:48:06 +0000151 };
152
cdalton6819df32014-10-15 13:43:48 -0700153 struct DrawPath : public Cmd {
154 DrawPath(const GrPath* path) : Cmd(kDrawPath_Cmd), fPath(path) {}
commit-bot@chromium.orgc4dc0ad2013-10-09 14:11:33 +0000155
bsalomonb3e3a952014-09-19 11:10:40 -0700156 const GrPath* path() const { return fPath.get(); }
157
joshualitt6db519c2014-10-29 08:48:18 -0700158 virtual void execute(GrClipTarget*);
cdalton6819df32014-10-15 13:43:48 -0700159
joshualitt92e496f2014-10-31 13:56:50 -0700160 GrPathRendering::FillType fFill;
161 GrDeviceCoordTexture fDstCopy;
bsalomonb3e3a952014-09-19 11:10:40 -0700162
163 private:
bsalomonbcf0a522014-10-08 08:40:09 -0700164 GrPendingIOResource<const GrPath, kRead_GrIOType> fPath;
commit-bot@chromium.orgc4dc0ad2013-10-09 14:11:33 +0000165 };
166
cdalton6819df32014-10-15 13:43:48 -0700167 struct DrawPaths : public Cmd {
168 DrawPaths(const GrPathRange* pathRange) : Cmd(kDrawPaths_Cmd), fPathRange(pathRange) {}
bsalomonb3e3a952014-09-19 11:10:40 -0700169
170 const GrPathRange* pathRange() const { return fPathRange.get(); }
cdalton6819df32014-10-15 13:43:48 -0700171 uint32_t* indices() { return reinterpret_cast<uint32_t*>(CmdBuffer::GetDataForItem(this)); }
172 float* transforms() { return reinterpret_cast<float*>(&this->indices()[fCount]); }
bsalomonb3e3a952014-09-19 11:10:40 -0700173
joshualitt6db519c2014-10-29 08:48:18 -0700174 virtual void execute(GrClipTarget*);
cdalton6819df32014-10-15 13:43:48 -0700175
joshualitt92e496f2014-10-31 13:56:50 -0700176 size_t fCount;
177 PathTransformType fTransformsType;
178 GrPathRendering::FillType fFill;
179 GrDeviceCoordTexture fDstCopy;
bsalomonb3e3a952014-09-19 11:10:40 -0700180
181 private:
bsalomonbcf0a522014-10-08 08:40:09 -0700182 GrPendingIOResource<const GrPathRange, kRead_GrIOType> fPathRange;
commit-bot@chromium.org9b62aa12014-03-25 11:59:40 +0000183 };
184
commit-bot@chromium.org28361fa2014-03-28 16:08:05 +0000185 // This is also used to record a discard by setting the color to GrColor_ILLEGAL
cdalton6819df32014-10-15 13:43:48 -0700186 struct Clear : public Cmd {
187 Clear(GrRenderTarget* rt) : Cmd(kClear_Cmd), fRenderTarget(rt) {}
188
bsalomonb3e3a952014-09-19 11:10:40 -0700189 GrRenderTarget* renderTarget() const { return fRenderTarget.get(); }
robertphillips@google.comc82a8b72012-06-21 20:15:48 +0000190
joshualitt6db519c2014-10-29 08:48:18 -0700191 virtual void execute(GrClipTarget*);
cdalton6819df32014-10-15 13:43:48 -0700192
bsalomonb3e3a952014-09-19 11:10:40 -0700193 SkIRect fRect;
194 GrColor fColor;
195 bool fCanIgnoreRect;
196
197 private:
bsalomonbcf0a522014-10-08 08:40:09 -0700198 GrPendingIOResource<GrRenderTarget, kWrite_GrIOType> fRenderTarget;
bsalomon@google.com0b335c12011-04-25 19:17:44 +0000199 };
200
joshualitt6db519c2014-10-29 08:48:18 -0700201 // This command is ONLY used by the clip mask manager to clear the stencil clip bits
202 struct ClearStencilClip : public Cmd {
203 ClearStencilClip(GrRenderTarget* rt) : Cmd(kClear_Cmd), fRenderTarget(rt) {}
204
205 GrRenderTarget* renderTarget() const { return fRenderTarget.get(); }
206
207 virtual void execute(GrClipTarget*);
208
209 SkIRect fRect;
210 bool fInsideClip;
211
212 private:
213 GrPendingIOResource<GrRenderTarget, kWrite_GrIOType> fRenderTarget;
214 };
215
cdalton6819df32014-10-15 13:43:48 -0700216 struct CopySurface : public Cmd {
217 CopySurface(GrSurface* dst, GrSurface* src) : Cmd(kCopySurface_Cmd), fDst(dst), fSrc(src) {}
bsalomonb3e3a952014-09-19 11:10:40 -0700218
219 GrSurface* dst() const { return fDst.get(); }
220 GrSurface* src() const { return fSrc.get(); }
221
joshualitt6db519c2014-10-29 08:48:18 -0700222 virtual void execute(GrClipTarget*);
cdalton6819df32014-10-15 13:43:48 -0700223
bsalomonb3e3a952014-09-19 11:10:40 -0700224 SkIPoint fDstPoint;
225 SkIRect fSrcRect;
226
227 private:
bsalomonbcf0a522014-10-08 08:40:09 -0700228 GrPendingIOResource<GrSurface, kWrite_GrIOType> fDst;
229 GrPendingIOResource<GrSurface, kRead_GrIOType> fSrc;
bsalomon@google.com116ad842013-04-09 15:38:19 +0000230 };
231
cdalton6819df32014-10-15 13:43:48 -0700232 struct SetState : public Cmd {
233 SetState(const GrDrawState& state) : Cmd(kSetState_Cmd), fState(state) {}
234
joshualitt6db519c2014-10-29 08:48:18 -0700235 virtual void execute(GrClipTarget*);
cdalton6819df32014-10-15 13:43:48 -0700236
237 GrDrawState fState;
bsalomonf0480b12014-07-02 12:11:24 -0700238 };
239
cdalton6819df32014-10-15 13:43:48 -0700240 struct SetClip : public Cmd {
241 SetClip(const GrClipData* clipData)
242 : Cmd(kSetClip_Cmd),
243 fStackStorage(*clipData->fClipStack) {
244 fClipData.fClipStack = &fStackStorage;
245 fClipData.fOrigin = clipData->fOrigin;
246 }
247
joshualitt6db519c2014-10-29 08:48:18 -0700248 virtual void execute(GrClipTarget*);
cdalton6819df32014-10-15 13:43:48 -0700249
250 GrClipData fClipData;
251
252 private:
253 SkClipStack fStackStorage;
254 };
255
256 typedef void* TCmdAlign; // This wouldn't be enough align if a command used long double.
257 typedef GrTRecorder<Cmd, TCmdAlign> CmdBuffer;
258
bsalomon@google.com25fb21f2011-06-21 18:17:25 +0000259 // overrides from GrDrawTarget
bsalomon@google.com74749cd2013-01-30 16:12:41 +0000260 virtual void onDraw(const DrawInfo&) SK_OVERRIDE;
commit-bot@chromium.orgfd03d4a2013-07-17 21:39:42 +0000261 virtual void onDrawRect(const SkRect& rect,
commit-bot@chromium.orgfd03d4a2013-07-17 21:39:42 +0000262 const SkRect* localRect,
bsalomon@google.com0406b9e2013-04-02 21:00:15 +0000263 const SkMatrix* localMatrix) SK_OVERRIDE;
commit-bot@chromium.org32184d82013-10-09 15:14:18 +0000264
joshualitt92e496f2014-10-31 13:56:50 -0700265 virtual void onStencilPath(const GrPath*, GrPathRendering::FillType) SK_OVERRIDE;
266 virtual void onDrawPath(const GrPath*, GrPathRendering::FillType,
commit-bot@chromium.orgc4dc0ad2013-10-09 14:11:33 +0000267 const GrDeviceCoordTexture* dstCopy) SK_OVERRIDE;
cdaltonb85a0aa2014-07-21 15:32:44 -0700268 virtual void onDrawPaths(const GrPathRange*,
269 const uint32_t indices[], int count,
270 const float transforms[], PathTransformType,
joshualitt92e496f2014-10-31 13:56:50 -0700271 GrPathRendering::FillType, const GrDeviceCoordTexture*) SK_OVERRIDE;
bsalomon63b21962014-11-05 07:05:34 -0800272 virtual void onClear(const SkIRect* rect,
273 GrColor color,
274 bool canIgnoreRect,
275 GrRenderTarget* renderTarget) SK_OVERRIDE;
commit-bot@chromium.org32184d82013-10-09 15:14:18 +0000276
jvanverth@google.coma6338982013-01-31 21:34:25 +0000277 virtual bool onReserveVertexSpace(size_t vertexSize,
bsalomon@google.com25fb21f2011-06-21 18:17:25 +0000278 int vertexCount,
bsalomon@google.com13f1b6f2012-05-31 12:52:43 +0000279 void** vertices) SK_OVERRIDE;
280 virtual bool onReserveIndexSpace(int indexCount,
281 void** indices) SK_OVERRIDE;
282 virtual void releaseReservedVertexSpace() SK_OVERRIDE;
283 virtual void releaseReservedIndexSpace() SK_OVERRIDE;
bsalomon@google.com13f1b6f2012-05-31 12:52:43 +0000284 virtual void geometrySourceWillPush() SK_OVERRIDE;
bsalomon@google.com02ddc8b2013-01-28 15:35:28 +0000285 virtual void geometrySourceWillPop(const GeometrySrcState& restoredState) SK_OVERRIDE;
jvanverth@google.comb75b0a02013-02-05 20:33:30 +0000286 virtual void willReserveVertexAndIndexSpace(int vertexCount,
bsalomon@google.com02ddc8b2013-01-28 15:35:28 +0000287 int indexCount) SK_OVERRIDE;
bsalomon@google.com116ad842013-04-09 15:38:19 +0000288
bsalomon@google.comd62e88e2013-02-01 14:19:27 +0000289 bool quickInsideClip(const SkRect& devBounds);
bsalomon@google.com02ddc8b2013-01-28 15:35:28 +0000290
commit-bot@chromium.org2a05de02014-03-25 15:17:32 +0000291 virtual void didAddGpuTraceMarker() SK_OVERRIDE {}
292 virtual void didRemoveGpuTraceMarker() SK_OVERRIDE {}
commit-bot@chromium.orga3baf3b2014-02-21 18:45:30 +0000293
bsalomon@google.comd62e88e2013-02-01 14:19:27 +0000294 // Attempts to concat instances from info onto the previous draw. info must represent an
295 // instanced draw. The caller must have already recorded a new draw state and clip if necessary.
296 int concatInstancedDraw(const DrawInfo& info);
bsalomon@google.com1c13c962011-02-14 16:51:21 +0000297
bsalomon838f62d2014-08-05 07:15:57 -0700298 // Determines whether the current draw operation requieres a new drawstate and if so records it.
299 void recordStateIfNecessary();
300 // We lazily record clip changes in order to skip clips that have no effect.
cdalton6819df32014-10-15 13:43:48 -0700301 void recordClipIfNecessary();
302 // Records any trace markers for a command after adding it to the buffer.
303 void recordTraceMarkersIfNecessary();
bsalomonb3e3a952014-09-19 11:10:40 -0700304
305 virtual bool isIssued(uint32_t drawID) { return drawID != fDrawID; }
bsalomon@google.com934c5702012-03-20 21:17:58 +0000306
bsalomon@google.com116ad842013-04-09 15:38:19 +0000307 // TODO: Use a single allocator for commands and records
bsalomon@google.com4b90c622011-09-28 17:52:15 +0000308 enum {
cdalton6819df32014-10-15 13:43:48 -0700309 kCmdBufferInitialSizeInBytes = 64 * 1024,
310 kGeoPoolStatePreAllocCnt = 4,
bsalomon@google.com4b90c622011-09-28 17:52:15 +0000311 };
reed@google.comac10a2d2010-12-22 21:39:39 +0000312
cdalton6819df32014-10-15 13:43:48 -0700313 CmdBuffer fCmdBuffer;
314 GrDrawState* fLastState;
315 GrClipData* fLastClip;
bsalomonbce3d6d2014-07-02 07:54:42 -0700316
cdalton6819df32014-10-15 13:43:48 -0700317 SkTArray<GrTraceMarkerSet, false> fGpuCmdMarkers;
joshualitt6db519c2014-10-29 08:48:18 -0700318 GrClipTarget* fDstGpu;
cdalton6819df32014-10-15 13:43:48 -0700319 bool fClipSet;
bsalomon@google.com86afc2a2011-02-16 16:12:19 +0000320
bsalomon@google.comd62e88e2013-02-01 14:19:27 +0000321 enum ClipProxyState {
322 kUnknown_ClipProxyState,
323 kValid_ClipProxyState,
324 kInvalid_ClipProxyState
325 };
bsalomon@google.comd62e88e2013-02-01 14:19:27 +0000326
bsalomonb3e3a952014-09-19 11:10:40 -0700327 ClipProxyState fClipProxyState;
328 SkRect fClipProxy;
329 GrVertexBufferAllocPool& fVertexPool;
330 GrIndexBufferAllocPool& fIndexPool;
bsalomon@google.com934c5702012-03-20 21:17:58 +0000331
bsalomon@google.com25fb21f2011-06-21 18:17:25 +0000332 struct GeometryPoolState {
bsalomonb3e3a952014-09-19 11:10:40 -0700333 const GrVertexBuffer* fPoolVertexBuffer;
334 int fPoolStartVertex;
335 const GrIndexBuffer* fPoolIndexBuffer;
336 int fPoolStartIndex;
bsalomon@google.com25fb21f2011-06-21 18:17:25 +0000337 // caller may conservatively over reserve vertices / indices.
338 // we release unused space back to allocator if possible
339 // can only do this if there isn't an intervening pushGeometrySource()
bsalomonb3e3a952014-09-19 11:10:40 -0700340 size_t fUsedPoolVertexBytes;
341 size_t fUsedPoolIndexBytes;
bsalomon@google.com25fb21f2011-06-21 18:17:25 +0000342 };
reed@google.comac10a2d2010-12-22 21:39:39 +0000343
bsalomonb3e3a952014-09-19 11:10:40 -0700344 typedef SkSTArray<kGeoPoolStatePreAllocCnt, GeometryPoolState> GeoPoolStateStack;
skia.committer@gmail.com74758112013-08-17 07:01:54 +0000345
bsalomonb3e3a952014-09-19 11:10:40 -0700346 GeoPoolStateStack fGeoPoolStateStack;
347 bool fFlushing;
348 uint32_t fDrawID;
robertphillips@google.comc82a8b72012-06-21 20:15:48 +0000349
joshualitt6db519c2014-10-29 08:48:18 -0700350 typedef GrClipTarget INHERITED;
reed@google.comac10a2d2010-12-22 21:39:39 +0000351};
352
353#endif