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

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

Issue 628293002: Plumb OptDrawState down to VertexShaderBuilder (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 2 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/gl/GrGLProgram.cpp ('k') | src/gpu/gl/GrGpuGL_program.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 GrGpuGL_DEFINED 8 #ifndef GrGpuGL_DEFINED
9 #define GrGpuGL_DEFINED 9 #define GrGpuGL_DEFINED
10 10
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 bool hasExtension(const char* ext) const { return fGLContext.hasExtension(ex t); } 172 bool hasExtension(const char* ext) const { return fGLContext.hasExtension(ex t); }
173 173
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 GrGLProgramDesc& desc, 182 GrGLProgram* getProgram(const GrOptDrawState& optState,
183 const GrGLProgramDesc& desc,
183 const GrGeometryStage* geometryProcessor, 184 const GrGeometryStage* geometryProcessor,
184 const GrFragmentStage* colorStages[], 185 const GrFragmentStage* colorStages[],
185 const GrFragmentStage* coverageStages[]); 186 const GrFragmentStage* coverageStages[]);
186 187
187 private: 188 private:
188 enum { 189 enum {
189 // We may actually have kMaxEntries+1 shaders in the GL context beca use we create a new 190 // We may actually have kMaxEntries+1 shaders in the GL context beca use we create a new
190 // shader before evicting from the cache. 191 // shader before evicting from the cache.
191 kMaxEntries = 128, 192 kMaxEntries = 128,
192 kHashBits = 6, 193 kHashBits = 6,
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
441 442
442 // we record what stencil format worked last time to hopefully exit early 443 // we record what stencil format worked last time to hopefully exit early
443 // from our loop that tries stencil formats and calls check fb status. 444 // from our loop that tries stencil formats and calls check fb status.
444 int fLastSuccessfulStencilFmtIdx; 445 int fLastSuccessfulStencilFmtIdx;
445 446
446 typedef GrGpu INHERITED; 447 typedef GrGpu INHERITED;
447 friend class GrGLPathRendering; // For accessing setTextureUnit. 448 friend class GrGLPathRendering; // For accessing setTextureUnit.
448 }; 449 };
449 450
450 #endif 451 #endif
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLProgram.cpp ('k') | src/gpu/gl/GrGpuGL_program.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698