summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVictoria Lease <violets@google.com>2014-03-19 14:32:15 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2014-03-19 14:32:15 -0700
commit6eb2810318262ff36014c52384ed3cdea19bd34e (patch)
treebc34d9b3ef2fc018fbfd658d827d66dcfb890e94
parentecba937b005b07d72eadfaf93a200e0b14af2980 (diff)
parent183f97b72faf7a0f45ad66e1b3fd9a4343cc7482 (diff)
downloadframeworks_base-6eb2810318262ff36014c52384ed3cdea19bd34e.zip
frameworks_base-6eb2810318262ff36014c52384ed3cdea19bd34e.tar.gz
frameworks_base-6eb2810318262ff36014c52384ed3cdea19bd34e.tar.bz2
am 183f97b7: am 1c12f9e7: malloc some advances
* commit '183f97b72faf7a0f45ad66e1b3fd9a4343cc7482': 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 150caf3..f5f1e86 100644
--- a/core/jni/android/graphics/Paint.cpp
+++ b/core/jni/android/graphics/Paint.cpp
@@ -554,7 +554,7 @@ public:
return 0;
}
}
- jfloat advancesArray[count];
+ jfloat* advancesArray = new jfloat[count];
jfloat totalAdvance = 0;
TextLayout::getTextRunAdvances(paint, text, start, count, contextCount, flags,
@@ -563,6 +563,7 @@ public:
if (advances != NULL) {
env->SetFloatArrayRegion(advances, advancesIndex, count, advancesArray);
}
+ delete [] advancesArray;
return totalAdvance;
}