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

Side by Side Diff: src/gpu/gl/GrGpuGL_program.cpp

Issue 304403003: Generate path names on the client side (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 6 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 | « src/gpu/gl/GrGpuGL.cpp ('k') | tests/NameAllocatorTest.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 #include "GrGpuGL.h" 8 #include "GrGpuGL.h"
9 9
10 #include "GrEffect.h" 10 #include "GrEffect.h"
11 #include "GrGLEffect.h" 11 #include "GrGLEffect.h"
12 #include "SkRTConf.h" 12 #include "SkRTConf.h"
13 #include "GrGLNameAllocator.h"
13 #include "SkTSearch.h" 14 #include "SkTSearch.h"
14 15
15 #ifdef PROGRAM_CACHE_STATS 16 #ifdef PROGRAM_CACHE_STATS
16 SK_CONF_DECLARE(bool, c_DisplayCache, "gpu.displayCache", false, 17 SK_CONF_DECLARE(bool, c_DisplayCache, "gpu.displayCache", false,
17 "Display program cache usage."); 18 "Display program cache usage.");
18 #endif 19 #endif
19 20
20 typedef GrGLUniformManager::UniformHandle UniformHandle; 21 typedef GrGLUniformManager::UniformHandle UniformHandle;
21 22
22 struct GrGpuGL::ProgramCache::Entry { 23 struct GrGpuGL::ProgramCache::Entry {
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 ++fCurrLRUStamp; 196 ++fCurrLRUStamp;
196 return entry->fProgram; 197 return entry->fProgram;
197 } 198 }
198 199
199 //////////////////////////////////////////////////////////////////////////////// 200 ////////////////////////////////////////////////////////////////////////////////
200 201
201 void GrGpuGL::abandonResources(){ 202 void GrGpuGL::abandonResources(){
202 INHERITED::abandonResources(); 203 INHERITED::abandonResources();
203 fProgramCache->abandon(); 204 fProgramCache->abandon();
204 fHWProgramID = 0; 205 fHWProgramID = 0;
206 fPathNameAllocator.reset(NULL);
205 } 207 }
206 208
207 //////////////////////////////////////////////////////////////////////////////// 209 ////////////////////////////////////////////////////////////////////////////////
208 210
209 #define GL_CALL(X) GR_GL_CALL(this->glInterface(), X) 211 #define GL_CALL(X) GR_GL_CALL(this->glInterface(), X)
210 212
211 bool GrGpuGL::flushGraphicsState(DrawType type, const GrDeviceCoordTexture* dstC opy) { 213 bool GrGpuGL::flushGraphicsState(DrawType type, const GrDeviceCoordTexture* dstC opy) {
212 const GrDrawState& drawState = this->getDrawState(); 214 const GrDrawState& drawState = this->getDrawState();
213 215
214 // GrGpu::setupClipAndFlushState should have already checked this and bailed if not true. 216 // GrGpu::setupClipAndFlushState should have already checked this and bailed if not true.
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 GrGLAttribTypeToLayout(attribType).fCount, 361 GrGLAttribTypeToLayout(attribType).fCount,
360 GrGLAttribTypeToLayout(attribType).fType, 362 GrGLAttribTypeToLayout(attribType).fType,
361 GrGLAttribTypeToLayout(attribType).fNormalized, 363 GrGLAttribTypeToLayout(attribType).fNormalized,
362 stride, 364 stride,
363 reinterpret_cast<GrGLvoid*>( 365 reinterpret_cast<GrGLvoid*>(
364 vertexOffsetInBytes + vertexAttrib->fOffset)); 366 vertexOffsetInBytes + vertexAttrib->fOffset));
365 } 367 }
366 attribState->disableUnusedArrays(this, usedAttribArraysMask); 368 attribState->disableUnusedArrays(this, usedAttribArraysMask);
367 } 369 }
368 } 370 }
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGpuGL.cpp ('k') | tests/NameAllocatorTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698