summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVictoria Lease <violets@google.com>2014-03-19 22:32:12 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-03-19 22:32:12 +0000
commitcfd46dc4847d5ef1ed14484717cf857ae5f67cae (patch)
treedeb14a6a6d875a1da4c444b192f9855db58777f3
parent1888333d7e814d6681a327cf1f3eda10098e3620 (diff)
parent610d401cb580ee233c008acf8fc076047a0ffdb4 (diff)
downloadframeworks_base-cfd46dc4847d5ef1ed14484717cf857ae5f67cae.zip
frameworks_base-cfd46dc4847d5ef1ed14484717cf857ae5f67cae.tar.gz
frameworks_base-cfd46dc4847d5ef1ed14484717cf857ae5f67cae.tar.bz2
am 610d401c: am e9c7fd2f: am 55371beb: am 754bf6ab: am c8868db2: am 737d3e5d: am 6b96ecca: am 32753f4f: am 31912122: am 6eb28103: am 183f97b7: am 1c12f9e7: malloc some advances
* commit '610d401cb580ee233c008acf8fc076047a0ffdb4': malloc some advances
-rw-r--r--core/jni/android/graphics/Paint.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/jni/android/graphics/Paint.cpp b/core/jni/android/graphics/Paint.cpp
index 4f6cc37..fd3f327 100644
--- a/core/jni/android/graphics/Paint.cpp
+++ b/core/jni/android/graphics/Paint.cpp
@@ -566,7 +566,7 @@ public:
return 0;
}
}
- jfloat advancesArray[count];
+ jfloat* advancesArray = new jfloat[count];
jfloat totalAdvance = 0;
TextLayout::getTextRunAdvances(paint, text, start, count, contextCount, flags,
@@ -575,6 +575,7 @@ public:
if (advances != NULL) {
env->SetFloatArrayRegion(advances, advancesIndex, count, advancesArray);
}
+ delete [] advancesArray;
return totalAdvance;
}