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

Side by Side Diff: samplecode/SampleCode.h

Issue 1037793002: C++11 override should now be supported by all of {bots,Chrome,Android,Mozilla} (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: git cl web Created 5 years, 9 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/SampleClock.cpp ('k') | samplecode/SampleDegenerateTwoPtRadials.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 2011 Google Inc. 2 * Copyright 2011 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 #ifndef SampleCode_DEFINED 8 #ifndef SampleCode_DEFINED
9 #define SampleCode_DEFINED 9 #define SampleCode_DEFINED
10 10
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 public: 46 public:
47 virtual SkView* operator() () const = 0; 47 virtual SkView* operator() () const = 0;
48 }; 48 };
49 49
50 typedef SkView* (*SkViewCreateFunc)(); 50 typedef SkView* (*SkViewCreateFunc)();
51 51
52 // wraps SkViewCreateFunc in SkViewFactory interface 52 // wraps SkViewCreateFunc in SkViewFactory interface
53 class SkFuncViewFactory : public SkViewFactory { 53 class SkFuncViewFactory : public SkViewFactory {
54 public: 54 public:
55 SkFuncViewFactory(SkViewCreateFunc func); 55 SkFuncViewFactory(SkViewCreateFunc func);
56 SkView* operator() () const SK_OVERRIDE; 56 SkView* operator() () const override;
57 57
58 private: 58 private:
59 SkViewCreateFunc fCreateFunc; 59 SkViewCreateFunc fCreateFunc;
60 }; 60 };
61 61
62 namespace skiagm { 62 namespace skiagm {
63 class GM; 63 class GM;
64 } 64 }
65 65
66 // factory function that creates a skiagm::GM 66 // factory function that creates a skiagm::GM
67 typedef skiagm::GM* (*GMFactoryFunc)(void*); 67 typedef skiagm::GM* (*GMFactoryFunc)(void*);
68 68
69 // Takes a GM factory function and implements the SkViewFactory interface 69 // Takes a GM factory function and implements the SkViewFactory interface
70 // by making the GM and wrapping it in a GMSampleView. GMSampleView bridges 70 // by making the GM and wrapping it in a GMSampleView. GMSampleView bridges
71 // the SampleView interface to skiagm::GM. 71 // the SampleView interface to skiagm::GM.
72 class SkGMSampleViewFactory : public SkViewFactory { 72 class SkGMSampleViewFactory : public SkViewFactory {
73 public: 73 public:
74 SkGMSampleViewFactory(GMFactoryFunc func); 74 SkGMSampleViewFactory(GMFactoryFunc func);
75 SkView* operator() () const SK_OVERRIDE; 75 SkView* operator() () const override;
76 private: 76 private:
77 GMFactoryFunc fFunc; 77 GMFactoryFunc fFunc;
78 }; 78 };
79 79
80 class SkViewRegister : public SkRefCnt { 80 class SkViewRegister : public SkRefCnt {
81 public: 81 public:
82 explicit SkViewRegister(SkViewFactory*); 82 explicit SkViewRegister(SkViewFactory*);
83 explicit SkViewRegister(SkViewCreateFunc); 83 explicit SkViewRegister(SkViewCreateFunc);
84 explicit SkViewRegister(GMFactoryFunc); 84 explicit SkViewRegister(GMFactoryFunc);
85 85
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 SkOSMenu::TriState fPipeState; 143 SkOSMenu::TriState fPipeState;
144 SkColor fBGColor; 144 SkColor fBGColor;
145 145
146 private: 146 private:
147 int fRepeatCount; 147 int fRepeatCount;
148 bool fHaveCalledOnceBeforeDraw; 148 bool fHaveCalledOnceBeforeDraw;
149 typedef SkView INHERITED; 149 typedef SkView INHERITED;
150 }; 150 };
151 151
152 #endif 152 #endif
OLDNEW
« no previous file with comments | « samplecode/SampleClock.cpp ('k') | samplecode/SampleDegenerateTwoPtRadials.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698