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

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

Issue 214823009: Increase GrGpuGL's program cache size (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | 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 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 192
193 void abandon(); 193 void abandon();
194 GrGLProgram* getProgram(const GrGLProgramDesc& desc, 194 GrGLProgram* getProgram(const GrGLProgramDesc& desc,
195 const GrEffectStage* colorStages[], 195 const GrEffectStage* colorStages[],
196 const GrEffectStage* coverageStages[]); 196 const GrEffectStage* coverageStages[]);
197 197
198 private: 198 private:
199 enum { 199 enum {
200 // We may actually have kMaxEntries+1 shaders in the GL context beca use we create a new 200 // We may actually have kMaxEntries+1 shaders in the GL context beca use we create a new
201 // shader before evicting from the cache. 201 // shader before evicting from the cache.
202 kMaxEntries = 32, 202 kMaxEntries = 128,
203 kHashBits = 6, 203 kHashBits = 6,
204 }; 204 };
205 205
206 struct Entry; 206 struct Entry;
207 207
208 struct ProgDescLess; 208 struct ProgDescLess;
209 209
210 // binary search for entry matching desc. returns index into fEntries th at matches desc or ~ 210 // binary search for entry matching desc. returns index into fEntries th at matches desc or ~
211 // of the index of where it should be inserted. 211 // of the index of where it should be inserted.
212 int search(const GrGLProgramDesc& desc) const; 212 int search(const GrGLProgramDesc& desc) const;
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
454 ///@} 454 ///@}
455 455
456 // we record what stencil format worked last time to hopefully exit early 456 // we record what stencil format worked last time to hopefully exit early
457 // from our loop that tries stencil formats and calls check fb status. 457 // from our loop that tries stencil formats and calls check fb status.
458 int fLastSuccessfulStencilFmtIdx; 458 int fLastSuccessfulStencilFmtIdx;
459 459
460 typedef GrGpu INHERITED; 460 typedef GrGpu INHERITED;
461 }; 461 };
462 462
463 #endif 463 #endif
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698