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 #include "SkCanvas.h" | 9 #include "SkCanvas.h" |
10 #include "SkGradientShader.h" | 10 #include "SkGradientShader.h" |
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
266 canvas->drawBitmapRect(fBM, r, nullptr); | 266 canvas->drawBitmapRect(fBM, r, nullptr); |
267 } | 267 } |
268 | 268 |
269 private: | 269 private: |
270 typedef skiagm::GM INHERITED; | 270 typedef skiagm::GM INHERITED; |
271 }; | 271 }; |
272 DEF_GM( return new BitmapRectRounding; ) | 272 DEF_GM( return new BitmapRectRounding; ) |
273 | 273 |
274 ////////////////////////////////////////////////////////////////////////////// | 274 ////////////////////////////////////////////////////////////////////////////// |
275 | 275 |
276 static skiagm::GM* MyFactory0(void*) { return new DrawBitmapRect2(false); } | 276 DEF_GM( return new DrawBitmapRect2(false); ) |
277 static skiagm::GM* MyFactory1(void*) { return new DrawBitmapRect2(true); } | 277 DEF_GM( return new DrawBitmapRect2(true); ) |
278 | 278 DEF_GM( return new DrawBitmapRect3(); ) |
279 static skiagm::GM* MyFactory2(void*) { return new DrawBitmapRect3(); } | |
280 | 279 |
281 #ifndef SK_BUILD_FOR_ANDROID | 280 #ifndef SK_BUILD_FOR_ANDROID |
282 static skiagm::GM* MyFactory3(void*) { return new DrawBitmapRect4(false); } | 281 DEF_GM( return new DrawBitmapRect4(false); ) |
283 static skiagm::GM* MyFactory4(void*) { return new DrawBitmapRect4(true); } | 282 DEF_GM( return new DrawBitmapRect4(true); ) |
284 #endif | 283 #endif |
285 | 284 |
286 static skiagm::GMRegistry reg0(MyFactory0); | |
287 static skiagm::GMRegistry reg1(MyFactory1); | |
288 | |
289 static skiagm::GMRegistry reg2(MyFactory2); | |
290 | |
291 #ifndef SK_BUILD_FOR_ANDROID | |
292 static skiagm::GMRegistry reg3(MyFactory3); | |
293 static skiagm::GMRegistry reg4(MyFactory4); | |
294 #endif | |
295 | |
OLD | NEW |