| 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 "SkColor.h" | 9 #include "SkColor.h" |
| 10 #include "SkBicubicImageFilter.h" | 10 #include "SkBicubicImageFilter.h" |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 } | 38 } |
| 39 s = fCheckerboard.getAddr32(0, y + 1); | 39 s = fCheckerboard.getAddr32(0, y + 1); |
| 40 for (int x = 0; x < width; x += 2) { | 40 for (int x = 0; x < width; x += 2) { |
| 41 *s++ = 0xFF000000; | 41 *s++ = 0xFF000000; |
| 42 *s++ = 0xFFFFFFFF; | 42 *s++ = 0xFFFFFFFF; |
| 43 } | 43 } |
| 44 } | 44 } |
| 45 } | 45 } |
| 46 | 46 |
| 47 virtual SkISize onISize() { | 47 virtual SkISize onISize() { |
| 48 return make_isize(400, 300); | 48 return SkISize::Make(400, 300); |
| 49 } | 49 } |
| 50 | 50 |
| 51 virtual void onDraw(SkCanvas* canvas) { | 51 virtual void onDraw(SkCanvas* canvas) { |
| 52 if (!fInitialized) { | 52 if (!fInitialized) { |
| 53 make_checkerboard(4, 4); | 53 make_checkerboard(4, 4); |
| 54 fInitialized = true; | 54 fInitialized = true; |
| 55 } | 55 } |
| 56 SkScalar sk32 = SkIntToScalar(32); | 56 SkScalar sk32 = SkIntToScalar(32); |
| 57 canvas->clear(0x00000000); | 57 canvas->clear(0x00000000); |
| 58 SkPaint bilinearPaint, bicubicPaint; | 58 SkPaint bilinearPaint, bicubicPaint; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 77 SkBitmap fCheckerboard; | 77 SkBitmap fCheckerboard; |
| 78 bool fInitialized; | 78 bool fInitialized; |
| 79 }; | 79 }; |
| 80 | 80 |
| 81 ////////////////////////////////////////////////////////////////////////////// | 81 ////////////////////////////////////////////////////////////////////////////// |
| 82 | 82 |
| 83 static GM* MyFactory(void*) { return new BicubicGM; } | 83 static GM* MyFactory(void*) { return new BicubicGM; } |
| 84 static GMRegistry reg(MyFactory); | 84 static GMRegistry reg(MyFactory); |
| 85 | 85 |
| 86 } | 86 } |
| OLD | NEW |