Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3053ac7f authored by John Reck's avatar John Reck
Browse files

Fix texture leak

Bug: 31251593
Change-Id: Ic86729eb6089239134213588d80459d14227ade6
parent 64dd8f3c
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -500,6 +500,10 @@ void CanvasContext::destroyHardwareResources(TreeObserver* observer) {
        for (const sp<RenderNode>& node : mRenderNodes) {
            node->destroyHardwareResources(observer);
        }
        Caches& caches = Caches::getInstance();
        // Make sure to release all the textures we were owning as there won't
        // be another draw
        caches.textureCache.resetMarkInUse(this);
        mRenderPipeline->onDestroyHardwareResources();
    }
}
+0 −4
Original line number Diff line number Diff line
@@ -163,10 +163,6 @@ bool OpenGLPipeline::isContextReady() {
}

void OpenGLPipeline::onDestroyHardwareResources() {
    Caches& caches = Caches::getInstance();
    // Make sure to release all the textures we were owning as there won't
    // be another draw
    caches.textureCache.resetMarkInUse(this);
    mRenderThread.renderState().flush(Caches::FlushMode::Layers);
}