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

Side by Side Diff: samplecode/GMSampleView.h

Issue 888283002: allow GMs to animate (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: switch all existing animations to use animatePulse Created 5 years, 10 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 | « gm/gm.cpp ('k') | samplecode/SampleAnimBlur.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 /* 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 8
9 9
10 #ifndef GMSampleView_DEFINED 10 #ifndef GMSampleView_DEFINED
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 SkPaint paint; 63 SkPaint paint;
64 paint.setColor(0x40FF8833); 64 paint.setColor(0x40FF8833);
65 canvas->drawRect(r, paint); 65 canvas->drawRect(r, paint);
66 } 66 }
67 } 67 }
68 68
69 virtual void onDrawBackground(SkCanvas* canvas) { 69 virtual void onDrawBackground(SkCanvas* canvas) {
70 fGM->drawBackground(canvas); 70 fGM->drawBackground(canvas);
71 } 71 }
72 72
73 bool onAnimatePulse(SkMSec curr, SkMSec prev) SK_OVERRIDE {
74 return fGM->animatePulse(curr, prev);
75 }
76
73 private: 77 private:
74 GM* fGM; 78 GM* fGM;
75 typedef SampleView INHERITED; 79 typedef SampleView INHERITED;
76 }; 80 };
77 81
78 #endif 82 #endif
OLDNEW
« no previous file with comments | « gm/gm.cpp ('k') | samplecode/SampleAnimBlur.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698