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

Side by Side Diff: samplecode/SampleClock.cpp

Issue 2063883002: Revert of Add samples to Viewer. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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') | tools/viewer/SKPSlide.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 }
219 218
220 bool onAnimate(const SkAnimTimer&) override { 219 this->inval(nullptr);
221 return true;
222 } 220 }
223 221
224 private: 222 private:
225 223
226 typedef SampleView INHERITED; 224 typedef SampleView INHERITED;
227 }; 225 };
228 226
229 ////////////////////////////////////////////////////////////////////////////// 227 //////////////////////////////////////////////////////////////////////////////
230 228
231 static SkView* MyFactory() { return new ClockView; } 229 static SkView* MyFactory() { return new ClockView; }
232 static SkViewRegister reg(MyFactory); 230 static SkViewRegister reg(MyFactory);
OLDNEW
« no previous file with comments | « samplecode/SampleAtlas.cpp ('k') | tools/viewer/SKPSlide.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698