blob: 415c3e1d1d789ea8b79fac34118592d4c31a2a15 [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
bsalomonf90a02b2014-11-26 12:28:00 -080055 ~GrInOrderDrawBuffer() SK_OVERRIDE;
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
bsalomonf90a02b2014-11-26 12:28:00 -080072 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
bsalomonf90a02b2014-11-26 12:28:00 -080075 bool geometryHints(size_t vertexStride,
76 int* vertexCount,
77 int* indexCount) const SK_OVERRIDE;
joshualitt6db519c2014-10-29 08:48:18 -070078
bsalomonf90a02b2014-11-26 12:28:00 -080079 void clearStencilClip(const SkIRect& rect,
80 bool insideClip,
81 GrRenderTarget* renderTarget) SK_OVERRIDE;
joshualitta7024152014-11-03 14:16:35 -080082
bsalomonf90a02b2014-11-26 12:28:00 -080083 void discard(GrRenderTarget*) SK_OVERRIDE;
bsalomon@google.comeb851172013-04-15 13:51:00 +000084
reed@google.comac10a2d2010-12-22 21:39:39 +000085private:
joshualitt2c93efe2014-11-06 12:57:13 -080086 typedef GrClipMaskManager::ScissorState ScissorState;
cdalton6819df32014-10-15 13:43:48 -070087 enum {
bsalomon@google.comded4f4b2012-06-28 18:48:06 +000088 kDraw_Cmd = 1,
89 kStencilPath_Cmd = 2,
90 kSetState_Cmd = 3,
joshualitt2c93efe2014-11-06 12:57:13 -080091 kClear_Cmd = 4,
92 kCopySurface_Cmd = 5,
93 kDrawPath_Cmd = 6,
94 kDrawPaths_Cmd = 7,
bsalomon@google.coma4f6b102012-06-26 21:04:22 +000095 };
96
cdalton6819df32014-10-15 13:43:48 -070097 struct Cmd : ::SkNoncopyable {
98 Cmd(uint8_t type) : fType(type) {}
99 virtual ~Cmd() {}
100
cdalton3fc6a2f2014-11-13 11:54:20 -0800101 virtual void execute(GrInOrderDrawBuffer*, const GrOptDrawState*) = 0;
cdalton6819df32014-10-15 13:43:48 -0700102
103 uint8_t fType;
104 };
105
106 struct Draw : public Cmd {
joshualitt54e0c122014-11-19 09:38:51 -0800107 Draw(const DrawInfo& info) : Cmd(kDraw_Cmd), fInfo(info) {}
bsalomonb3e3a952014-09-19 11:10:40 -0700108
bsalomon932f8662014-11-24 06:47:48 -0800109 void execute(GrInOrderDrawBuffer*, const GrOptDrawState*) SK_OVERRIDE;
cdalton6819df32014-10-15 13:43:48 -0700110
joshualitt2c93efe2014-11-06 12:57:13 -0800111 DrawInfo fInfo;
reed@google.comac10a2d2010-12-22 21:39:39 +0000112 };
113
cdalton6819df32014-10-15 13:43:48 -0700114 struct StencilPath : public Cmd {
115 StencilPath(const GrPath* path) : Cmd(kStencilPath_Cmd), fPath(path) {}
sugoi@google.com5f74cf82012-12-17 21:16:45 +0000116
bsalomonb3e3a952014-09-19 11:10:40 -0700117 const GrPath* path() const { return fPath.get(); }
118
bsalomon932f8662014-11-24 06:47:48 -0800119 void execute(GrInOrderDrawBuffer*, const GrOptDrawState*) SK_OVERRIDE;
cdalton6819df32014-10-15 13:43:48 -0700120
joshualitt2c93efe2014-11-06 12:57:13 -0800121 GrStencilSettings fStencilSettings;
bsalomonb3e3a952014-09-19 11:10:40 -0700122
123 private:
bsalomonbcf0a522014-10-08 08:40:09 -0700124 GrPendingIOResource<const GrPath, kRead_GrIOType> fPath;
bsalomon@google.comded4f4b2012-06-28 18:48:06 +0000125 };
126
cdalton6819df32014-10-15 13:43:48 -0700127 struct DrawPath : public Cmd {
128 DrawPath(const GrPath* path) : Cmd(kDrawPath_Cmd), fPath(path) {}
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
bsalomon932f8662014-11-24 06:47:48 -0800132 void execute(GrInOrderDrawBuffer*, const GrOptDrawState*) SK_OVERRIDE;
cdalton6819df32014-10-15 13:43:48 -0700133
joshualitt2c93efe2014-11-06 12:57:13 -0800134 GrStencilSettings fStencilSettings;
bsalomonb3e3a952014-09-19 11:10:40 -0700135
136 private:
bsalomonbcf0a522014-10-08 08:40:09 -0700137 GrPendingIOResource<const GrPath, kRead_GrIOType> fPath;
commit-bot@chromium.orgc4dc0ad2013-10-09 14:11:33 +0000138 };
139
cdalton6819df32014-10-15 13:43:48 -0700140 struct DrawPaths : public Cmd {
141 DrawPaths(const GrPathRange* pathRange) : Cmd(kDrawPaths_Cmd), fPathRange(pathRange) {}
bsalomonb3e3a952014-09-19 11:10:40 -0700142
143 const GrPathRange* pathRange() const { return fPathRange.get(); }
144
bsalomon932f8662014-11-24 06:47:48 -0800145 void execute(GrInOrderDrawBuffer*, const GrOptDrawState*) SK_OVERRIDE;
cdalton6819df32014-10-15 13:43:48 -0700146
cdalton3fc6a2f2014-11-13 11:54:20 -0800147 int fIndicesLocation;
cdalton55b24af2014-11-25 11:00:56 -0800148 PathIndexType fIndexType;
cdalton3fc6a2f2014-11-13 11:54:20 -0800149 int fTransformsLocation;
cdalton55b24af2014-11-25 11:00:56 -0800150 PathTransformType fTransformType;
151 int fCount;
joshualitt2c93efe2014-11-06 12:57:13 -0800152 GrStencilSettings fStencilSettings;
bsalomonb3e3a952014-09-19 11:10:40 -0700153
154 private:
bsalomonbcf0a522014-10-08 08:40:09 -0700155 GrPendingIOResource<const GrPathRange, kRead_GrIOType> fPathRange;
commit-bot@chromium.org9b62aa12014-03-25 11:59:40 +0000156 };
157
commit-bot@chromium.org28361fa2014-03-28 16:08:05 +0000158 // This is also used to record a discard by setting the color to GrColor_ILLEGAL
cdalton6819df32014-10-15 13:43:48 -0700159 struct Clear : public Cmd {
160 Clear(GrRenderTarget* rt) : Cmd(kClear_Cmd), fRenderTarget(rt) {}
161
bsalomonb3e3a952014-09-19 11:10:40 -0700162 GrRenderTarget* renderTarget() const { return fRenderTarget.get(); }
robertphillips@google.comc82a8b72012-06-21 20:15:48 +0000163
bsalomon932f8662014-11-24 06:47:48 -0800164 void execute(GrInOrderDrawBuffer*, const GrOptDrawState*) SK_OVERRIDE;
cdalton6819df32014-10-15 13:43:48 -0700165
bsalomonb3e3a952014-09-19 11:10:40 -0700166 SkIRect fRect;
167 GrColor fColor;
168 bool fCanIgnoreRect;
169
170 private:
bsalomonbcf0a522014-10-08 08:40:09 -0700171 GrPendingIOResource<GrRenderTarget, kWrite_GrIOType> fRenderTarget;
bsalomon@google.com0b335c12011-04-25 19:17:44 +0000172 };
173
joshualitt6db519c2014-10-29 08:48:18 -0700174 // This command is ONLY used by the clip mask manager to clear the stencil clip bits
175 struct ClearStencilClip : public Cmd {
176 ClearStencilClip(GrRenderTarget* rt) : Cmd(kClear_Cmd), fRenderTarget(rt) {}
177
178 GrRenderTarget* renderTarget() const { return fRenderTarget.get(); }
179
bsalomon932f8662014-11-24 06:47:48 -0800180 void execute(GrInOrderDrawBuffer*, const GrOptDrawState*) SK_OVERRIDE;
joshualitt6db519c2014-10-29 08:48:18 -0700181
182 SkIRect fRect;
183 bool fInsideClip;
184
185 private:
186 GrPendingIOResource<GrRenderTarget, kWrite_GrIOType> fRenderTarget;
187 };
188
cdalton6819df32014-10-15 13:43:48 -0700189 struct CopySurface : public Cmd {
190 CopySurface(GrSurface* dst, GrSurface* src) : Cmd(kCopySurface_Cmd), fDst(dst), fSrc(src) {}
bsalomonb3e3a952014-09-19 11:10:40 -0700191
192 GrSurface* dst() const { return fDst.get(); }
193 GrSurface* src() const { return fSrc.get(); }
194
bsalomon932f8662014-11-24 06:47:48 -0800195 void execute(GrInOrderDrawBuffer*, const GrOptDrawState*) SK_OVERRIDE;
cdalton6819df32014-10-15 13:43:48 -0700196
bsalomonb3e3a952014-09-19 11:10:40 -0700197 SkIPoint fDstPoint;
198 SkIRect fSrcRect;
199
200 private:
bsalomonbcf0a522014-10-08 08:40:09 -0700201 GrPendingIOResource<GrSurface, kWrite_GrIOType> fDst;
202 GrPendingIOResource<GrSurface, kRead_GrIOType> fSrc;
bsalomon@google.com116ad842013-04-09 15:38:19 +0000203 };
204
cdalton6819df32014-10-15 13:43:48 -0700205 struct SetState : public Cmd {
bsalomon932f8662014-11-24 06:47:48 -0800206 SetState(const GrDrawState& drawState, GrGpu* gpu, const ScissorState& scissor,
207 const GrDeviceCoordTexture* dstCopy, GrGpu::DrawType drawType)
208 : Cmd(kSetState_Cmd)
209 , fState(drawState, gpu, scissor, dstCopy, drawType) {}
cdalton6819df32014-10-15 13:43:48 -0700210
bsalomon932f8662014-11-24 06:47:48 -0800211 void execute(GrInOrderDrawBuffer*, const GrOptDrawState*) SK_OVERRIDE;
cdalton6819df32014-10-15 13:43:48 -0700212
bsalomon932f8662014-11-24 06:47:48 -0800213 const GrOptDrawState fState;
214 GrGpu::DrawType fDrawType;
bsalomonf0480b12014-07-02 12:11:24 -0700215 };
216
cdalton6819df32014-10-15 13:43:48 -0700217 typedef void* TCmdAlign; // This wouldn't be enough align if a command used long double.
218 typedef GrTRecorder<Cmd, TCmdAlign> CmdBuffer;
219
bsalomon@google.com25fb21f2011-06-21 18:17:25 +0000220 // overrides from GrDrawTarget
bsalomonae59b772014-11-19 08:23:49 -0800221 void onDraw(const GrDrawState&,
222 const DrawInfo&,
joshualitt9176e2c2014-11-20 07:28:52 -0800223 const ScissorState&,
224 const GrDeviceCoordTexture* dstCopy) SK_OVERRIDE;
bsalomonae59b772014-11-19 08:23:49 -0800225 void onDrawRect(GrDrawState*,
226 const SkRect& rect,
227 const SkRect* localRect,
228 const SkMatrix* localMatrix) SK_OVERRIDE;
commit-bot@chromium.org32184d82013-10-09 15:14:18 +0000229
bsalomonae59b772014-11-19 08:23:49 -0800230 void onStencilPath(const GrDrawState&,
231 const GrPath*,
joshualitt54e0c122014-11-19 09:38:51 -0800232 const ScissorState&,
bsalomonae59b772014-11-19 08:23:49 -0800233 const GrStencilSettings&) SK_OVERRIDE;
234 void onDrawPath(const GrDrawState&,
235 const GrPath*,
joshualitt54e0c122014-11-19 09:38:51 -0800236 const ScissorState&,
bsalomonae59b772014-11-19 08:23:49 -0800237 const GrStencilSettings&,
238 const GrDeviceCoordTexture* dstCopy) SK_OVERRIDE;
239 void onDrawPaths(const GrDrawState&,
240 const GrPathRange*,
cdalton55b24af2014-11-25 11:00:56 -0800241 const void* indices,
242 PathIndexType,
243 const float transformValues[],
bsalomonae59b772014-11-19 08:23:49 -0800244 PathTransformType,
cdalton55b24af2014-11-25 11:00:56 -0800245 int count,
joshualitt54e0c122014-11-19 09:38:51 -0800246 const ScissorState&,
bsalomonae59b772014-11-19 08:23:49 -0800247 const GrStencilSettings&,
248 const GrDeviceCoordTexture*) SK_OVERRIDE;
249 void onClear(const SkIRect* rect,
250 GrColor color,
251 bool canIgnoreRect,
252 GrRenderTarget* renderTarget) SK_OVERRIDE;
253 void setDrawBuffers(DrawInfo*) SK_OVERRIDE;
commit-bot@chromium.org32184d82013-10-09 15:14:18 +0000254
bsalomonae59b772014-11-19 08:23:49 -0800255 bool onReserveVertexSpace(size_t vertexSize, int vertexCount, void** vertices) SK_OVERRIDE;
256 bool onReserveIndexSpace(int indexCount, void** indices) SK_OVERRIDE;
257 void releaseReservedVertexSpace() SK_OVERRIDE;
258 void releaseReservedIndexSpace() SK_OVERRIDE;
259 void geometrySourceWillPush() SK_OVERRIDE;
260 void geometrySourceWillPop(const GeometrySrcState& restoredState) SK_OVERRIDE;
261 void willReserveVertexAndIndexSpace(int vertexCount,
262 size_t vertexStride,
263 int indexCount) SK_OVERRIDE;
bsalomonf90a02b2014-11-26 12:28:00 -0800264 bool onCopySurface(GrSurface* dst,
265 GrSurface* src,
266 const SkIRect& srcRect,
267 const SkIPoint& dstPoint) SK_OVERRIDE;
268 bool onCanCopySurface(const GrSurface* dst,
269 const GrSurface* src,
270 const SkIRect& srcRect,
271 const SkIPoint& dstPoint) SK_OVERRIDE;
272 bool onInitCopySurfaceDstDesc(const GrSurface* src, GrSurfaceDesc* desc) SK_OVERRIDE;
bsalomon@google.com116ad842013-04-09 15:38:19 +0000273
bsalomon@google.comd62e88e2013-02-01 14:19:27 +0000274 // Attempts to concat instances from info onto the previous draw. info must represent an
275 // instanced draw. The caller must have already recorded a new draw state and clip if necessary.
joshualitt54e0c122014-11-19 09:38:51 -0800276 int concatInstancedDraw(const GrDrawState&, const DrawInfo&);
bsalomon@google.com1c13c962011-02-14 16:51:21 +0000277
bsalomonae59b772014-11-19 08:23:49 -0800278 // Determines whether the current draw operation requires a new GrOptDrawState and if so
279 // records it. If the draw can be skipped false is returned and no new GrOptDrawState is
280 // recorded.
281 bool SK_WARN_UNUSED_RESULT recordStateAndShouldDraw(const GrDrawState&,
282 GrGpu::DrawType,
joshualitt54e0c122014-11-19 09:38:51 -0800283 const GrClipMaskManager::ScissorState&,
bsalomonae59b772014-11-19 08:23:49 -0800284 const GrDeviceCoordTexture*);
bsalomon838f62d2014-08-05 07:15:57 -0700285 // We lazily record clip changes in order to skip clips that have no effect.
cdalton6819df32014-10-15 13:43:48 -0700286 void recordClipIfNecessary();
287 // Records any trace markers for a command after adding it to the buffer.
288 void recordTraceMarkersIfNecessary();
bsalomonb3e3a952014-09-19 11:10:40 -0700289
290 virtual bool isIssued(uint32_t drawID) { return drawID != fDrawID; }
bsalomon@google.com934c5702012-03-20 21:17:58 +0000291
bsalomon@google.com116ad842013-04-09 15:38:19 +0000292 // TODO: Use a single allocator for commands and records
bsalomon@google.com4b90c622011-09-28 17:52:15 +0000293 enum {
cdaltonc4650ee2014-11-07 12:51:18 -0800294 kCmdBufferInitialSizeInBytes = 8 * 1024,
cdalton55b24af2014-11-25 11:00:56 -0800295 kPathIdxBufferMinReserve = 2 * 64, // 64 uint16_t's
296 kPathXformBufferMinReserve = 2 * 64, // 64 two-float transforms
cdalton6819df32014-10-15 13:43:48 -0700297 kGeoPoolStatePreAllocCnt = 4,
bsalomon@google.com4b90c622011-09-28 17:52:15 +0000298 };
reed@google.comac10a2d2010-12-22 21:39:39 +0000299
bsalomon@google.com25fb21f2011-06-21 18:17:25 +0000300 struct GeometryPoolState {
bsalomonb3e3a952014-09-19 11:10:40 -0700301 const GrVertexBuffer* fPoolVertexBuffer;
302 int fPoolStartVertex;
303 const GrIndexBuffer* fPoolIndexBuffer;
304 int fPoolStartIndex;
bsalomon@google.com25fb21f2011-06-21 18:17:25 +0000305 // caller may conservatively over reserve vertices / indices.
306 // we release unused space back to allocator if possible
307 // can only do this if there isn't an intervening pushGeometrySource()
bsalomonb3e3a952014-09-19 11:10:40 -0700308 size_t fUsedPoolVertexBytes;
309 size_t fUsedPoolIndexBytes;
bsalomon@google.com25fb21f2011-06-21 18:17:25 +0000310 };
reed@google.comac10a2d2010-12-22 21:39:39 +0000311
bsalomonb3e3a952014-09-19 11:10:40 -0700312 typedef SkSTArray<kGeoPoolStatePreAllocCnt, GeometryPoolState> GeoPoolStateStack;
skia.committer@gmail.com74758112013-08-17 07:01:54 +0000313
bsalomonae59b772014-11-19 08:23:49 -0800314 CmdBuffer fCmdBuffer;
bsalomon932f8662014-11-24 06:47:48 -0800315 const GrOptDrawState* fPrevState;
bsalomonae59b772014-11-19 08:23:49 -0800316 SkTArray<GrTraceMarkerSet, false> fGpuCmdMarkers;
317 GrGpu* fDstGpu;
318 GrVertexBufferAllocPool& fVertexPool;
319 GrIndexBufferAllocPool& fIndexPool;
cdalton55b24af2014-11-25 11:00:56 -0800320 SkTDArray<char> fPathIndexBuffer;
bsalomonae59b772014-11-19 08:23:49 -0800321 SkTDArray<float> fPathTransformBuffer;
322 GeoPoolStateStack fGeoPoolStateStack;
323 bool fFlushing;
324 uint32_t fDrawID;
robertphillips@google.comc82a8b72012-06-21 20:15:48 +0000325
joshualitt6db519c2014-10-29 08:48:18 -0700326 typedef GrClipTarget INHERITED;
reed@google.comac10a2d2010-12-22 21:39:39 +0000327};
328
329#endif