OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 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 "SkBitmap.h" | 10 #include "SkBitmap.h" |
11 #include "SkPaint.h" | 11 #include "SkPaint.h" |
12 #include "SkPicture.h" | 12 #include "SkPicture.h" |
| 13 #include "SkPictureRecorder.h" |
13 #include "SkShader.h" | 14 #include "SkShader.h" |
14 | 15 |
15 namespace skiagm { | 16 namespace skiagm { |
16 | 17 |
17 static struct { | 18 static struct { |
18 SkShader::TileMode tmx; | 19 SkShader::TileMode tmx; |
19 SkShader::TileMode tmy; | 20 SkShader::TileMode tmy; |
20 } kTileConfigs[] = { | 21 } kTileConfigs[] = { |
21 { SkShader::kRepeat_TileMode, SkShader::kRepeat_TileMode }, | 22 { SkShader::kRepeat_TileMode, SkShader::kRepeat_TileMode }, |
22 { SkShader::kRepeat_TileMode, SkShader::kClamp_TileMode }, | 23 { SkShader::kRepeat_TileMode, SkShader::kClamp_TileMode }, |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 SkScalar fSceneSize; | 158 SkScalar fSceneSize; |
158 | 159 |
159 SkAutoTUnref<SkShader> fPictureShaders[SK_ARRAY_COUNT(kTileConfigs)]; | 160 SkAutoTUnref<SkShader> fPictureShaders[SK_ARRAY_COUNT(kTileConfigs)]; |
160 SkAutoTUnref<SkShader> fBitmapShaders[SK_ARRAY_COUNT(kTileConfigs)]; | 161 SkAutoTUnref<SkShader> fBitmapShaders[SK_ARRAY_COUNT(kTileConfigs)]; |
161 | 162 |
162 typedef GM INHERITED; | 163 typedef GM INHERITED; |
163 }; | 164 }; |
164 | 165 |
165 DEF_GM( return SkNEW_ARGS(PictureShaderGM, (50, 100)); ) | 166 DEF_GM( return SkNEW_ARGS(PictureShaderGM, (50, 100)); ) |
166 } | 167 } |
OLD | NEW |