| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 Google Inc. |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 #include "SampleCode.h" | 8 #include "SampleCode.h" |
| 9 #include "SkBlurMask.h" | 9 #include "SkBlurMask.h" |
| 10 #include "SkCanvas.h" | 10 #include "SkCanvas.h" |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 Dot2DPathEffect(SkScalar radius, const SkMatrix& matrix) | 165 Dot2DPathEffect(SkScalar radius, const SkMatrix& matrix) |
| 166 : Sk2DPathEffect(matrix), fRadius(radius) {} | 166 : Sk2DPathEffect(matrix), fRadius(radius) {} |
| 167 | 167 |
| 168 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(Dot2DPathEffect) | 168 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(Dot2DPathEffect) |
| 169 | 169 |
| 170 protected: | 170 protected: |
| 171 virtual void next(const SkPoint& loc, int u, int v, SkPath* dst) const SK_OV
ERRIDE { | 171 virtual void next(const SkPoint& loc, int u, int v, SkPath* dst) const SK_OV
ERRIDE { |
| 172 dst->addCircle(loc.fX, loc.fY, fRadius); | 172 dst->addCircle(loc.fX, loc.fY, fRadius); |
| 173 } | 173 } |
| 174 | 174 |
| 175 #ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING |
| 175 Dot2DPathEffect(SkReadBuffer& buffer) : INHERITED(buffer) { | 176 Dot2DPathEffect(SkReadBuffer& buffer) : INHERITED(buffer) { |
| 176 fRadius = buffer.readScalar(); | 177 fRadius = buffer.readScalar(); |
| 177 } | 178 } |
| 179 #endif |
| 178 virtual void flatten(SkWriteBuffer& buffer) const SK_OVERRIDE { | 180 virtual void flatten(SkWriteBuffer& buffer) const SK_OVERRIDE { |
| 179 this->INHERITED::flatten(buffer); | 181 this->INHERITED::flatten(buffer); |
| 180 buffer.writeScalar(fRadius); | 182 buffer.writeScalar(fRadius); |
| 181 } | 183 } |
| 182 | 184 |
| 183 private: | 185 private: |
| 184 SkScalar fRadius; | 186 SkScalar fRadius; |
| 185 | 187 |
| 186 typedef Sk2DPathEffect INHERITED; | 188 typedef Sk2DPathEffect INHERITED; |
| 187 }; | 189 }; |
| (...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 593 private: | 595 private: |
| 594 SkPoint fClickPt; | 596 SkPoint fClickPt; |
| 595 SkBitmap fBug, fTb, fTx; | 597 SkBitmap fBug, fTb, fTx; |
| 596 typedef SampleView INHERITED; | 598 typedef SampleView INHERITED; |
| 597 }; | 599 }; |
| 598 | 600 |
| 599 ////////////////////////////////////////////////////////////////////////////// | 601 ////////////////////////////////////////////////////////////////////////////// |
| 600 | 602 |
| 601 static SkView* MyFactory() { return new DemoView; } | 603 static SkView* MyFactory() { return new DemoView; } |
| 602 static SkViewRegister reg(MyFactory); | 604 static SkViewRegister reg(MyFactory); |
| OLD | NEW |