Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(243)

Side by Side Diff: samplecode/SampleAll.cpp

Issue 23021015: Initial error handling code (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Fixing comments Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 p.setRasterizer(rast2)->unref(); 157 p.setRasterizer(rast2)->unref();
158 p.setXfermodeMode(SkXfermode::kClear_Mode); 158 p.setXfermodeMode(SkXfermode::kClear_Mode);
159 rast->addLayer(p); 159 rast->addLayer(p);
160 } 160 }
161 161
162 class Dot2DPathEffect : public Sk2DPathEffect { 162 class Dot2DPathEffect : public Sk2DPathEffect {
163 public: 163 public:
164 Dot2DPathEffect(SkScalar radius, const SkMatrix& matrix) 164 Dot2DPathEffect(SkScalar radius, const SkMatrix& matrix)
165 : Sk2DPathEffect(matrix), fRadius(radius) {} 165 : Sk2DPathEffect(matrix), fRadius(radius) {}
166 166
167 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(Dot2DPathEffect) 167 SK_DEFINE_FLATTENABLE_TYPE_CHECKING_PROCS(Dot2DPathEffect)
sugoi1 2013/10/09 14:29:58 Should be SK_DEFINE_FLATTENABLE_DESERIALIZATION_PR
168 168
169 protected: 169 protected:
170 virtual void next(const SkPoint& loc, int u, int v, SkPath* dst) const SK_OV ERRIDE { 170 virtual void next(const SkPoint& loc, int u, int v, SkPath* dst) const SK_OV ERRIDE {
171 dst->addCircle(loc.fX, loc.fY, fRadius); 171 dst->addCircle(loc.fX, loc.fY, fRadius);
172 } 172 }
173 173
174 Dot2DPathEffect(SkFlattenableReadBuffer& buffer) : INHERITED(buffer) { 174 Dot2DPathEffect(SkFlattenableReadBuffer& buffer) : INHERITED(buffer) {
175 fRadius = buffer.readScalar(); 175 fRadius = buffer.readScalar();
176 } 176 }
177 virtual void flatten(SkFlattenableWriteBuffer& buffer) const SK_OVERRIDE { 177 virtual void flatten(SkFlattenableWriteBuffer& buffer) const SK_OVERRIDE {
(...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after
641 private: 641 private:
642 SkPoint fClickPt; 642 SkPoint fClickPt;
643 SkBitmap fBug, fTb, fTx; 643 SkBitmap fBug, fTb, fTx;
644 typedef SampleView INHERITED; 644 typedef SampleView INHERITED;
645 }; 645 };
646 646
647 ////////////////////////////////////////////////////////////////////////////// 647 //////////////////////////////////////////////////////////////////////////////
648 648
649 static SkView* MyFactory() { return new DemoView; } 649 static SkView* MyFactory() { return new DemoView; }
650 static SkViewRegister reg(MyFactory); 650 static SkViewRegister reg(MyFactory);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698