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

Commit a56868b8 authored by Sally Qi's avatar Sally Qi
Browse files

Fix Vts drawLayers function for async renderengine change

Bug: 180657548
Test: this
Change-Id: I8980d843599fe8b8195f6a1b8540b5d13528ac4b
parent 38733d5a
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -60,7 +60,6 @@ void TestRenderEngine::initGraphicBuffer(uint32_t width, uint32_t height, uint32

void TestRenderEngine::drawLayers() {
    base::unique_fd bufferFence;
    base::unique_fd readyFence;

    std::vector<const renderengine::LayerSettings*> compositionLayerPointers;
    compositionLayerPointers.reserve(mCompositionLayers.size());
@@ -71,8 +70,10 @@ void TestRenderEngine::drawLayers() {
                   });
    auto texture = std::make_shared<renderengine::ExternalTexture>(
            mGraphicBuffer, *mRenderEngine, renderengine::ExternalTexture::Usage::WRITEABLE);
    mRenderEngine->drawLayers(mDisplaySettings, compositionLayerPointers, texture, true,
                              std::move(bufferFence), &readyFence);
    auto [status, readyFence] = mRenderEngine
                                        ->drawLayers(mDisplaySettings, compositionLayerPointers,
                                                     texture, true, std::move(bufferFence))
                                        .get();
    int fd = readyFence.release();
    if (fd != -1) {
        ASSERT_EQ(0, sync_wait(fd, -1));