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

Commit aeaf9d79 authored by Vishnu Nair's avatar Vishnu Nair
Browse files

[sf-newfe] pass buffer transform to legacy layer

Screenshots still access the legacy layer object on the
binder thread. Until we can migrate the logic to use
layer snapshots, pass buffer transform to the layer
object.

Test: atest AccessibilityTakeScreenshotTest
Fixes: 299370771
Change-Id: I0d66640dd4da1bcf9e784af551660683fd0cd051
parent 269f69d7
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -5379,6 +5379,13 @@ uint32_t SurfaceFlinger::updateLayerCallbacksAndStats(const FrameTimelineInfo& f
    // TODO(b/238781169) remove after screenshot refactor, currently screenshots
    // requires to read drawing state from binder thread. So we need to fix that
    // before removing this.
    if (what & layer_state_t::eBufferTransformChanged) {
        if (layer->setTransform(s.bufferTransform)) flags |= eTraversalNeeded;
    }
    if (what & layer_state_t::eTransformToDisplayInverseChanged) {
        if (layer->setTransformToDisplayInverse(s.transformToDisplayInverse))
            flags |= eTraversalNeeded;
    }
    if (what & layer_state_t::eCropChanged) {
        if (layer->setCrop(s.crop)) flags |= eTraversalNeeded;
    }