Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Side by Side Diff: src/gpu/gl/GrGLGpu.h

Issue 1816153002: Set up cache in vulkan to reuse GrVkPrograms (aka VkPipelines) (Closed) Base URL: https://skia.googlesource.com/skia.git@progSamplers
Patch Set: rebase Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/gpu/GrStencil.cpp ('k') | src/gpu/gl/GrGLGpuProgramCache.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/gpu/GrStencil.cpp ('k') | src/gpu/gl/GrGLGpuProgramCache.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698