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

Commit b449bfc7 authored by Chris Craik's avatar Chris Craik Committed by android-build-merger
Browse files

Merge "Fix flickering when layers resize in-place" into nyc-dev am: c33609cb

am: 0874ce79

* commit '0874ce79':
  Fix flickering when layers resize in-place
parents 4634efe6 0874ce79
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -254,6 +254,7 @@ LOCAL_SRC_FILES += \
ifeq (true, $(HWUI_NEW_OPS))
    LOCAL_SRC_FILES += \
        tests/unit/BakedOpDispatcherTests.cpp \
        tests/unit/BakedOpRendererTests.cpp \
        tests/unit/BakedOpStateTests.cpp \
        tests/unit/FrameBuilderTests.cpp \
        tests/unit/LeakCheckTests.cpp \
+10 −0
Original line number Diff line number Diff line
@@ -40,6 +40,16 @@ OffscreenBuffer* BakedOpRenderer::startTemporaryLayer(uint32_t width, uint32_t h
void BakedOpRenderer::startRepaintLayer(OffscreenBuffer* offscreenBuffer, const Rect& repaintRect) {
    LOG_ALWAYS_FATAL_IF(mRenderTarget.offscreenBuffer, "already has layer...");

    // subtract repaintRect from region, since it will be regenerated
    if (repaintRect.contains(0, 0,
                offscreenBuffer->viewportWidth, offscreenBuffer->viewportHeight)) {
        // repaint full layer, so throw away entire region
        offscreenBuffer->region.clear();
    } else {
        offscreenBuffer->region.subtractSelf(android::Rect(repaintRect.left, repaintRect.top,
                repaintRect.right, repaintRect.bottom));
    }

    mRenderTarget.offscreenBuffer = offscreenBuffer;

    // create and bind framebuffer
+4 −0
Original line number Diff line number Diff line
@@ -41,6 +41,10 @@ Rect transformAndCalculateBounds(const Rect& r, const Matrix4& transform) {
    return transformedBounds;
}

void ClipBase::dump() const {
    ALOGD("mode %d" RECT_STRING, mode, RECT_ARGS(rect));
}

/*
 * TransformedRectangle
 */
+2 −0
Original line number Diff line number Diff line
@@ -106,6 +106,8 @@ struct ClipBase {
    // Bounds of the clipping area, used to define the scissor, and define which
    // portion of the stencil is updated/used
    Rect rect;

    void dump() const;
};

struct ClipRect : ClipBase {
+3 −2
Original line number Diff line number Diff line
@@ -349,8 +349,9 @@ void LayerBuilder::replayBakedOpsImpl(void* arg,
}

void LayerBuilder::dump() const {
    ALOGD("LayerBuilder %p, %ux%u buffer %p, blo %p, rn %p",
            this, width, height, offscreenBuffer, beginLayerOp, renderNode);
    ALOGD("LayerBuilder %p, %ux%u buffer %p, blo %p, rn %p (%s)",
            this, width, height, offscreenBuffer, beginLayerOp,
            renderNode, renderNode ? renderNode->getName() : "-");
    for (const BatchBase* batch : mBatches) {
        batch->dump();
    }
Loading