summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorVictoria Lease <violets@google.com>2014-03-19 14:27:19 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2014-03-19 14:27:19 -0700
commit183f97b72faf7a0f45ad66e1b3fd9a4343cc7482 (patch)
treefe3012c6e05cdb85fa514bb00528098212373ea5 /core
parentda37ed8b0aebdf885a32cbe28e8fd5a2240d38c3 (diff)
parent1c12f9e76298c757423155ad812890d27effafe8 (diff)
downloadframeworks_base-183f97b72faf7a0f45ad66e1b3fd9a4343cc7482.zip
frameworks_base-183f97b72faf7a0f45ad66e1b3fd9a4343cc7482.tar.gz
frameworks_base-183f97b72faf7a0f45ad66e1b3fd9a4343cc7482.tar.bz2
am 1c12f9e7: malloc some advances
* commit '1c12f9e76298c757423155ad812890d27effafe8': malloc some advances
Diffstat (limited to 'core')
-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 a4d5477..315f2d5 100644
--- a/core/jni/android/graphics/Paint.cpp
+++ b/core/jni/android/graphics/Paint.cpp
@@ -512,7 +512,7 @@ public:
return 0;
}
}
- jfloat advancesArray[count];
+ jfloat* advancesArray = new jfloat[count];
jfloat totalAdvance = 0;
TextLayout::getTextRunAdvances(paint, text, start, count, contextCount, flags,
@@ -521,6 +521,7 @@ public:
if (advances != NULL) {
env->SetFloatArrayRegion(advances, advancesIndex, count, advancesArray);
}
+ delete [] advancesArray;
return totalAdvance;
}