| 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 "SkBitmapSource.h" | 10 #include "SkBitmapSource.h" |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 protected: | 33 protected: |
| 34 virtual uint32_t onGetFlags() const SK_OVERRIDE { | 34 virtual uint32_t onGetFlags() const SK_OVERRIDE { |
| 35 return kSkipTiled_Flag; | 35 return kSkipTiled_Flag; |
| 36 } | 36 } |
| 37 | 37 |
| 38 virtual SkString onShortName() { | 38 virtual SkString onShortName() { |
| 39 return SkString("imagefiltersscaled"); | 39 return SkString("imagefiltersscaled"); |
| 40 } | 40 } |
| 41 | 41 |
| 42 virtual SkISize onISize() { | 42 virtual SkISize onISize() { |
| 43 return make_isize(1428, 500); | 43 return SkISize::Make(1428, 500); |
| 44 } | 44 } |
| 45 | 45 |
| 46 void make_checkerboard() { | 46 void make_checkerboard() { |
| 47 fCheckerboard.allocN32Pixels(64, 64); | 47 fCheckerboard.allocN32Pixels(64, 64); |
| 48 SkCanvas canvas(fCheckerboard); | 48 SkCanvas canvas(fCheckerboard); |
| 49 canvas.clear(0x00000000); | 49 canvas.clear(0x00000000); |
| 50 SkPaint darkPaint; | 50 SkPaint darkPaint; |
| 51 darkPaint.setColor(0xFF404040); | 51 darkPaint.setColor(0xFF404040); |
| 52 SkPaint lightPaint; | 52 SkPaint lightPaint; |
| 53 lightPaint.setColor(0xFFA0A0A0); | 53 lightPaint.setColor(0xFFA0A0A0); |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 SkBitmap fGradientCircle; | 174 SkBitmap fGradientCircle; |
| 175 typedef GM INHERITED; | 175 typedef GM INHERITED; |
| 176 }; | 176 }; |
| 177 | 177 |
| 178 ////////////////////////////////////////////////////////////////////////////// | 178 ////////////////////////////////////////////////////////////////////////////// |
| 179 | 179 |
| 180 static GM* MyFactory(void*) { return new ImageFiltersScaledGM; } | 180 static GM* MyFactory(void*) { return new ImageFiltersScaledGM; } |
| 181 static GMRegistry reg(MyFactory); | 181 static GMRegistry reg(MyFactory); |
| 182 | 182 |
| 183 } | 183 } |
| OLD | NEW |