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

Side by Side Diff: samplecode/SampleApp.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, 8 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/SampleAnimBlur.cpp ('k') | samplecode/SampleApp.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 Skia 2 * Copyright 2011 Skia
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 SampleApp_DEFINED 8 #ifndef SampleApp_DEFINED
9 #define SampleApp_DEFINED 9 #define SampleApp_DEFINED
10 10
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 92
93 // return the GrRenderTarget backing gpu devices (NULL if not built with GPU support) 93 // return the GrRenderTarget backing gpu devices (NULL if not built with GPU support)
94 virtual GrRenderTarget* getGrRenderTarget() = 0; 94 virtual GrRenderTarget* getGrRenderTarget() = 0;
95 private: 95 private:
96 typedef SkRefCnt INHERITED; 96 typedef SkRefCnt INHERITED;
97 }; 97 };
98 98
99 SampleWindow(void* hwnd, int argc, char** argv, DeviceManager*); 99 SampleWindow(void* hwnd, int argc, char** argv, DeviceManager*);
100 virtual ~SampleWindow(); 100 virtual ~SampleWindow();
101 101
102 SkSurface* createSurface() SK_OVERRIDE { 102 SkSurface* createSurface() override {
103 SkSurface* surface = NULL; 103 SkSurface* surface = NULL;
104 if (fDevManager) { 104 if (fDevManager) {
105 surface = fDevManager->createSurface(fDeviceType, this); 105 surface = fDevManager->createSurface(fDeviceType, this);
106 } 106 }
107 if (NULL == surface) { 107 if (NULL == surface) {
108 surface = this->INHERITED::createSurface(); 108 surface = this->INHERITED::createSurface();
109 } 109 }
110 return surface; 110 return surface;
111 } 111 }
112 112
113 void draw(SkCanvas*) SK_OVERRIDE; 113 void draw(SkCanvas*) override;
114 114
115 void setDeviceType(DeviceType type); 115 void setDeviceType(DeviceType type);
116 void toggleRendering(); 116 void toggleRendering();
117 void toggleSlideshow(); 117 void toggleSlideshow();
118 void toggleFPS(); 118 void toggleFPS();
119 void showOverview(); 119 void showOverview();
120 void toggleDistanceFieldFonts(); 120 void toggleDistanceFieldFonts();
121 121
122 GrContext* getGrContext() const { return fDevManager->getGrContext(); } 122 GrContext* getGrContext() const { return fDevManager->getGrContext(); }
123 123
124 void setZoomCenter(float x, float y); 124 void setZoomCenter(float x, float y);
125 void changeZoomLevel(float delta); 125 void changeZoomLevel(float delta);
126 bool nextSample(); 126 bool nextSample();
127 bool previousSample(); 127 bool previousSample();
128 bool goToSample(int i); 128 bool goToSample(int i);
129 SkString getSampleTitle(int i); 129 SkString getSampleTitle(int i);
130 int sampleCount(); 130 int sampleCount();
131 bool handleTouch(int ownerId, float x, float y, 131 bool handleTouch(int ownerId, float x, float y,
132 SkView::Click::State state); 132 SkView::Click::State state);
133 void saveToPdf(); 133 void saveToPdf();
134 void postInvalDelay(); 134 void postInvalDelay();
135 135
136 DeviceType getDeviceType() const { return fDeviceType; } 136 DeviceType getDeviceType() const { return fDeviceType; }
137 137
138 protected: 138 protected:
139 void onDraw(SkCanvas* canvas) SK_OVERRIDE; 139 void onDraw(SkCanvas* canvas) override;
140 bool onHandleKey(SkKey key) SK_OVERRIDE; 140 bool onHandleKey(SkKey key) override;
141 bool onHandleChar(SkUnichar) SK_OVERRIDE; 141 bool onHandleChar(SkUnichar) override;
142 void onSizeChange() SK_OVERRIDE; 142 void onSizeChange() override;
143 143
144 SkCanvas* beforeChildren(SkCanvas*) SK_OVERRIDE; 144 SkCanvas* beforeChildren(SkCanvas*) override;
145 void afterChildren(SkCanvas*) SK_OVERRIDE; 145 void afterChildren(SkCanvas*) override;
146 void beforeChild(SkView* child, SkCanvas* canvas) SK_OVERRIDE; 146 void beforeChild(SkView* child, SkCanvas* canvas) override;
147 void afterChild(SkView* child, SkCanvas* canvas) SK_OVERRIDE; 147 void afterChild(SkView* child, SkCanvas* canvas) override;
148 148
149 bool onEvent(const SkEvent& evt) SK_OVERRIDE; 149 bool onEvent(const SkEvent& evt) override;
150 bool onQuery(SkEvent* evt) SK_OVERRIDE; 150 bool onQuery(SkEvent* evt) override;
151 151
152 virtual bool onDispatchClick(int x, int y, Click::State, void* owner, 152 virtual bool onDispatchClick(int x, int y, Click::State, void* owner,
153 unsigned modi) SK_OVERRIDE; 153 unsigned modi) override;
154 bool onClick(Click* click) SK_OVERRIDE; 154 bool onClick(Click* click) override;
155 virtual Click* onFindClickHandler(SkScalar x, SkScalar y, 155 virtual Click* onFindClickHandler(SkScalar x, SkScalar y,
156 unsigned modi) SK_OVERRIDE; 156 unsigned modi) override;
157 157
158 private: 158 private:
159 class DefaultDeviceManager; 159 class DefaultDeviceManager;
160 160
161 int fCurrIndex; 161 int fCurrIndex;
162 162
163 SkPictureRecorder fRecorder; 163 SkPictureRecorder fRecorder;
164 SkPath fClipPath; 164 SkPath fClipPath;
165 165
166 SkTouchGesture fGesture; 166 SkTouchGesture fGesture;
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 void installDrawFilter(SkCanvas*); 232 void installDrawFilter(SkCanvas*);
233 int findByTitle(const char*); 233 int findByTitle(const char*);
234 void listTitles(); 234 void listTitles();
235 SkSize tileSize() const; 235 SkSize tileSize() const;
236 bool sendAnimatePulse(); 236 bool sendAnimatePulse();
237 237
238 typedef SkOSWindow INHERITED; 238 typedef SkOSWindow INHERITED;
239 }; 239 };
240 240
241 #endif 241 #endif
OLDNEW
« no previous file with comments | « samplecode/SampleAnimBlur.cpp ('k') | samplecode/SampleApp.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698