OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 #include "gm.h" | 8 #include "gm.h" |
9 | 9 |
10 namespace skiagm { | 10 namespace skiagm { |
(...skipping 29 matching lines...) Expand all Loading... |
40 SkPaint* p) { | 40 SkPaint* p) { |
41 x += draw_bm(c, bm, x, 0, p); | 41 x += draw_bm(c, bm, x, 0, p); |
42 p->setFilterLevel(SkPaint::kLow_FilterLevel); | 42 p->setFilterLevel(SkPaint::kLow_FilterLevel); |
43 x += draw_bm(c, bm, x, 0, p); | 43 x += draw_bm(c, bm, x, 0, p); |
44 p->setDither(true); | 44 p->setDither(true); |
45 return x + draw_bm(c, bm, x, 0, p); | 45 return x + draw_bm(c, bm, x, 0, p); |
46 } | 46 } |
47 | 47 |
48 static const char* gConfigNames[] = { | 48 static const char* gConfigNames[] = { |
49 "unknown config", | 49 "unknown config", |
50 "A1", | |
51 "A8", | 50 "A8", |
52 "Index8", | 51 "Index8", |
53 "565", | 52 "565", |
54 "4444", | 53 "4444", |
55 "8888" | 54 "8888" |
56 }; | 55 }; |
57 | 56 |
58 static SkScalar draw_row(SkCanvas* canvas, const SkBitmap& bm) { | 57 static SkScalar draw_row(SkCanvas* canvas, const SkBitmap& bm) { |
59 SkAutoCanvasRestore acr(canvas, true); | 58 SkAutoCanvasRestore acr(canvas, true); |
60 | 59 |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 private: | 123 private: |
125 typedef GM INHERITED; | 124 typedef GM INHERITED; |
126 }; | 125 }; |
127 | 126 |
128 ////////////////////////////////////////////////////////////////////////////// | 127 ////////////////////////////////////////////////////////////////////////////// |
129 | 128 |
130 static GM* MyFactory(void*) { return new FilterGM; } | 129 static GM* MyFactory(void*) { return new FilterGM; } |
131 static GMRegistry reg(MyFactory); | 130 static GMRegistry reg(MyFactory); |
132 | 131 |
133 } | 132 } |
OLD | NEW |