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

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

Issue 17027003: Add flag bits for partial GrContext reset (Closed)
Patch Set: add flags for partial resetContext Created 7 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
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(GrState state) {
208 fGpu->markContextDirty(); 208 fGpu->markContextDirty(state);
209 }
210
211 void GrContext::resetTextureBinding() {
212 fGpu->resetTextureBinding();
209 } 213 }
210 214
211 void GrContext::freeGpuResources() { 215 void GrContext::freeGpuResources() {
212 this->flush(); 216 this->flush();
213 217
214 fGpu->purgeResources(); 218 fGpu->purgeResources();
215 219
216 fAARectRenderer->reset(); 220 fAARectRenderer->reset();
217 221
218 fTextureCache->purgeAllUnlocked(); 222 fTextureCache->purgeAllUnlocked();
(...skipping 1629 matching lines...) Expand 10 before | Expand all | Expand 10 after
1848 return srcTexture; 1852 return srcTexture;
1849 } 1853 }
1850 } 1854 }
1851 1855
1852 /////////////////////////////////////////////////////////////////////////////// 1856 ///////////////////////////////////////////////////////////////////////////////
1853 #if GR_CACHE_STATS 1857 #if GR_CACHE_STATS
1854 void GrContext::printCacheStats() const { 1858 void GrContext::printCacheStats() const {
1855 fTextureCache->printStats(); 1859 fTextureCache->printStats();
1856 } 1860 }
1857 #endif 1861 #endif
OLDNEW
« include/gpu/GrContext.h ('K') | « include/gpu/GrContext.h ('k') | src/gpu/GrGpu.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698