| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #ifndef GrGpuGL_DEFINED | 8 #ifndef GrGpuGL_DEFINED |
| 9 #define GrGpuGL_DEFINED | 9 #define GrGpuGL_DEFINED |
| 10 | 10 |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 | 171 |
| 172 static bool BlendCoeffReferencesConstant(GrBlendCoeff coeff); | 172 static bool BlendCoeffReferencesConstant(GrBlendCoeff coeff); |
| 173 | 173 |
| 174 class ProgramCache : public ::SkNoncopyable { | 174 class ProgramCache : public ::SkNoncopyable { |
| 175 public: | 175 public: |
| 176 ProgramCache(GrGpuGL* gpu); | 176 ProgramCache(GrGpuGL* gpu); |
| 177 ~ProgramCache(); | 177 ~ProgramCache(); |
| 178 | 178 |
| 179 void abandon(); | 179 void abandon(); |
| 180 GrGLProgram* getProgram(const GrGLProgramDesc& desc, | 180 GrGLProgram* getProgram(const GrGLProgramDesc& desc, |
| 181 const GrEffectStage* geometryProcessor, |
| 181 const GrEffectStage* colorStages[], | 182 const GrEffectStage* colorStages[], |
| 182 const GrEffectStage* coverageStages[]); | 183 const GrEffectStage* coverageStages[]); |
| 183 | 184 |
| 184 private: | 185 private: |
| 185 enum { | 186 enum { |
| 186 // We may actually have kMaxEntries+1 shaders in the GL context beca
use we create a new | 187 // We may actually have kMaxEntries+1 shaders in the GL context beca
use we create a new |
| 187 // shader before evicting from the cache. | 188 // shader before evicting from the cache. |
| 188 kMaxEntries = 128, | 189 kMaxEntries = 128, |
| 189 kHashBits = 6, | 190 kHashBits = 6, |
| 190 }; | 191 }; |
| (...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 435 | 436 |
| 436 // we record what stencil format worked last time to hopefully exit early | 437 // we record what stencil format worked last time to hopefully exit early |
| 437 // from our loop that tries stencil formats and calls check fb status. | 438 // from our loop that tries stencil formats and calls check fb status. |
| 438 int fLastSuccessfulStencilFmtIdx; | 439 int fLastSuccessfulStencilFmtIdx; |
| 439 | 440 |
| 440 typedef GrGpu INHERITED; | 441 typedef GrGpu INHERITED; |
| 441 friend class GrGLPathRendering; // For accessing setTextureUnit. | 442 friend class GrGLPathRendering; // For accessing setTextureUnit. |
| 442 }; | 443 }; |
| 443 | 444 |
| 444 #endif | 445 #endif |
| OLD | NEW |