blob: 532b83f1d1ca9f1c50adc1d9b3401982f577fc26 [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"
19#include "GrVertexBuffer.h"
reed@google.comac10a2d2010-12-22 21:39:39 +000020
robertphillips@google.com641f8b12012-07-31 19:15:58 +000021#include "SkClipStack.h"
bsalomon@google.comded4f4b2012-06-28 18:48:06 +000022#include "SkTemplates.h"
commit-bot@chromium.orga0b40282013-09-18 13:00:55 +000023#include "SkTypes.h"
bsalomon@google.comded4f4b2012-06-28 18:48:06 +000024
bsalomon@google.com471d4712011-08-23 15:45:25 +000025class GrGpu;
bsalomon@google.com1c13c962011-02-14 16:51:21 +000026class GrIndexBufferAllocPool;
bsalomon@google.com471d4712011-08-23 15:45:25 +000027class GrVertexBufferAllocPool;
reed@google.comac10a2d2010-12-22 21:39:39 +000028
bsalomon@google.com1c13c962011-02-14 16:51:21 +000029/**
bsalomon@google.com55e4a202013-01-11 13:54:21 +000030 * GrInOrderDrawBuffer is an implementation of GrDrawTarget that queues up draws for eventual
31 * playback into a GrGpu. In theory one draw buffer could playback into another. When index or
32 * vertex buffers are used as geometry sources it is the callers the draw buffer only holds
33 * references to the buffers. It is the callers responsibility to ensure that the data is still
34 * valid when the draw buffer is played back into a GrGpu. Similarly, it is the caller's
35 * responsibility to ensure that all referenced textures, buffers, and render-targets are associated
36 * in the GrGpu object that the buffer is played back into. The buffer requires VB and IB pools to
37 * store geometry.
skia.committer@gmail.com07d3a652013-04-10 07:01:15 +000038 */
reed@google.comac10a2d2010-12-22 21:39:39 +000039class GrInOrderDrawBuffer : public GrDrawTarget {
40public:
41
bsalomon@google.com86afc2a2011-02-16 16:12:19 +000042 /**
43 * Creates a GrInOrderDrawBuffer
44 *
bsalomon@google.com6e4e6502013-02-25 20:12:45 +000045 * @param gpu the gpu object that this draw buffer flushes to.
bsalomon@google.com86afc2a2011-02-16 16:12:19 +000046 * @param vertexPool pool where vertices for queued draws will be saved when
47 * the vertex source is either reserved or array.
48 * @param indexPool pool where indices for queued draws will be saved when
49 * the index source is either reserved or array.
50 */
bsalomon@google.com6e4e6502013-02-25 20:12:45 +000051 GrInOrderDrawBuffer(GrGpu* gpu,
bsalomon@google.com471d4712011-08-23 15:45:25 +000052 GrVertexBufferAllocPool* vertexPool,
bsalomon@google.com1c13c962011-02-14 16:51:21 +000053 GrIndexBufferAllocPool* indexPool);
reed@google.comac10a2d2010-12-22 21:39:39 +000054
55 virtual ~GrInOrderDrawBuffer();
56
bsalomon@google.com86afc2a2011-02-16 16:12:19 +000057 /**
bsalomon@google.com55e4a202013-01-11 13:54:21 +000058 * Empties the draw buffer of any queued up draws. This must not be called while inside an
59 * unbalanced pushGeometrySource(). The current draw state and clip are preserved.
bsalomon@google.com86afc2a2011-02-16 16:12:19 +000060 */
61 void reset();
62
63 /**
bsalomon@google.com6e4e6502013-02-25 20:12:45 +000064 * 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 +000065 * is destructive). This buffer must not have an active reserved vertex or index source. Any
66 * reserved geometry on the target will be finalized because it's geometry source will be pushed
67 * before flushing and popped afterwards.
bsalomon@google.com86afc2a2011-02-16 16:12:19 +000068 */
robertphillips@google.com1267fbd2013-07-03 18:37:27 +000069 void flush();
bsalomon@google.com97805382012-03-13 14:32:07 +000070
commit-bot@chromium.orga8916ff2013-08-16 15:53:46 +000071 // tracking for draws
72 virtual DrawToken getCurrentDrawToken() { return DrawToken(this, fDrawID); }
73
bsalomon@google.com86afc2a2011-02-16 16:12:19 +000074 // overrides from GrDrawTarget
jvanverth@google.comb75b0a02013-02-05 20:33:30 +000075 virtual bool geometryHints(int* vertexCount,
bsalomon@google.com97805382012-03-13 14:32:07 +000076 int* indexCount) const SK_OVERRIDE;
commit-bot@chromium.orgfd03d4a2013-07-17 21:39:42 +000077 virtual void clear(const SkIRect* rect,
robertphillips@google.comc82a8b72012-06-21 20:15:48 +000078 GrColor color,
robertphillips@google.com56ce48a2013-10-31 21:44:25 +000079 bool canIgnoreRect,
commit-bot@chromium.org28361fa2014-03-28 16:08:05 +000080 GrRenderTarget* renderTarget) SK_OVERRIDE;
81
82 virtual void discard(GrRenderTarget*) SK_OVERRIDE;
bsalomon@google.com0b335c12011-04-25 19:17:44 +000083
bsalomon@google.comeb851172013-04-15 13:51:00 +000084 virtual void initCopySurfaceDstDesc(const GrSurface* src, GrTextureDesc* desc) SK_OVERRIDE;
85
bsalomon@google.com97805382012-03-13 14:32:07 +000086protected:
bsalomon@google.com02ddc8b2013-01-28 15:35:28 +000087 virtual void clipWillBeSet(const GrClipData* newClip) SK_OVERRIDE;
88
reed@google.comac10a2d2010-12-22 21:39:39 +000089private:
bsalomon@google.coma4f6b102012-06-26 21:04:22 +000090 enum Cmd {
bsalomon@google.comded4f4b2012-06-28 18:48:06 +000091 kDraw_Cmd = 1,
92 kStencilPath_Cmd = 2,
93 kSetState_Cmd = 3,
94 kSetClip_Cmd = 4,
95 kClear_Cmd = 5,
bsalomon@google.com116ad842013-04-09 15:38:19 +000096 kCopySurface_Cmd = 6,
commit-bot@chromium.org32184d82013-10-09 15:14:18 +000097 kDrawPath_Cmd = 7,
commit-bot@chromium.org9b62aa12014-03-25 11:59:40 +000098 kDrawPaths_Cmd = 8,
bsalomon@google.coma4f6b102012-06-26 21:04:22 +000099 };
100
bsalomonb3e3a952014-09-19 11:10:40 -0700101 class Draw : public DrawInfo {
bsalomon@google.comd62e88e2013-02-01 14:19:27 +0000102 public:
bsalomonb3e3a952014-09-19 11:10:40 -0700103 Draw(const DrawInfo& info, const GrVertexBuffer* vb, const GrIndexBuffer* ib)
104 : DrawInfo(info)
105 , fVertexBuffer(vb, GrGpuResourceRef::kRead_IOType)
106 , fIndexBuffer(ib, GrGpuResourceRef::kRead_IOType) {}
107
108 const GrVertexBuffer* vertexBuffer() const { return fVertexBuffer.get(); }
109 const GrIndexBuffer* indexBuffer() const { return fIndexBuffer.get(); }
110
111 private:
112 GrPendingIOResource<const GrVertexBuffer> fVertexBuffer;
113 GrPendingIOResource<const GrIndexBuffer> fIndexBuffer;
reed@google.comac10a2d2010-12-22 21:39:39 +0000114 };
115
commit-bot@chromium.orga0b40282013-09-18 13:00:55 +0000116 struct StencilPath : public ::SkNoncopyable {
bsalomonb3e3a952014-09-19 11:10:40 -0700117 StencilPath(const GrPath* path) : fPath(path, GrGpuResourceRef::kRead_IOType) {}
sugoi@google.com5f74cf82012-12-17 21:16:45 +0000118
bsalomonb3e3a952014-09-19 11:10:40 -0700119 const GrPath* path() const { return fPath.get(); }
120
121 SkPath::FillType fFill;
122
123 private:
124 GrPendingIOResource<const GrPath> fPath;
bsalomon@google.comded4f4b2012-06-28 18:48:06 +0000125 };
126
commit-bot@chromium.org32184d82013-10-09 15:14:18 +0000127 struct DrawPath : public ::SkNoncopyable {
bsalomonb3e3a952014-09-19 11:10:40 -0700128 DrawPath(const GrPath* path) : fPath(path, GrGpuResourceRef::kRead_IOType) {}
commit-bot@chromium.orgc4dc0ad2013-10-09 14:11:33 +0000129
bsalomonb3e3a952014-09-19 11:10:40 -0700130 const GrPath* path() const { return fPath.get(); }
131
132 SkPath::FillType fFill;
133 GrDeviceCoordTexture fDstCopy;
134
135 private:
136 GrPendingIOResource<const GrPath> fPath;
commit-bot@chromium.orgc4dc0ad2013-10-09 14:11:33 +0000137 };
138
commit-bot@chromium.org9b62aa12014-03-25 11:59:40 +0000139 struct DrawPaths : public ::SkNoncopyable {
bsalomonb3e3a952014-09-19 11:10:40 -0700140 DrawPaths(const GrPathRange* pathRange)
141 : fPathRange(pathRange, GrGpuResourceRef::kRead_IOType) {}
commit-bot@chromium.org9b62aa12014-03-25 11:59:40 +0000142
bsalomonb3e3a952014-09-19 11:10:40 -0700143 ~DrawPaths() {
144 if (fTransforms) {
145 SkDELETE_ARRAY(fTransforms);
146 }
147 if (fIndices) {
148 SkDELETE_ARRAY(fIndices);
149 }
150 }
151
152 const GrPathRange* pathRange() const { return fPathRange.get(); }
153
154 uint32_t* fIndices;
155 size_t fCount;
156 float* fTransforms;
157 PathTransformType fTransformsType;
158 SkPath::FillType fFill;
159 GrDeviceCoordTexture fDstCopy;
160
161 private:
162 GrPendingIOResource<const GrPathRange> fPathRange;
commit-bot@chromium.org9b62aa12014-03-25 11:59:40 +0000163 };
164
commit-bot@chromium.org28361fa2014-03-28 16:08:05 +0000165 // This is also used to record a discard by setting the color to GrColor_ILLEGAL
commit-bot@chromium.orga0b40282013-09-18 13:00:55 +0000166 struct Clear : public ::SkNoncopyable {
bsalomonb3e3a952014-09-19 11:10:40 -0700167 Clear(GrRenderTarget* rt) : fRenderTarget(rt, GrGpuResourceRef::kWrite_IOType) {}
168 ~Clear() { }
169 GrRenderTarget* renderTarget() const { return fRenderTarget.get(); }
robertphillips@google.comc82a8b72012-06-21 20:15:48 +0000170
bsalomonb3e3a952014-09-19 11:10:40 -0700171 SkIRect fRect;
172 GrColor fColor;
173 bool fCanIgnoreRect;
174
175 private:
176 GrPendingIOResource<GrRenderTarget> fRenderTarget;
bsalomon@google.com0b335c12011-04-25 19:17:44 +0000177 };
178
commit-bot@chromium.orga0b40282013-09-18 13:00:55 +0000179 struct CopySurface : public ::SkNoncopyable {
bsalomonb3e3a952014-09-19 11:10:40 -0700180 CopySurface(GrSurface* dst, GrSurface* src)
181 : fDst(dst, GrGpuResourceRef::kWrite_IOType)
182 , fSrc(src, GrGpuResourceRef::kRead_IOType) {}
183
184 GrSurface* dst() const { return fDst.get(); }
185 GrSurface* src() const { return fSrc.get(); }
186
187 SkIPoint fDstPoint;
188 SkIRect fSrcRect;
189
190 private:
191 GrPendingIOResource<GrSurface> fDst;
192 GrPendingIOResource<GrSurface> fSrc;
bsalomon@google.com116ad842013-04-09 15:38:19 +0000193 };
194
bsalomonf0480b12014-07-02 12:11:24 -0700195 struct Clip : public ::SkNoncopyable {
196 SkClipStack fStack;
197 SkIPoint fOrigin;
198 };
199
bsalomon@google.com25fb21f2011-06-21 18:17:25 +0000200 // overrides from GrDrawTarget
bsalomon@google.com74749cd2013-01-30 16:12:41 +0000201 virtual void onDraw(const DrawInfo&) SK_OVERRIDE;
commit-bot@chromium.orgfd03d4a2013-07-17 21:39:42 +0000202 virtual void onDrawRect(const SkRect& rect,
commit-bot@chromium.orgfd03d4a2013-07-17 21:39:42 +0000203 const SkRect* localRect,
bsalomon@google.com0406b9e2013-04-02 21:00:15 +0000204 const SkMatrix* localMatrix) SK_OVERRIDE;
commit-bot@chromium.org32184d82013-10-09 15:14:18 +0000205
206 virtual void onStencilPath(const GrPath*, SkPath::FillType) SK_OVERRIDE;
207 virtual void onDrawPath(const GrPath*, SkPath::FillType,
commit-bot@chromium.orgc4dc0ad2013-10-09 14:11:33 +0000208 const GrDeviceCoordTexture* dstCopy) SK_OVERRIDE;
cdaltonb85a0aa2014-07-21 15:32:44 -0700209 virtual void onDrawPaths(const GrPathRange*,
210 const uint32_t indices[], int count,
211 const float transforms[], PathTransformType,
212 SkPath::FillType, const GrDeviceCoordTexture*) SK_OVERRIDE;
commit-bot@chromium.org32184d82013-10-09 15:14:18 +0000213
jvanverth@google.coma6338982013-01-31 21:34:25 +0000214 virtual bool onReserveVertexSpace(size_t vertexSize,
bsalomon@google.com25fb21f2011-06-21 18:17:25 +0000215 int vertexCount,
bsalomon@google.com13f1b6f2012-05-31 12:52:43 +0000216 void** vertices) SK_OVERRIDE;
217 virtual bool onReserveIndexSpace(int indexCount,
218 void** indices) SK_OVERRIDE;
219 virtual void releaseReservedVertexSpace() SK_OVERRIDE;
220 virtual void releaseReservedIndexSpace() SK_OVERRIDE;
bsalomon@google.combcdbbe62011-04-12 15:40:00 +0000221 virtual void onSetVertexSourceToArray(const void* vertexArray,
bsalomon@google.com13f1b6f2012-05-31 12:52:43 +0000222 int vertexCount) SK_OVERRIDE;
bsalomon@google.combcdbbe62011-04-12 15:40:00 +0000223 virtual void onSetIndexSourceToArray(const void* indexArray,
bsalomon@google.com13f1b6f2012-05-31 12:52:43 +0000224 int indexCount) SK_OVERRIDE;
225 virtual void releaseVertexArray() SK_OVERRIDE;
226 virtual void releaseIndexArray() SK_OVERRIDE;
227 virtual void geometrySourceWillPush() SK_OVERRIDE;
bsalomon@google.com02ddc8b2013-01-28 15:35:28 +0000228 virtual void geometrySourceWillPop(const GeometrySrcState& restoredState) SK_OVERRIDE;
jvanverth@google.comb75b0a02013-02-05 20:33:30 +0000229 virtual void willReserveVertexAndIndexSpace(int vertexCount,
bsalomon@google.com02ddc8b2013-01-28 15:35:28 +0000230 int indexCount) SK_OVERRIDE;
bsalomon@google.com116ad842013-04-09 15:38:19 +0000231 virtual bool onCopySurface(GrSurface* dst,
232 GrSurface* src,
233 const SkIRect& srcRect,
234 const SkIPoint& dstPoint) SK_OVERRIDE;
235 virtual bool onCanCopySurface(GrSurface* dst,
236 GrSurface* src,
237 const SkIRect& srcRect,
238 const SkIPoint& dstPoint) SK_OVERRIDE;
239
bsalomon@google.comd62e88e2013-02-01 14:19:27 +0000240 bool quickInsideClip(const SkRect& devBounds);
bsalomon@google.com02ddc8b2013-01-28 15:35:28 +0000241
commit-bot@chromium.org2a05de02014-03-25 15:17:32 +0000242 virtual void didAddGpuTraceMarker() SK_OVERRIDE {}
243 virtual void didRemoveGpuTraceMarker() SK_OVERRIDE {}
commit-bot@chromium.orga3baf3b2014-02-21 18:45:30 +0000244
bsalomon@google.comd62e88e2013-02-01 14:19:27 +0000245 // Attempts to concat instances from info onto the previous draw. info must represent an
246 // instanced draw. The caller must have already recorded a new draw state and clip if necessary.
247 int concatInstancedDraw(const DrawInfo& info);
bsalomon@google.com1c13c962011-02-14 16:51:21 +0000248
bsalomon838f62d2014-08-05 07:15:57 -0700249 // Determines whether the current draw operation requieres a new drawstate and if so records it.
250 void recordStateIfNecessary();
251 // We lazily record clip changes in order to skip clips that have no effect.
bsalomon@google.com86afc2a2011-02-16 16:12:19 +0000252 bool needsNewClip() const;
reed@google.comac10a2d2010-12-22 21:39:39 +0000253
bsalomon@google.coma4f6b102012-06-26 21:04:22 +0000254 // these functions record a command
bsalomon@google.comded4f4b2012-06-28 18:48:06 +0000255 void recordState();
bsalomon@google.comded4f4b2012-06-28 18:48:06 +0000256 void recordClip();
bsalomonb3e3a952014-09-19 11:10:40 -0700257 Draw* recordDraw(const DrawInfo&, const GrVertexBuffer*, const GrIndexBuffer*);
258 StencilPath* recordStencilPath(const GrPath*);
259 DrawPath* recordDrawPath(const GrPath*);
260 DrawPaths* recordDrawPaths(const GrPathRange*);
261 Clear* recordClear(GrRenderTarget*);
262 CopySurface* recordCopySurface(GrSurface* dst, GrSurface* src);
263
264 virtual bool isIssued(uint32_t drawID) { return drawID != fDrawID; }
265 void addToCmdBuffer(uint8_t cmd);
bsalomon@google.com934c5702012-03-20 21:17:58 +0000266
bsalomon@google.com116ad842013-04-09 15:38:19 +0000267 // TODO: Use a single allocator for commands and records
bsalomon@google.com4b90c622011-09-28 17:52:15 +0000268 enum {
bsalomon@google.coma4f6b102012-06-26 21:04:22 +0000269 kCmdPreallocCnt = 32,
bsalomonbce3d6d2014-07-02 07:54:42 -0700270 kDrawPreallocCnt = 16,
bsalomon@google.comded4f4b2012-06-28 18:48:06 +0000271 kStencilPathPreallocCnt = 8,
commit-bot@chromium.org32184d82013-10-09 15:14:18 +0000272 kDrawPathPreallocCnt = 8,
commit-bot@chromium.org9b62aa12014-03-25 11:59:40 +0000273 kDrawPathsPreallocCnt = 8,
bsalomon@google.com4b90c622011-09-28 17:52:15 +0000274 kStatePreallocCnt = 8,
275 kClipPreallocCnt = 8,
bsalomonbce3d6d2014-07-02 07:54:42 -0700276 kClearPreallocCnt = 8,
bsalomon@google.com4b90c622011-09-28 17:52:15 +0000277 kGeoPoolStatePreAllocCnt = 4,
bsalomon@google.com116ad842013-04-09 15:38:19 +0000278 kCopySurfacePreallocCnt = 4,
bsalomon@google.com4b90c622011-09-28 17:52:15 +0000279 };
reed@google.comac10a2d2010-12-22 21:39:39 +0000280
bsalomonb3e3a952014-09-19 11:10:40 -0700281 typedef GrTAllocator<Draw> DrawAllocator;
282 typedef GrTAllocator<StencilPath> StencilPathAllocator;
283 typedef GrTAllocator<DrawPath> DrawPathAllocator;
284 typedef GrTAllocator<DrawPaths> DrawPathsAllocator;
285 typedef GrTAllocator<GrDrawState> StateAllocator;
286 typedef GrTAllocator<Clear> ClearAllocator;
287 typedef GrTAllocator<CopySurface> CopySurfaceAllocator;
288 typedef GrTAllocator<Clip> ClipAllocator;
bsalomonbce3d6d2014-07-02 07:54:42 -0700289
bsalomonb3e3a952014-09-19 11:10:40 -0700290 GrSTAllocator<kDrawPreallocCnt, Draw> fDraws;
291 GrSTAllocator<kStencilPathPreallocCnt, StencilPath> fStencilPaths;
292 GrSTAllocator<kDrawPathPreallocCnt, DrawPath> fDrawPath;
293 GrSTAllocator<kDrawPathsPreallocCnt, DrawPaths> fDrawPaths;
294 GrSTAllocator<kStatePreallocCnt, GrDrawState> fStates;
295 GrSTAllocator<kClearPreallocCnt, Clear> fClears;
296 GrSTAllocator<kCopySurfacePreallocCnt, CopySurface> fCopySurfaces;
297 GrSTAllocator<kClipPreallocCnt, Clip> fClips;
bsalomonbce3d6d2014-07-02 07:54:42 -0700298
bsalomonb3e3a952014-09-19 11:10:40 -0700299 SkTArray<GrTraceMarkerSet, false> fGpuCmdMarkers;
300 SkSTArray<kCmdPreallocCnt, uint8_t, true> fCmds;
301 GrDrawTarget* fDstGpu;
302 bool fClipSet;
bsalomon@google.com86afc2a2011-02-16 16:12:19 +0000303
bsalomon@google.comd62e88e2013-02-01 14:19:27 +0000304 enum ClipProxyState {
305 kUnknown_ClipProxyState,
306 kValid_ClipProxyState,
307 kInvalid_ClipProxyState
308 };
bsalomon@google.comd62e88e2013-02-01 14:19:27 +0000309
bsalomonb3e3a952014-09-19 11:10:40 -0700310 ClipProxyState fClipProxyState;
311 SkRect fClipProxy;
312 GrVertexBufferAllocPool& fVertexPool;
313 GrIndexBufferAllocPool& fIndexPool;
bsalomon@google.com934c5702012-03-20 21:17:58 +0000314
bsalomon@google.com25fb21f2011-06-21 18:17:25 +0000315 struct GeometryPoolState {
bsalomonb3e3a952014-09-19 11:10:40 -0700316 const GrVertexBuffer* fPoolVertexBuffer;
317 int fPoolStartVertex;
318 const GrIndexBuffer* fPoolIndexBuffer;
319 int fPoolStartIndex;
bsalomon@google.com25fb21f2011-06-21 18:17:25 +0000320 // caller may conservatively over reserve vertices / indices.
321 // we release unused space back to allocator if possible
322 // can only do this if there isn't an intervening pushGeometrySource()
bsalomonb3e3a952014-09-19 11:10:40 -0700323 size_t fUsedPoolVertexBytes;
324 size_t fUsedPoolIndexBytes;
bsalomon@google.com25fb21f2011-06-21 18:17:25 +0000325 };
reed@google.comac10a2d2010-12-22 21:39:39 +0000326
bsalomonb3e3a952014-09-19 11:10:40 -0700327 typedef SkSTArray<kGeoPoolStatePreAllocCnt, GeometryPoolState> GeoPoolStateStack;
skia.committer@gmail.com74758112013-08-17 07:01:54 +0000328
bsalomonb3e3a952014-09-19 11:10:40 -0700329 GeoPoolStateStack fGeoPoolStateStack;
330 bool fFlushing;
331 uint32_t fDrawID;
robertphillips@google.comc82a8b72012-06-21 20:15:48 +0000332
bsalomon@google.com86afc2a2011-02-16 16:12:19 +0000333 typedef GrDrawTarget INHERITED;
reed@google.comac10a2d2010-12-22 21:39:39 +0000334};
335
336#endif