aboutsummaryrefslogtreecommitdiffhomepage
path: root/bench/FontCacheBench.cpp
diff options
context:
space:
mode:
authorGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-06-11 19:53:19 +0000
committerGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-06-11 19:53:19 +0000
commitc9ab48f03b420fc1abb1b08261e632dc5254d29b (patch)
tree3d40d8de058a65052b6eb867e736059b19eafdec /bench/FontCacheBench.cpp
parentfad3e5e5ad5628d0d23040bea25c94a0f091858f (diff)
switch array to uint16_t to fix overflows
git-svn-id: http://skia.googlecode.com/svn/trunk@9515 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'bench/FontCacheBench.cpp')
-rw-r--r--bench/FontCacheBench.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/bench/FontCacheBench.cpp b/bench/FontCacheBench.cpp
index b4e128a0ce..12b46e9564 100644
--- a/bench/FontCacheBench.cpp
+++ b/bench/FontCacheBench.cpp
@@ -15,7 +15,7 @@
#include "gUniqueGlyphIDs.h"
class FontCacheBench : public SkBenchmark {
- enum { N = SkBENCHLOOP(800) };
+ enum { N = SkBENCHLOOP(40) };
public:
FontCacheBench(void* param) : INHERITED(param) {
}
@@ -31,10 +31,10 @@ protected:
paint.setTextEncoding(SkPaint::kGlyphID_TextEncoding);
for (int i = 0; i < N; ++i) {
- const int16_t* array = gUniqueGlyphIDs;
- while (*array >= 0) {
- const int16_t* end = array + 1;
- while (*end >= 0) {
+ const uint16_t* array = gUniqueGlyphIDs;
+ while (*array != 0xFFFF) {
+ const uint16_t* end = array + 1;
+ while (*end != 0xFFFF) {
end += 1;
}
paint.measureText(array, end - array);