| 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 "SkColorMatrixFilter.h" | 9 #include "SkColorMatrixFilter.h" |
| 10 #include "SkColorFilterImageFilter.h" | 10 #include "SkColorFilterImageFilter.h" |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 canvas.drawRect(SkRect::MakeXYWH(0, 0, 8, 8), darkPaint); | 55 canvas.drawRect(SkRect::MakeXYWH(0, 0, 8, 8), darkPaint); |
| 56 canvas.drawRect(SkRect::MakeXYWH(8, 0, 8, 8), lightPaint); | 56 canvas.drawRect(SkRect::MakeXYWH(8, 0, 8, 8), lightPaint); |
| 57 canvas.drawRect(SkRect::MakeXYWH(0, 8, 8, 8), lightPaint); | 57 canvas.drawRect(SkRect::MakeXYWH(0, 8, 8, 8), lightPaint); |
| 58 canvas.drawRect(SkRect::MakeXYWH(8, 8, 8, 8), darkPaint); | 58 canvas.drawRect(SkRect::MakeXYWH(8, 8, 8, 8), darkPaint); |
| 59 canvas.restore(); | 59 canvas.restore(); |
| 60 } | 60 } |
| 61 } | 61 } |
| 62 } | 62 } |
| 63 | 63 |
| 64 virtual SkISize onISize() { | 64 virtual SkISize onISize() { |
| 65 return make_isize(WIDTH, HEIGHT); | 65 return SkISize::Make(WIDTH, HEIGHT); |
| 66 } | 66 } |
| 67 | 67 |
| 68 virtual void onDraw(SkCanvas* canvas) { | 68 virtual void onDraw(SkCanvas* canvas) { |
| 69 if (!fInitialized) { | 69 if (!fInitialized) { |
| 70 make_bitmap(); | 70 make_bitmap(); |
| 71 make_checkerboard(); | 71 make_checkerboard(); |
| 72 fInitialized = true; | 72 fInitialized = true; |
| 73 } | 73 } |
| 74 canvas->clear(0x00000000); | 74 canvas->clear(0x00000000); |
| 75 | 75 |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 SkBitmap fBitmap, fCheckerboard; | 128 SkBitmap fBitmap, fCheckerboard; |
| 129 bool fInitialized; | 129 bool fInitialized; |
| 130 }; | 130 }; |
| 131 | 131 |
| 132 ////////////////////////////////////////////////////////////////////////////// | 132 ////////////////////////////////////////////////////////////////////////////// |
| 133 | 133 |
| 134 static GM* MyFactory(void*) { return new TileImageFilterGM; } | 134 static GM* MyFactory(void*) { return new TileImageFilterGM; } |
| 135 static GMRegistry reg(MyFactory); | 135 static GMRegistry reg(MyFactory); |
| 136 | 136 |
| 137 } | 137 } |
| OLD | NEW |