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

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

Issue 12942014: Move GrGLProgram::Desc out of GrGLProgram. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Move #include below dbl include check Created 7 years, 8 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 | Annotate | Revision Log
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 8
9 9
10 #ifndef GrGpuGL_DEFINED 10 #ifndef GrGpuGL_DEFINED
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 const GrGLContext& glContext() const { return fGLContext; } 156 const GrGLContext& glContext() const { return fGLContext; }
157 157
158 static bool BlendCoeffReferencesConstant(GrBlendCoeff coeff); 158 static bool BlendCoeffReferencesConstant(GrBlendCoeff coeff);
159 159
160 class ProgramCache : public ::GrNoncopyable { 160 class ProgramCache : public ::GrNoncopyable {
161 public: 161 public:
162 ProgramCache(const GrGLContext& gl); 162 ProgramCache(const GrGLContext& gl);
163 ~ProgramCache(); 163 ~ProgramCache();
164 164
165 void abandon(); 165 void abandon();
166 GrGLProgram* getProgram(const GrGLProgram::Desc& desc, const GrEffectSta ge* stages[]); 166 GrGLProgram* getProgram(const GrGLProgramDesc& desc, const GrEffectStage * stages[]);
167 private: 167 private:
168 enum { 168 enum {
169 kKeySize = sizeof(GrGLProgram::Desc), 169 kKeySize = sizeof(GrGLProgramDesc),
170 // We may actually have kMaxEntries+1 shaders in the GL context beca use we create a new 170 // We may actually have kMaxEntries+1 shaders in the GL context beca use we create a new
171 // shader before evicting from the cache. 171 // shader before evicting from the cache.
172 kMaxEntries = 32 172 kMaxEntries = 32
173 }; 173 };
174 174
175 class Entry; 175 class Entry;
176 // The value of the hash key is based on the ProgramDesc. 176 // The value of the hash key is based on the ProgramDesc.
177 typedef GrTBinHashKey<Entry, kKeySize> ProgramHashKey; 177 typedef GrTBinHashKey<Entry, kKeySize> ProgramHashKey;
178 178
179 class Entry : public ::GrNoncopyable { 179 class Entry : public ::GrNoncopyable {
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
425 ///@} 425 ///@}
426 426
427 // we record what stencil format worked last time to hopefully exit early 427 // we record what stencil format worked last time to hopefully exit early
428 // from our loop that tries stencil formats and calls check fb status. 428 // from our loop that tries stencil formats and calls check fb status.
429 int fLastSuccessfulStencilFmtIdx; 429 int fLastSuccessfulStencilFmtIdx;
430 430
431 typedef GrGpu INHERITED; 431 typedef GrGpu INHERITED;
432 }; 432 };
433 433
434 #endif 434 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698