| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 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 #include "SampleCode.h" | 7 #include "SampleCode.h" |
| 8 | 8 |
| 9 #include "SkCanvas.h" | 9 #include "SkCanvas.h" |
| 10 #include "SkPath.h" | 10 #include "SkPath.h" |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 path.reset(); | 208 path.reset(); |
| 209 path.arcTo(rect, 0, 0, false); | 209 path.arcTo(rect, 0, 0, false); |
| 210 path.addOval(rect, SkPath::kCCW_Direction); | 210 path.addOval(rect, SkPath::kCCW_Direction); |
| 211 path.arcTo(rect, 360, 0, true); | 211 path.arcTo(rect, 360, 0, true); |
| 212 canvas->drawPath(path, paintStroke); | 212 canvas->drawPath(path, paintStroke); |
| 213 #else | 213 #else |
| 214 canvas->drawOval(rect, paintStroke); | 214 canvas->drawOval(rect, paintStroke); |
| 215 #endif | 215 #endif |
| 216 | 216 |
| 217 canvas->restore(); | 217 canvas->restore(); |
| 218 } |
| 218 | 219 |
| 219 this->inval(nullptr); | 220 bool onAnimate(const SkAnimTimer&) override { |
| 221 return true; |
| 220 } | 222 } |
| 221 | 223 |
| 222 private: | 224 private: |
| 223 | 225 |
| 224 typedef SampleView INHERITED; | 226 typedef SampleView INHERITED; |
| 225 }; | 227 }; |
| 226 | 228 |
| 227 ////////////////////////////////////////////////////////////////////////////// | 229 ////////////////////////////////////////////////////////////////////////////// |
| 228 | 230 |
| 229 static SkView* MyFactory() { return new ClockView; } | 231 static SkView* MyFactory() { return new ClockView; } |
| 230 static SkViewRegister reg(MyFactory); | 232 static SkViewRegister reg(MyFactory); |
| OLD | NEW |