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

Side by Side Diff: samplecode/GMSampleView.h

Issue 178473006: DM: also run benches once. (Closed) Base URL: https://skia.googlesource.com/skia.git@dm
Patch Set: add note Created 6 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 | « gyp/dm.gyp ('k') | no next file » | 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 18 matching lines...) Expand all
29 static SkEvent* NewShowSizeEvt(bool doShowSize) { 29 static SkEvent* NewShowSizeEvt(bool doShowSize) {
30 SkEvent* evt = SkNEW_ARGS(SkEvent, ("GMSampleView::showSize")); 30 SkEvent* evt = SkNEW_ARGS(SkEvent, ("GMSampleView::showSize"));
31 evt->setFast32(doShowSize); 31 evt->setFast32(doShowSize);
32 return evt; 32 return evt;
33 } 33 }
34 34
35 protected: 35 protected:
36 virtual bool onQuery(SkEvent* evt) { 36 virtual bool onQuery(SkEvent* evt) {
37 if (SampleCode::TitleQ(*evt)) { 37 if (SampleCode::TitleQ(*evt)) {
38 SkString name("GM:"); 38 SkString name("GM:");
39 name.append(fGM->shortName()); 39 name.append(fGM->getName());
40 SampleCode::TitleR(evt, name.c_str()); 40 SampleCode::TitleR(evt, name.c_str());
41 return true; 41 return true;
42 } 42 }
43 return this->INHERITED::onQuery(evt); 43 return this->INHERITED::onQuery(evt);
44 } 44 }
45 45
46 virtual bool onEvent(const SkEvent& evt) SK_OVERRIDE { 46 virtual bool onEvent(const SkEvent& evt) SK_OVERRIDE {
47 if (evt.isType("GMSampleView::showSize")) { 47 if (evt.isType("GMSampleView::showSize")) {
48 fShowSize = SkToBool(evt.getFast32()); 48 fShowSize = SkToBool(evt.getFast32());
49 return true; 49 return true;
(...skipping 19 matching lines...) Expand all
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 private: 73 private:
74 GM* fGM; 74 GM* fGM;
75 typedef SampleView INHERITED; 75 typedef SampleView INHERITED;
76 }; 76 };
77 77
78 #endif 78 #endif
OLDNEW
« no previous file with comments | « gyp/dm.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698