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

Side by Side Diff: dm/DMSrcSink.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 | « dm/DM.cpp ('k') | dm/DMSrcSink.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 #ifndef DMSrcSink_DEFINED 8 #ifndef DMSrcSink_DEFINED
9 #define DMSrcSink_DEFINED 9 #define DMSrcSink_DEFINED
10 10
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 74
75 enum { kAnyThread_Enclave, kGPU_Enclave }; 75 enum { kAnyThread_Enclave, kGPU_Enclave };
76 static const int kNumEnclaves = kGPU_Enclave + 1; 76 static const int kNumEnclaves = kGPU_Enclave + 1;
77 77
78 /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~*/ 78 /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~*/
79 79
80 class GMSrc : public Src { 80 class GMSrc : public Src {
81 public: 81 public:
82 explicit GMSrc(skiagm::GMRegistry::Factory); 82 explicit GMSrc(skiagm::GMRegistry::Factory);
83 83
84 Error draw(SkCanvas*) const SK_OVERRIDE; 84 Error draw(SkCanvas*) const override;
85 SkISize size() const SK_OVERRIDE; 85 SkISize size() const override;
86 Name name() const SK_OVERRIDE; 86 Name name() const override;
87 private: 87 private:
88 skiagm::GMRegistry::Factory fFactory; 88 skiagm::GMRegistry::Factory fFactory;
89 }; 89 };
90 90
91 class CodecSrc : public Src { 91 class CodecSrc : public Src {
92 public: 92 public:
93 enum Mode { 93 enum Mode {
94 kNormal_Mode, 94 kNormal_Mode,
95 kScanline_Mode, 95 kScanline_Mode,
96 }; 96 };
97 CodecSrc(Path, Mode); 97 CodecSrc(Path, Mode);
98 98
99 Error draw(SkCanvas*) const SK_OVERRIDE; 99 Error draw(SkCanvas*) const override;
100 SkISize size() const SK_OVERRIDE; 100 SkISize size() const override;
101 Name name() const SK_OVERRIDE; 101 Name name() const override;
102 private: 102 private:
103 Path fPath; 103 Path fPath;
104 Mode fMode; 104 Mode fMode;
105 }; 105 };
106 106
107 107
108 class ImageSrc : public Src { 108 class ImageSrc : public Src {
109 public: 109 public:
110 // divisor == 0 means decode the whole image 110 // divisor == 0 means decode the whole image
111 // divisor > 0 means decode in subsets, dividing into a divisor x divisor gr id. 111 // divisor > 0 means decode in subsets, dividing into a divisor x divisor gr id.
112 explicit ImageSrc(Path path, int divisor = 0); 112 explicit ImageSrc(Path path, int divisor = 0);
113 113
114 Error draw(SkCanvas*) const SK_OVERRIDE; 114 Error draw(SkCanvas*) const override;
115 SkISize size() const SK_OVERRIDE; 115 SkISize size() const override;
116 Name name() const SK_OVERRIDE; 116 Name name() const override;
117 private: 117 private:
118 Path fPath; 118 Path fPath;
119 const int fDivisor; 119 const int fDivisor;
120 }; 120 };
121 121
122 class SKPSrc : public Src { 122 class SKPSrc : public Src {
123 public: 123 public:
124 explicit SKPSrc(Path path); 124 explicit SKPSrc(Path path);
125 125
126 Error draw(SkCanvas*) const SK_OVERRIDE; 126 Error draw(SkCanvas*) const override;
127 SkISize size() const SK_OVERRIDE; 127 SkISize size() const override;
128 Name name() const SK_OVERRIDE; 128 Name name() const override;
129 private: 129 private:
130 Path fPath; 130 Path fPath;
131 }; 131 };
132 132
133 /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~*/ 133 /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~*/
134 134
135 class NullSink : public Sink { 135 class NullSink : public Sink {
136 public: 136 public:
137 NullSink() {} 137 NullSink() {}
138 138
139 Error draw(const Src& src, SkBitmap*, SkWStream*, SkString*) const SK_OVERRI DE; 139 Error draw(const Src& src, SkBitmap*, SkWStream*, SkString*) const override;
140 int enclave() const SK_OVERRIDE { return kAnyThread_Enclave; } 140 int enclave() const override { return kAnyThread_Enclave; }
141 const char* fileExtension() const SK_OVERRIDE { return ""; } 141 const char* fileExtension() const override { return ""; }
142 }; 142 };
143 143
144 144
145 class GPUSink : public Sink { 145 class GPUSink : public Sink {
146 public: 146 public:
147 GPUSink(GrContextFactory::GLContextType, GrGLStandard, int samples, bool dfT ext, bool threaded); 147 GPUSink(GrContextFactory::GLContextType, GrGLStandard, int samples, bool dfT ext, bool threaded);
148 148
149 Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const SK_OVERRIDE; 149 Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override;
150 int enclave() const SK_OVERRIDE; 150 int enclave() const override;
151 const char* fileExtension() const SK_OVERRIDE { return "png"; } 151 const char* fileExtension() const override { return "png"; }
152 private: 152 private:
153 GrContextFactory::GLContextType fContextType; 153 GrContextFactory::GLContextType fContextType;
154 GrGLStandard fGpuAPI; 154 GrGLStandard fGpuAPI;
155 int fSampleCount; 155 int fSampleCount;
156 bool fUseDFText; 156 bool fUseDFText;
157 bool fThreaded; 157 bool fThreaded;
158 }; 158 };
159 159
160 class PDFSink : public Sink { 160 class PDFSink : public Sink {
161 public: 161 public:
162 PDFSink(); 162 PDFSink();
163 163
164 Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const SK_OVERRIDE; 164 Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override;
165 int enclave() const SK_OVERRIDE { return kAnyThread_Enclave; } 165 int enclave() const override { return kAnyThread_Enclave; }
166 const char* fileExtension() const SK_OVERRIDE { return "pdf"; } 166 const char* fileExtension() const override { return "pdf"; }
167 }; 167 };
168 168
169 class XPSSink : public Sink { 169 class XPSSink : public Sink {
170 public: 170 public:
171 XPSSink(); 171 XPSSink();
172 172
173 Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const SK_OVERRIDE; 173 Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override;
174 int enclave() const SK_OVERRIDE { return kAnyThread_Enclave; } 174 int enclave() const override { return kAnyThread_Enclave; }
175 const char* fileExtension() const SK_OVERRIDE { return "xps"; } 175 const char* fileExtension() const override { return "xps"; }
176 }; 176 };
177 177
178 class RasterSink : public Sink { 178 class RasterSink : public Sink {
179 public: 179 public:
180 explicit RasterSink(SkColorType); 180 explicit RasterSink(SkColorType);
181 181
182 Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const SK_OVERRIDE; 182 Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override;
183 int enclave() const SK_OVERRIDE { return kAnyThread_Enclave; } 183 int enclave() const override { return kAnyThread_Enclave; }
184 const char* fileExtension() const SK_OVERRIDE { return "png"; } 184 const char* fileExtension() const override { return "png"; }
185 private: 185 private:
186 SkColorType fColorType; 186 SkColorType fColorType;
187 }; 187 };
188 188
189 class SKPSink : public Sink { 189 class SKPSink : public Sink {
190 public: 190 public:
191 SKPSink(); 191 SKPSink();
192 192
193 Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const SK_OVERRIDE; 193 Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override;
194 int enclave() const SK_OVERRIDE { return kAnyThread_Enclave; } 194 int enclave() const override { return kAnyThread_Enclave; }
195 const char* fileExtension() const SK_OVERRIDE { return "skp"; } 195 const char* fileExtension() const override { return "skp"; }
196 }; 196 };
197 197
198 class SVGSink : public Sink { 198 class SVGSink : public Sink {
199 public: 199 public:
200 SVGSink(); 200 SVGSink();
201 201
202 Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const SK_OVERRIDE; 202 Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override;
203 int enclave() const SK_OVERRIDE { return kAnyThread_Enclave; } 203 int enclave() const override { return kAnyThread_Enclave; }
204 const char* fileExtension() const SK_OVERRIDE { return "svg"; } 204 const char* fileExtension() const override { return "svg"; }
205 }; 205 };
206 206
207 207
208 /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~*/ 208 /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~*/
209 209
210 class ViaMatrix : public Sink { 210 class ViaMatrix : public Sink {
211 public: 211 public:
212 ViaMatrix(SkMatrix, Sink*); 212 ViaMatrix(SkMatrix, Sink*);
213 213
214 Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const SK_OVERRIDE; 214 Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override;
215 int enclave() const SK_OVERRIDE { return fSink->enclave(); } 215 int enclave() const override { return fSink->enclave(); }
216 const char* fileExtension() const SK_OVERRIDE { return fSink->fileExtension( ); } 216 const char* fileExtension() const override { return fSink->fileExtension(); }
217 private: 217 private:
218 SkMatrix fMatrix; 218 SkMatrix fMatrix;
219 SkAutoTDelete<Sink> fSink; 219 SkAutoTDelete<Sink> fSink;
220 }; 220 };
221 221
222 class ViaUpright : public Sink { 222 class ViaUpright : public Sink {
223 public: 223 public:
224 ViaUpright(SkMatrix, Sink*); 224 ViaUpright(SkMatrix, Sink*);
225 225
226 Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const SK_OVERRIDE; 226 Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override;
227 int enclave() const SK_OVERRIDE { return fSink->enclave(); } 227 int enclave() const override { return fSink->enclave(); }
228 const char* fileExtension() const SK_OVERRIDE { return fSink->fileExtension( ); } 228 const char* fileExtension() const override { return fSink->fileExtension(); }
229 private: 229 private:
230 SkMatrix fMatrix; 230 SkMatrix fMatrix;
231 SkAutoTDelete<Sink> fSink; 231 SkAutoTDelete<Sink> fSink;
232 }; 232 };
233 233
234 class ViaPipe : public Sink { 234 class ViaPipe : public Sink {
235 public: 235 public:
236 explicit ViaPipe(Sink*); 236 explicit ViaPipe(Sink*);
237 237
238 Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const SK_OVERRIDE; 238 Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override;
239 int enclave() const SK_OVERRIDE { return fSink->enclave(); } 239 int enclave() const override { return fSink->enclave(); }
240 const char* fileExtension() const SK_OVERRIDE { return fSink->fileExtension( ); } 240 const char* fileExtension() const override { return fSink->fileExtension(); }
241 private: 241 private:
242 SkAutoTDelete<Sink> fSink; 242 SkAutoTDelete<Sink> fSink;
243 }; 243 };
244 244
245 class ViaSerialization : public Sink { 245 class ViaSerialization : public Sink {
246 public: 246 public:
247 explicit ViaSerialization(Sink*); 247 explicit ViaSerialization(Sink*);
248 248
249 Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const SK_OVERRIDE; 249 Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override;
250 int enclave() const SK_OVERRIDE { return fSink->enclave(); } 250 int enclave() const override { return fSink->enclave(); }
251 const char* fileExtension() const SK_OVERRIDE { return fSink->fileExtension( ); } 251 const char* fileExtension() const override { return fSink->fileExtension(); }
252 private: 252 private:
253 SkAutoTDelete<Sink> fSink; 253 SkAutoTDelete<Sink> fSink;
254 }; 254 };
255 255
256 class ViaTiles : public Sink { 256 class ViaTiles : public Sink {
257 public: 257 public:
258 ViaTiles(int w, int h, SkBBHFactory*, Sink*); 258 ViaTiles(int w, int h, SkBBHFactory*, Sink*);
259 259
260 Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const SK_OVERRIDE; 260 Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override;
261 int enclave() const SK_OVERRIDE { return fSink->enclave(); } 261 int enclave() const override { return fSink->enclave(); }
262 const char* fileExtension() const SK_OVERRIDE { return fSink->fileExtension( ); } 262 const char* fileExtension() const override { return fSink->fileExtension(); }
263 private: 263 private:
264 const int fW, fH; 264 const int fW, fH;
265 SkAutoTDelete<SkBBHFactory> fFactory; 265 SkAutoTDelete<SkBBHFactory> fFactory;
266 SkAutoTDelete<Sink> fSink; 266 SkAutoTDelete<Sink> fSink;
267 }; 267 };
268 268
269 } // namespace DM 269 } // namespace DM
270 270
271 #endif//DMSrcSink_DEFINED 271 #endif//DMSrcSink_DEFINED
OLDNEW
« no previous file with comments | « dm/DM.cpp ('k') | dm/DMSrcSink.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698