| 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 "SkView.h" | 9 #include "SkView.h" |
| 10 #include "SkCanvas.h" | 10 #include "SkCanvas.h" |
| 11 #include "SkColorPriv.h" | 11 #include "SkColorPriv.h" |
| 12 #include "SkDevice.h" | 12 #include "SkDevice.h" |
| 13 #include "SkPaint.h" | 13 #include "SkPaint.h" |
| 14 #include "SkPath.h" |
| 14 #include "SkRandom.h" | 15 #include "SkRandom.h" |
| 15 | 16 |
| 16 #define W 150 | 17 #define W 150 |
| 17 #define H 200 | 18 #define H 200 |
| 18 | 19 |
| 19 static void show_text(SkCanvas* canvas, bool doAA) { | 20 static void show_text(SkCanvas* canvas, bool doAA) { |
| 20 SkRandom rand; | 21 SkRandom rand; |
| 21 SkPaint paint; | 22 SkPaint paint; |
| 22 paint.setAntiAlias(doAA); | 23 paint.setAntiAlias(doAA); |
| 23 paint.setLCDRenderText(true); | 24 paint.setLCDRenderText(true); |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 } | 156 } |
| 156 | 157 |
| 157 private: | 158 private: |
| 158 typedef SampleView INHERITED; | 159 typedef SampleView INHERITED; |
| 159 }; | 160 }; |
| 160 | 161 |
| 161 ////////////////////////////////////////////////////////////////////////////// | 162 ////////////////////////////////////////////////////////////////////////////// |
| 162 | 163 |
| 163 static SkView* MyFactory() { return new ClipView; } | 164 static SkView* MyFactory() { return new ClipView; } |
| 164 static SkViewRegister reg(MyFactory); | 165 static SkViewRegister reg(MyFactory); |
| OLD | NEW |