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

Side by Side Diff: src/effects/gradients/SkSweepGradient.cpp

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
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2012 Google Inc. 3 * Copyright 2012 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 #include "SkSweepGradient.h" 9 #include "SkSweepGradient.h"
10 10
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 public: 188 public:
189 189
190 GrGLSweepGradient(const GrProcessor&) {} 190 GrGLSweepGradient(const GrProcessor&) {}
191 virtual ~GrGLSweepGradient() { } 191 virtual ~GrGLSweepGradient() { }
192 192
193 virtual void emitCode(GrGLFPBuilder*, 193 virtual void emitCode(GrGLFPBuilder*,
194 const GrFragmentProcessor&, 194 const GrFragmentProcessor&,
195 const char* outputColor, 195 const char* outputColor,
196 const char* inputColor, 196 const char* inputColor,
197 const TransformedCoordsArray&, 197 const TransformedCoordsArray&,
198 const TextureSamplerArray&) SK_OVERRIDE; 198 const TextureSamplerArray&) override;
199 199
200 static void GenKey(const GrProcessor& processor, const GrGLCaps&, GrProcesso rKeyBuilder* b) { 200 static void GenKey(const GrProcessor& processor, const GrGLCaps&, GrProcesso rKeyBuilder* b) {
201 b->add32(GenBaseGradientKey(processor)); 201 b->add32(GenBaseGradientKey(processor));
202 } 202 }
203 203
204 private: 204 private:
205 205
206 typedef GrGLGradientEffect INHERITED; 206 typedef GrGLGradientEffect INHERITED;
207 207
208 }; 208 };
209 209
210 ///////////////////////////////////////////////////////////////////// 210 /////////////////////////////////////////////////////////////////////
211 211
212 class GrSweepGradient : public GrGradientEffect { 212 class GrSweepGradient : public GrGradientEffect {
213 public: 213 public:
214 static GrFragmentProcessor* Create(GrContext* ctx, const SkSweepGradient& sh ader, 214 static GrFragmentProcessor* Create(GrContext* ctx, const SkSweepGradient& sh ader,
215 const SkMatrix& m) { 215 const SkMatrix& m) {
216 return SkNEW_ARGS(GrSweepGradient, (ctx, shader, m)); 216 return SkNEW_ARGS(GrSweepGradient, (ctx, shader, m));
217 } 217 }
218 virtual ~GrSweepGradient() { } 218 virtual ~GrSweepGradient() { }
219 219
220 const char* name() const SK_OVERRIDE { return "Sweep Gradient"; } 220 const char* name() const override { return "Sweep Gradient"; }
221 221
222 virtual void getGLProcessorKey(const GrGLCaps& caps, 222 virtual void getGLProcessorKey(const GrGLCaps& caps,
223 GrProcessorKeyBuilder* b) const SK_OVERRIDE { 223 GrProcessorKeyBuilder* b) const override {
224 GrGLSweepGradient::GenKey(*this, caps, b); 224 GrGLSweepGradient::GenKey(*this, caps, b);
225 } 225 }
226 226
227 GrGLFragmentProcessor* createGLInstance() const SK_OVERRIDE { 227 GrGLFragmentProcessor* createGLInstance() const override {
228 return SkNEW_ARGS(GrGLSweepGradient, (*this)); 228 return SkNEW_ARGS(GrGLSweepGradient, (*this));
229 } 229 }
230 230
231 private: 231 private:
232 GrSweepGradient(GrContext* ctx, 232 GrSweepGradient(GrContext* ctx,
233 const SkSweepGradient& shader, 233 const SkSweepGradient& shader,
234 const SkMatrix& matrix) 234 const SkMatrix& matrix)
235 : INHERITED(ctx, shader, matrix, SkShader::kClamp_TileMode) { 235 : INHERITED(ctx, shader, matrix, SkShader::kClamp_TileMode) {
236 this->initClassID<GrSweepGradient>(); 236 this->initClassID<GrSweepGradient>();
237 } 237 }
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 str->appendScalar(fCenter.fX); 337 str->appendScalar(fCenter.fX);
338 str->append(", "); 338 str->append(", ");
339 str->appendScalar(fCenter.fY); 339 str->appendScalar(fCenter.fY);
340 str->append(") "); 340 str->append(") ");
341 341
342 this->INHERITED::toString(str); 342 this->INHERITED::toString(str);
343 343
344 str->append(")"); 344 str->append(")");
345 } 345 }
346 #endif 346 #endif
OLDNEW
« no previous file with comments | « src/effects/gradients/SkSweepGradient.h ('k') | src/effects/gradients/SkTwoPointConicalGradient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698