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

Commit 81efa15f authored by John Reck's avatar John Reck Committed by Android (Google) Code Review
Browse files

Merge "Make sure the root node has a type"

parents bf6899ed 2dc223d2
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -33,6 +33,7 @@ NullDamageAccumulator* NullDamageAccumulator::instance() {
}

enum TransformType {
    TransformInvalid = 0,
    TransformRenderNode,
    TransformMatrix4,
    TransformNone,
@@ -56,6 +57,7 @@ DamageAccumulator::DamageAccumulator() {
    memset(mHead, 0, sizeof(DirtyStack));
    // Create a root that we will not pop off
    mHead->prev = mHead;
    mHead->type = TransformNone;
}

void DamageAccumulator::pushCommon() {
@@ -100,6 +102,8 @@ void DamageAccumulator::popTransform() {
    case TransformNone:
        mHead->pendingDirty.join(dirtyFrame->pendingDirty);
        break;
    default:
        LOG_ALWAYS_FATAL("Tried to pop an invalid type: %d", dirtyFrame->type);
    }
}

@@ -186,8 +190,6 @@ void DamageAccumulator::applyRenderNodeTransform(DirtyStack* frame) {
        if (projectionReceiver) {
            applyTransforms(frame, projectionReceiver);
            projectionReceiver->pendingDirty.join(frame->pendingDirty);
        } else {
            ALOGW("Failed to find projection receiver? Dropping on the floor...");
        }

        frame->pendingDirty.setEmpty();