junov@google.com | f93e717 | 2011-03-31 21:26:24 +0000 | [diff] [blame] | 1 | /* |
epoger@google.com | ec3ed6a | 2011-07-28 14:26:00 +0000 | [diff] [blame] | 2 | * 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.com | f93e717 | 2011-03-31 21:26:24 +0000 | [diff] [blame] | 6 | */ |
| 7 | |
epoger@google.com | ec3ed6a | 2011-07-28 14:26:00 +0000 | [diff] [blame] | 8 | |
junov@google.com | f93e717 | 2011-03-31 21:26:24 +0000 | [diff] [blame] | 9 | #ifndef GrGLProgram_DEFINED |
| 10 | #define GrGLProgram_DEFINED |
| 11 | |
tomhudson@google.com | d8f856c | 2012-05-10 12:13:36 +0000 | [diff] [blame] | 12 | #include "GrDrawState.h" |
bsalomon@google.com | dbe49f7 | 2012-11-05 16:36:02 +0000 | [diff] [blame] | 13 | #include "GrGLEffect.h" |
bsalomon@google.com | 9639994 | 2012-02-13 14:39:16 +0000 | [diff] [blame] | 14 | #include "GrGLContextInfo.h" |
tomhudson@google.com | 086e535 | 2011-12-08 14:44:10 +0000 | [diff] [blame] | 15 | #include "GrGLSL.h" |
bsalomon@google.com | 890e3b5 | 2012-06-01 19:01:37 +0000 | [diff] [blame] | 16 | #include "GrGLTexture.h" |
bsalomon@google.com | dbbc4e2 | 2012-07-25 17:48:39 +0000 | [diff] [blame] | 17 | #include "GrGLUniformManager.h" |
junov@google.com | f93e717 | 2011-03-31 21:26:24 +0000 | [diff] [blame] | 18 | |
bsalomon@google.com | f0a104e | 2012-07-10 17:51:07 +0000 | [diff] [blame] | 19 | #include "SkString.h" |
Scroggo | 97c88c2 | 2011-05-11 14:05:25 +0000 | [diff] [blame] | 20 | #include "SkXfermode.h" |
| 21 | |
junov@google.com | f93e717 | 2011-03-31 21:26:24 +0000 | [diff] [blame] | 22 | class GrBinHashKeyBuilder; |
bsalomon@google.com | d698f77 | 2012-10-25 13:22:00 +0000 | [diff] [blame] | 23 | class GrGLEffect; |
tomhudson@google.com | f9ad886 | 2012-05-11 20:38:48 +0000 | [diff] [blame] | 24 | class GrGLShaderBuilder; |
junov@google.com | f93e717 | 2011-03-31 21:26:24 +0000 | [diff] [blame] | 25 | |
bsalomon@google.com | edfe1aa | 2011-09-29 14:40:26 +0000 | [diff] [blame] | 26 | // optionally compile the experimental GS code. Set to GR_DEBUG |
| 27 | // so that debug build bots will execute the code. |
| 28 | #define GR_GL_EXPERIMENTAL_GS GR_DEBUG |
| 29 | |
junov@google.com | f93e717 | 2011-03-31 21:26:24 +0000 | [diff] [blame] | 30 | /** |
| 31 | * This class manages a GPU program and records per-program information. |
| 32 | * We can specify the attribute locations so that they are constant |
| 33 | * across our shaders. But the driver determines the uniform locations |
| 34 | * at link time. We don't need to remember the sampler uniform location |
| 35 | * because we will bind a texture slot to it and never change it |
| 36 | * Uniforms are program-local so we can't rely on fHWState to hold the |
| 37 | * previous uniform state after a program change. |
| 38 | */ |
bsalomon@google.com | 9ba4fa6 | 2012-07-16 17:36:28 +0000 | [diff] [blame] | 39 | class GrGLProgram : public GrRefCnt { |
junov@google.com | f93e717 | 2011-03-31 21:26:24 +0000 | [diff] [blame] | 40 | public: |
bsalomon@google.com | 9ba4fa6 | 2012-07-16 17:36:28 +0000 | [diff] [blame] | 41 | SK_DECLARE_INST_COUNT(GrGLProgram) |
bsalomon@google.com | 4fa6694 | 2011-09-20 19:06:12 +0000 | [diff] [blame] | 42 | |
bsalomon@google.com | 9ba4fa6 | 2012-07-16 17:36:28 +0000 | [diff] [blame] | 43 | struct Desc; |
junov@google.com | f93e717 | 2011-03-31 21:26:24 +0000 | [diff] [blame] | 44 | |
bsalomon@google.com | ecb60aa | 2012-07-18 13:20:29 +0000 | [diff] [blame] | 45 | static GrGLProgram* Create(const GrGLContextInfo& gl, |
| 46 | const Desc& desc, |
bsalomon@google.com | 2eaaefd | 2012-10-29 19:51:22 +0000 | [diff] [blame] | 47 | const GrEffectStage* stages[]); |
bsalomon@google.com | ecb60aa | 2012-07-18 13:20:29 +0000 | [diff] [blame] | 48 | |
bsalomon@google.com | 9ba4fa6 | 2012-07-16 17:36:28 +0000 | [diff] [blame] | 49 | virtual ~GrGLProgram(); |
junov@google.com | f93e717 | 2011-03-31 21:26:24 +0000 | [diff] [blame] | 50 | |
bsalomon@google.com | 34cccde | 2013-01-04 18:34:30 +0000 | [diff] [blame] | 51 | /** |
| 52 | * Call to abandon GL objects owned by this program. |
| 53 | */ |
bsalomon@google.com | ecb60aa | 2012-07-18 13:20:29 +0000 | [diff] [blame] | 54 | void abandon(); |
| 55 | |
junov@google.com | f93e717 | 2011-03-31 21:26:24 +0000 | [diff] [blame] | 56 | /** |
bsalomon@google.com | 4285acc | 2012-10-22 14:11:24 +0000 | [diff] [blame] | 57 | * The shader may modify the blend coefficients. Params are in/out |
junov@google.com | f93e717 | 2011-03-31 21:26:24 +0000 | [diff] [blame] | 58 | */ |
bsalomon@google.com | ecb60aa | 2012-07-18 13:20:29 +0000 | [diff] [blame] | 59 | void overrideBlend(GrBlendCoeff* srcCoeff, GrBlendCoeff* dstCoeff) const; |
junov@google.com | f93e717 | 2011-03-31 21:26:24 +0000 | [diff] [blame] | 60 | |
bsalomon@google.com | ecb60aa | 2012-07-18 13:20:29 +0000 | [diff] [blame] | 61 | const Desc& getDesc() { return fDesc; } |
bsalomon@google.com | 9ba4fa6 | 2012-07-16 17:36:28 +0000 | [diff] [blame] | 62 | |
bsalomon@google.com | 271cffc | 2011-05-20 14:13:56 +0000 | [diff] [blame] | 63 | /** |
bsalomon@google.com | 28f6ab4 | 2012-10-23 14:21:11 +0000 | [diff] [blame] | 64 | * Attribute indices. These should not overlap. |
bsalomon@google.com | 271cffc | 2011-05-20 14:13:56 +0000 | [diff] [blame] | 65 | */ |
bsalomon@google.com | 9196130 | 2011-05-09 18:39:58 +0000 | [diff] [blame] | 66 | static int PositionAttributeIdx() { return 0; } |
bsalomon@google.com | 28f6ab4 | 2012-10-23 14:21:11 +0000 | [diff] [blame] | 67 | static int ColorAttributeIdx() { return 1; } |
| 68 | static int CoverageAttributeIdx() { return 2; } |
| 69 | static int EdgeAttributeIdx() { return 3; } |
| 70 | static int TexCoordAttributeIdx(int tcIdx) { return 4 + tcIdx; } |
bsalomon@google.com | aeb2160 | 2011-08-30 18:13:44 +0000 | [diff] [blame] | 71 | |
bsalomon@google.com | 4285acc | 2012-10-22 14:11:24 +0000 | [diff] [blame] | 72 | /** |
bsalomon@google.com | 34cccde | 2013-01-04 18:34:30 +0000 | [diff] [blame] | 73 | * This function uploads uniforms and calls each GrGLEffect's setData. It is called before a |
| 74 | * draw occurs using the program after the program has already been bound. It also uses the |
| 75 | * GrGpuGL object to bind the textures required by the GrGLEffects. |
bsalomon@google.com | 4285acc | 2012-10-22 14:11:24 +0000 | [diff] [blame] | 76 | */ |
bsalomon@google.com | 34cccde | 2013-01-04 18:34:30 +0000 | [diff] [blame] | 77 | void setData(GrGpuGL*); |
bsalomon@google.com | 9196130 | 2011-05-09 18:39:58 +0000 | [diff] [blame] | 78 | |
tomhudson@google.com | 0d83172 | 2011-06-02 15:37:14 +0000 | [diff] [blame] | 79 | // Parameters that affect code generation |
bsalomon@google.com | dbe49f7 | 2012-11-05 16:36:02 +0000 | [diff] [blame] | 80 | // This structs should be kept compact; it is input to an expensive hash key generator. |
bsalomon@google.com | 9ba4fa6 | 2012-07-16 17:36:28 +0000 | [diff] [blame] | 81 | struct Desc { |
| 82 | Desc() { |
bsalomon@google.com | 4285acc | 2012-10-22 14:11:24 +0000 | [diff] [blame] | 83 | // since we use this as part of a key we can't have any uninitialized |
bsalomon@google.com | 4be283f | 2011-04-19 21:15:09 +0000 | [diff] [blame] | 84 | // padding |
bsalomon@google.com | 9ba4fa6 | 2012-07-16 17:36:28 +0000 | [diff] [blame] | 85 | 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.com | 4be283f | 2011-04-19 21:15:09 +0000 | [diff] [blame] | 91 | } |
| 92 | |
bsalomon@google.com | 4285acc | 2012-10-22 14:11:24 +0000 | [diff] [blame] | 93 | // Specifies where the initial color comes from before the stages are applied. |
bsalomon@google.com | 85b505b | 2011-11-07 14:56:51 +0000 | [diff] [blame] | 94 | enum ColorInput { |
| 95 | kSolidWhite_ColorInput, |
| 96 | kTransBlack_ColorInput, |
| 97 | kAttribute_ColorInput, |
| 98 | kUniform_ColorInput, |
bsalomon@google.com | 86c1f71 | 2011-10-12 14:54:26 +0000 | [diff] [blame] | 99 | |
bsalomon@google.com | 85b505b | 2011-11-07 14:56:51 +0000 | [diff] [blame] | 100 | kColorInputCnt |
tomhudson@google.com | 0d83172 | 2011-06-02 15:37:14 +0000 | [diff] [blame] | 101 | }; |
| 102 | // Dual-src blending makes use of a secondary output color that can be |
bsalomon@google.com | 4285acc | 2012-10-22 14:11:24 +0000 | [diff] [blame] | 103 | // used as a per-pixel blend coefficient. This controls whether a |
bsalomon@google.com | 271cffc | 2011-05-20 14:13:56 +0000 | [diff] [blame] | 104 | // secondary source is output and what value it holds. |
| 105 | enum DualSrcOutput { |
| 106 | kNone_DualSrcOutput, |
| 107 | kCoverage_DualSrcOutput, |
| 108 | kCoverageISA_DualSrcOutput, |
| 109 | kCoverageISC_DualSrcOutput, |
bsalomon@google.com | 1e257a5 | 2011-07-06 19:52:16 +0000 | [diff] [blame] | 110 | |
bsalomon@google.com | 271cffc | 2011-05-20 14:13:56 +0000 | [diff] [blame] | 111 | kDualSrcOutputCnt |
tomhudson@google.com | 0d83172 | 2011-06-02 15:37:14 +0000 | [diff] [blame] | 112 | }; |
bsalomon@google.com | 271cffc | 2011-05-20 14:13:56 +0000 | [diff] [blame] | 113 | |
bsalomon@google.com | 45a15f5 | 2012-12-10 19:10:17 +0000 | [diff] [blame] | 114 | // TODO: remove these two members when edge-aa can be rewritten as a GrEffect. |
tomhudson@google.com | 9381363 | 2011-10-27 20:21:16 +0000 | [diff] [blame] | 115 | GrDrawState::VertexEdgeType fVertexEdgeType; |
bsalomon@google.com | 45a15f5 | 2012-12-10 19:10:17 +0000 | [diff] [blame] | 116 | // should the FS discard if the edge-aa coverage is zero (to avoid stencil manipulation) |
| 117 | bool fDiscardIfOutsideEdge; |
bsalomon@google.com | aeb2160 | 2011-08-30 18:13:44 +0000 | [diff] [blame] | 118 | |
bsalomon@google.com | 4285acc | 2012-10-22 14:11:24 +0000 | [diff] [blame] | 119 | // stripped of bits that don't affect program generation |
bsalomon@google.com | 34cccde | 2013-01-04 18:34:30 +0000 | [diff] [blame] | 120 | GrVertexLayout fVertexLayout; |
junov@google.com | f93e717 | 2011-03-31 21:26:24 +0000 | [diff] [blame] | 121 | |
bsalomon@google.com | dbe49f7 | 2012-11-05 16:36:02 +0000 | [diff] [blame] | 122 | /** Non-zero if this stage has an effect */ |
bsalomon@google.com | 34cccde | 2013-01-04 18:34:30 +0000 | [diff] [blame] | 123 | GrGLEffect::EffectKey fEffectKeys[GrDrawState::kNumStages]; |
Scroggo | 97c88c2 | 2011-05-11 14:05:25 +0000 | [diff] [blame] | 124 | |
bsalomon@google.com | edfe1aa | 2011-09-29 14:40:26 +0000 | [diff] [blame] | 125 | // To enable experimental geometry shader code (not for use in |
| 126 | // production) |
| 127 | #if GR_GL_EXPERIMENTAL_GS |
bsalomon@google.com | 34cccde | 2013-01-04 18:34:30 +0000 | [diff] [blame] | 128 | bool fExperimentalGS; |
bsalomon@google.com | edfe1aa | 2011-09-29 14:40:26 +0000 | [diff] [blame] | 129 | #endif |
bsalomon@google.com | 34cccde | 2013-01-04 18:34:30 +0000 | [diff] [blame] | 130 | uint8_t fColorInput; // casts to enum ColorInput |
| 131 | uint8_t fCoverageInput; // casts to enum ColorInput |
| 132 | uint8_t fDualSrcOutput; // casts to enum DualSrcOutput |
| 133 | int8_t fFirstCoverageStage; |
| 134 | SkBool8 fEmitsPointSize; |
| 135 | uint8_t fColorFilterXfermode; // casts to enum SkXfermode::Mode |
bsalomon@google.com | 9ba4fa6 | 2012-07-16 17:36:28 +0000 | [diff] [blame] | 136 | }; |
tomhudson@google.com | 2a2e3ef | 2011-10-25 19:51:09 +0000 | [diff] [blame] | 137 | private: |
bsalomon@google.com | ecb60aa | 2012-07-18 13:20:29 +0000 | [diff] [blame] | 138 | GrGLProgram(const GrGLContextInfo& gl, |
| 139 | const Desc& desc, |
bsalomon@google.com | 2eaaefd | 2012-10-29 19:51:22 +0000 | [diff] [blame] | 140 | const GrEffectStage* stages[]); |
bsalomon@google.com | ecb60aa | 2012-07-18 13:20:29 +0000 | [diff] [blame] | 141 | |
| 142 | bool succeeded() const { return 0 != fProgramID; } |
| 143 | |
| 144 | /** |
bsalomon@google.com | 4285acc | 2012-10-22 14:11:24 +0000 | [diff] [blame] | 145 | * This is the heavy initialization routine for building a GLProgram. |
bsalomon@google.com | ecb60aa | 2012-07-18 13:20:29 +0000 | [diff] [blame] | 146 | */ |
bsalomon@google.com | 2eaaefd | 2012-10-29 19:51:22 +0000 | [diff] [blame] | 147 | bool genProgram(const GrEffectStage* stages[]); |
bsalomon@google.com | ecb60aa | 2012-07-18 13:20:29 +0000 | [diff] [blame] | 148 | |
bsalomon@google.com | 9ba4fa6 | 2012-07-16 17:36:28 +0000 | [diff] [blame] | 149 | void genInputColor(GrGLShaderBuilder* builder, SkString* inColor); |
tomhudson@google.com | 2a2e3ef | 2011-10-25 19:51:09 +0000 | [diff] [blame] | 150 | |
bsalomon@google.com | ecb60aa | 2012-07-18 13:20:29 +0000 | [diff] [blame] | 151 | void genGeometryShader(GrGLShaderBuilder* segments) const; |
bsalomon@google.com | 9ba4fa6 | 2012-07-16 17:36:28 +0000 | [diff] [blame] | 152 | |
bsalomon@google.com | dbbc4e2 | 2012-07-25 17:48:39 +0000 | [diff] [blame] | 153 | typedef GrGLUniformManager::UniformHandle UniformHandle; |
| 154 | |
bsalomon@google.com | 9ba4fa6 | 2012-07-16 17:36:28 +0000 | [diff] [blame] | 155 | void genUniformCoverage(GrGLShaderBuilder* segments, SkString* inOutCoverage); |
| 156 | |
bsalomon@google.com | d472620 | 2012-08-03 14:34:46 +0000 | [diff] [blame] | 157 | // generates code to compute coverage based on edge AA. Returns true if edge coverage was |
| 158 | // inserted in which case coverageVar will be updated to refer to a scalar. Otherwise, |
| 159 | // coverageVar is set to an empty string. |
| 160 | bool genEdgeCoverage(SkString* coverageVar, GrGLShaderBuilder* builder) const; |
bsalomon@google.com | 9ba4fa6 | 2012-07-16 17:36:28 +0000 | [diff] [blame] | 161 | |
| 162 | // Creates a GL program ID, binds shader attributes to GL vertex attrs, and links the program |
bsalomon@google.com | 17504f5 | 2012-10-30 12:34:25 +0000 | [diff] [blame] | 163 | bool bindOutputsAttribsAndLinkProgram(const GrGLShaderBuilder& builder, |
| 164 | SkString texCoordAttrNames[GrDrawState::kMaxTexCoords], |
bsalomon@google.com | 9ba4fa6 | 2012-07-16 17:36:28 +0000 | [diff] [blame] | 165 | bool bindColorOut, |
| 166 | bool bindDualSrcOut); |
| 167 | |
bsalomon@google.com | dbbc4e2 | 2012-07-25 17:48:39 +0000 | [diff] [blame] | 168 | // Sets the texture units for samplers |
| 169 | void initSamplerUniforms(); |
bsalomon@google.com | 9ba4fa6 | 2012-07-16 17:36:28 +0000 | [diff] [blame] | 170 | |
bsalomon@google.com | ecb60aa | 2012-07-18 13:20:29 +0000 | [diff] [blame] | 171 | bool compileShaders(const GrGLShaderBuilder& builder); |
bsalomon@google.com | 9ba4fa6 | 2012-07-16 17:36:28 +0000 | [diff] [blame] | 172 | |
bsalomon@google.com | f0a104e | 2012-07-10 17:51:07 +0000 | [diff] [blame] | 173 | const char* adjustInColor(const SkString& inColor) const; |
tomhudson@google.com | 2a2e3ef | 2011-10-25 19:51:09 +0000 | [diff] [blame] | 174 | |
bsalomon@google.com | 34cccde | 2013-01-04 18:34:30 +0000 | [diff] [blame] | 175 | typedef SkSTArray<4, UniformHandle, true> SamplerUniSArray; |
skia.committer@gmail.com | 8ae714b | 2013-01-05 02:02:05 +0000 | [diff] [blame] | 176 | |
bsalomon@google.com | 34cccde | 2013-01-04 18:34:30 +0000 | [diff] [blame] | 177 | struct UniformHandles { |
| 178 | UniformHandle fViewMatrixUni; |
| 179 | UniformHandle fColorUni; |
| 180 | UniformHandle fCoverageUni; |
| 181 | UniformHandle fColorFilterUni; |
bsalomon@google.com | 706f668 | 2012-10-23 14:53:55 +0000 | [diff] [blame] | 182 | // We use the render target height to provide a y-down frag coord when specifying |
| 183 | // origin_upper_left is not supported. |
bsalomon@google.com | 34cccde | 2013-01-04 18:34:30 +0000 | [diff] [blame] | 184 | UniformHandle fRTHeightUni; |
| 185 | // An array of sampler uniform handles for each effect. |
| 186 | SamplerUniSArray fSamplerUnis[GrDrawState::kNumStages]; |
skia.committer@gmail.com | 8ae714b | 2013-01-05 02:02:05 +0000 | [diff] [blame] | 187 | |
bsalomon@google.com | 34cccde | 2013-01-04 18:34:30 +0000 | [diff] [blame] | 188 | UniformHandles() { |
bsalomon@google.com | dbbc4e2 | 2012-07-25 17:48:39 +0000 | [diff] [blame] | 189 | fViewMatrixUni = GrGLUniformManager::kInvalidUniformHandle; |
| 190 | fColorUni = GrGLUniformManager::kInvalidUniformHandle; |
| 191 | fCoverageUni = GrGLUniformManager::kInvalidUniformHandle; |
| 192 | fColorFilterUni = GrGLUniformManager::kInvalidUniformHandle; |
bsalomon@google.com | 34cccde | 2013-01-04 18:34:30 +0000 | [diff] [blame] | 193 | fRTHeightUni = GrGLUniformManager::kInvalidUniformHandle; |
bsalomon@google.com | 9196130 | 2011-05-09 18:39:58 +0000 | [diff] [blame] | 194 | } |
junov@google.com | f93e717 | 2011-03-31 21:26:24 +0000 | [diff] [blame] | 195 | }; |
| 196 | |
bsalomon@google.com | 34cccde | 2013-01-04 18:34:30 +0000 | [diff] [blame] | 197 | // GL IDs |
| 198 | GrGLuint fVShaderID; |
| 199 | GrGLuint fGShaderID; |
| 200 | GrGLuint fFShaderID; |
| 201 | GrGLuint fProgramID; |
senorblanco@chromium.org | 3cb406b | 2013-02-05 19:50:46 +0000 | [diff] [blame^] | 202 | // The matrix sent to GL is determined by the client's matrix, |
| 203 | // the size of the viewport, and the origin of the render target. |
bsalomon@google.com | 34cccde | 2013-01-04 18:34:30 +0000 | [diff] [blame] | 204 | SkMatrix fViewMatrix; |
| 205 | SkISize fViewportSize; |
senorblanco@chromium.org | 3cb406b | 2013-02-05 19:50:46 +0000 | [diff] [blame^] | 206 | GrSurfaceOrigin fOrigin; |
junov@google.com | f93e717 | 2011-03-31 21:26:24 +0000 | [diff] [blame] | 207 | |
bsalomon@google.com | 34cccde | 2013-01-04 18:34:30 +0000 | [diff] [blame] | 208 | // these reflect the current values of uniforms (GL uniform values travel with program) |
bsalomon@google.com | 9ba4fa6 | 2012-07-16 17:36:28 +0000 | [diff] [blame] | 209 | GrColor fColor; |
| 210 | GrColor fCoverage; |
| 211 | GrColor fColorFilterColor; |
bsalomon@google.com | 706f668 | 2012-10-23 14:53:55 +0000 | [diff] [blame] | 212 | int fRTHeight; |
junov@google.com | f93e717 | 2011-03-31 21:26:24 +0000 | [diff] [blame] | 213 | |
bsalomon@google.com | 46fba0d | 2012-10-25 21:42:05 +0000 | [diff] [blame] | 214 | GrGLEffect* fEffects[GrDrawState::kNumStages]; |
junov@google.com | f93e717 | 2011-03-31 21:26:24 +0000 | [diff] [blame] | 215 | |
bsalomon@google.com | 34cccde | 2013-01-04 18:34:30 +0000 | [diff] [blame] | 216 | Desc fDesc; |
bsalomon@google.com | ecb60aa | 2012-07-18 13:20:29 +0000 | [diff] [blame] | 217 | const GrGLContextInfo& fContextInfo; |
junov@google.com | f93e717 | 2011-03-31 21:26:24 +0000 | [diff] [blame] | 218 | |
bsalomon@google.com | dbbc4e2 | 2012-07-25 17:48:39 +0000 | [diff] [blame] | 219 | GrGLUniformManager fUniformManager; |
bsalomon@google.com | 34cccde | 2013-01-04 18:34:30 +0000 | [diff] [blame] | 220 | UniformHandles fUniformHandles; |
bsalomon@google.com | dbbc4e2 | 2012-07-25 17:48:39 +0000 | [diff] [blame] | 221 | |
bsalomon@google.com | 9ba4fa6 | 2012-07-16 17:36:28 +0000 | [diff] [blame] | 222 | friend class GrGpuGL; // TODO: remove this by adding getters and moving functionality. |
junov@google.com | f93e717 | 2011-03-31 21:26:24 +0000 | [diff] [blame] | 223 | |
bsalomon@google.com | 9ba4fa6 | 2012-07-16 17:36:28 +0000 | [diff] [blame] | 224 | typedef GrRefCnt INHERITED; |
junov@google.com | f93e717 | 2011-03-31 21:26:24 +0000 | [diff] [blame] | 225 | }; |
| 226 | |
| 227 | #endif |