OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 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 /** | 8 /** |
9 * Pathologically simple drawing tests, designed to generate consistent | 9 * Pathologically simple drawing tests, designed to generate consistent |
10 * output images across platforms for gm/tests/run.sh | 10 * output images across platforms for gm/tests/run.sh |
(...skipping 23 matching lines...) Expand all Loading... |
34 canvas->drawRectCoords(0, 0, SkIntToScalar(kWidth), SkIntToScalar(kHeigh
t), paint); | 34 canvas->drawRectCoords(0, 0, SkIntToScalar(kWidth), SkIntToScalar(kHeigh
t), paint); |
35 } | 35 } |
36 | 36 |
37 private: | 37 private: |
38 const SkString fName; | 38 const SkString fName; |
39 const SkColor fColor; | 39 const SkColor fColor; |
40 }; | 40 }; |
41 | 41 |
42 ////////////////////////////////////////////////////////////////////////////// | 42 ////////////////////////////////////////////////////////////////////////////// |
43 | 43 |
44 static skiagm::GM* F1(void*) { return new SelfTestGM("selftest1", SK_ColorGREEN)
; } | 44 // We use translucent colors to make sure we are properly handling cases like |
45 static skiagm::GM* F2(void*) { return new SelfTestGM("selftest2", SK_ColorBLUE);
} | 45 // those which caused https://code.google.com/p/skia/issues/detail?id=1079 |
| 46 // ('gm generating spurious pixel_error messages as of r7258') |
| 47 static SkColor kTranslucentGreen = 0x7700EE00; |
| 48 static SkColor kTranslucentBlue = 0x770000DD; |
| 49 |
| 50 static skiagm::GM* F1(void*) { return new SelfTestGM("selftest1", kTranslucentGr
een); } |
| 51 static skiagm::GM* F2(void*) { return new SelfTestGM("selftest2", kTranslucentBl
ue); } |
46 | 52 |
47 static skiagm::GMRegistry gR1(F1); | 53 static skiagm::GMRegistry gR1(F1); |
48 static skiagm::GMRegistry gR2(F2); | 54 static skiagm::GMRegistry gR2(F2); |
OLD | NEW |