| 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 #include "SkColor.h" | 9 #include "SkColor.h" |
| 10 #include "SkMatrixImageFilter.h" | 10 #include "SkMatrixImageFilter.h" |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 make_checkerboard(&checkerboard); | 66 make_checkerboard(&checkerboard); |
| 67 | 67 |
| 68 SkRect srcRect = SkRect::MakeWH(96, 96); | 68 SkRect srcRect = SkRect::MakeWH(96, 96); |
| 69 | 69 |
| 70 canvas->translate(margin, margin); | 70 canvas->translate(margin, margin); |
| 71 draw(canvas, srcRect, checkerboard, matrix, SkPaint::kNone_FilterLevel); | 71 draw(canvas, srcRect, checkerboard, matrix, SkPaint::kNone_FilterLevel); |
| 72 | 72 |
| 73 canvas->translate(srcRect.width() + margin, 0); | 73 canvas->translate(srcRect.width() + margin, 0); |
| 74 draw(canvas, srcRect, checkerboard, matrix, SkPaint::kLow_FilterLevel); | 74 draw(canvas, srcRect, checkerboard, matrix, SkPaint::kLow_FilterLevel); |
| 75 | 75 |
| 76 #if 0 |
| 77 // This may be causing Mac 10.6 to barf. |
| 76 canvas->translate(srcRect.width() + margin, 0); | 78 canvas->translate(srcRect.width() + margin, 0); |
| 77 draw(canvas, srcRect, checkerboard, matrix, SkPaint::kMedium_FilterLevel
); | 79 draw(canvas, srcRect, checkerboard, matrix, SkPaint::kMedium_FilterLevel
); |
| 78 | 80 |
| 79 canvas->translate(srcRect.width() + margin, 0); | 81 canvas->translate(srcRect.width() + margin, 0); |
| 80 draw(canvas, srcRect, checkerboard, matrix, SkPaint::kHigh_FilterLevel); | 82 draw(canvas, srcRect, checkerboard, matrix, SkPaint::kHigh_FilterLevel); |
| 83 #endif |
| 81 } | 84 } |
| 82 | 85 |
| 83 private: | 86 private: |
| 84 typedef GM INHERITED; | 87 typedef GM INHERITED; |
| 85 }; | 88 }; |
| 86 | 89 |
| 87 ////////////////////////////////////////////////////////////////////////////// | 90 ////////////////////////////////////////////////////////////////////////////// |
| 88 | 91 |
| 89 static GM* MyFactory(void*) { return new MatrixImageFilterGM; } | 92 static GM* MyFactory(void*) { return new MatrixImageFilterGM; } |
| 90 static GMRegistry reg(MyFactory); | 93 static GMRegistry reg(MyFactory); |
| 91 | 94 |
| 92 } | 95 } |
| OLD | NEW |