227 void Caches::clearGarbage() {
228 textureCache.clearGarbage();
229 pathCache.clearGarbage();
230 patchCache.clearGarbage();
231 }
233 void Caches::flush(FlushMode mode) {
234 FLUSH_LOGD("Flushing caches (mode %d)", mode);
235
236 switch (mode) {
237 case FlushMode::Full:
238 textureCache.clear();
239 patchCache.clear();
240 dropShadowCache.clear();
241 gradientCache.clear();
242 fontRenderer.clear();
243 fboCache.clear();
244 dither.clear();
245
246 case FlushMode::Moderate:
247 fontRenderer.flush();
248 textureCache.flush();
249 pathCache.clear();
250 tessellationCache.clear();
251
252 case FlushMode::Layers:
253 layerCache.clear();
254 renderBufferCache.clear();
255 break;
256 }
257
258 clearGarbage();
259 glFinish();
260
261 TODO
262 GLUtils::dumpGLErrors();
263 }