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

Commit ff493fd3 authored by Lynn Yeh's avatar Lynn Yeh Committed by Android (Google) Code Review
Browse files

Merge "Fix HardwareRenderers becoming invalidated by TRIM" into 24D1-dev

parents f307dbcc 7640f840
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -994,7 +994,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() {