| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 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 "SkCanvas.h" | 9 #include "SkCanvas.h" |
| 10 #include "SkGradientShader.h" | 10 #include "SkGradientShader.h" |
| 11 #include "SkPath.h" |
| 11 | 12 |
| 12 namespace skiagm { | 13 namespace skiagm { |
| 13 | 14 |
| 14 static void makebm(SkBitmap* bm, int w, int h) { | 15 static void makebm(SkBitmap* bm, int w, int h) { |
| 15 bm->allocN32Pixels(w, h); | 16 bm->allocN32Pixels(w, h); |
| 16 bm->eraseColor(SK_ColorTRANSPARENT); | 17 bm->eraseColor(SK_ColorTRANSPARENT); |
| 17 | 18 |
| 18 SkCanvas canvas(*bm); | 19 SkCanvas canvas(*bm); |
| 19 SkScalar s = SkIntToScalar(SkMin32(w, h)); | 20 SkScalar s = SkIntToScalar(SkMin32(w, h)); |
| 20 SkPoint pts[] = { { 0, 0 }, { s, s } }; | 21 SkPoint pts[] = { { 0, 0 }, { s, s } }; |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 | 183 |
| 183 private: | 184 private: |
| 184 typedef GM INHERITED; | 185 typedef GM INHERITED; |
| 185 }; | 186 }; |
| 186 | 187 |
| 187 /////////////////////////////////////////////////////////////////////////////// | 188 /////////////////////////////////////////////////////////////////////////////// |
| 188 | 189 |
| 189 static GM* MyFactory(void*) { return new ShaderTextGM; } | 190 static GM* MyFactory(void*) { return new ShaderTextGM; } |
| 190 static GMRegistry reg(MyFactory); | 191 static GMRegistry reg(MyFactory); |
| 191 } | 192 } |
| OLD | NEW |