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

Commit 226fcca4 authored by John Reck's avatar John Reck
Browse files

Allow translucent RenderNode->Bitmap captures

Set translucent to true when doing createHardwareBitmapFromRenderNode.
This ensures that the buffer is initialized to transparent which
is a safer default for this path. Marginally less performant in some
cases, but as this is a rare capture safety is preferred for and
performance can be revisted if it turns out to be an issue.

Bug: 65164016
Test: builds
Change-Id: I6467c0ccf46e5e2a87c31cc4855ced8275236ca9
parent 54ff7e75
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -888,7 +888,7 @@ static jobject android_view_ThreadedRenderer_createHardwareBitmapFromRenderNode(
    // Render into the surface
    {
        ContextFactory factory;
        RenderProxy proxy{false, renderNode, &factory};
        RenderProxy proxy{true, renderNode, &factory};
        proxy.loadSystemProperties();
        proxy.setSwapBehavior(SwapBehavior::kSwap_discardBuffer);
        proxy.initialize(surface);