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

Commit af78e0ad authored by Patrick Williams's avatar Patrick Williams
Browse files

Replace RenderEngineResult with FenceResult

Bug: b/232535621
Test: refactor, existing tests pass

Change-Id: I86fe498246e45d199a47008a3fb90af3030e83d6
parent c85203e6
Loading
Loading
Loading
Loading
+6 −8
Original line number Diff line number Diff line
@@ -71,14 +71,12 @@ void TestRenderEngine::drawLayers() {
                   });
    auto texture = std::make_shared<renderengine::impl::ExternalTexture>(
            mGraphicBuffer, *mRenderEngine, renderengine::impl::ExternalTexture::Usage::WRITEABLE);
    auto [status, readyFence] = mRenderEngine
                                        ->drawLayers(mDisplaySettings, compositionLayers, texture,
                                                     true, std::move(bufferFence))
    auto result = mRenderEngine
                          ->drawLayers(mDisplaySettings, compositionLayers, texture, true,
                                       std::move(bufferFence))
                          .get();
    int fd = readyFence.release();
    if (fd != -1) {
        ASSERT_EQ(0, sync_wait(fd, -1));
        ASSERT_EQ(0, close(fd));
    if (result.ok()) {
        result.value()->waitForever(LOG_TAG);
    }
}

+6 −8
Original line number Diff line number Diff line
@@ -66,14 +66,12 @@ void TestRenderEngine::drawLayers() {
    auto texture = std::make_shared<::android::renderengine::impl::ExternalTexture>(
            mGraphicBuffer, *mRenderEngine,
            ::android::renderengine::impl::ExternalTexture::Usage::WRITEABLE);
    auto [status, readyFence] = mRenderEngine
                                        ->drawLayers(mDisplaySettings, compositionLayers, texture,
                                                     true, std::move(bufferFence))
    auto result = mRenderEngine
                          ->drawLayers(mDisplaySettings, compositionLayers, texture, true,
                                       std::move(bufferFence))
                          .get();
    int fd = readyFence.release();
    if (fd != -1) {
        ASSERT_EQ(0, sync_wait(fd, -1));
        ASSERT_EQ(0, close(fd));
    if (result.ok()) {
        result.value()->waitForever(LOG_TAG);
    }
}