Make sure the root node has a type
Bug: 15686491
Change-Id: I4bd64a6470dd704740e99d21cfdbe84805961401
diff --git a/libs/hwui/DamageAccumulator.cpp b/libs/hwui/DamageAccumulator.cpp
index 1cb87f2..61cbf85 100644
--- a/libs/hwui/DamageAccumulator.cpp
+++ b/libs/hwui/DamageAccumulator.cpp
@@ -33,6 +33,7 @@
}
enum TransformType {
+ TransformInvalid = 0,
TransformRenderNode,
TransformMatrix4,
TransformNone,
@@ -56,6 +57,7 @@
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 @@
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 @@
if (projectionReceiver) {
applyTransforms(frame, projectionReceiver);
projectionReceiver->pendingDirty.join(frame->pendingDirty);
- } else {
- ALOGW("Failed to find projection receiver? Dropping on the floor...");
}
frame->pendingDirty.setEmpty();