OLD | NEW |
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 #include "GrContext.h" | 9 #include "GrContext.h" |
10 | 10 |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 fLayerCache->freeAll(); | 206 fLayerCache->freeAll(); |
207 } | 207 } |
208 | 208 |
209 void GrContext::resetContext(uint32_t state) { | 209 void GrContext::resetContext(uint32_t state) { |
210 fGpu->markContextDirty(state); | 210 fGpu->markContextDirty(state); |
211 } | 211 } |
212 | 212 |
213 void GrContext::freeGpuResources() { | 213 void GrContext::freeGpuResources() { |
214 this->flush(); | 214 this->flush(); |
215 | 215 |
216 fGpu->purgeResources(); | |
217 if (fDrawBuffer) { | 216 if (fDrawBuffer) { |
218 fDrawBuffer->purgeResources(); | 217 fDrawBuffer->purgeResources(); |
219 } | 218 } |
220 | 219 |
221 fAARectRenderer->reset(); | 220 fAARectRenderer->reset(); |
222 fOvalRenderer->reset(); | 221 fOvalRenderer->reset(); |
223 | 222 |
224 fResourceCache->purgeAllUnlocked(); | 223 fResourceCache->purgeAllUnlocked(); |
225 fFontCache->freeAll(); | 224 fFontCache->freeAll(); |
226 fLayerCache->freeAll(); | 225 fLayerCache->freeAll(); |
(...skipping 1554 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1781 fResourceCache->printStats(); | 1780 fResourceCache->printStats(); |
1782 } | 1781 } |
1783 #endif | 1782 #endif |
1784 | 1783 |
1785 #if GR_GPU_STATS | 1784 #if GR_GPU_STATS |
1786 const GrContext::GPUStats* GrContext::gpuStats() const { | 1785 const GrContext::GPUStats* GrContext::gpuStats() const { |
1787 return fGpu->gpuStats(); | 1786 return fGpu->gpuStats(); |
1788 } | 1787 } |
1789 #endif | 1788 #endif |
1790 | 1789 |
OLD | NEW |