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