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

Side by Side Diff: samplecode/SampleClock.cpp

Issue 2056343004: Add samples to Viewer. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Add samples.gypi Created 4 years, 6 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
« no previous file with comments | « samplecode/SampleAtlas.cpp ('k') | samplecode/SampleCode.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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);
OLDNEW
« no previous file with comments | « samplecode/SampleAtlas.cpp ('k') | samplecode/SampleCode.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698