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

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

Change RenderEngine::drawLayers to take a vector of LayerSettings pointers

Prework for the client composition cache logic which extends
LayerSettings. Passing in a set of pointers will reduce the
amount of copying needed when passing the LayerSettings to
RenderEngine.

Bug: 136561771
Test: atest librenderengine_test libcompositionengine_test
Test: go/wm-smoke
Change-Id: Iba89e5d611256583c46e02d32ed9b0cc58969331
parent 31f98910
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -136,7 +136,7 @@ status_t FrameCaptureProcessor::onCreate() {
status_t FrameCaptureProcessor::onCapture(const sp<Layer> &layer,
        const Rect &sourceCrop, const sp<GraphicBuffer> &buffer) {
    renderengine::DisplaySettings clientCompositionDisplay;
    std::vector<renderengine::LayerSettings> clientCompositionLayers;
    std::vector<const renderengine::LayerSettings*> clientCompositionLayers;

    clientCompositionDisplay.physicalDisplay = sourceCrop;
    clientCompositionDisplay.clip = sourceCrop;
@@ -150,7 +150,7 @@ status_t FrameCaptureProcessor::onCapture(const sp<Layer> &layer,

    layer->getLayerSettings(sourceCrop, mTextureName, &layerSettings);

    clientCompositionLayers.push_back(layerSettings);
    clientCompositionLayers.push_back(&layerSettings);

    // Use an empty fence for the buffer fence, since we just created the buffer so
    // there is no need for synchronization with the GPU.