| 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 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 static bool BlendCoeffReferencesConstant(GrBlendCoeff coeff); | 174 static bool BlendCoeffReferencesConstant(GrBlendCoeff coeff); |
| 175 | 175 |
| 176 class ProgramCache : public ::SkNoncopyable { | 176 class ProgramCache : public ::SkNoncopyable { |
| 177 public: | 177 public: |
| 178 ProgramCache(GrGpuGL* gpu); | 178 ProgramCache(GrGpuGL* gpu); |
| 179 ~ProgramCache(); | 179 ~ProgramCache(); |
| 180 | 180 |
| 181 void abandon(); | 181 void abandon(); |
| 182 GrGLProgram* getProgram(const GrOptDrawState&, | 182 GrGLProgram* getProgram(const GrOptDrawState&, |
| 183 const GrGLProgramDesc&, | 183 const GrGLProgramDesc&, |
| 184 DrawType, | 184 DrawType); |
| 185 const GrGeometryStage* geometryProcessor, | |
| 186 const GrFragmentStage* colorStages[], | |
| 187 const GrFragmentStage* coverageStages[]); | |
| 188 | 185 |
| 189 private: | 186 private: |
| 190 enum { | 187 enum { |
| 191 // We may actually have kMaxEntries+1 shaders in the GL context beca
use we create a new | 188 // We may actually have kMaxEntries+1 shaders in the GL context beca
use we create a new |
| 192 // shader before evicting from the cache. | 189 // shader before evicting from the cache. |
| 193 kMaxEntries = 128, | 190 kMaxEntries = 128, |
| 194 kHashBits = 6, | 191 kHashBits = 6, |
| 195 }; | 192 }; |
| 196 | 193 |
| 197 struct Entry; | 194 struct Entry; |
| (...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 443 | 440 |
| 444 // we record what stencil format worked last time to hopefully exit early | 441 // we record what stencil format worked last time to hopefully exit early |
| 445 // from our loop that tries stencil formats and calls check fb status. | 442 // from our loop that tries stencil formats and calls check fb status. |
| 446 int fLastSuccessfulStencilFmtIdx; | 443 int fLastSuccessfulStencilFmtIdx; |
| 447 | 444 |
| 448 typedef GrGpu INHERITED; | 445 typedef GrGpu INHERITED; |
| 449 friend class GrGLPathRendering; // For accessing setTextureUnit. | 446 friend class GrGLPathRendering; // For accessing setTextureUnit. |
| 450 }; | 447 }; |
| 451 | 448 |
| 452 #endif | 449 #endif |
| OLD | NEW |