blob: b6c224cfebcb234689aedb61e75ec6fc88d0218f [file] [log] [blame]
junov@google.comf93e7172011-03-31 21:26:24 +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.
junov@google.comf93e7172011-03-31 21:26:24 +00006 */
7
epoger@google.comec3ed6a2011-07-28 14:26:00 +00008
junov@google.comf93e7172011-03-31 21:26:24 +00009#ifndef GrGLProgram_DEFINED
10#define GrGLProgram_DEFINED
11
tomhudson@google.comd8f856c2012-05-10 12:13:36 +000012#include "GrDrawState.h"
bsalomon@google.com96399942012-02-13 14:39:16 +000013#include "GrGLContextInfo.h"
tomhudson@google.com086e5352011-12-08 14:44:10 +000014#include "GrGLSL.h"
bsalomon@google.com890e3b52012-06-01 19:01:37 +000015#include "GrGLTexture.h"
bsalomon@google.comdbbc4e22012-07-25 17:48:39 +000016#include "GrGLUniformManager.h"
junov@google.comf93e7172011-03-31 21:26:24 +000017
bsalomon@google.comf0a104e2012-07-10 17:51:07 +000018#include "SkString.h"
Scroggo97c88c22011-05-11 14:05:25 +000019#include "SkXfermode.h"
20
junov@google.comf93e7172011-03-31 21:26:24 +000021class GrBinHashKeyBuilder;
tomhudson@google.com07eecdc2012-04-20 18:35:38 +000022class GrGLProgramStage;
tomhudson@google.comf9ad8862012-05-11 20:38:48 +000023class GrGLShaderBuilder;
junov@google.comf93e7172011-03-31 21:26:24 +000024
bsalomon@google.comedfe1aa2011-09-29 14:40:26 +000025// optionally compile the experimental GS code. Set to GR_DEBUG
26// so that debug build bots will execute the code.
27#define GR_GL_EXPERIMENTAL_GS GR_DEBUG
28
junov@google.comf93e7172011-03-31 21:26:24 +000029/**
30 * This class manages a GPU program and records per-program information.
31 * We can specify the attribute locations so that they are constant
32 * across our shaders. But the driver determines the uniform locations
33 * at link time. We don't need to remember the sampler uniform location
34 * because we will bind a texture slot to it and never change it
35 * Uniforms are program-local so we can't rely on fHWState to hold the
36 * previous uniform state after a program change.
37 */
bsalomon@google.com9ba4fa62012-07-16 17:36:28 +000038class GrGLProgram : public GrRefCnt {
junov@google.comf93e7172011-03-31 21:26:24 +000039public:
bsalomon@google.com9ba4fa62012-07-16 17:36:28 +000040 SK_DECLARE_INST_COUNT(GrGLProgram)
bsalomon@google.com4fa66942011-09-20 19:06:12 +000041
bsalomon@google.com9ba4fa62012-07-16 17:36:28 +000042 struct Desc;
junov@google.comf93e7172011-03-31 21:26:24 +000043
bsalomon@google.comecb60aa2012-07-18 13:20:29 +000044 static GrGLProgram* Create(const GrGLContextInfo& gl,
45 const Desc& desc,
bsalomon@google.comcddaf342012-07-30 13:09:05 +000046 const GrCustomStage** customStages);
bsalomon@google.comecb60aa2012-07-18 13:20:29 +000047
bsalomon@google.com9ba4fa62012-07-16 17:36:28 +000048 virtual ~GrGLProgram();
junov@google.comf93e7172011-03-31 21:26:24 +000049
bsalomon@google.comecb60aa2012-07-18 13:20:29 +000050 /** Call to abandon GL objects owned by this program */
51 void abandon();
52
junov@google.comf93e7172011-03-31 21:26:24 +000053 /**
bsalomon@google.comecb60aa2012-07-18 13:20:29 +000054 * The shader may modify the blend coeffecients. Params are in/out
junov@google.comf93e7172011-03-31 21:26:24 +000055 */
bsalomon@google.comecb60aa2012-07-18 13:20:29 +000056 void overrideBlend(GrBlendCoeff* srcCoeff, GrBlendCoeff* dstCoeff) const;
junov@google.comf93e7172011-03-31 21:26:24 +000057
bsalomon@google.comecb60aa2012-07-18 13:20:29 +000058 const Desc& getDesc() { return fDesc; }
bsalomon@google.com9ba4fa62012-07-16 17:36:28 +000059
bsalomon@google.com271cffc2011-05-20 14:13:56 +000060 /**
bsalomon@google.comb5b5eaf2011-10-19 13:25:46 +000061 * Attribute indices. These should not overlap. Matrices consume 3 slots.
bsalomon@google.com271cffc2011-05-20 14:13:56 +000062 */
bsalomon@google.com91961302011-05-09 18:39:58 +000063 static int PositionAttributeIdx() { return 0; }
64 static int TexCoordAttributeIdx(int tcIdx) { return 1 + tcIdx; }
tomhudson@google.com93813632011-10-27 20:21:16 +000065 static int ColorAttributeIdx() { return 1 + GrDrawState::kMaxTexCoords; }
bsalomon@google.coma3108262011-10-10 14:08:47 +000066 static int CoverageAttributeIdx() {
tomhudson@google.com93813632011-10-27 20:21:16 +000067 return 2 + GrDrawState::kMaxTexCoords;
bsalomon@google.coma3108262011-10-10 14:08:47 +000068 }
tomhudson@google.com93813632011-10-27 20:21:16 +000069 static int EdgeAttributeIdx() { return 3 + GrDrawState::kMaxTexCoords; }
bsalomon@google.comaeb21602011-08-30 18:13:44 +000070
tomhudson@google.com0d831722011-06-02 15:37:14 +000071 static int ViewMatrixAttributeIdx() {
tomhudson@google.com93813632011-10-27 20:21:16 +000072 return 4 + GrDrawState::kMaxTexCoords;
bsalomon@google.com91961302011-05-09 18:39:58 +000073 }
tomhudson@google.com0d831722011-06-02 15:37:14 +000074 static int TextureMatrixAttributeIdx(int stage) {
tomhudson@google.com93813632011-10-27 20:21:16 +000075 return 7 + GrDrawState::kMaxTexCoords + 3 * stage;
bsalomon@google.com91961302011-05-09 18:39:58 +000076 }
77
tomhudson@google.com0d831722011-06-02 15:37:14 +000078 // Parameters that affect code generation
79 // These structs should be kept compact; they are the input to an
80 // expensive hash key generator.
bsalomon@google.com9ba4fa62012-07-16 17:36:28 +000081 struct Desc {
82 Desc() {
bsalomon@google.com4be283f2011-04-19 21:15:09 +000083 // since we use this as part of a key we can't have any unitialized
84 // padding
bsalomon@google.com9ba4fa62012-07-16 17:36:28 +000085 memset(this, 0, sizeof(Desc));
86 }
87
88 // returns this as a uint32_t array to be used as a key in the program cache
89 const uint32_t* asKey() const {
90 return reinterpret_cast<const uint32_t*>(this);
bsalomon@google.com4be283f2011-04-19 21:15:09 +000091 }
92
bsalomon@google.coma91e9232012-02-23 15:39:54 +000093 enum OutputConfig {
bsalomon@google.comc4364992011-11-07 15:54:49 +000094 // PM-color OR color with no alpha channel
bsalomon@google.coma91e9232012-02-23 15:39:54 +000095 kPremultiplied_OutputConfig,
96 // nonPM-color with alpha channel. Round components up after
97 // dividing by alpha. Assumes output is 8 bits for r, g, and b
98 kUnpremultiplied_RoundUp_OutputConfig,
99 // nonPM-color with alpha channel. Round components down after
100 // dividing by alpha. Assumes output is 8 bits for r, g, and b
101 kUnpremultiplied_RoundDown_OutputConfig,
bsalomon@google.comc4364992011-11-07 15:54:49 +0000102
bsalomon@google.coma91e9232012-02-23 15:39:54 +0000103 kOutputConfigCnt
bsalomon@google.comc4364992011-11-07 15:54:49 +0000104 };
105
tomhudson@google.com0d831722011-06-02 15:37:14 +0000106 struct StageDesc {
107 enum OptFlagBits {
108 kNoPerspective_OptFlagBit = 1 << 0,
109 kIdentityMatrix_OptFlagBit = 1 << 1,
tomhudson@google.com0d831722011-06-02 15:37:14 +0000110 kIsEnabled_OptFlagBit = 1 << 7
111 };
bsalomon@google.comb505a122012-05-31 18:40:36 +0000112
bsalomon@google.com0a97be22011-11-08 19:20:57 +0000113 /**
bsalomon@google.com74b98712011-11-11 19:46:16 +0000114 Flags set based on a src texture's pixel config. The operations
115 described are performed after reading a texel.
bsalomon@google.com0a97be22011-11-08 19:20:57 +0000116 */
bsalomon@google.com74b98712011-11-11 19:46:16 +0000117 enum InConfigFlags {
robertphillips@google.com443e5a52012-04-30 20:01:21 +0000118 kNone_InConfigFlag = 0x00,
bsalomon@google.com74b98712011-11-11 19:46:16 +0000119
bsalomon@google.com85b505b2011-11-07 14:56:51 +0000120 /**
bsalomon@google.com74b98712011-11-11 19:46:16 +0000121 Swap the R and B channels. This is incompatible with
122 kSmearAlpha. It is prefereable to perform the swizzle outside
123 the shader using GL_ARB_texture_swizzle if possible rather
124 than setting this flag.
bsalomon@google.com85b505b2011-11-07 14:56:51 +0000125 */
robertphillips@google.com443e5a52012-04-30 20:01:21 +0000126 kSwapRAndB_InConfigFlag = 0x01,
bsalomon@google.com74b98712011-11-11 19:46:16 +0000127
bsalomon@google.com85b505b2011-11-07 14:56:51 +0000128 /**
bsalomon@google.com74b98712011-11-11 19:46:16 +0000129 Smear alpha across all four channels. This is incompatible with
robertphillips@google.com443e5a52012-04-30 20:01:21 +0000130 kSwapRAndB, kMulRGBByAlpha* and kSmearRed. It is prefereable
131 to perform the smear outside the shader using
132 GL_ARB_texture_swizzle if possible rather than setting this
133 flag.
bsalomon@google.com85b505b2011-11-07 14:56:51 +0000134 */
robertphillips@google.com443e5a52012-04-30 20:01:21 +0000135 kSmearAlpha_InConfigFlag = 0x02,
136
137 /**
138 Smear the red channel across all four channels. This flag is
139 incompatible with kSwapRAndB, kMulRGBByAlpha*and kSmearAlpha.
140 It is preferable to use GL_ARB_texture_swizzle instead of this
141 flag.
142 */
143 kSmearRed_InConfigFlag = 0x04,
bsalomon@google.com74b98712011-11-11 19:46:16 +0000144
145 /**
146 Multiply r,g,b by a after texture reads. This flag incompatible
bsalomon@google.comd2ae1fa2012-06-04 20:06:02 +0000147 with kSmearAlpha.
bsalomon@google.coma91e9232012-02-23 15:39:54 +0000148
149 It is assumed the src texture has 8bit color components. After
150 reading the texture one version rounds up to the next multiple
151 of 1/255.0 and the other rounds down. At most one of these
152 flags may be set.
bsalomon@google.com74b98712011-11-11 19:46:16 +0000153 */
robertphillips@google.com443e5a52012-04-30 20:01:21 +0000154 kMulRGBByAlpha_RoundUp_InConfigFlag = 0x08,
155 kMulRGBByAlpha_RoundDown_InConfigFlag = 0x10,
bsalomon@google.com74b98712011-11-11 19:46:16 +0000156
157 kDummyInConfigFlag,
158 kInConfigBitMask = (kDummyInConfigFlag-1) |
159 (kDummyInConfigFlag-2)
bsalomon@google.com85b505b2011-11-07 14:56:51 +0000160 };
junov@google.comf93e7172011-03-31 21:26:24 +0000161
tomhudson@google.com0d831722011-06-02 15:37:14 +0000162 uint8_t fOptFlags;
bsalomon@google.com74b98712011-11-11 19:46:16 +0000163 uint8_t fInConfigFlags; // bitfield of InConfigFlags values
tomhudson@google.com0d831722011-06-02 15:37:14 +0000164
tomhudson@google.com07eecdc2012-04-20 18:35:38 +0000165 /** Non-zero if user-supplied code will write the stage's
166 contribution to the fragment shader. */
167 uint16_t fCustomStageKey;
168
bsalomon@google.com74b98712011-11-11 19:46:16 +0000169 GR_STATIC_ASSERT((InConfigFlags)(uint8_t)kInConfigBitMask ==
170 kInConfigBitMask);
171
tomhudson@google.com0d831722011-06-02 15:37:14 +0000172 inline bool isEnabled() const {
bsalomon@google.comc2c9b972011-10-03 13:17:22 +0000173 return SkToBool(fOptFlags & kIsEnabled_OptFlagBit);
tomhudson@google.com0d831722011-06-02 15:37:14 +0000174 }
175 inline void setEnabled(bool newValue) {
176 if (newValue) {
177 fOptFlags |= kIsEnabled_OptFlagBit;
178 } else {
179 fOptFlags &= ~kIsEnabled_OptFlagBit;
180 }
181 }
182 };
183
bsalomon@google.com86c1f712011-10-12 14:54:26 +0000184 // Specifies where the intitial color comes from before the stages are
185 // applied.
bsalomon@google.com85b505b2011-11-07 14:56:51 +0000186 enum ColorInput {
187 kSolidWhite_ColorInput,
188 kTransBlack_ColorInput,
189 kAttribute_ColorInput,
190 kUniform_ColorInput,
bsalomon@google.com86c1f712011-10-12 14:54:26 +0000191
bsalomon@google.com85b505b2011-11-07 14:56:51 +0000192 kColorInputCnt
tomhudson@google.com0d831722011-06-02 15:37:14 +0000193 };
194 // Dual-src blending makes use of a secondary output color that can be
bsalomon@google.com271cffc2011-05-20 14:13:56 +0000195 // used as a per-pixel blend coeffecient. This controls whether a
196 // secondary source is output and what value it holds.
197 enum DualSrcOutput {
198 kNone_DualSrcOutput,
199 kCoverage_DualSrcOutput,
200 kCoverageISA_DualSrcOutput,
201 kCoverageISC_DualSrcOutput,
bsalomon@google.com1e257a52011-07-06 19:52:16 +0000202
bsalomon@google.com271cffc2011-05-20 14:13:56 +0000203 kDualSrcOutputCnt
tomhudson@google.com0d831722011-06-02 15:37:14 +0000204 };
bsalomon@google.com271cffc2011-05-20 14:13:56 +0000205
tomhudson@google.com93813632011-10-27 20:21:16 +0000206 GrDrawState::VertexEdgeType fVertexEdgeType;
bsalomon@google.comaeb21602011-08-30 18:13:44 +0000207
tomhudson@google.com0d831722011-06-02 15:37:14 +0000208 // stripped of bits that don't affect prog generation
209 GrVertexLayout fVertexLayout;
junov@google.comf93e7172011-03-31 21:26:24 +0000210
tomhudson@google.com93813632011-10-27 20:21:16 +0000211 StageDesc fStages[GrDrawState::kNumStages];
Scroggo97c88c22011-05-11 14:05:25 +0000212
bsalomon@google.comedfe1aa2011-09-29 14:40:26 +0000213 // To enable experimental geometry shader code (not for use in
214 // production)
215#if GR_GL_EXPERIMENTAL_GS
216 bool fExperimentalGS;
217#endif
218
bsalomon@google.com85b505b2011-11-07 14:56:51 +0000219 uint8_t fColorInput; // casts to enum ColorInput
bsalomon@google.com2401ae82012-01-17 21:03:05 +0000220 uint8_t fCoverageInput; // casts to enum CoverageInput
bsalomon@google.coma91e9232012-02-23 15:39:54 +0000221 uint8_t fOutputConfig; // casts to enum OutputConfig
bsalomon@google.com85b505b2011-11-07 14:56:51 +0000222 uint8_t fDualSrcOutput; // casts to enum DualSrcOutput
tomhudson@google.com0d831722011-06-02 15:37:14 +0000223 int8_t fFirstCoverageStage;
224 SkBool8 fEmitsPointSize;
senorblanco@chromium.org50bdad82012-01-03 20:51:57 +0000225 SkBool8 fColorMatrixEnabled;
junov@google.comf93e7172011-03-31 21:26:24 +0000226
tomhudson@google.com0d831722011-06-02 15:37:14 +0000227 uint8_t fColorFilterXfermode; // casts to enum SkXfermode::Mode
bsalomon@google.com7ffe6812012-05-11 17:32:43 +0000228 int8_t fPadding[1];
bsalomon@google.com9ba4fa62012-07-16 17:36:28 +0000229 };
230 GR_STATIC_ASSERT(!(sizeof(Desc) % 4));
junov@google.comf93e7172011-03-31 21:26:24 +0000231
bsalomon@google.com22c5dea2011-07-07 14:38:03 +0000232 // for code readability
bsalomon@google.com9ba4fa62012-07-16 17:36:28 +0000233 typedef Desc::StageDesc StageDesc;
bsalomon@google.com22c5dea2011-07-07 14:38:03 +0000234
tomhudson@google.com2a2e3ef2011-10-25 19:51:09 +0000235private:
bsalomon@google.comecb60aa2012-07-18 13:20:29 +0000236 GrGLProgram(const GrGLContextInfo& gl,
237 const Desc& desc,
bsalomon@google.comcddaf342012-07-30 13:09:05 +0000238 const GrCustomStage** customStages);
bsalomon@google.comecb60aa2012-07-18 13:20:29 +0000239
240 bool succeeded() const { return 0 != fProgramID; }
241
242 /**
243 * This is the heavy initilization routine for building a GLProgram.
244 */
bsalomon@google.comcddaf342012-07-30 13:09:05 +0000245 bool genProgram(const GrCustomStage** customStages);
bsalomon@google.comecb60aa2012-07-18 13:20:29 +0000246
bsalomon@google.com9ba4fa62012-07-16 17:36:28 +0000247 void genInputColor(GrGLShaderBuilder* builder, SkString* inColor);
tomhudson@google.com2a2e3ef2011-10-25 19:51:09 +0000248
bsalomon@google.com9ba4fa62012-07-16 17:36:28 +0000249 // Determines which uniforms will need to be bound.
bsalomon@google.comecb60aa2012-07-18 13:20:29 +0000250 void genStageCode(int stageNum,
bsalomon@google.com9ba4fa62012-07-16 17:36:28 +0000251 const char* fsInColor, // NULL means no incoming color
252 const char* fsOutColor,
253 const char* vsInCoord,
254 GrGLShaderBuilder* builder);
255
bsalomon@google.comecb60aa2012-07-18 13:20:29 +0000256 void genGeometryShader(GrGLShaderBuilder* segments) const;
bsalomon@google.com9ba4fa62012-07-16 17:36:28 +0000257
bsalomon@google.comdbbc4e22012-07-25 17:48:39 +0000258 typedef GrGLUniformManager::UniformHandle UniformHandle;
259
bsalomon@google.com9ba4fa62012-07-16 17:36:28 +0000260 void genUniformCoverage(GrGLShaderBuilder* segments, SkString* inOutCoverage);
261
262 // generates code to compute coverage based on edge AA.
bsalomon@google.comecb60aa2012-07-18 13:20:29 +0000263 void genEdgeCoverage(SkString* coverageVar, GrGLShaderBuilder* builder) const;
bsalomon@google.com9ba4fa62012-07-16 17:36:28 +0000264
265 // Creates a GL program ID, binds shader attributes to GL vertex attrs, and links the program
bsalomon@google.comecb60aa2012-07-18 13:20:29 +0000266 bool bindOutputsAttribsAndLinkProgram(SkString texCoordAttrNames[GrDrawState::kMaxTexCoords],
bsalomon@google.com9ba4fa62012-07-16 17:36:28 +0000267 bool bindColorOut,
268 bool bindDualSrcOut);
269
bsalomon@google.comdbbc4e22012-07-25 17:48:39 +0000270 // Sets the texture units for samplers
271 void initSamplerUniforms();
bsalomon@google.com9ba4fa62012-07-16 17:36:28 +0000272
bsalomon@google.comecb60aa2012-07-18 13:20:29 +0000273 bool compileShaders(const GrGLShaderBuilder& builder);
bsalomon@google.com9ba4fa62012-07-16 17:36:28 +0000274
bsalomon@google.comf0a104e2012-07-10 17:51:07 +0000275 const char* adjustInColor(const SkString& inColor) const;
tomhudson@google.com2a2e3ef2011-10-25 19:51:09 +0000276
bsalomon@google.comdbbc4e22012-07-25 17:48:39 +0000277 struct StageUniforms {
278 UniformHandle fTextureMatrixUni;
279 UniformHandle fSamplerUni;
280 StageUniforms() {
281 fTextureMatrixUni = GrGLUniformManager::kInvalidUniformHandle;
282 fSamplerUni = GrGLUniformManager::kInvalidUniformHandle;
bsalomon@google.com91961302011-05-09 18:39:58 +0000283 }
junov@google.comf93e7172011-03-31 21:26:24 +0000284 };
285
bsalomon@google.comdbbc4e22012-07-25 17:48:39 +0000286 struct Uniforms {
287 UniformHandle fViewMatrixUni;
288 UniformHandle fColorUni;
289 UniformHandle fCoverageUni;
290 UniformHandle fColorFilterUni;
291 UniformHandle fColorMatrixUni;
292 UniformHandle fColorMatrixVecUni;
293 StageUniforms fStages[GrDrawState::kNumStages];
294 Uniforms() {
295 fViewMatrixUni = GrGLUniformManager::kInvalidUniformHandle;
296 fColorUni = GrGLUniformManager::kInvalidUniformHandle;
297 fCoverageUni = GrGLUniformManager::kInvalidUniformHandle;
298 fColorFilterUni = GrGLUniformManager::kInvalidUniformHandle;
299 fColorMatrixUni = GrGLUniformManager::kInvalidUniformHandle;
300 fColorMatrixVecUni = GrGLUniformManager::kInvalidUniformHandle;
bsalomon@google.com91961302011-05-09 18:39:58 +0000301 }
junov@google.comf93e7172011-03-31 21:26:24 +0000302 };
303
bsalomon@google.com9ba4fa62012-07-16 17:36:28 +0000304 // IDs
305 GrGLuint fVShaderID;
306 GrGLuint fGShaderID;
307 GrGLuint fFShaderID;
308 GrGLuint fProgramID;
junov@google.comf93e7172011-03-31 21:26:24 +0000309
bsalomon@google.com9ba4fa62012-07-16 17:36:28 +0000310 // The matrix sent to GL is determined by both the client's matrix and
311 // the size of the viewport.
312 GrMatrix fViewMatrix;
313 SkISize fViewportSize;
junov@google.comf93e7172011-03-31 21:26:24 +0000314
bsalomon@google.com9ba4fa62012-07-16 17:36:28 +0000315 // these reflect the current values of uniforms
316 // (GL uniform values travel with program)
317 GrColor fColor;
318 GrColor fCoverage;
319 GrColor fColorFilterColor;
tomhudson@google.com2f68e762012-07-17 18:43:21 +0000320 /// When it is sent to GL, the texture matrix will be flipped if the texture orientation
321 /// (below) requires.
bsalomon@google.com9ba4fa62012-07-16 17:36:28 +0000322 GrMatrix fTextureMatrices[GrDrawState::kNumStages];
bsalomon@google.com9ba4fa62012-07-16 17:36:28 +0000323 GrGLTexture::Orientation fTextureOrientation[GrDrawState::kNumStages];
junov@google.comf93e7172011-03-31 21:26:24 +0000324
bsalomon@google.com9ba4fa62012-07-16 17:36:28 +0000325 GrGLProgramStage* fProgramStage[GrDrawState::kNumStages];
junov@google.comf93e7172011-03-31 21:26:24 +0000326
bsalomon@google.com9ba4fa62012-07-16 17:36:28 +0000327 Desc fDesc;
bsalomon@google.comecb60aa2012-07-18 13:20:29 +0000328 const GrGLContextInfo& fContextInfo;
junov@google.comf93e7172011-03-31 21:26:24 +0000329
bsalomon@google.comdbbc4e22012-07-25 17:48:39 +0000330 GrGLUniformManager fUniformManager;
331 Uniforms fUniforms;
332
bsalomon@google.com9ba4fa62012-07-16 17:36:28 +0000333 friend class GrGpuGL; // TODO: remove this by adding getters and moving functionality.
junov@google.comf93e7172011-03-31 21:26:24 +0000334
bsalomon@google.com9ba4fa62012-07-16 17:36:28 +0000335 typedef GrRefCnt INHERITED;
junov@google.comf93e7172011-03-31 21:26:24 +0000336};
337
338#endif