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

Commit cecfc9f5 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fix HardwareRenderers becoming invalidated by TRIM" into main

parents 722a4c72 254972cf
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -1010,7 +1010,15 @@ void CanvasContext::destroyHardwareResources() {
}

void CanvasContext::onContextDestroyed() {
    destroyHardwareResources();
    // We don't want to destroyHardwareResources as that will invalidate display lists which
    // the client may not be expecting. Instead just purge all scratch resources
    if (mRenderPipeline->isContextReady()) {
        freePrefetchedLayers();
        for (const sp<RenderNode>& node : mRenderNodes) {
            node->destroyLayers();
        }
        mRenderPipeline->onDestroyHardwareResources();
    }
}

DeferredLayerUpdater* CanvasContext::createTextureLayer() {