diff options
author | John Reck <jreck@google.com> | 2014-06-17 10:46:09 -0700 |
---|---|---|
committer | John Reck <jreck@google.com> | 2014-06-17 10:47:11 -0700 |
commit | 2dc223d23764a78f052529e86a59a1979d03b811 (patch) | |
tree | acf38e3f89c908a1d03dbfd6a106484f6b2fec44 /libs/hwui/DamageAccumulator.cpp | |
parent | 29956069637f456df23d391a59bc77e545b02e05 (diff) |
Make sure the root node has a type
Bug: 15686491
Change-Id: I4bd64a6470dd704740e99d21cfdbe84805961401
Diffstat (limited to 'libs/hwui/DamageAccumulator.cpp')
-rw-r--r-- | libs/hwui/DamageAccumulator.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libs/hwui/DamageAccumulator.cpp b/libs/hwui/DamageAccumulator.cpp index 1cb87f2c6bd2..61cbf85303eb 100644 --- a/libs/hwui/DamageAccumulator.cpp +++ b/libs/hwui/DamageAccumulator.cpp @@ -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(); |