• Rafael Cintron's avatar
    Call IDXGIDevice3::Trim in GpuChannelManager::HandleMemoryPressure · d5a992e6
    Rafael Cintron authored
    Graphics drivers periodically allocate internal memory buffers in
    order to speed up subsequent rendering requests. These memory allocations
    in general lead to increased memory usage by the overall system.
    
    Calling Trim discards internal memory buffers allocated for the app,
    reducing its memory footprint.
    
    Calling Trim method does not change the rendering state of the
    graphics device and has no effect on rendering operations.
    
    There is a brief performance hit when internal buffers are reallocated
    during the first rendering operations after the Trim call, therefore
    apps should only call Trim when going idle for a period of time or during
    low memory conditions.
    
    Bug: 1048920
    Change-Id: Ic6a27fc5b05eb4084c85726fd3c4f82837f786a3
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2037816
    Commit-Queue: Rafael Cintron <rafael.cintron@microsoft.com>
    Reviewed-by: default avatarZhenyao Mo <zmo@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#738404}
    d5a992e6
gpu_channel_manager.cc 22.4 KB