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