| 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 "SampleCode.h" | 8 #include "SampleCode.h" |
| 9 #include "SkAnimTimer.h" | 9 #include "SkAnimTimer.h" |
| 10 #include "SkView.h" | 10 #include "SkView.h" |
| 11 #include "SkCanvas.h" | 11 #include "SkCanvas.h" |
| 12 #include "SkCornerPathEffect.h" | 12 #include "SkCornerPathEffect.h" |
| 13 #include "SkGradientShader.h" | 13 #include "SkGradientShader.h" |
| 14 #include "SkGraphics.h" | 14 #include "SkGraphics.h" |
| 15 #include "SkImageDecoder.h" | |
| 16 #include "SkPath.h" | 15 #include "SkPath.h" |
| 17 #include "SkRandom.h" | 16 #include "SkRandom.h" |
| 18 #include "SkRegion.h" | 17 #include "SkRegion.h" |
| 19 #include "SkShader.h" | 18 #include "SkShader.h" |
| 20 #include "SkUtils.h" | 19 #include "SkUtils.h" |
| 21 #include "SkColorPriv.h" | 20 #include "SkColorPriv.h" |
| 22 #include "SkColorFilter.h" | 21 #include "SkColorFilter.h" |
| 23 #include "SkTime.h" | 22 #include "SkTime.h" |
| 24 #include "SkTypeface.h" | 23 #include "SkTypeface.h" |
| 25 #include "SkXfermode.h" | 24 #include "SkXfermode.h" |
| 26 | 25 |
| 27 #include "SkStream.h" | 26 #include "SkStream.h" |
| 28 #include "SkColorPriv.h" | 27 #include "SkColorPriv.h" |
| 29 #include "SkImageDecoder.h" | |
| 30 | 28 |
| 31 static SkRandom gRand; | 29 static SkRandom gRand; |
| 32 | 30 |
| 33 static void generate_pts(SkPoint pts[], int count, int w, int h) { | 31 static void generate_pts(SkPoint pts[], int count, int w, int h) { |
| 34 for (int i = 0; i < count; i++) { | 32 for (int i = 0; i < count; i++) { |
| 35 pts[i].set(gRand.nextUScalar1() * 3 * w - SkIntToScalar(w), | 33 pts[i].set(gRand.nextUScalar1() * 3 * w - SkIntToScalar(w), |
| 36 gRand.nextUScalar1() * 3 * h - SkIntToScalar(h)); | 34 gRand.nextUScalar1() * 3 * h - SkIntToScalar(h)); |
| 37 } | 35 } |
| 38 } | 36 } |
| 39 | 37 |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 | 236 |
| 239 | 237 |
| 240 private: | 238 private: |
| 241 typedef SampleView INHERITED; | 239 typedef SampleView INHERITED; |
| 242 }; | 240 }; |
| 243 | 241 |
| 244 ////////////////////////////////////////////////////////////////////////////// | 242 ////////////////////////////////////////////////////////////////////////////// |
| 245 | 243 |
| 246 static SkView* MyFactory() { return new HairlineView; } | 244 static SkView* MyFactory() { return new HairlineView; } |
| 247 static SkViewRegister reg(MyFactory); | 245 static SkViewRegister reg(MyFactory); |
| OLD | NEW |