OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #include "Test.h" | 8 #include "Test.h" |
9 #include "SkBlurMask.h" | 9 #include "SkBlurMask.h" |
10 #include "SkBlurMaskFilter.h" | 10 #include "SkBlurMaskFilter.h" |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 | 64 |
65 static const struct { | 65 static const struct { |
66 size_t (*fSeedTextProc)(const SkUnichar[], void* dst, int count); | 66 size_t (*fSeedTextProc)(const SkUnichar[], void* dst, int count); |
67 SkPaint::TextEncoding fEncoding; | 67 SkPaint::TextEncoding fEncoding; |
68 } gRec[] = { | 68 } gRec[] = { |
69 { uni_to_utf8, SkPaint::kUTF8_TextEncoding }, | 69 { uni_to_utf8, SkPaint::kUTF8_TextEncoding }, |
70 { uni_to_utf16, SkPaint::kUTF16_TextEncoding }, | 70 { uni_to_utf16, SkPaint::kUTF16_TextEncoding }, |
71 { uni_to_utf32, SkPaint::kUTF32_TextEncoding }, | 71 { uni_to_utf32, SkPaint::kUTF32_TextEncoding }, |
72 }; | 72 }; |
73 | 73 |
74 SkMWCRandom rand; | 74 SkRandom rand; |
75 SkPaint paint; | 75 SkPaint paint; |
76 paint.setTypeface(SkTypeface::RefDefault())->unref(); | 76 paint.setTypeface(SkTypeface::RefDefault())->unref(); |
77 SkTypeface* face = paint.getTypeface(); | 77 SkTypeface* face = paint.getTypeface(); |
78 | 78 |
79 for (int i = 0; i < 1000; ++i) { | 79 for (int i = 0; i < 1000; ++i) { |
80 // generate some random text | 80 // generate some random text |
81 for (int j = 0; j < NGLYPHS; ++j) { | 81 for (int j = 0; j < NGLYPHS; ++j) { |
82 src[j] = ' ' + j; | 82 src[j] = ' ' + j; |
83 } | 83 } |
84 // inject some random chars, to sometimes abort early | 84 // inject some random chars, to sometimes abort early |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
247 | 247 |
248 // need to implement charsToGlyphs on other backends (e.g. linux, win) | 248 // need to implement charsToGlyphs on other backends (e.g. linux, win) |
249 // before we can run this tests everywhere | 249 // before we can run this tests everywhere |
250 if (false) { | 250 if (false) { |
251 test_cmap(reporter); | 251 test_cmap(reporter); |
252 } | 252 } |
253 } | 253 } |
254 | 254 |
255 #include "TestClassDef.h" | 255 #include "TestClassDef.h" |
256 DEFINE_TESTCLASS("Paint", TestPaintClass, TestPaint) | 256 DEFINE_TESTCLASS("Paint", TestPaintClass, TestPaint) |
OLD | NEW |