blob: b5dd09ab51a3d3a1f07d0d65385080491fe08b72 [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
8
epoger@google.comec3ed6a2011-07-28 14:26:00 +00009
reed@google.comac10a2d2010-12-22 21:39:39 +000010#ifndef GrGpuGL_DEFINED
11#define GrGpuGL_DEFINED
12
bsalomon@google.comc1d2a582012-06-01 15:08:19 +000013#include "GrBinHashKey.h"
tomhudson@google.comd8f856c2012-05-10 12:13:36 +000014#include "GrDrawState.h"
15#include "GrGpu.h"
bsalomon@google.com89ec61e2012-02-10 20:05:18 +000016#include "GrGLContextInfo.h"
bsalomon@google.com4043ae22011-08-02 14:19:11 +000017#include "GrGLIndexBuffer.h"
bsalomon@google.com81c3f8d2011-08-03 15:18:33 +000018#include "GrGLIRect.h"
bsalomon@google.com5739d2c2012-05-31 15:07:19 +000019#include "GrGLProgram.h"
bsalomon@google.com81c3f8d2011-08-03 15:18:33 +000020#include "GrGLStencilBuffer.h"
21#include "GrGLTexture.h"
22#include "GrGLVertexBuffer.h"
bsalomon@google.comc1d2a582012-06-01 15:08:19 +000023#include "../GrTHashCache.h"
reed@google.comac10a2d2010-12-22 21:39:39 +000024
25class GrGpuGL : public GrGpu {
26public:
bsalomon@google.com5739d2c2012-05-31 15:07:19 +000027 GrGpuGL(const GrGLContextInfo& ctxInfo);
reed@google.comac10a2d2010-12-22 21:39:39 +000028 virtual ~GrGpuGL();
29
bsalomon@google.com89ec61e2012-02-10 20:05:18 +000030 const GrGLInterface* glInterface() const {
31 return fGLContextInfo.interface();
32 }
tomhudson@google.comdd182cb2012-02-10 21:01:00 +000033 GrGLBinding glBinding() const { return fGLContextInfo.binding(); }
34 GrGLVersion glVersion() const { return fGLContextInfo.version(); }
35 GrGLSLGeneration glslGeneration() const {
bsalomon@google.com89ec61e2012-02-10 20:05:18 +000036 return fGLContextInfo.glslGeneration();
37 }
bsalomon@google.com0b77d682011-08-19 13:28:54 +000038
bsalomon@google.com56d11e02011-11-30 19:59:08 +000039 // GrGpu overrides
bsalomon@google.com0a97be22011-11-08 19:20:57 +000040 virtual GrPixelConfig preferredReadPixelsConfig(GrPixelConfig config)
bsalomon@google.com56d11e02011-11-30 19:59:08 +000041 const SK_OVERRIDE;
bsalomon@google.coma85449d2011-11-19 02:36:05 +000042 virtual GrPixelConfig preferredWritePixelsConfig(GrPixelConfig config)
bsalomon@google.com56d11e02011-11-30 19:59:08 +000043 const SK_OVERRIDE;
bsalomon@google.comc4364992011-11-07 15:54:49 +000044 virtual bool readPixelsWillPayForYFlip(
45 GrRenderTarget* renderTarget,
46 int left, int top,
47 int width, int height,
48 GrPixelConfig config,
bsalomon@google.com56d11e02011-11-30 19:59:08 +000049 size_t rowBytes) const SK_OVERRIDE;
50 virtual bool fullReadPixelsIsFasterThanPartial() const SK_OVERRIDE;
bsalomon@google.com75f9f252012-01-31 13:35:56 +000051
bsalomon@google.coma91e9232012-02-23 15:39:54 +000052 virtual bool canPreserveReadWriteUnpremulPixels() SK_OVERRIDE;
53
bsalomon@google.com5739d2c2012-05-31 15:07:19 +000054 virtual void abandonResources() SK_OVERRIDE;
55
56 bool programUnitTest();
57
bsalomon@google.com88939ae2011-12-14 15:58:11 +000058protected:
bsalomon@google.com6aa25c32011-04-27 19:55:29 +000059
bsalomon@google.coma4d8fc22012-05-21 13:21:46 +000060 enum TriState {
61 kNo_TriState,
62 kYes_TriState,
63 kUnknown_TriState
64 };
65
reed@google.comac10a2d2010-12-22 21:39:39 +000066 struct {
bsalomon@google.com1c13c962011-02-14 16:51:21 +000067 size_t fVertexOffset;
reed@google.comac10a2d2010-12-22 21:39:39 +000068 GrVertexLayout fVertexLayout;
69 const GrVertexBuffer* fVertexBuffer;
70 const GrIndexBuffer* fIndexBuffer;
bsalomon@google.com7acdb8e2011-02-11 14:07:02 +000071 bool fArrayPtrsDirty;
reed@google.comac10a2d2010-12-22 21:39:39 +000072 } fHWGeometryState;
73
bsalomon@google.coma91e9232012-02-23 15:39:54 +000074 enum UnpremulConversion {
75 kUpOnWrite_DownOnRead_UnpremulConversion,
76 kDownOnWrite_UpOnRead_UnpremulConversion
77 } fUnpremulConversion;
78
bsalomon@google.comc6cf7232011-02-17 16:43:10 +000079 // last scissor / viewport scissor state seen by the GL.
bsalomon@google.com8895a7a2011-02-18 16:09:55 +000080 struct {
81 bool fScissorEnabled;
82 GrGLIRect fScissorRect;
83 GrGLIRect fViewportRect;
84 } fHWBounds;
bsalomon@google.comc6cf7232011-02-17 16:43:10 +000085
bsalomon@google.comf7fa8062012-02-14 14:09:57 +000086 const GrGLCaps& glCaps() const { return fGLContextInfo.caps(); }
bsalomon@google.com88939ae2011-12-14 15:58:11 +000087
bsalomon@google.com1c13c962011-02-14 16:51:21 +000088 // GrGpu overrides
bsalomon@google.com1bf1c212011-11-05 12:18:58 +000089 virtual void onResetContext() SK_OVERRIDE;
bsalomon@google.coma7f84e12011-03-10 14:13:19 +000090
bsalomon@google.comfea37b52011-04-25 15:51:06 +000091 virtual GrTexture* onCreateTexture(const GrTextureDesc& desc,
bsalomon@google.combcdbbe62011-04-12 15:40:00 +000092 const void* srcData,
bsalomon@google.com13f1b6f2012-05-31 12:52:43 +000093 size_t rowBytes) SK_OVERRIDE;
bsalomon@google.combcdbbe62011-04-12 15:40:00 +000094 virtual GrVertexBuffer* onCreateVertexBuffer(uint32_t size,
bsalomon@google.com13f1b6f2012-05-31 12:52:43 +000095 bool dynamic) SK_OVERRIDE;
bsalomon@google.combcdbbe62011-04-12 15:40:00 +000096 virtual GrIndexBuffer* onCreateIndexBuffer(uint32_t size,
bsalomon@google.com13f1b6f2012-05-31 12:52:43 +000097 bool dynamic) SK_OVERRIDE;
98 virtual GrTexture* onCreatePlatformTexture(
99 const GrPlatformTextureDesc& desc) SK_OVERRIDE;
100 virtual GrRenderTarget* onCreatePlatformRenderTarget(
101 const GrPlatformRenderTargetDesc& desc) SK_OVERRIDE;
bsalomon@google.com81c3f8d2011-08-03 15:18:33 +0000102 virtual bool createStencilBufferForRenderTarget(GrRenderTarget* rt,
bsalomon@google.com13f1b6f2012-05-31 12:52:43 +0000103 int width,
104 int height) SK_OVERRIDE;
105 virtual bool attachStencilBufferToRenderTarget(
106 GrStencilBuffer* sb,
107 GrRenderTarget* rt) SK_OVERRIDE;
bsalomon@google.coma7f84e12011-03-10 14:13:19 +0000108
bsalomon@google.com13f1b6f2012-05-31 12:52:43 +0000109 virtual void onClear(const GrIRect* rect, GrColor color) SK_OVERRIDE;
bsalomon@google.coma7f84e12011-03-10 14:13:19 +0000110
bsalomon@google.com13f1b6f2012-05-31 12:52:43 +0000111 virtual void onForceRenderTargetFlush() SK_OVERRIDE;
bsalomon@google.coma7f84e12011-03-10 14:13:19 +0000112
bsalomon@google.com5877ffd2011-04-11 17:58:48 +0000113 virtual bool onReadPixels(GrRenderTarget* target,
bsalomon@google.comc6980972011-11-02 19:57:21 +0000114 int left, int top,
115 int width, int height,
116 GrPixelConfig,
bsalomon@google.comc4364992011-11-07 15:54:49 +0000117 void* buffer,
118 size_t rowBytes,
119 bool invertY) SK_OVERRIDE;
bsalomon@google.coma7f84e12011-03-10 14:13:19 +0000120
bsalomon@google.com6f379512011-11-16 20:36:03 +0000121 virtual void onWriteTexturePixels(GrTexture* texture,
122 int left, int top, int width, int height,
123 GrPixelConfig config, const void* buffer,
124 size_t rowBytes) SK_OVERRIDE;
125
bsalomon@google.com75f9f252012-01-31 13:35:56 +0000126 virtual void onResolveRenderTarget(GrRenderTarget* target) SK_OVERRIDE;
127
128
bsalomon@google.com25fb21f2011-06-21 18:17:25 +0000129 virtual void onGpuDrawIndexed(GrPrimitiveType type,
130 uint32_t startVertex,
131 uint32_t startIndex,
132 uint32_t vertexCount,
bsalomon@google.com13f1b6f2012-05-31 12:52:43 +0000133 uint32_t indexCount) SK_OVERRIDE;
bsalomon@google.com25fb21f2011-06-21 18:17:25 +0000134 virtual void onGpuDrawNonIndexed(GrPrimitiveType type,
135 uint32_t vertexCount,
bsalomon@google.com13f1b6f2012-05-31 12:52:43 +0000136 uint32_t numVertices) SK_OVERRIDE;
137 virtual void enableScissoring(const GrIRect& rect) SK_OVERRIDE;
138 virtual void disableScissor() SK_OVERRIDE;
robertphillips@google.com730ebe52012-04-16 16:33:13 +0000139
bsalomon@google.com13f1b6f2012-05-31 12:52:43 +0000140 virtual void clearStencil() SK_OVERRIDE;
141 virtual void clearStencilClip(const GrIRect& rect,
142 bool insideClip) SK_OVERRIDE;
bsalomon@google.com5739d2c2012-05-31 15:07:19 +0000143 virtual bool flushGraphicsState(GrPrimitiveType type) SK_OVERRIDE;
144 virtual void setupGeometry(int* startVertex,
145 int* startIndex,
146 int vertexCount,
147 int indexCount) SK_OVERRIDE;
148
bsalomon@google.com5782d712011-01-21 21:03:59 +0000149
bsalomon@google.com1c13c962011-02-14 16:51:21 +0000150 // binds texture unit in GL
bsalomon@google.com8531c1c2011-01-13 19:52:45 +0000151 void setTextureUnit(int unitIdx);
reed@google.comac10a2d2010-12-22 21:39:39 +0000152
bsalomon@google.com1c13c962011-02-14 16:51:21 +0000153 // binds appropriate vertex and index buffers, also returns any extra
154 // extra verts or indices to offset by.
155 void setBuffers(bool indexed,
156 int* extraVertexOffset,
157 int* extraIndexOffset);
bsalomon@google.com7acdb8e2011-02-11 14:07:02 +0000158
reed@google.comac10a2d2010-12-22 21:39:39 +0000159 // flushes state that is common to fixed and programmable GL
160 // dither
161 // line smoothing
reed@google.comac10a2d2010-12-22 21:39:39 +0000162 // texture binding
163 // sampler state (filtering, tiling)
164 // FBO binding
165 // line width
bsalomon@google.comffca4002011-02-22 20:34:01 +0000166 bool flushGLStateCommon(GrPrimitiveType type);
reed@google.comac10a2d2010-12-22 21:39:39 +0000167
bsalomon@google.com86c1f712011-10-12 14:54:26 +0000168 // Subclasses should call this to flush the blend state.
169 // The params should be the final coeffecients to apply
170 // (after any blending optimizations or dual source blending considerations
171 // have been accounted for).
bsalomon@google.com271cffc2011-05-20 14:13:56 +0000172 void flushBlend(GrPrimitiveType type,
173 GrBlendCoeff srcCoeff,
174 GrBlendCoeff dstCoeff);
175
bsalomon@google.com89ec61e2012-02-10 20:05:18 +0000176 bool hasExtension(const char* ext) const {
177 return fGLContextInfo.hasExtension(ext);
bsalomon@google.com96399942012-02-13 14:39:16 +0000178 }
179
180 const GrGLContextInfo& glContextInfo() const { return fGLContextInfo; }
bsalomon@google.com2c17fcd2011-07-06 17:47:02 +0000181
bsalomon@google.com99621082011-11-15 16:47:16 +0000182 // adjusts texture matrix to account for orientation
bsalomon@google.comc6cf7232011-02-17 16:43:10 +0000183 static void AdjustTextureMatrix(const GrGLTexture* texture,
bsalomon@google.comc6cf7232011-02-17 16:43:10 +0000184 GrMatrix* matrix);
bsalomon@google.com88939ae2011-12-14 15:58:11 +0000185
186 // subclass may try to take advantage of identity tex matrices.
187 // This helper determines if matrix will be identity after all
188 // adjustments are applied.
189 static bool TextureMatrixIsIdentity(const GrGLTexture* texture,
190 const GrSamplerState& sampler);
191
bsalomon@google.com271cffc2011-05-20 14:13:56 +0000192 static bool BlendCoeffReferencesConstant(GrBlendCoeff coeff);
bsalomon@google.com080773c2011-03-15 19:09:25 +0000193
bsalomon@google.com8531c1c2011-01-13 19:52:45 +0000194private:
bsalomon@google.com5739d2c2012-05-31 15:07:19 +0000195 // for readability of function impls
196 typedef GrGLProgram::ProgramDesc ProgramDesc;
197 typedef ProgramDesc::StageDesc StageDesc;
198 typedef GrGLProgram::CachedData CachedData;
199
bsalomon@google.comc1d2a582012-06-01 15:08:19 +0000200 class ProgramCache : public ::GrNoncopyable {
201 public:
202 ProgramCache(const GrGLContextInfo& gl);
203 ~ProgramCache();
bsalomon@google.com5739d2c2012-05-31 15:07:19 +0000204
bsalomon@google.comc1d2a582012-06-01 15:08:19 +0000205 void abandon();
bsalomon@google.comc1d2a582012-06-01 15:08:19 +0000206 CachedData* getProgramData(const GrGLProgram& desc,
207 GrCustomStage** stages);
208 private:
209 enum {
210 kKeySize = GrGLProgram::kProgramKeySize,
211 // We may actually have kMaxEntries+1 shaders in the GL context
212 // because we create a new shader before evicting from the cache.
213 kMaxEntries = 32
214 };
215
216 class Entry;
217 typedef GrBinHashKey<Entry, kKeySize> ProgramHashKey;
218
219 class Entry : public ::GrNoncopyable {
220 public:
221 Entry() {}
222 void copyAndTakeOwnership(Entry& entry);
223 int compare(const ProgramHashKey& key) const {
224 return fKey.compare(key);
225 }
226
227 public:
228 CachedData fProgramData;
229 ProgramHashKey fKey;
230 unsigned int fLRUStamp;
231 };
232
233 GrTHashTable<Entry, ProgramHashKey, 8> fHashCache;
234
235 Entry fEntries[kMaxEntries];
236 int fCount;
237 unsigned int fCurrLRUStamp;
238 const GrGLContextInfo& fGL;
239 };
bsalomon@google.com5739d2c2012-05-31 15:07:19 +0000240
bsalomon@google.com4c883782012-06-04 19:05:11 +0000241 // binds the texture and sets its texture params
242 void flushBoundTextureAndParams(int stage);
243
bsalomon@google.com890e3b52012-06-01 19:01:37 +0000244 // sets the texture matrix and domain for the currently bound program
245 void flushTextureMatrixAndDomain(int stage);
bsalomon@google.com5739d2c2012-05-31 15:07:19 +0000246
247 // sets the color specified by GrDrawState::setColor()
248 void flushColor(GrColor color);
249
250 // sets the color specified by GrDrawState::setCoverage()
251 void flushCoverage(GrColor color);
252
253 // sets the MVP matrix uniform for currently bound program
254 void flushViewMatrix();
255
256 // flushes the parameters to two point radial gradient
257 void flushRadial2(int stage);
258
259 // flushes the parameters for convolution
260 void flushConvolution(int stage);
261
262 // flushes the normalized texel size
263 void flushTexelSize(int stage);
264
265 // flushes the color matrix
266 void flushColorMatrix();
267
268 static void DeleteProgram(const GrGLInterface* gl,
269 CachedData* programData);
270
271 void buildProgram(GrPrimitiveType typeBlend,
272 BlendOptFlags blendOpts,
273 GrBlendCoeff dstCoeff,
274 GrCustomStage** customStages);
275
bsalomon@google.comf7fa8062012-02-14 14:09:57 +0000276 // Inits GrDrawTarget::Caps, sublcass may enable additional caps.
bsalomon@google.com18c9c192011-09-22 21:01:31 +0000277 void initCaps();
278
279 void initFSAASupport();
bsalomon@google.com6aa25c32011-04-27 19:55:29 +0000280
bsalomon@google.com2c17fcd2011-07-06 17:47:02 +0000281 // determines valid stencil formats
bsalomon@google.com18c9c192011-09-22 21:01:31 +0000282 void initStencilFormats();
bsalomon@google.com2c17fcd2011-07-06 17:47:02 +0000283
reed@google.comac10a2d2010-12-22 21:39:39 +0000284 // notify callbacks to update state tracking when related
285 // objects are bound to GL or deleted outside of the class
286 void notifyVertexBufferBind(const GrGLVertexBuffer* buffer);
287 void notifyVertexBufferDelete(const GrGLVertexBuffer* buffer);
288 void notifyIndexBufferBind(const GrGLIndexBuffer* buffer);
289 void notifyIndexBufferDelete(const GrGLIndexBuffer* buffer);
reed@google.comac10a2d2010-12-22 21:39:39 +0000290 void notifyTextureDelete(GrGLTexture* texture);
291 void notifyRenderTargetDelete(GrRenderTarget* renderTarget);
bsalomon@google.com5782d712011-01-21 21:03:59 +0000292
bsalomon@google.com8531c1c2011-01-13 19:52:45 +0000293 void setSpareTextureUnit();
reed@google.comac10a2d2010-12-22 21:39:39 +0000294
bsalomon@google.com8295dc12011-05-02 12:53:34 +0000295 // bound is region that may be modified and therefore has to be resolved.
296 // NULL means whole target. Can be an empty rect.
297 void flushRenderTarget(const GrIRect* bound);
reed@google.comac10a2d2010-12-22 21:39:39 +0000298 void flushStencil();
bsalomon@google.comf954d8d2011-04-06 17:50:02 +0000299 void flushAAState(GrPrimitiveType type);
bsalomon@google.com0650e812011-04-08 18:07:53 +0000300
bsalomon@google.com280e99f2012-01-05 16:17:38 +0000301 bool configToGLFormats(GrPixelConfig config,
302 bool getSizedInternal,
303 GrGLenum* internalFormat,
304 GrGLenum* externalFormat,
305 GrGLenum* externalType);
bsalomon@google.com6f379512011-11-16 20:36:03 +0000306 // helper for onCreateTexture and writeTexturePixels
bsalomon@google.com136f55b2011-11-28 18:34:44 +0000307 bool uploadTexData(const GrGLTexture::Desc& desc,
bsalomon@google.com1e0e6072011-11-28 18:49:37 +0000308 bool isNewTexture,
bsalomon@google.com6f379512011-11-16 20:36:03 +0000309 int left, int top, int width, int height,
310 GrPixelConfig dataConfig,
311 const void* data,
312 size_t rowBytes);
bsalomon@google.com0650e812011-04-08 18:07:53 +0000313
bsalomon@google.com81c3f8d2011-08-03 15:18:33 +0000314 bool createRenderTargetObjects(int width, int height,
315 GrGLuint texID,
316 GrGLRenderTarget::Desc* desc);
317
robertphillips@google.com99a5ac02012-04-10 19:26:38 +0000318 void fillInConfigRenderableTable();
319
reed@google.comac10a2d2010-12-22 21:39:39 +0000320 friend class GrGLVertexBuffer;
321 friend class GrGLIndexBuffer;
322 friend class GrGLTexture;
323 friend class GrGLRenderTarget;
324
bsalomon@google.com89ec61e2012-02-10 20:05:18 +0000325 GrGLContextInfo fGLContextInfo;
bsalomon@google.com2c17fcd2011-07-06 17:47:02 +0000326
bsalomon@google.com5739d2c2012-05-31 15:07:19 +0000327 // GL program-related state
328 ProgramCache* fProgramCache;
329 CachedData* fProgramData;
330 GrGLuint fHWProgramID;
331 GrColor fHWConstAttribColor;
332 GrColor fHWConstAttribCoverage;
333 GrGLProgram fCurrentProgram;
bsalomon@google.com5739d2c2012-05-31 15:07:19 +0000334
bsalomon@google.com8531c1c2011-01-13 19:52:45 +0000335 int fActiveTextureUnitIdx;
bsalomon@google.com5782d712011-01-21 21:03:59 +0000336
bsalomon@google.coma4d8fc22012-05-21 13:21:46 +0000337 struct {
338 GrBlendCoeff fSrcCoeff;
339 GrBlendCoeff fDstCoeff;
340 GrColor fConstColor;
341 bool fConstColorValid;
342 TriState fEnabled;
343
344 void invalidate() {
345 fSrcCoeff = kInvalid_BlendCoeff;
346 fDstCoeff = kInvalid_BlendCoeff;
347 fConstColorValid = false;
348 fEnabled = kUnknown_TriState;
349 }
350 } fHWBlendState;
351
bsalomon@google.com4d5f3fe2012-05-21 17:11:44 +0000352 struct {
353 TriState fMSAAEnabled;
354 TriState fSmoothLineEnabled;
355 void invalidate() {
356 fMSAAEnabled = kUnknown_TriState;
357 fSmoothLineEnabled = kUnknown_TriState;
358 }
359 } fHWAAState;
360
bsalomon@google.com457b8a32012-05-21 21:19:58 +0000361 // The high bit of the stencil buffer is used for clipping. This enum is
362 // used to track whether the clip bit of the stencil buffer is being used,
363 // manipulated, or neither.
364 enum StencilClipMode {
365 // Draw to the clip bit of the stencil buffer
366 kModifyClip_StencilClipMode,
367 // Clip against the existing representation of the clip in the high bit
368 // of the stencil buffer.
369 kUseClip_StencilClipMode,
370 // Neither writing to nor clipping against the clip bit.
371 kIgnoreClip_StencilClipMode,
372 // Unknown state of HW
373 kInvalid_StencilClipMode,
374 };
375 StencilClipMode fHWStencilClipMode;
376 GrStencilSettings fHWStencilSettings;
377
bsalomon@google.comc811ea32012-05-21 15:33:09 +0000378 GrDrawState::DrawFace fHWDrawFace;
379 TriState fHWWriteToColor;
380 TriState fHWDitherEnabled;
381 GrRenderTarget* fHWBoundRenderTarget;
382 GrTexture* fHWBoundTextures[GrDrawState::kNumStages];
bsalomon@google.com978c8c62012-05-21 14:45:49 +0000383
bsalomon@google.comfe676522011-06-17 18:12:21 +0000384 // we record what stencil format worked last time to hopefully exit early
385 // from our loop that tries stencil formats and calls check fb status.
386 int fLastSuccessfulStencilFmtIdx;
387
bsalomon@google.coma91e9232012-02-23 15:39:54 +0000388 enum CanPreserveUnpremulRoundtrip {
389 kUnknown_CanPreserveUnpremulRoundtrip,
390 kNo_CanPreserveUnpremulRoundtrip,
391 kYes_CanPreserveUnpremulRoundtrip,
392 } fCanPreserveUnpremulRoundtrip;
bsalomon@google.com0b77d682011-08-19 13:28:54 +0000393
bsalomon@google.com18c9c192011-09-22 21:01:31 +0000394 bool fPrintedCaps;
395
reed@google.comac10a2d2010-12-22 21:39:39 +0000396 typedef GrGpu INHERITED;
397};
398
bsalomon@google.coma7f84e12011-03-10 14:13:19 +0000399#endif
bsalomon@google.comfe676522011-06-17 18:12:21 +0000400