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

Commit d3bf2512 authored by Sally Qi's avatar Sally Qi Committed by Android (Google) Code Review
Browse files

Merge "Fix Vts drawLayers function for async renderengine change"

parents b408a73a a56868b8
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));