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 #include "GrContextOptions.h" | 10 #include "GrContextOptions.h" |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
111 delete fResourceProvider; | 111 delete fResourceProvider; |
112 delete fResourceCache; | 112 delete fResourceCache; |
113 delete fBatchFontCache; | 113 delete fBatchFontCache; |
114 | 114 |
115 fGpu->unref(); | 115 fGpu->unref(); |
116 fCaps->unref(); | 116 fCaps->unref(); |
117 } | 117 } |
118 | 118 |
119 void GrContext::abandonContext() { | 119 void GrContext::abandonContext() { |
120 fResourceProvider->abandon(); | 120 fResourceProvider->abandon(); |
121 | |
122 fDrawingManager->abandon(); | |
joshualitt
2015/11/12 20:48:55
if moving this is intentional, maybe leave a comme
robertphillips
2015/11/13 12:41:40
Done.
| |
123 | |
121 // abandon first to so destructors | 124 // abandon first to so destructors |
122 // don't try to free the resources in the API. | 125 // don't try to free the resources in the API. |
123 fResourceCache->abandonAll(); | 126 fResourceCache->abandonAll(); |
124 | 127 |
125 fGpu->contextAbandoned(); | 128 fGpu->contextAbandoned(); |
126 | 129 |
127 fDrawingManager->abandon(); | |
128 | |
129 fBatchFontCache->freeAll(); | 130 fBatchFontCache->freeAll(); |
130 fLayerCache->freeAll(); | 131 fLayerCache->freeAll(); |
131 fTextBlobCache->freeAll(); | 132 fTextBlobCache->freeAll(); |
132 } | 133 } |
133 | 134 |
134 void GrContext::resetContext(uint32_t state) { | 135 void GrContext::resetContext(uint32_t state) { |
135 fGpu->markContextDirty(state); | 136 fGpu->markContextDirty(state); |
136 } | 137 } |
137 | 138 |
138 void GrContext::freeGpuResources() { | 139 void GrContext::freeGpuResources() { |
(...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
618 | 619 |
619 void GrContext::setResourceCacheLimits(int maxTextures, size_t maxTextureBytes) { | 620 void GrContext::setResourceCacheLimits(int maxTextures, size_t maxTextureBytes) { |
620 fResourceCache->setLimits(maxTextures, maxTextureBytes); | 621 fResourceCache->setLimits(maxTextures, maxTextureBytes); |
621 } | 622 } |
622 | 623 |
623 ////////////////////////////////////////////////////////////////////////////// | 624 ////////////////////////////////////////////////////////////////////////////// |
624 | 625 |
625 void GrContext::dumpMemoryStatistics(SkTraceMemoryDump* traceMemoryDump) const { | 626 void GrContext::dumpMemoryStatistics(SkTraceMemoryDump* traceMemoryDump) const { |
626 fResourceCache->dumpMemoryStatistics(traceMemoryDump); | 627 fResourceCache->dumpMemoryStatistics(traceMemoryDump); |
627 } | 628 } |
OLD | NEW |