| 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 #include "SkArithmeticMode.h" | 9 #include "SkArithmeticMode.h" |
| 10 #include "SkOffsetImageFilter.h" | 10 #include "SkOffsetImageFilter.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 virtual SkString onShortName() SK_OVERRIDE { | 27 virtual SkString onShortName() SK_OVERRIDE { |
| 28 return SkString("xfermodeimagefilter"); | 28 return SkString("xfermodeimagefilter"); |
| 29 } | 29 } |
| 30 | 30 |
| 31 void make_bitmap() { | 31 void make_bitmap() { |
| 32 fBitmap.allocN32Pixels(80, 80); | 32 fBitmap.allocN32Pixels(80, 80); |
| 33 SkCanvas canvas(fBitmap); | 33 SkCanvas canvas(fBitmap); |
| 34 canvas.clear(0x00000000); | 34 canvas.clear(0x00000000); |
| 35 SkPaint paint; | 35 SkPaint paint; |
| 36 paint.setAntiAlias(true); | 36 paint.setAntiAlias(true); |
| 37 sk_tool_utils::set_portable_typeface(&paint); |
| 37 paint.setColor(0xD000D000); | 38 paint.setColor(0xD000D000); |
| 38 paint.setTextSize(SkIntToScalar(96)); | 39 paint.setTextSize(SkIntToScalar(96)); |
| 39 const char* str = "e"; | 40 const char* str = "e"; |
| 40 canvas.drawText(str, strlen(str), SkIntToScalar(15), SkIntToScalar(65),
paint); | 41 canvas.drawText(str, strlen(str), SkIntToScalar(15), SkIntToScalar(65),
paint); |
| 41 } | 42 } |
| 42 | 43 |
| 43 void make_checkerboard() { | 44 void make_checkerboard() { |
| 44 fCheckerboard.allocN32Pixels(80, 80); | 45 fCheckerboard.allocN32Pixels(80, 80); |
| 45 SkCanvas canvas(fCheckerboard); | 46 SkCanvas canvas(fCheckerboard); |
| 46 canvas.clear(0x00000000); | 47 canvas.clear(0x00000000); |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 217 private: | 218 private: |
| 218 SkBitmap fBitmap, fCheckerboard; | 219 SkBitmap fBitmap, fCheckerboard; |
| 219 typedef GM INHERITED; | 220 typedef GM INHERITED; |
| 220 }; | 221 }; |
| 221 | 222 |
| 222 ////////////////////////////////////////////////////////////////////////////// | 223 ////////////////////////////////////////////////////////////////////////////// |
| 223 | 224 |
| 224 DEF_GM( return new XfermodeImageFilterGM; ); | 225 DEF_GM( return new XfermodeImageFilterGM; ); |
| 225 | 226 |
| 226 } | 227 } |
| OLD | NEW |