のねのBlog

パソコンやソフト開発で起きた問題など書きます。よろしくお願いします。

flush

    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             // fall through
    246         case FlushMode::Moderate:
    247             fontRenderer.flush();
    248             textureCache.flush();
    249             pathCache.clear();
    250             tessellationCache.clear();
    251             // fall through
    252         case FlushMode::Layers:
    253             layerCache.clear();
    254             renderBufferCache.clear();
    255             break;
    256     }
    257 
    258     clearGarbage();
    259     glFinish();
    260     // Errors during cleanup should be considered non-fatal, dump them and
    261     // and move on. TODO: All errors or just errors like bad surface?
    262     GLUtils::dumpGLErrors();
    263 }