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

Side by Side Diff: src/gpu/GrContext.cpp

Issue 17027003: Add flag bits for partial GrContext reset (Closed)
Patch Set: Fixes (prev checkin was reverted due to assertions) Created 7 years, 5 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 | « include/gpu/GrTypes.h ('k') | src/gpu/GrGpu.h » ('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 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 #include "GrContext.h" 10 #include "GrContext.h"
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 delete fDrawBufferIBAllocPool; 197 delete fDrawBufferIBAllocPool;
198 fDrawBufferIBAllocPool = NULL; 198 fDrawBufferIBAllocPool = NULL;
199 199
200 fAARectRenderer->reset(); 200 fAARectRenderer->reset();
201 201
202 fTextureCache->purgeAllUnlocked(); 202 fTextureCache->purgeAllUnlocked();
203 fFontCache->freeAll(); 203 fFontCache->freeAll();
204 fGpu->markContextDirty(); 204 fGpu->markContextDirty();
205 } 205 }
206 206
207 void GrContext::resetContext() { 207 void GrContext::resetContext(uint32_t state) {
208 fGpu->markContextDirty(); 208 fGpu->markContextDirty(state);
209 } 209 }
210 210
211 void GrContext::freeGpuResources() { 211 void GrContext::freeGpuResources() {
212 this->flush(); 212 this->flush();
213 213
214 fGpu->purgeResources(); 214 fGpu->purgeResources();
215 215
216 fAARectRenderer->reset(); 216 fAARectRenderer->reset();
217 217
218 fTextureCache->purgeAllUnlocked(); 218 fTextureCache->purgeAllUnlocked();
(...skipping 1629 matching lines...) Expand 10 before | Expand all | Expand 10 after
1848 return srcTexture; 1848 return srcTexture;
1849 } 1849 }
1850 } 1850 }
1851 1851
1852 /////////////////////////////////////////////////////////////////////////////// 1852 ///////////////////////////////////////////////////////////////////////////////
1853 #if GR_CACHE_STATS 1853 #if GR_CACHE_STATS
1854 void GrContext::printCacheStats() const { 1854 void GrContext::printCacheStats() const {
1855 fTextureCache->printStats(); 1855 fTextureCache->printStats();
1856 } 1856 }
1857 #endif 1857 #endif
OLDNEW
« no previous file with comments | « include/gpu/GrTypes.h ('k') | src/gpu/GrGpu.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698