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

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

Issue 477323006: Revert of Add GrResourceCache2. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 4 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/GrGpuGL.cpp ('k') | 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 #include "GrGpuGL.h" 8 #include "GrGpuGL.h"
9 9
10 #include "GrEffect.h" 10 #include "GrEffect.h"
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 for (int i = 0; i < fCount; ++i) { 192 for (int i = 0; i < fCount; ++i) {
193 fEntries[i]->fLRUStamp = 0; 193 fEntries[i]->fLRUStamp = 0;
194 } 194 }
195 } 195 }
196 ++fCurrLRUStamp; 196 ++fCurrLRUStamp;
197 return entry->fProgram; 197 return entry->fProgram;
198 } 198 }
199 199
200 //////////////////////////////////////////////////////////////////////////////// 200 ////////////////////////////////////////////////////////////////////////////////
201 201
202 void GrGpuGL::abandonResources(){
203 INHERITED::abandonResources();
204 fProgramCache->abandon();
205 fHWProgramID = 0;
206 if (this->glCaps().pathRenderingSupport()) {
207 fPathRendering->abandonGpuResources();
208 }
209 }
210
211 ////////////////////////////////////////////////////////////////////////////////
212
202 #define GL_CALL(X) GR_GL_CALL(this->glInterface(), X) 213 #define GL_CALL(X) GR_GL_CALL(this->glInterface(), X)
203 214
204 bool GrGpuGL::flushGraphicsState(DrawType type, const GrDeviceCoordTexture* dstC opy) { 215 bool GrGpuGL::flushGraphicsState(DrawType type, const GrDeviceCoordTexture* dstC opy) {
205 const GrDrawState& drawState = this->getDrawState(); 216 const GrDrawState& drawState = this->getDrawState();
206 217
207 // GrGpu::setupClipAndFlushState should have already checked this and bailed if not true. 218 // GrGpu::setupClipAndFlushState should have already checked this and bailed if not true.
208 SkASSERT(NULL != drawState.getRenderTarget()); 219 SkASSERT(NULL != drawState.getRenderTarget());
209 220
210 if (kStencilPath_DrawType == type) { 221 if (kStencilPath_DrawType == type) {
211 const GrRenderTarget* rt = this->getDrawState().getRenderTarget(); 222 const GrRenderTarget* rt = this->getDrawState().getRenderTarget();
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 GrGLAttribTypeToLayout(attribType).fType, 370 GrGLAttribTypeToLayout(attribType).fType,
360 GrGLAttribTypeToLayout(attribType).fNormalized, 371 GrGLAttribTypeToLayout(attribType).fNormalized,
361 stride, 372 stride,
362 reinterpret_cast<GrGLvoid*>( 373 reinterpret_cast<GrGLvoid*>(
363 vertexOffsetInBytes + vertexAttrib->fOffset)); 374 vertexOffsetInBytes + vertexAttrib->fOffset));
364 } 375 }
365 } 376 }
366 attribState->disableUnusedArrays(this, usedAttribArraysMask); 377 attribState->disableUnusedArrays(this, usedAttribArraysMask);
367 } 378 }
368 } 379 }
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGpuGL.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698