summaryrefslogtreecommitdiff
path: root/libs/hwui/pipeline/skia/ReorderBarrierDrawables.cpp
diff options
context:
space:
mode:
authorStan Iliev <stani@google.com>2016-12-01 12:25:07 -0500
committerStan Iliev <stani@google.com>2016-12-01 12:25:07 -0500
commit347691f8d87157be0eaeca26f4003d8a06a275e3 (patch)
treec4016adc24b4cdba0777a8cd921377c772f590ea /libs/hwui/pipeline/skia/ReorderBarrierDrawables.cpp
parent4f8a7a5582f62c600e6840504d09d5f519bd6376 (diff)
Fix a crash in skia pipeline, when empty reorder block is first
Fix a crash in skia pipeline, which happens if an empty reorder barrier is inserted at index 0 in a SkiaDisplayList. Add a unit test that repro the bug (unit test is crashing wihtout the fix and passing with the fix). Test: built and ran skia pipeline with angler-eng and run HWUI unit tests. Change-Id: I4aded15021c70cc0ae8daa83bbe8ed0e10a41eef
Diffstat (limited to 'libs/hwui/pipeline/skia/ReorderBarrierDrawables.cpp')
-rw-r--r--libs/hwui/pipeline/skia/ReorderBarrierDrawables.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libs/hwui/pipeline/skia/ReorderBarrierDrawables.cpp b/libs/hwui/pipeline/skia/ReorderBarrierDrawables.cpp
index 6973209c4626..d05e7f660c72 100644
--- a/libs/hwui/pipeline/skia/ReorderBarrierDrawables.cpp
+++ b/libs/hwui/pipeline/skia/ReorderBarrierDrawables.cpp
@@ -40,7 +40,7 @@ void StartReorderBarrierDrawable::onDraw(SkCanvas* canvas) {
//mChildren is allocated and initialized only the first time onDraw is called and cached for
//subsequent calls
mChildren.reserve(mEndChildIndex - mBeginChildIndex + 1);
- for (unsigned int i = mBeginChildIndex; i <= mEndChildIndex; i++) {
+ for (int i = mBeginChildIndex; i <= mEndChildIndex; i++) {
mChildren.push_back(const_cast<RenderNodeDrawable*>(&mDisplayList->mChildNodes[i]));
}
}