| 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 | 8 |
| 9 | 9 |
| 10 #ifndef GrGpuGL_DEFINED | 10 #ifndef GrGpuGL_DEFINED |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 const GrGLContext& glContext() const { return fGLContext; } | 171 const GrGLContext& glContext() const { return fGLContext; } |
| 172 | 172 |
| 173 static bool BlendCoeffReferencesConstant(GrBlendCoeff coeff); | 173 static bool BlendCoeffReferencesConstant(GrBlendCoeff coeff); |
| 174 | 174 |
| 175 class ProgramCache : public ::GrNoncopyable { | 175 class ProgramCache : public ::GrNoncopyable { |
| 176 public: | 176 public: |
| 177 ProgramCache(const GrGLContext& gl); | 177 ProgramCache(const GrGLContext& gl); |
| 178 ~ProgramCache(); | 178 ~ProgramCache(); |
| 179 | 179 |
| 180 void abandon(); | 180 void abandon(); |
| 181 GrGLProgram* getProgram(const GrGLProgramDesc& desc, const GrEffectStage
* stages[]); | 181 GrGLProgram* getProgram(const GrGLProgramDesc& desc, |
| 182 const GrEffectStage* colorStages[], |
| 183 const GrEffectStage* coverageStages[]); |
| 182 | 184 |
| 183 private: | 185 private: |
| 184 enum { | 186 enum { |
| 185 // 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 |
| 186 // shader before evicting from the cache. | 188 // shader before evicting from the cache. |
| 187 kMaxEntries = 32, | 189 kMaxEntries = 32, |
| 188 kHashBits = 6, | 190 kHashBits = 6, |
| 189 }; | 191 }; |
| 190 | 192 |
| 191 struct Entry; | 193 struct Entry; |
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 431 ///@} | 433 ///@} |
| 432 | 434 |
| 433 // we record what stencil format worked last time to hopefully exit early | 435 // we record what stencil format worked last time to hopefully exit early |
| 434 // from our loop that tries stencil formats and calls check fb status. | 436 // from our loop that tries stencil formats and calls check fb status. |
| 435 int fLastSuccessfulStencilFmtIdx; | 437 int fLastSuccessfulStencilFmtIdx; |
| 436 | 438 |
| 437 typedef GrGpu INHERITED; | 439 typedef GrGpu INHERITED; |
| 438 }; | 440 }; |
| 439 | 441 |
| 440 #endif | 442 #endif |
| OLD | NEW |