| 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 "TestClassDef.h" | 
| 9 #include "SkBlurMask.h" | 10 #include "SkBlurMask.h" | 
| 10 #include "SkBlurMaskFilter.h" | 11 #include "SkBlurMaskFilter.h" | 
| 11 #include "SkLayerDrawLooper.h" | 12 #include "SkLayerDrawLooper.h" | 
| 12 #include "SkPath.h" | 13 #include "SkPath.h" | 
| 13 #include "SkPaint.h" | 14 #include "SkPaint.h" | 
| 14 #include "SkRandom.h" | 15 #include "SkRandom.h" | 
| 15 #include "SkTypeface.h" | 16 #include "SkTypeface.h" | 
| 16 #include "SkUtils.h" | 17 #include "SkUtils.h" | 
| 17 | 18 | 
| 18 static size_t uni_to_utf8(const SkUnichar src[], void* dst, int count) { | 19 static size_t uni_to_utf8(const SkUnichar src[], void* dst, int count) { | 
| (...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 228     paint.setTextSize(12.0f); | 229     paint.setTextSize(12.0f); | 
| 229 | 230 | 
| 230     SkRect r; | 231     SkRect r; | 
| 231     r.setLTRB(SK_ScalarNaN, SK_ScalarNaN, SK_ScalarNaN, SK_ScalarNaN); | 232     r.setLTRB(SK_ScalarNaN, SK_ScalarNaN, SK_ScalarNaN, SK_ScalarNaN); | 
| 232 | 233 | 
| 233     // test that the rect was reset | 234     // test that the rect was reset | 
| 234     paint.measureText("", 0, &r, 1.0f); | 235     paint.measureText("", 0, &r, 1.0f); | 
| 235     REPORTER_ASSERT(reporter, r.isEmpty()); | 236     REPORTER_ASSERT(reporter, r.isEmpty()); | 
| 236 } | 237 } | 
| 237 | 238 | 
| 238 static void TestPaint(skiatest::Reporter* reporter) { | 239 DEF_TEST(Paint, reporter) { | 
| 239     // TODO add general paint tests | 240     // TODO add general paint tests | 
| 240     test_copy(reporter); | 241     test_copy(reporter); | 
| 241 | 242 | 
| 242     // regression tests | 243     // regression tests | 
| 243     regression_cubic(reporter); | 244     regression_cubic(reporter); | 
| 244     regression_measureText(reporter); | 245     regression_measureText(reporter); | 
| 245 | 246 | 
| 246     test_filterlevel(reporter); | 247     test_filterlevel(reporter); | 
| 247 | 248 | 
| 248     // need to implement charsToGlyphs on other backends (e.g. linux, win) | 249     // need to implement charsToGlyphs on other backends (e.g. linux, win) | 
| 249     // before we can run this tests everywhere | 250     // before we can run this tests everywhere | 
| 250     if (false) { | 251     if (false) { | 
| 251        test_cmap(reporter); | 252        test_cmap(reporter); | 
| 252     } | 253     } | 
| 253 } | 254 } | 
| 254 |  | 
| 255 #include "TestClassDef.h" |  | 
| 256 DEFINE_TESTCLASS("Paint", TestPaintClass, TestPaint) |  | 
| OLD | NEW | 
|---|