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

Side by Side Diff: samplecode/SampleAtlas.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/ClockFaceView.cpp ('k') | samplecode/SampleClock.cpp » ('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 2015 Google Inc. 2 * Copyright 2015 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 7
8 #include "SampleCode.h" 8 #include "SampleCode.h"
9 #include "SkAnimTimer.h" 9 #include "SkAnimTimer.h"
10 #include "SkView.h" 10 #include "SkView.h"
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 switch (uni) { 225 switch (uni) {
226 case 'C': fDrawable->toggleUseColors(); this->inval(nullptr); re turn true; 226 case 'C': fDrawable->toggleUseColors(); this->inval(nullptr); re turn true;
227 default: break; 227 default: break;
228 } 228 }
229 } 229 }
230 return this->INHERITED::onQuery(evt); 230 return this->INHERITED::onQuery(evt);
231 } 231 }
232 232
233 void onDrawContent(SkCanvas* canvas) override { 233 void onDrawContent(SkCanvas* canvas) override {
234 canvas->drawDrawable(fDrawable); 234 canvas->drawDrawable(fDrawable);
235 this->inval(nullptr);
235 } 236 }
236 237
237 bool onAnimate(const SkAnimTimer&) override {
238 return true;
239 }
240 #if 0 238 #if 0
241 // TODO: switch over to use this for our animation 239 // TODO: switch over to use this for our animation
242 bool onAnimate(const SkAnimTimer& timer) override { 240 bool onAnimate(const SkAnimTimer& timer) override {
243 SkScalar angle = SkDoubleToScalar(fmod(timer.secs() * 360 / 24, 360)); 241 SkScalar angle = SkDoubleToScalar(fmod(timer.secs() * 360 / 24, 360));
244 fAnimatingDrawable->setSweep(angle); 242 fAnimatingDrawable->setSweep(angle);
245 return true; 243 return true;
246 } 244 }
247 #endif 245 #endif
248 246
249 private: 247 private:
250 typedef SampleView INHERITED; 248 typedef SampleView INHERITED;
251 }; 249 };
252 250
253 ////////////////////////////////////////////////////////////////////////////// 251 //////////////////////////////////////////////////////////////////////////////
254 252
255 DEF_SAMPLE( return new DrawAtlasView("DrawAtlas", draw_atlas); ) 253 DEF_SAMPLE( return new DrawAtlasView("DrawAtlas", draw_atlas); )
256 DEF_SAMPLE( return new DrawAtlasView("DrawAtlasSim", draw_atlas_sim); ) 254 DEF_SAMPLE( return new DrawAtlasView("DrawAtlasSim", draw_atlas_sim); )
OLDNEW
« no previous file with comments | « samplecode/ClockFaceView.cpp ('k') | samplecode/SampleClock.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698