blob: 373c5b4d5937f2ebcb49df6b5efb60fd28e047f1 [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"
joshualittd53a8272014-11-10 16:03:14 -080012#include "GrGpu.h"
bsalomonb3e3a952014-09-19 11:10:40 -070013#include "GrIndexBuffer.h"
bsalomonae59b772014-11-19 08:23:49 -080014#include "GrOptDrawState.h"
bsalomon@google.comded4f4b2012-06-28 18:48:06 +000015#include "GrPath.h"
bsalomonb3e3a952014-09-19 11:10:40 -070016#include "GrPathRange.h"
bsalomonae59b772014-11-19 08:23:49 -080017#include "GrRenderTarget.h"
bsalomonb3e3a952014-09-19 11:10:40 -070018#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.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 */
joshualitt6db519c2014-10-29 08:48:18 -070039class GrInOrderDrawBuffer : public GrClipTarget {
reed@google.comac10a2d2010-12-22 21:39:39 +000040public:
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
bsalomon8ee4e602014-11-26 10:20:45 -080055 virtual ~GrInOrderDrawBuffer();
reed@google.comac10a2d2010-12-22 21:39:39 +000056
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
bsalomon8ee4e602014-11-26 10:20:45 -080072 virtual DrawToken getCurrentDrawToken() { return DrawToken(this, fDrawID); }
commit-bot@chromium.orga8916ff2013-08-16 15:53:46 +000073
bsalomon@google.com86afc2a2011-02-16 16:12:19 +000074 // overrides from GrDrawTarget
bsalomon8ee4e602014-11-26 10:20:45 -080075 virtual bool geometryHints(size_t vertexStride,
76 int* vertexCount,
77 int* indexCount) const SK_OVERRIDE;
joshualitt6db519c2014-10-29 08:48:18 -070078
bsalomon8ee4e602014-11-26 10:20:45 -080079 virtual bool copySurface(GrSurface* dst,
80 GrSurface* src,
81 const SkIRect& srcRect,
82 const SkIPoint& dstPoint) SK_OVERRIDE;
joshualitta7024152014-11-03 14:16:35 -080083
bsalomon8ee4e602014-11-26 10:20:45 -080084 virtual bool canCopySurface(const GrSurface* dst,
85 const GrSurface* src,
86 const SkIRect& srcRect,
87 const SkIPoint& dstPoint) SK_OVERRIDE;
88
89 virtual void clearStencilClip(const SkIRect& rect,
90 bool insideClip,
91 GrRenderTarget* renderTarget) SK_OVERRIDE;
92
93 virtual void discard(GrRenderTarget*) SK_OVERRIDE;
94
95 virtual void initCopySurfaceDstDesc(const GrSurface* src, GrSurfaceDesc* desc) SK_OVERRIDE;
bsalomon@google.comeb851172013-04-15 13:51:00 +000096
reed@google.comac10a2d2010-12-22 21:39:39 +000097private:
joshualitt2c93efe2014-11-06 12:57:13 -080098 typedef GrClipMaskManager::ScissorState ScissorState;
cdalton6819df32014-10-15 13:43:48 -070099 enum {
bsalomon@google.comded4f4b2012-06-28 18:48:06 +0000100 kDraw_Cmd = 1,
101 kStencilPath_Cmd = 2,
102 kSetState_Cmd = 3,
joshualitt2c93efe2014-11-06 12:57:13 -0800103 kClear_Cmd = 4,
104 kCopySurface_Cmd = 5,
105 kDrawPath_Cmd = 6,
106 kDrawPaths_Cmd = 7,
bsalomon@google.coma4f6b102012-06-26 21:04:22 +0000107 };
108
cdalton6819df32014-10-15 13:43:48 -0700109 struct Cmd : ::SkNoncopyable {
110 Cmd(uint8_t type) : fType(type) {}
111 virtual ~Cmd() {}
112
cdalton3fc6a2f2014-11-13 11:54:20 -0800113 virtual void execute(GrInOrderDrawBuffer*, const GrOptDrawState*) = 0;
cdalton6819df32014-10-15 13:43:48 -0700114
115 uint8_t fType;
116 };
117
118 struct Draw : public Cmd {
joshualitt54e0c122014-11-19 09:38:51 -0800119 Draw(const DrawInfo& info) : Cmd(kDraw_Cmd), fInfo(info) {}
bsalomonb3e3a952014-09-19 11:10:40 -0700120
bsalomon932f8662014-11-24 06:47:48 -0800121 void execute(GrInOrderDrawBuffer*, const GrOptDrawState*) SK_OVERRIDE;
cdalton6819df32014-10-15 13:43:48 -0700122
joshualitt2c93efe2014-11-06 12:57:13 -0800123 DrawInfo fInfo;
reed@google.comac10a2d2010-12-22 21:39:39 +0000124 };
125
cdalton6819df32014-10-15 13:43:48 -0700126 struct StencilPath : public Cmd {
127 StencilPath(const GrPath* path) : Cmd(kStencilPath_Cmd), fPath(path) {}
sugoi@google.com5f74cf82012-12-17 21:16:45 +0000128
bsalomonb3e3a952014-09-19 11:10:40 -0700129 const GrPath* path() const { return fPath.get(); }
130
bsalomon932f8662014-11-24 06:47:48 -0800131 void execute(GrInOrderDrawBuffer*, const GrOptDrawState*) SK_OVERRIDE;
cdalton6819df32014-10-15 13:43:48 -0700132
joshualitt2c93efe2014-11-06 12:57:13 -0800133 GrStencilSettings fStencilSettings;
bsalomonb3e3a952014-09-19 11:10:40 -0700134
135 private:
bsalomonbcf0a522014-10-08 08:40:09 -0700136 GrPendingIOResource<const GrPath, kRead_GrIOType> fPath;
bsalomon@google.comded4f4b2012-06-28 18:48:06 +0000137 };
138
cdalton6819df32014-10-15 13:43:48 -0700139 struct DrawPath : public Cmd {
140 DrawPath(const GrPath* path) : Cmd(kDrawPath_Cmd), fPath(path) {}
commit-bot@chromium.orgc4dc0ad2013-10-09 14:11:33 +0000141
bsalomonb3e3a952014-09-19 11:10:40 -0700142 const GrPath* path() const { return fPath.get(); }
143
bsalomon932f8662014-11-24 06:47:48 -0800144 void execute(GrInOrderDrawBuffer*, const GrOptDrawState*) SK_OVERRIDE;
cdalton6819df32014-10-15 13:43:48 -0700145
joshualitt2c93efe2014-11-06 12:57:13 -0800146 GrStencilSettings fStencilSettings;
bsalomonb3e3a952014-09-19 11:10:40 -0700147
148 private:
bsalomonbcf0a522014-10-08 08:40:09 -0700149 GrPendingIOResource<const GrPath, kRead_GrIOType> fPath;
commit-bot@chromium.orgc4dc0ad2013-10-09 14:11:33 +0000150 };
151
cdalton6819df32014-10-15 13:43:48 -0700152 struct DrawPaths : public Cmd {
153 DrawPaths(const GrPathRange* pathRange) : Cmd(kDrawPaths_Cmd), fPathRange(pathRange) {}
bsalomonb3e3a952014-09-19 11:10:40 -0700154
155 const GrPathRange* pathRange() const { return fPathRange.get(); }
156
bsalomon932f8662014-11-24 06:47:48 -0800157 void execute(GrInOrderDrawBuffer*, const GrOptDrawState*) SK_OVERRIDE;
cdalton6819df32014-10-15 13:43:48 -0700158
cdalton3fc6a2f2014-11-13 11:54:20 -0800159 int fIndicesLocation;
cdalton55b24af2014-11-25 11:00:56 -0800160 PathIndexType fIndexType;
cdalton3fc6a2f2014-11-13 11:54:20 -0800161 int fTransformsLocation;
cdalton55b24af2014-11-25 11:00:56 -0800162 PathTransformType fTransformType;
163 int fCount;
joshualitt2c93efe2014-11-06 12:57:13 -0800164 GrStencilSettings fStencilSettings;
bsalomonb3e3a952014-09-19 11:10:40 -0700165
166 private:
bsalomonbcf0a522014-10-08 08:40:09 -0700167 GrPendingIOResource<const GrPathRange, kRead_GrIOType> fPathRange;
commit-bot@chromium.org9b62aa12014-03-25 11:59:40 +0000168 };
169
commit-bot@chromium.org28361fa2014-03-28 16:08:05 +0000170 // This is also used to record a discard by setting the color to GrColor_ILLEGAL
cdalton6819df32014-10-15 13:43:48 -0700171 struct Clear : public Cmd {
172 Clear(GrRenderTarget* rt) : Cmd(kClear_Cmd), fRenderTarget(rt) {}
173
bsalomonb3e3a952014-09-19 11:10:40 -0700174 GrRenderTarget* renderTarget() const { return fRenderTarget.get(); }
robertphillips@google.comc82a8b72012-06-21 20:15:48 +0000175
bsalomon932f8662014-11-24 06:47:48 -0800176 void execute(GrInOrderDrawBuffer*, const GrOptDrawState*) SK_OVERRIDE;
cdalton6819df32014-10-15 13:43:48 -0700177
bsalomonb3e3a952014-09-19 11:10:40 -0700178 SkIRect fRect;
179 GrColor fColor;
180 bool fCanIgnoreRect;
181
182 private:
bsalomonbcf0a522014-10-08 08:40:09 -0700183 GrPendingIOResource<GrRenderTarget, kWrite_GrIOType> fRenderTarget;
bsalomon@google.com0b335c12011-04-25 19:17:44 +0000184 };
185
joshualitt6db519c2014-10-29 08:48:18 -0700186 // This command is ONLY used by the clip mask manager to clear the stencil clip bits
187 struct ClearStencilClip : public Cmd {
188 ClearStencilClip(GrRenderTarget* rt) : Cmd(kClear_Cmd), fRenderTarget(rt) {}
189
190 GrRenderTarget* renderTarget() const { return fRenderTarget.get(); }
191
bsalomon932f8662014-11-24 06:47:48 -0800192 void execute(GrInOrderDrawBuffer*, const GrOptDrawState*) SK_OVERRIDE;
joshualitt6db519c2014-10-29 08:48:18 -0700193
194 SkIRect fRect;
195 bool fInsideClip;
196
197 private:
198 GrPendingIOResource<GrRenderTarget, kWrite_GrIOType> fRenderTarget;
199 };
200
cdalton6819df32014-10-15 13:43:48 -0700201 struct CopySurface : public Cmd {
202 CopySurface(GrSurface* dst, GrSurface* src) : Cmd(kCopySurface_Cmd), fDst(dst), fSrc(src) {}
bsalomonb3e3a952014-09-19 11:10:40 -0700203
204 GrSurface* dst() const { return fDst.get(); }
205 GrSurface* src() const { return fSrc.get(); }
206
bsalomon932f8662014-11-24 06:47:48 -0800207 void execute(GrInOrderDrawBuffer*, const GrOptDrawState*) SK_OVERRIDE;
cdalton6819df32014-10-15 13:43:48 -0700208
bsalomonb3e3a952014-09-19 11:10:40 -0700209 SkIPoint fDstPoint;
210 SkIRect fSrcRect;
211
212 private:
bsalomonbcf0a522014-10-08 08:40:09 -0700213 GrPendingIOResource<GrSurface, kWrite_GrIOType> fDst;
214 GrPendingIOResource<GrSurface, kRead_GrIOType> fSrc;
bsalomon@google.com116ad842013-04-09 15:38:19 +0000215 };
216
cdalton6819df32014-10-15 13:43:48 -0700217 struct SetState : public Cmd {
bsalomon932f8662014-11-24 06:47:48 -0800218 SetState(const GrDrawState& drawState, GrGpu* gpu, const ScissorState& scissor,
219 const GrDeviceCoordTexture* dstCopy, GrGpu::DrawType drawType)
220 : Cmd(kSetState_Cmd)
221 , fState(drawState, gpu, scissor, dstCopy, drawType) {}
cdalton6819df32014-10-15 13:43:48 -0700222
bsalomon932f8662014-11-24 06:47:48 -0800223 void execute(GrInOrderDrawBuffer*, const GrOptDrawState*) SK_OVERRIDE;
cdalton6819df32014-10-15 13:43:48 -0700224
bsalomon932f8662014-11-24 06:47:48 -0800225 const GrOptDrawState fState;
226 GrGpu::DrawType fDrawType;
bsalomonf0480b12014-07-02 12:11:24 -0700227 };
228
cdalton6819df32014-10-15 13:43:48 -0700229 typedef void* TCmdAlign; // This wouldn't be enough align if a command used long double.
230 typedef GrTRecorder<Cmd, TCmdAlign> CmdBuffer;
231
bsalomon@google.com25fb21f2011-06-21 18:17:25 +0000232 // overrides from GrDrawTarget
bsalomonae59b772014-11-19 08:23:49 -0800233 void onDraw(const GrDrawState&,
234 const DrawInfo&,
joshualitt9176e2c2014-11-20 07:28:52 -0800235 const ScissorState&,
236 const GrDeviceCoordTexture* dstCopy) SK_OVERRIDE;
bsalomonae59b772014-11-19 08:23:49 -0800237 void onDrawRect(GrDrawState*,
238 const SkRect& rect,
239 const SkRect* localRect,
240 const SkMatrix* localMatrix) SK_OVERRIDE;
commit-bot@chromium.org32184d82013-10-09 15:14:18 +0000241
bsalomonae59b772014-11-19 08:23:49 -0800242 void onStencilPath(const GrDrawState&,
243 const GrPath*,
joshualitt54e0c122014-11-19 09:38:51 -0800244 const ScissorState&,
bsalomonae59b772014-11-19 08:23:49 -0800245 const GrStencilSettings&) SK_OVERRIDE;
246 void onDrawPath(const GrDrawState&,
247 const GrPath*,
joshualitt54e0c122014-11-19 09:38:51 -0800248 const ScissorState&,
bsalomonae59b772014-11-19 08:23:49 -0800249 const GrStencilSettings&,
250 const GrDeviceCoordTexture* dstCopy) SK_OVERRIDE;
251 void onDrawPaths(const GrDrawState&,
252 const GrPathRange*,
cdalton55b24af2014-11-25 11:00:56 -0800253 const void* indices,
254 PathIndexType,
255 const float transformValues[],
bsalomonae59b772014-11-19 08:23:49 -0800256 PathTransformType,
cdalton55b24af2014-11-25 11:00:56 -0800257 int count,
joshualitt54e0c122014-11-19 09:38:51 -0800258 const ScissorState&,
bsalomonae59b772014-11-19 08:23:49 -0800259 const GrStencilSettings&,
260 const GrDeviceCoordTexture*) SK_OVERRIDE;
261 void onClear(const SkIRect* rect,
262 GrColor color,
263 bool canIgnoreRect,
264 GrRenderTarget* renderTarget) SK_OVERRIDE;
265 void setDrawBuffers(DrawInfo*) SK_OVERRIDE;
commit-bot@chromium.org32184d82013-10-09 15:14:18 +0000266
bsalomonae59b772014-11-19 08:23:49 -0800267 bool onReserveVertexSpace(size_t vertexSize, int vertexCount, void** vertices) SK_OVERRIDE;
268 bool onReserveIndexSpace(int indexCount, void** indices) SK_OVERRIDE;
269 void releaseReservedVertexSpace() SK_OVERRIDE;
270 void releaseReservedIndexSpace() SK_OVERRIDE;
271 void geometrySourceWillPush() SK_OVERRIDE;
272 void geometrySourceWillPop(const GeometrySrcState& restoredState) SK_OVERRIDE;
273 void willReserveVertexAndIndexSpace(int vertexCount,
274 size_t vertexStride,
275 int indexCount) SK_OVERRIDE;
bsalomon@google.com116ad842013-04-09 15:38:19 +0000276
bsalomon@google.comd62e88e2013-02-01 14:19:27 +0000277 // Attempts to concat instances from info onto the previous draw. info must represent an
278 // instanced draw. The caller must have already recorded a new draw state and clip if necessary.
joshualitt54e0c122014-11-19 09:38:51 -0800279 int concatInstancedDraw(const GrDrawState&, const DrawInfo&);
bsalomon@google.com1c13c962011-02-14 16:51:21 +0000280
bsalomonae59b772014-11-19 08:23:49 -0800281 // Determines whether the current draw operation requires a new GrOptDrawState and if so
282 // records it. If the draw can be skipped false is returned and no new GrOptDrawState is
283 // recorded.
284 bool SK_WARN_UNUSED_RESULT recordStateAndShouldDraw(const GrDrawState&,
285 GrGpu::DrawType,
joshualitt54e0c122014-11-19 09:38:51 -0800286 const GrClipMaskManager::ScissorState&,
bsalomonae59b772014-11-19 08:23:49 -0800287 const GrDeviceCoordTexture*);
bsalomon838f62d2014-08-05 07:15:57 -0700288 // We lazily record clip changes in order to skip clips that have no effect.
cdalton6819df32014-10-15 13:43:48 -0700289 void recordClipIfNecessary();
290 // Records any trace markers for a command after adding it to the buffer.
291 void recordTraceMarkersIfNecessary();
bsalomonb3e3a952014-09-19 11:10:40 -0700292
293 virtual bool isIssued(uint32_t drawID) { return drawID != fDrawID; }
bsalomon@google.com934c5702012-03-20 21:17:58 +0000294
bsalomon@google.com116ad842013-04-09 15:38:19 +0000295 // TODO: Use a single allocator for commands and records
bsalomon@google.com4b90c622011-09-28 17:52:15 +0000296 enum {
cdaltonc4650ee2014-11-07 12:51:18 -0800297 kCmdBufferInitialSizeInBytes = 8 * 1024,
cdalton55b24af2014-11-25 11:00:56 -0800298 kPathIdxBufferMinReserve = 2 * 64, // 64 uint16_t's
299 kPathXformBufferMinReserve = 2 * 64, // 64 two-float transforms
cdalton6819df32014-10-15 13:43:48 -0700300 kGeoPoolStatePreAllocCnt = 4,
bsalomon@google.com4b90c622011-09-28 17:52:15 +0000301 };
reed@google.comac10a2d2010-12-22 21:39:39 +0000302
bsalomon@google.com25fb21f2011-06-21 18:17:25 +0000303 struct GeometryPoolState {
bsalomonb3e3a952014-09-19 11:10:40 -0700304 const GrVertexBuffer* fPoolVertexBuffer;
305 int fPoolStartVertex;
306 const GrIndexBuffer* fPoolIndexBuffer;
307 int fPoolStartIndex;
bsalomon@google.com25fb21f2011-06-21 18:17:25 +0000308 // caller may conservatively over reserve vertices / indices.
309 // we release unused space back to allocator if possible
310 // can only do this if there isn't an intervening pushGeometrySource()
bsalomonb3e3a952014-09-19 11:10:40 -0700311 size_t fUsedPoolVertexBytes;
312 size_t fUsedPoolIndexBytes;
bsalomon@google.com25fb21f2011-06-21 18:17:25 +0000313 };
reed@google.comac10a2d2010-12-22 21:39:39 +0000314
bsalomonb3e3a952014-09-19 11:10:40 -0700315 typedef SkSTArray<kGeoPoolStatePreAllocCnt, GeometryPoolState> GeoPoolStateStack;
skia.committer@gmail.com74758112013-08-17 07:01:54 +0000316
bsalomonae59b772014-11-19 08:23:49 -0800317 CmdBuffer fCmdBuffer;
bsalomon932f8662014-11-24 06:47:48 -0800318 const GrOptDrawState* fPrevState;
bsalomonae59b772014-11-19 08:23:49 -0800319 SkTArray<GrTraceMarkerSet, false> fGpuCmdMarkers;
320 GrGpu* fDstGpu;
321 GrVertexBufferAllocPool& fVertexPool;
322 GrIndexBufferAllocPool& fIndexPool;
cdalton55b24af2014-11-25 11:00:56 -0800323 SkTDArray<char> fPathIndexBuffer;
bsalomonae59b772014-11-19 08:23:49 -0800324 SkTDArray<float> fPathTransformBuffer;
325 GeoPoolStateStack fGeoPoolStateStack;
326 bool fFlushing;
327 uint32_t fDrawID;
robertphillips@google.comc82a8b72012-06-21 20:15:48 +0000328
joshualitt6db519c2014-10-29 08:48:18 -0700329 typedef GrClipTarget INHERITED;
reed@google.comac10a2d2010-12-22 21:39:39 +0000330};
331
332#endif