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

Commit 722c8560 authored by Sally Qi's avatar Sally Qi
Browse files

Fix the issue that renderEngine bails out too early.

- Remove the check about empty layer, because bailing out too early will
  cause dirty buffers to be re-used before they get cleared.
- Test locally but hold off adding corresponding test until ANGLE side
  fixes the issue of clearing a new created buffer.

Bug: 233052879
Test: librenderengine_test, and test locally with new test case
Change-Id: Ie1a04b1ce6b691f99555f60d680846c8ab4f1f97
parent 715b4413
Loading
Loading
Loading
Loading
+1 −7
Original line number Diff line number Diff line
@@ -779,15 +779,9 @@ void SkiaGLRenderEngine::drawLayersInternal(
        const DisplaySettings& display, const std::vector<LayerSettings>& layers,
        const std::shared_ptr<ExternalTexture>& buffer, const bool /*useFramebufferCache*/,
        base::unique_fd&& bufferFence) {
    ATRACE_NAME("SkiaGL::drawLayers");
    ATRACE_NAME("SkiaGL::drawLayersInternal");

    std::lock_guard<std::mutex> lock(mRenderingMutex);
    if (layers.empty()) {
        ALOGV("Drawing empty layer stack");
        resultPromise->set_value({NO_ERROR, base::unique_fd()});
        return;
    }

    if (buffer == nullptr) {
        ALOGE("No output buffer provided. Aborting GPU composition.");
        resultPromise->set_value({BAD_VALUE, base::unique_fd()});