| 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 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 | 208 |
| 209 fAARectRenderer->reset(); | 209 fAARectRenderer->reset(); |
| 210 fOvalRenderer->reset(); | 210 fOvalRenderer->reset(); |
| 211 | 211 |
| 212 fBatchFontCache->freeAll(); | 212 fBatchFontCache->freeAll(); |
| 213 fFontCache->freeAll(); | 213 fFontCache->freeAll(); |
| 214 fLayerCache->freeAll(); | 214 fLayerCache->freeAll(); |
| 215 // a path renderer may be holding onto resources | 215 // a path renderer may be holding onto resources |
| 216 SkSafeSetNull(fPathRendererChain); | 216 SkSafeSetNull(fPathRendererChain); |
| 217 SkSafeSetNull(fSoftwarePathRenderer); | 217 SkSafeSetNull(fSoftwarePathRenderer); |
| 218 |
| 219 fResourceCache->purgeAllUnlocked(); |
| 218 } | 220 } |
| 219 | 221 |
| 220 void GrContext::getResourceCacheUsage(int* resourceCount, size_t* resourceBytes)
const { | 222 void GrContext::getResourceCacheUsage(int* resourceCount, size_t* resourceBytes)
const { |
| 221 if (resourceCount) { | 223 if (resourceCount) { |
| 222 *resourceCount = fResourceCache->getBudgetedResourceCount(); | 224 *resourceCount = fResourceCache->getBudgetedResourceCount(); |
| 223 } | 225 } |
| 224 if (resourceBytes) { | 226 if (resourceBytes) { |
| 225 *resourceBytes = fResourceCache->getBudgetedResourceBytes(); | 227 *resourceBytes = fResourceCache->getBudgetedResourceBytes(); |
| 226 } | 228 } |
| 227 } | 229 } |
| (...skipping 1799 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2027 } | 2029 } |
| 2028 } | 2030 } |
| 2029 | 2031 |
| 2030 void GrContext::removeGpuTraceMarker(const GrGpuTraceMarker* marker) { | 2032 void GrContext::removeGpuTraceMarker(const GrGpuTraceMarker* marker) { |
| 2031 fGpu->removeGpuTraceMarker(marker); | 2033 fGpu->removeGpuTraceMarker(marker); |
| 2032 if (fDrawBuffer) { | 2034 if (fDrawBuffer) { |
| 2033 fDrawBuffer->removeGpuTraceMarker(marker); | 2035 fDrawBuffer->removeGpuTraceMarker(marker); |
| 2034 } | 2036 } |
| 2035 } | 2037 } |
| 2036 | 2038 |
| OLD | NEW |