| 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 GrGLGpu_DEFINED | 8 #ifndef GrGLGpu_DEFINED |
| 9 #define GrGLGpu_DEFINED | 9 #define GrGLGpu_DEFINED |
| 10 | 10 |
| (...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 262 | 262 |
| 263 void setupPixelLocalStorage(const GrPipeline&, const GrPrimitiveProcessor&); | 263 void setupPixelLocalStorage(const GrPipeline&, const GrPrimitiveProcessor&); |
| 264 | 264 |
| 265 static bool BlendCoeffReferencesConstant(GrBlendCoeff coeff); | 265 static bool BlendCoeffReferencesConstant(GrBlendCoeff coeff); |
| 266 | 266 |
| 267 class ProgramCache : public ::SkNoncopyable { | 267 class ProgramCache : public ::SkNoncopyable { |
| 268 public: | 268 public: |
| 269 ProgramCache(GrGLGpu* gpu); | 269 ProgramCache(GrGLGpu* gpu); |
| 270 ~ProgramCache(); | 270 ~ProgramCache(); |
| 271 | 271 |
| 272 void reset(); | |
| 273 void abandon(); | 272 void abandon(); |
| 274 GrGLProgram* refProgram(const GrGLGpu* gpu, const GrPipeline&, const GrP
rimitiveProcessor&); | 273 GrGLProgram* refProgram(const GrGLGpu* gpu, const GrPipeline&, const GrP
rimitiveProcessor&); |
| 275 | 274 |
| 276 private: | 275 private: |
| 277 enum { | 276 enum { |
| 278 // We may actually have kMaxEntries+1 shaders in the GL context beca
use we create a new | 277 // We may actually have kMaxEntries+1 shaders in the GL context beca
use we create a new |
| 279 // shader before evicting from the cache. | 278 // shader before evicting from the cache. |
| 280 kMaxEntries = 128, | 279 kMaxEntries = 128, |
| 281 kHashBits = 6, | 280 kHashBits = 6, |
| 282 }; | 281 }; |
| (...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 617 } fPLSSetupProgram; | 616 } fPLSSetupProgram; |
| 618 | 617 |
| 619 bool fHWPLSEnabled; | 618 bool fHWPLSEnabled; |
| 620 bool fPLSHasBeenUsed; | 619 bool fPLSHasBeenUsed; |
| 621 | 620 |
| 622 typedef GrGpu INHERITED; | 621 typedef GrGpu INHERITED; |
| 623 friend class GrGLPathRendering; // For accessing setTextureUnit. | 622 friend class GrGLPathRendering; // For accessing setTextureUnit. |
| 624 }; | 623 }; |
| 625 | 624 |
| 626 #endif | 625 #endif |
| OLD | NEW |