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 #include "gm.h" | 8 #include "gm.h" |
9 | 9 |
10 #include "Resources.h" | 10 #include "Resources.h" |
11 #include "SkGradientShader.h" | 11 #include "SkGradientShader.h" |
12 #include "SkTypeface.h" | 12 #include "SkTypeface.h" |
13 #include "SkImageDecoder.h" | 13 #include "SkImageDecoder.h" |
14 #include "SkStream.h" | 14 #include "SkStream.h" |
15 #include "SkPaint.h" | 15 #include "SkPaint.h" |
16 | 16 |
17 static void setTypeface(SkPaint* paint, const char name[], SkTypeface::Style sty
le) { | 17 static void setTypeface(SkPaint* paint, const char name[], SkTypeface::Style sty
le) { |
18 SkSafeUnref(paint->setTypeface(SkTypeface::CreateFromName(name, style))); | 18 sk_tool_utils::set_portable_typeface(paint, name, style); |
19 } | 19 } |
20 | 20 |
21 class DownsampleBitmapGM : public skiagm::GM { | 21 class DownsampleBitmapGM : public skiagm::GM { |
22 public: | 22 public: |
23 SkBitmap fBM; | 23 SkBitmap fBM; |
24 SkString fName; | 24 SkString fName; |
25 bool fBitmapMade; | 25 bool fBitmapMade; |
26 SkPaint::FilterLevel fFilterLevel; | 26 SkPaint::FilterLevel fFilterLevel; |
27 | 27 |
28 DownsampleBitmapGM(SkPaint::FilterLevel filterLevel) | 28 DownsampleBitmapGM(SkPaint::FilterLevel filterLevel) |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 DEF_GM( return new DownsampleBitmapCheckerboardGM(512,256, SkPaint::kMedium_Filt
erLevel); ) | 202 DEF_GM( return new DownsampleBitmapCheckerboardGM(512,256, SkPaint::kMedium_Filt
erLevel); ) |
203 DEF_GM( return new DownsampleBitmapImageGM("mandrill_512.png", SkPaint::kMedium_
FilterLevel); ) | 203 DEF_GM( return new DownsampleBitmapImageGM("mandrill_512.png", SkPaint::kMedium_
FilterLevel); ) |
204 | 204 |
205 DEF_GM( return new DownsampleBitmapTextGM(72, SkPaint::kLow_FilterLevel); ) | 205 DEF_GM( return new DownsampleBitmapTextGM(72, SkPaint::kLow_FilterLevel); ) |
206 DEF_GM( return new DownsampleBitmapCheckerboardGM(512,256, SkPaint::kLow_FilterL
evel); ) | 206 DEF_GM( return new DownsampleBitmapCheckerboardGM(512,256, SkPaint::kLow_FilterL
evel); ) |
207 DEF_GM( return new DownsampleBitmapImageGM("mandrill_512.png", SkPaint::kLow_Fil
terLevel); ) | 207 DEF_GM( return new DownsampleBitmapImageGM("mandrill_512.png", SkPaint::kLow_Fil
terLevel); ) |
208 | 208 |
209 DEF_GM( return new DownsampleBitmapTextGM(72, SkPaint::kNone_FilterLevel); ) | 209 DEF_GM( return new DownsampleBitmapTextGM(72, SkPaint::kNone_FilterLevel); ) |
210 DEF_GM( return new DownsampleBitmapCheckerboardGM(512,256, SkPaint::kNone_Filter
Level); ) | 210 DEF_GM( return new DownsampleBitmapCheckerboardGM(512,256, SkPaint::kNone_Filter
Level); ) |
211 DEF_GM( return new DownsampleBitmapImageGM("mandrill_512.png", SkPaint::kNone_Fi
lterLevel); ) | 211 DEF_GM( return new DownsampleBitmapImageGM("mandrill_512.png", SkPaint::kNone_Fi
lterLevel); ) |
OLD | NEW |