From: mtklein Date: Thu, 26 Mar 2015 01:17:31 +0000 (-0700) Subject: C++11 override should now be supported by all of {bots,Chrome,Android,Mozilla} X-Git-Tag: submit/tizen/20180928.044319~3027 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=36352bf5e38f45a70ee4f4fc132a38048d38206d;p=platform%2Fupstream%2FlibSkiaSharp.git C++11 override should now be supported by all of {bots,Chrome,Android,Mozilla} NOPRESUBMIT=true BUG=skia: DOCS_PREVIEW= https://skia.org/?cl=1037793002 Review URL: https://codereview.chromium.org/1037793002 --- diff --git a/Doxyfile b/Doxyfile index 3497e271f8..28dd00ea95 100644 --- a/Doxyfile +++ b/Doxyfile @@ -39,9 +39,9 @@ CLASS_DIAGRAMS = YES # CLASS_GRAPH = YES # COLLABORATION_GRAPH = YES # UML_LOOK = YES -# GRAPHICAL_HIERARCHY = YES +# GRAPHICAL_HIERARCHY = YES -# Make SkDEBUGCODE disappear, but not SK_OVERRIDE. +# Make SkDEBUGCODE disappear. ENABLE_PREPROCESSING = YES MACRO_EXPANSION = YES EXPAND_ONLY_PREDEF = YES diff --git a/bench/AlternatingColorPatternBench.cpp b/bench/AlternatingColorPatternBench.cpp index 3d812aa65a..7744d72e5f 100644 --- a/bench/AlternatingColorPatternBench.cpp +++ b/bench/AlternatingColorPatternBench.cpp @@ -108,7 +108,7 @@ public: } protected: - const char* onGetName() SK_OVERRIDE { + const char* onGetName() override { return fName.c_str(); } @@ -146,7 +146,7 @@ protected: } } - void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE { + void onDraw(const int loops, SkCanvas* canvas) override { SkPaint paint; paint.setAntiAlias(false); paint.setFilterQuality(kLow_SkFilterQuality); diff --git a/bench/BigPathBench.cpp b/bench/BigPathBench.cpp index c46296e159..f18e3de077 100644 --- a/bench/BigPathBench.cpp +++ b/bench/BigPathBench.cpp @@ -38,19 +38,19 @@ public: } protected: - const char* onGetName() SK_OVERRIDE { + const char* onGetName() override { return fName.c_str(); } - SkIPoint onGetSize() SK_OVERRIDE { + SkIPoint onGetSize() override { return SkIPoint::Make(640, 100); } - void onPreDraw() SK_OVERRIDE { + void onPreDraw() override { make_path(fPath); } - void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE { + void onDraw(const int loops, SkCanvas* canvas) override { SkPaint paint; paint.setAntiAlias(true); paint.setStyle(SkPaint::kStroke_Style); diff --git a/bench/BitmapBench.cpp b/bench/BitmapBench.cpp index 1ac1992ab6..6220247c8d 100644 --- a/bench/BitmapBench.cpp +++ b/bench/BitmapBench.cpp @@ -247,7 +247,7 @@ protected: INHERITED::onDraw(loops, canvas); } - void setupPaint(SkPaint* paint) SK_OVERRIDE { + void setupPaint(SkPaint* paint) override { this->INHERITED::setupPaint(paint); int index = 0; @@ -303,7 +303,7 @@ protected: return fFullName.c_str(); } - void onDrawIntoBitmap(const SkBitmap& bm) SK_OVERRIDE { + void onDrawIntoBitmap(const SkBitmap& bm) override { const int w = bm.width(); const int h = bm.height(); diff --git a/bench/BitmapRectBench.cpp b/bench/BitmapRectBench.cpp index e2c2e345fc..d3a7574e04 100644 --- a/bench/BitmapRectBench.cpp +++ b/bench/BitmapRectBench.cpp @@ -59,7 +59,7 @@ public: } protected: - const char* onGetName() SK_OVERRIDE { + const char* onGetName() override { fName.printf("bitmaprect_%02X_%sfilter_%s", fAlpha, kNone_SkFilterQuality == fFilterQuality ? "no" : "", @@ -67,7 +67,7 @@ protected: return fName.c_str(); } - void onPreDraw() SK_OVERRIDE { + void onPreDraw() override { fBitmap.allocPixels(); fBitmap.setAlphaType(kOpaque_SkAlphaType); fBitmap.eraseColor(SK_ColorBLACK); @@ -87,7 +87,7 @@ protected: } - void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE { + void onDraw(const int loops, SkCanvas* canvas) override { SkRandom rand; SkPaint paint; diff --git a/bench/BitmapScaleBench.cpp b/bench/BitmapScaleBench.cpp index 5bd5b522d9..f71e10ff6a 100644 --- a/bench/BitmapScaleBench.cpp +++ b/bench/BitmapScaleBench.cpp @@ -48,7 +48,7 @@ protected: return float(outputSize())/inputSize(); } - SkIPoint onGetSize() SK_OVERRIDE { + SkIPoint onGetSize() override { return SkIPoint::Make( fOutputSize, fOutputSize ); } @@ -88,7 +88,7 @@ class BitmapFilterScaleBench: public BitmapScaleBench { setName( "filter" ); } protected: - void doScaleImage() SK_OVERRIDE { + void doScaleImage() override { SkCanvas canvas( fOutputBitmap ); SkPaint paint; diff --git a/bench/BlurImageFilterBench.cpp b/bench/BlurImageFilterBench.cpp index 68d0e6c574..476f192ef8 100644 --- a/bench/BlurImageFilterBench.cpp +++ b/bench/BlurImageFilterBench.cpp @@ -31,18 +31,18 @@ public: } protected: - const char* onGetName() SK_OVERRIDE { + const char* onGetName() override { return fName.c_str(); } - void onPreDraw() SK_OVERRIDE { + void onPreDraw() override { if (!fInitialized) { make_checkerboard(); fInitialized = true; } } - void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE { + void onDraw(const int loops, SkCanvas* canvas) override { SkPaint paint; paint.setImageFilter(SkBlurImageFilter::Create(fSigmaX, fSigmaY))->unref(); diff --git a/bench/BlurRectBench.cpp b/bench/BlurRectBench.cpp index 66aff22073..8f8a2de25b 100644 --- a/bench/BlurRectBench.cpp +++ b/bench/BlurRectBench.cpp @@ -88,7 +88,7 @@ class BlurRectDirectBench: public BlurRectBench { this->setName(name); } protected: - void makeBlurryRect(const SkRect& r) SK_OVERRIDE { + void makeBlurryRect(const SkRect& r) override { SkMask mask; SkBlurMask::BlurRect(SkBlurMask::ConvertRadiusToSigma(this->radius()), &mask, r, kNormal_SkBlurStyle); @@ -110,7 +110,7 @@ public: } protected: - void preBenchSetup(const SkRect& r) SK_OVERRIDE { + void preBenchSetup(const SkRect& r) override { SkMask::FreeImage(fSrcMask.fImage); r.roundOut(&fSrcMask.fBounds); @@ -142,7 +142,7 @@ public: protected: - void makeBlurryRect(const SkRect&) SK_OVERRIDE { + void makeBlurryRect(const SkRect&) override { SkMask mask; mask.fImage = NULL; SkBlurMask::BoxBlur(&mask, fSrcMask, SkBlurMask::ConvertRadiusToSigma(this->radius()), @@ -169,7 +169,7 @@ public: protected: - void makeBlurryRect(const SkRect&) SK_OVERRIDE { + void makeBlurryRect(const SkRect&) override { SkMask mask; mask.fImage = NULL; SkBlurMask::BlurGroundTruth(SkBlurMask::ConvertRadiusToSigma(this->radius()), diff --git a/bench/BlurRectsBench.cpp b/bench/BlurRectsBench.cpp index 553cf6b398..83847713ee 100644 --- a/bench/BlurRectsBench.cpp +++ b/bench/BlurRectsBench.cpp @@ -21,7 +21,7 @@ public: fInner = inner; } - const char* onGetName() SK_OVERRIDE { + const char* onGetName() override { return fName.c_str(); } @@ -29,7 +29,7 @@ public: fName = name; } - void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE { + void onDraw(const int loops, SkCanvas* canvas) override { SkPaint paint; paint.setMaskFilter(SkBlurMaskFilter::Create(kNormal_SkBlurStyle, fRadius))->unref(); diff --git a/bench/BlurRoundRectBench.cpp b/bench/BlurRoundRectBench.cpp index 7ec89b8690..9f1e143862 100644 --- a/bench/BlurRoundRectBench.cpp +++ b/bench/BlurRoundRectBench.cpp @@ -30,16 +30,16 @@ public: fRRect.setRectXY(r, SkIntToScalar(cornerRadius), SkIntToScalar(cornerRadius)); } - const char* onGetName() SK_OVERRIDE { + const char* onGetName() override { return fName.c_str(); } - SkIPoint onGetSize() SK_OVERRIDE { + SkIPoint onGetSize() override { return SkIPoint::Make(SkScalarCeilToInt(fRRect.rect().width()), SkScalarCeilToInt(fRRect.rect().height())); } - void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE { + void onDraw(const int loops, SkCanvas* canvas) override { SkLayerDrawLooper::Builder looperBuilder; { SkLayerDrawLooper::LayerInfo info; diff --git a/bench/ChartBench.cpp b/bench/ChartBench.cpp index 175e1ddfd3..0cc02b0a86 100644 --- a/bench/ChartBench.cpp +++ b/bench/ChartBench.cpp @@ -94,7 +94,7 @@ public: } protected: - const char* onGetName() SK_OVERRIDE { + const char* onGetName() override { if (fAA) { return "chart_aa"; } else { @@ -102,7 +102,7 @@ protected: } } - void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE { + void onDraw(const int loops, SkCanvas* canvas) override { bool sizeChanged = false; if (canvas->getDeviceSize() != fSize) { fSize = canvas->getDeviceSize(); diff --git a/bench/ChecksumBench.cpp b/bench/ChecksumBench.cpp index 661f9e676c..9dd87c3481 100644 --- a/bench/ChecksumBench.cpp +++ b/bench/ChecksumBench.cpp @@ -35,7 +35,7 @@ public: } } - bool isSuitableFor(Backend backend) SK_OVERRIDE { + bool isSuitableFor(Backend backend) override { return backend == kNonRendering_Backend; } diff --git a/bench/CmapBench.cpp b/bench/CmapBench.cpp index ca0b25d282..10591ed410 100644 --- a/bench/CmapBench.cpp +++ b/bench/CmapBench.cpp @@ -81,11 +81,11 @@ public: } protected: - const char* onGetName() SK_OVERRIDE { + const char* onGetName() override { return fName.c_str(); } - void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE { + void onDraw(const int loops, SkCanvas* canvas) override { fProc(loops, fPaint, fText, sizeof(fText), NGLYPHS); } diff --git a/bench/ColorCubeBench.cpp b/bench/ColorCubeBench.cpp index 0d1e589d59..9326a123c3 100644 --- a/bench/ColorCubeBench.cpp +++ b/bench/ColorCubeBench.cpp @@ -27,22 +27,22 @@ public: } protected: - const char* onGetName() SK_OVERRIDE { + const char* onGetName() override { return "colorcube"; } - void onPreDraw() SK_OVERRIDE { + void onPreDraw() override { if (!SkToBool(fCubeData)) { this->makeCubeData(); this->make_bitmap(); } } - void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE { + void onDraw(const int loops, SkCanvas* canvas) override { this->test(loops, canvas); } - SkIPoint onGetSize() SK_OVERRIDE { + SkIPoint onGetSize() override { return SkIPoint::Make(fSize.width(), fSize.height()); } diff --git a/bench/ColorFilterBench.cpp b/bench/ColorFilterBench.cpp index b8cfbc3a80..04803b57b3 100644 --- a/bench/ColorFilterBench.cpp +++ b/bench/ColorFilterBench.cpp @@ -68,11 +68,11 @@ public: } protected: - const char* onGetName() SK_OVERRIDE { + const char* onGetName() override { return isSmall() ? "colorfilter_dim_bright_small" : "colorfilter_dim_bright_large"; } - void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE { + void onDraw(const int loops, SkCanvas* canvas) override { SkRect r = getFilterRect(); SkPaint paint; paint.setColor(SK_ColorRED); @@ -98,11 +98,11 @@ public: } protected: - const char* onGetName() SK_OVERRIDE { + const char* onGetName() override { return isSmall() ? "colorfilter_bright_gray_small" : "colorfilter_bright_gray_large"; } - void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE { + void onDraw(const int loops, SkCanvas* canvas) override { SkRect r = getFilterRect(); SkPaint paint; paint.setColor(SK_ColorRED); @@ -125,11 +125,11 @@ public: } protected: - const char* onGetName() SK_OVERRIDE { + const char* onGetName() override { return isSmall() ? "colorfilter_gray_bright_small" : "colorfilter_gray_bright_large"; } - void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE { + void onDraw(const int loops, SkCanvas* canvas) override { SkRect r = getFilterRect(); SkPaint paint; paint.setColor(SK_ColorRED); @@ -152,11 +152,11 @@ public: } protected: - const char* onGetName() SK_OVERRIDE { + const char* onGetName() override { return isSmall() ? "colorfilter_blue_bright_small" : "colorfilter_blue_bright_large"; } - void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE { + void onDraw(const int loops, SkCanvas* canvas) override { SkRect r = getFilterRect(); SkPaint paint; paint.setColor(SK_ColorRED); @@ -179,11 +179,11 @@ public: } protected: - const char* onGetName() SK_OVERRIDE { + const char* onGetName() override { return isSmall() ? "colorfilter_bright_blue_small" : "colorfilter_bright_blue_large"; } - void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE { + void onDraw(const int loops, SkCanvas* canvas) override { SkRect r = getFilterRect(); SkPaint paint; paint.setColor(SK_ColorRED); @@ -206,11 +206,11 @@ public: } protected: - const char* onGetName() SK_OVERRIDE { + const char* onGetName() override { return isSmall() ? "colorfilter_bright_small" : "colorfilter_bright_large"; } - void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE { + void onDraw(const int loops, SkCanvas* canvas) override { SkRect r = getFilterRect(); SkPaint paint; paint.setColor(SK_ColorRED); @@ -232,11 +232,11 @@ public: } protected: - const char* onGetName() SK_OVERRIDE { + const char* onGetName() override { return isSmall() ? "colorfilter_blue_small" : "colorfilter_blue_large"; } - void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE { + void onDraw(const int loops, SkCanvas* canvas) override { SkRect r = getFilterRect(); SkPaint paint; paint.setColor(SK_ColorRED); @@ -258,11 +258,11 @@ public: } protected: - const char* onGetName() SK_OVERRIDE { + const char* onGetName() override { return isSmall() ? "colorfilter_gray_small" : "colorfilter_gray_large"; } - void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE { + void onDraw(const int loops, SkCanvas* canvas) override { SkRect r = getFilterRect(); SkPaint paint; paint.setColor(SK_ColorRED); @@ -284,11 +284,11 @@ public: } protected: - const char* onGetName() SK_OVERRIDE { + const char* onGetName() override { return isSmall() ? "table_colorfilter_small" : "table_colorfilter_large"; } - void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE { + void onDraw(const int loops, SkCanvas* canvas) override { SkRect r = getFilterRect(); SkPaint paint; paint.setColor(SK_ColorRED); @@ -322,11 +322,11 @@ public: } protected: - const char* onGetName() SK_OVERRIDE { + const char* onGetName() override { return isSmall() ? "luma_colorfilter_small" : "luma_colorfilter_large"; } - void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE { + void onDraw(const int loops, SkCanvas* canvas) override { SkRect r = getFilterRect(); SkPaint paint; paint.setColor(SK_ColorRED); diff --git a/bench/ColorPrivBench.cpp b/bench/ColorPrivBench.cpp index 4d04e89708..e6c68b5909 100644 --- a/bench/ColorPrivBench.cpp +++ b/bench/ColorPrivBench.cpp @@ -12,13 +12,13 @@ public: fName.append(kScale ? "_255" : "_256"); } - bool isSuitableFor(Backend backend) SK_OVERRIDE { + bool isSuitableFor(Backend backend) override { return backend == kNonRendering_Backend; } - const char* onGetName() SK_OVERRIDE { return fName.c_str(); } + const char* onGetName() override { return fName.c_str(); } - void onPreDraw() SK_OVERRIDE { + void onPreDraw() override { // A handful of random srcs and dsts. SkRandom rand; for (int i = 0; i < kInputs; i++) { @@ -33,7 +33,7 @@ public: if (kScale) fScales[256] = 255; // We'll just do 255 twice if we're limited to [0,255]. } - void onDraw(const int loops, SkCanvas*) SK_OVERRIDE { + void onDraw(const int loops, SkCanvas*) override { // We xor results of FourByteInterp into junk to make sure the function runs. volatile SkPMColor junk = 0; diff --git a/bench/CoverageBench.cpp b/bench/CoverageBench.cpp index 097a9e1b28..96eafaaace 100644 --- a/bench/CoverageBench.cpp +++ b/bench/CoverageBench.cpp @@ -44,11 +44,11 @@ public: } protected: - const char* onGetName() SK_OVERRIDE { + const char* onGetName() override { return fName.c_str(); } - void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE { + void onDraw(const int loops, SkCanvas* canvas) override { if (fDrawCoverage) { for (int i = 0; i < loops; ++i) { fDraw.drawPathCoverage(fPath, fPaint); diff --git a/bench/DashBench.cpp b/bench/DashBench.cpp index 5f209698de..17a9234926 100644 --- a/bench/DashBench.cpp +++ b/bench/DashBench.cpp @@ -57,11 +57,11 @@ public: } protected: - const char* onGetName() SK_OVERRIDE { + const char* onGetName() override { return fName.c_str(); } - void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE { + void onDraw(const int loops, SkCanvas* canvas) override { SkPaint paint; this->setupPaint(&paint); paint.setStyle(SkPaint::kStroke_Style); @@ -106,7 +106,7 @@ public: protected: virtual void handlePath(SkCanvas* canvas, const SkPath& path, - const SkPaint& paint, int N) SK_OVERRIDE { + const SkPaint& paint, int N) override { SkPoint pts[2]; if (!path.isLine(pts) || pts[0].fY != pts[1].fY) { this->INHERITED::handlePath(canvas, path, paint, N); @@ -190,11 +190,11 @@ public: } protected: - const char* onGetName() SK_OVERRIDE { + const char* onGetName() override { return fName.c_str(); } - void onDraw(const int loops, SkCanvas*) SK_OVERRIDE { + void onDraw(const int loops, SkCanvas*) override { SkPath dst; for (int i = 0; i < loops; ++i) { SkStrokeRec rec(SkStrokeRec::kHairline_InitStyle); @@ -228,11 +228,11 @@ public: } protected: - const char* onGetName() SK_OVERRIDE { + const char* onGetName() override { return fName.c_str(); } - void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE { + void onDraw(const int loops, SkCanvas* canvas) override { SkPaint paint; this->setupPaint(&paint); paint.setStrokeWidth(fStrokeWidth); @@ -267,11 +267,11 @@ public: } protected: - const char* onGetName() SK_OVERRIDE { + const char* onGetName() override { return fName.c_str(); } - void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE { + void onDraw(const int loops, SkCanvas* canvas) override { SkPaint p; this->setupPaint(&p); p.setColor(SK_ColorBLACK); @@ -353,11 +353,11 @@ public: } protected: - const char* onGetName() SK_OVERRIDE { + const char* onGetName() override { return fName.c_str(); } - void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE { + void onDraw(const int loops, SkCanvas* canvas) override { SkPaint p; this->setupPaint(&p); p.setStyle(SkPaint::kStroke_Style); @@ -393,11 +393,11 @@ public: } protected: - const char* onGetName() SK_OVERRIDE { + const char* onGetName() override { return fName.c_str(); } - void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE { + void onDraw(const int loops, SkCanvas* canvas) override { SkPaint p; this->setupPaint(&p); p.setColor(SK_ColorBLACK); diff --git a/bench/DecodingBench.h b/bench/DecodingBench.h index b41941b84f..80a474df32 100644 --- a/bench/DecodingBench.h +++ b/bench/DecodingBench.h @@ -22,9 +22,9 @@ public: DecodingBench(SkString path, SkColorType colorType); protected: - const char* onGetName() SK_OVERRIDE; - bool isSuitableFor(Backend backend) SK_OVERRIDE; - void onDraw(const int n, SkCanvas* canvas) SK_OVERRIDE; + const char* onGetName() override; + bool isSuitableFor(Backend backend) override; + void onDraw(const int n, SkCanvas* canvas) override; private: SkString fName; diff --git a/bench/DecodingSubsetBench.h b/bench/DecodingSubsetBench.h index 8034c8fb74..4941aa10c1 100644 --- a/bench/DecodingSubsetBench.h +++ b/bench/DecodingSubsetBench.h @@ -23,9 +23,9 @@ public: const int divisor); protected: - const char* onGetName() SK_OVERRIDE; - bool isSuitableFor(Backend backend) SK_OVERRIDE; - void onDraw(const int n, SkCanvas* canvas) SK_OVERRIDE; + const char* onGetName() override; + bool isSuitableFor(Backend backend) override; + void onDraw(const int n, SkCanvas* canvas) override; private: SkString fName; diff --git a/bench/DeferredSurfaceCopyBench.cpp b/bench/DeferredSurfaceCopyBench.cpp index e0bf8e7a78..3644627d31 100644 --- a/bench/DeferredSurfaceCopyBench.cpp +++ b/bench/DeferredSurfaceCopyBench.cpp @@ -26,12 +26,12 @@ public: } protected: - const char* onGetName() SK_OVERRIDE { + const char* onGetName() override { return fDiscardableContents ? "DeferredSurfaceCopy_discardable" : "DeferredSurfaceCopy_nonDiscardable"; } - void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE { + void onDraw(const int loops, SkCanvas* canvas) override { // The canvas is not actually used for this test except to provide // configuration information: gpu, multisampling, size, etc? SkImageInfo info = SkImageInfo::MakeN32Premul(kSurfaceWidth, kSurfaceHeight); diff --git a/bench/DisplacementBench.cpp b/bench/DisplacementBench.cpp index 2f9a69e0f8..b9070cb9e0 100644 --- a/bench/DisplacementBench.cpp +++ b/bench/DisplacementBench.cpp @@ -22,7 +22,7 @@ public: } protected: - void onPreDraw() SK_OVERRIDE { + void onPreDraw() override { if (!fInitialized) { this->makeBitmap(); this->makeCheckerboard(); @@ -91,11 +91,11 @@ public: } protected: - const char* onGetName() SK_OVERRIDE { + const char* onGetName() override { return this->isSmall() ? "displacement_zero_small" : "displacement_zero_large"; } - void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE { + void onDraw(const int loops, SkCanvas* canvas) override { SkPaint paint; SkAutoTUnref displ(SkBitmapSource::Create(fCheckerboard)); // No displacement effect @@ -118,11 +118,11 @@ public: } protected: - const char* onGetName() SK_OVERRIDE { + const char* onGetName() override { return isSmall() ? "displacement_alpha_small" : "displacement_alpha_large"; } - void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE { + void onDraw(const int loops, SkCanvas* canvas) override { SkPaint paint; SkAutoTUnref displ(SkBitmapSource::Create(fCheckerboard)); // Displacement, with 1 alpha component (which isn't pre-multiplied) @@ -144,11 +144,11 @@ public: } protected: - const char* onGetName() SK_OVERRIDE { + const char* onGetName() override { return isSmall() ? "displacement_full_small" : "displacement_full_large"; } - void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE { + void onDraw(const int loops, SkCanvas* canvas) override { SkPaint paint; SkAutoTUnref displ(SkBitmapSource::Create(fCheckerboard)); // Displacement, with 2 non-alpha components diff --git a/bench/ETCBitmapBench.cpp b/bench/ETCBitmapBench.cpp index 351b0ea09f..1cc61e6157 100644 --- a/bench/ETCBitmapBench.cpp +++ b/bench/ETCBitmapBench.cpp @@ -122,12 +122,12 @@ public: ETCBitmapBench(bool decompress, Backend backend) : fDecompress(decompress), fBackend(backend) { } - bool isSuitableFor(Backend backend) SK_OVERRIDE { + bool isSuitableFor(Backend backend) override { return backend == this->fBackend; } protected: - const char* onGetName() SK_OVERRIDE { + const char* onGetName() override { if (kGPU_Backend == this->fBackend) { if (this->fDecompress) { return "etc1bitmap_render_gpu_decompressed"; @@ -144,7 +144,7 @@ protected: } } - void onPreDraw() SK_OVERRIDE { + void onPreDraw() override { if (NULL == fPKMData) { SkDebugf("Failed to load PKM data!\n"); return; @@ -162,7 +162,7 @@ protected: } } - void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE { + void onDraw(const int loops, SkCanvas* canvas) override { for (int i = 0; i < loops; ++i) { canvas->drawBitmap(this->fBitmap, 0, 0, NULL); } @@ -187,7 +187,7 @@ public: : ETCBitmapBench(decompress, backend) { } protected: - const char* onGetName() SK_OVERRIDE { + const char* onGetName() override { if (kGPU_Backend == this->backend()) { if (this->decompress()) { return "etc1bitmap_upload_gpu_decompressed"; @@ -204,7 +204,7 @@ protected: } } - void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE { + void onDraw(const int loops, SkCanvas* canvas) override { SkPixelRef* pr = fBitmap.pixelRef(); for (int i = 0; i < loops; ++i) { if (pr) { diff --git a/bench/FSRectBench.cpp b/bench/FSRectBench.cpp index af99015a29..914b5b6688 100644 --- a/bench/FSRectBench.cpp +++ b/bench/FSRectBench.cpp @@ -20,9 +20,9 @@ public: FSRectBench() : fInit(false) { } protected: - const char* onGetName() SK_OVERRIDE { return "fullscreen_rects"; } + const char* onGetName() override { return "fullscreen_rects"; } - void onPreDraw() SK_OVERRIDE { + void onPreDraw() override { if (!fInit) { SkRandom rand; static const SkScalar kMinOffset = 0; @@ -39,7 +39,7 @@ protected: } } - void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE { + void onDraw(const int loops, SkCanvas* canvas) override { SkPaint paint; for (int i = 0; i < loops; ++i) { paint.setColor(fColors[i % N]); diff --git a/bench/FontCacheBench.cpp b/bench/FontCacheBench.cpp index 3bff0637d4..304d8d3c88 100644 --- a/bench/FontCacheBench.cpp +++ b/bench/FontCacheBench.cpp @@ -28,11 +28,11 @@ public: FontCacheBench() {} protected: - const char* onGetName() SK_OVERRIDE { + const char* onGetName() override { return "fontcache"; } - void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE { + void onDraw(const int loops, SkCanvas* canvas) override { SkPaint paint; this->setupPaint(&paint); paint.setTextEncoding(SkPaint::kGlyphID_TextEncoding); @@ -104,11 +104,11 @@ public: } protected: - const char* onGetName() SK_OVERRIDE { + const char* onGetName() override { return "fontefficiency"; } - void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE { + void onDraw(const int loops, SkCanvas* canvas) override { static bool gDone; if (gDone) { return; diff --git a/bench/GMBench.h b/bench/GMBench.h index 43ca9812a1..82ca3c9c71 100644 --- a/bench/GMBench.h +++ b/bench/GMBench.h @@ -21,10 +21,10 @@ public: virtual ~GMBench(); protected: - const char* onGetName() SK_OVERRIDE; - bool isSuitableFor(Backend backend) SK_OVERRIDE; - void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE; - SkIPoint onGetSize() SK_OVERRIDE; + const char* onGetName() override; + bool isSuitableFor(Backend backend) override; + void onDraw(const int loops, SkCanvas* canvas) override; + SkIPoint onGetSize() override; private: skiagm::GM* fGM; diff --git a/bench/GameBench.cpp b/bench/GameBench.cpp index eb1d9b909a..d9a397e190 100644 --- a/bench/GameBench.cpp +++ b/bench/GameBench.cpp @@ -74,11 +74,11 @@ public: } protected: - const char* onGetName() SK_OVERRIDE { + const char* onGetName() override { return fName.c_str(); } - void onPreDraw() SK_OVERRIDE { + void onPreDraw() override { if (!fInitialized) { this->makeCheckerboard(); this->makeAtlas(); @@ -86,7 +86,7 @@ protected: } } - void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE { + void onDraw(const int loops, SkCanvas* canvas) override { SkRandom scaleRand; SkRandom transRand; SkRandom rotRand; diff --git a/bench/GeometryBench.cpp b/bench/GeometryBench.cpp index 9178aa4b51..501c7b8262 100644 --- a/bench/GeometryBench.cpp +++ b/bench/GeometryBench.cpp @@ -16,11 +16,11 @@ public: fName.printf("geo_%s", suffix); } - const char* onGetName() SK_OVERRIDE { + const char* onGetName() override { return fName.c_str(); } - bool isSuitableFor(Backend backend) SK_OVERRIDE { + bool isSuitableFor(Backend backend) override { return kNonRendering_Backend == backend; } @@ -65,7 +65,7 @@ public: GeoRectBench_intersect() : GeoRectBench("rect_intersect") {} protected: - void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE { + void onDraw(const int loops, SkCanvas* canvas) override { for (int outer = 0; outer < loops; ++outer) { int count = 0; for (size_t i = 0; i < SK_ARRAY_COUNT(fRects); ++i) { @@ -82,7 +82,7 @@ public: GeoRectBench_intersect_rect() : GeoRectBench("rect_intersect_rect") {} protected: - void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE { + void onDraw(const int loops, SkCanvas* canvas) override { for (int outer = 0; outer < loops; ++outer) { int count = 0; SkRect r; @@ -99,7 +99,7 @@ public: GeoRectBench_Intersects() : GeoRectBench("rect_Intersects") {} protected: - void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE { + void onDraw(const int loops, SkCanvas* canvas) override { for (int outer = 0; outer < loops; ++outer) { int count = 0; for (size_t i = 0; i < SK_ARRAY_COUNT(fRects); ++i) { @@ -115,7 +115,7 @@ public: GeoRectBench_sort() : GeoRectBench("rect_sort") {} protected: - void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE { + void onDraw(const int loops, SkCanvas* canvas) override { for (int outer = 0; outer < loops; ++outer) { for (size_t i = 0; i < SK_ARRAY_COUNT(fRects); ++i) { fRects[i].sort(); @@ -148,7 +148,7 @@ class EvalQuadAt0 : public QuadBenchBase { public: EvalQuadAt0() : QuadBenchBase("evalquadat0") {} protected: - void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE { + void onDraw(const int loops, SkCanvas* canvas) override { SkPoint result; for (int outer = 0; outer < loops; ++outer) { SkEvalQuadAt(fPts, 0.5f, &result); @@ -164,7 +164,7 @@ class EvalQuadAt1 : public QuadBenchBase { public: EvalQuadAt1() : QuadBenchBase("evalquadat1") {} protected: - void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE { + void onDraw(const int loops, SkCanvas* canvas) override { SkPoint result; for (int outer = 0; outer < loops; ++outer) { result = SkEvalQuadAt(fPts, 0.5f); @@ -182,7 +182,7 @@ class EvalQuadTangentAt0 : public QuadBenchBase { public: EvalQuadTangentAt0() : QuadBenchBase("evalquadtangentat0") {} protected: - void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE { + void onDraw(const int loops, SkCanvas* canvas) override { SkPoint result; for (int outer = 0; outer < loops; ++outer) { SkEvalQuadAt(fPts, 0.5f, NULL, &result); @@ -198,7 +198,7 @@ class EvalQuadTangentAt1 : public QuadBenchBase { public: EvalQuadTangentAt1() : QuadBenchBase("evalquadtangentat1") {} protected: - void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE { + void onDraw(const int loops, SkCanvas* canvas) override { SkPoint result; for (int outer = 0; outer < loops; ++outer) { result = SkEvalQuadTangentAt(fPts, 0.5f); @@ -216,7 +216,7 @@ class ChopQuadAt0 : public QuadBenchBase { public: ChopQuadAt0() : QuadBenchBase("chopquadat0") {} protected: - void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE { + void onDraw(const int loops, SkCanvas* canvas) override { SkPoint dst[5]; for (int outer = 0; outer < loops; ++outer) { SkChopQuadAt(fPts, dst, 0.5f); @@ -232,7 +232,7 @@ class ChopQuadAt1 : public QuadBenchBase { public: ChopQuadAt1() : QuadBenchBase("chopquadat1") {} protected: - void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE { + void onDraw(const int loops, SkCanvas* canvas) override { SkPoint dst[5]; for (int outer = 0; outer < loops; ++outer) { SkChopQuadAt2(fPts, dst, 0.5f); @@ -248,7 +248,7 @@ class ChopCubicAt0 : public QuadBenchBase { public: ChopCubicAt0() : QuadBenchBase("chopcubicat0") {} protected: - void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE { + void onDraw(const int loops, SkCanvas* canvas) override { SkPoint dst[7]; for (int outer = 0; outer < loops; ++outer) { SkChopCubicAt(fPts, dst, 0.5f); @@ -264,7 +264,7 @@ class ChopCubicAt1 : public QuadBenchBase { public: ChopCubicAt1() : QuadBenchBase("chopcubicat1") {} protected: - void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE { + void onDraw(const int loops, SkCanvas* canvas) override { SkPoint dst[7]; for (int outer = 0; outer < loops; ++outer) { SkChopCubicAt2(fPts, dst, 0.5f); diff --git a/bench/GrMemoryPoolBench.cpp b/bench/GrMemoryPoolBench.cpp index 320ff00f14..55690a4323 100644 --- a/bench/GrMemoryPoolBench.cpp +++ b/bench/GrMemoryPoolBench.cpp @@ -32,7 +32,7 @@ GrMemoryPool A::gBenchPool(10 * (1 << 10), 10 * (1 << 10)); */ class GrMemoryPoolBenchStack : public Benchmark { public: - bool isSuitableFor(Backend backend) SK_OVERRIDE { + bool isSuitableFor(Backend backend) override { return backend == kNonRendering_Backend; } @@ -94,7 +94,7 @@ GrMemoryPool B::gBenchPool(10 * (1 << 10), 10 * (1 << 10)); */ class GrMemoryPoolBenchRandom : public Benchmark { public: - bool isSuitableFor(Backend backend) SK_OVERRIDE { + bool isSuitableFor(Backend backend) override { return backend == kNonRendering_Backend; } @@ -142,7 +142,7 @@ class GrMemoryPoolBenchQueue : public Benchmark { M = 4 * (1 << 10), }; public: - bool isSuitableFor(Backend backend) SK_OVERRIDE { + bool isSuitableFor(Backend backend) override { return backend == kNonRendering_Backend; } diff --git a/bench/GrOrderedSetBench.cpp b/bench/GrOrderedSetBench.cpp index 280ed2cc35..f532a83b36 100644 --- a/bench/GrOrderedSetBench.cpp +++ b/bench/GrOrderedSetBench.cpp @@ -21,25 +21,25 @@ public: fName.append("ordered_set_build"); } - bool isSuitableFor(Backend backend) SK_OVERRIDE { + bool isSuitableFor(Backend backend) override { return kNonRendering_Backend == backend; } virtual ~GrOrderedSetBuildBench() {} protected: - const char* onGetName() SK_OVERRIDE { + const char* onGetName() override { return fName.c_str(); } - void onPreDraw() SK_OVERRIDE { + void onPreDraw() override { SkRandom rand; for (int j = 0; j < NUM_ELEMENTS; ++j) { fData[j] = rand.nextU() % NUM_ELEMENTS; } } - void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE { + void onDraw(const int loops, SkCanvas* canvas) override { for (int i = 0; i < loops; ++i) { GrOrderedSet set; for (int j = 0; j < NUM_ELEMENTS; ++j) { @@ -62,18 +62,18 @@ public: fName.append("ordered_set_find"); } - bool isSuitableFor(Backend backend) SK_OVERRIDE { + bool isSuitableFor(Backend backend) override { return kNonRendering_Backend == backend; } virtual ~GrOrderedSetFindBench() {} protected: - const char* onGetName() SK_OVERRIDE { + const char* onGetName() override { return fName.c_str(); } - void onPreDraw() SK_OVERRIDE { + void onPreDraw() override { SkRandom rand; for (int j = 0; j < NUM_ELEMENTS; ++j) { fData[j] = rand.nextU() % 1500; @@ -81,7 +81,7 @@ protected: } } - void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE { + void onDraw(const int loops, SkCanvas* canvas) override { for (int i = 0; i < loops; ++i) { for (int j = 0; j < NUM_ELEMENTS; ++j) { fSet.find(fData[j]); @@ -103,25 +103,25 @@ public: fName.append("ordered_set_remove"); } - bool isSuitableFor(Backend backend) SK_OVERRIDE { + bool isSuitableFor(Backend backend) override { return kNonRendering_Backend == backend; } virtual ~GrOrderedSetRemoveBench() {} protected: - const char* onGetName() SK_OVERRIDE { + const char* onGetName() override { return fName.c_str(); } - void onPreDraw() SK_OVERRIDE { + void onPreDraw() override { SkRandom rand; for (int j = 0; j < NUM_ELEMENTS; ++j) { fSet.insert(rand.nextU() % NUM_ELEMENTS); } } - void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE { + void onDraw(const int loops, SkCanvas* canvas) override { typedef GrOrderedSet::Iter SetIter; for (int i = 0; i < loops; ++i) { GrOrderedSet testSet; diff --git a/bench/GrResourceCacheBench.cpp b/bench/GrResourceCacheBench.cpp index def736c8b8..5807654ca9 100644 --- a/bench/GrResourceCacheBench.cpp +++ b/bench/GrResourceCacheBench.cpp @@ -36,7 +36,7 @@ public: } private: - size_t onGpuMemorySize() const SK_OVERRIDE { return 100; } + size_t onGpuMemorySize() const override { return 100; } typedef GrGpuResource INHERITED; }; @@ -53,16 +53,16 @@ static void populate_cache(GrGpu* gpu, int resourceCount) { class GrResourceCacheBenchAdd : public Benchmark { public: - bool isSuitableFor(Backend backend) SK_OVERRIDE { + bool isSuitableFor(Backend backend) override { return backend == kNonRendering_Backend; } protected: - const char* onGetName() SK_OVERRIDE { + const char* onGetName() override { return "grresourcecache_add"; } - void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE { + void onDraw(const int loops, SkCanvas* canvas) override { SkAutoTUnref context(GrContext::CreateMockContext()); if (NULL == context) { return; @@ -90,16 +90,16 @@ private: class GrResourceCacheBenchFind : public Benchmark { public: - bool isSuitableFor(Backend backend) SK_OVERRIDE { + bool isSuitableFor(Backend backend) override { return backend == kNonRendering_Backend; } protected: - const char* onGetName() SK_OVERRIDE { + const char* onGetName() override { return "grresourcecache_find"; } - void onPreDraw() SK_OVERRIDE { + void onPreDraw() override { fContext.reset(GrContext::CreateMockContext()); if (!fContext) { return; @@ -118,7 +118,7 @@ protected: populate_cache(gpu, CACHE_SIZE_COUNT); } - void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE { + void onDraw(const int loops, SkCanvas* canvas) override { if (!fContext) { return; } diff --git a/bench/HairlinePathBench.cpp b/bench/HairlinePathBench.cpp index f52fc3b1ff..5b77ff8b49 100644 --- a/bench/HairlinePathBench.cpp +++ b/bench/HairlinePathBench.cpp @@ -42,7 +42,7 @@ public: virtual void makePath(SkPath*) = 0; protected: - const char* onGetName() SK_OVERRIDE { + const char* onGetName() override { fName.printf("path_hairline_%s_%s_", fFlags & kBig_Flag ? "big" : "small", fFlags & kAA_Flag ? "AA" : "noAA"); @@ -50,7 +50,7 @@ protected: return fName.c_str(); } - void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE { + void onDraw(const int loops, SkCanvas* canvas) override { SkPaint paint(fPaint); this->setupPaint(&paint); @@ -80,10 +80,10 @@ class LinePathBench : public HairlinePathBench { public: LinePathBench(Flags flags) : INHERITED(flags) {} - void appendName(SkString* name) SK_OVERRIDE { + void appendName(SkString* name) override { name->append("line"); } - void makePath(SkPath* path) SK_OVERRIDE { + void makePath(SkPath* path) override { SkRandom rand; int size = SK_ARRAY_COUNT(points); int hSize = size / 2; @@ -112,10 +112,10 @@ class QuadPathBench : public HairlinePathBench { public: QuadPathBench(Flags flags) : INHERITED(flags) {} - void appendName(SkString* name) SK_OVERRIDE { + void appendName(SkString* name) override { name->append("quad"); } - void makePath(SkPath* path) SK_OVERRIDE { + void makePath(SkPath* path) override { SkRandom rand; int size = SK_ARRAY_COUNT(points); int hSize = size / 2; @@ -144,10 +144,10 @@ class ConicPathBench : public HairlinePathBench { public: ConicPathBench(Flags flags) : INHERITED(flags) {} - void appendName(SkString* name) SK_OVERRIDE { + void appendName(SkString* name) override { name->append("conic"); } - void makePath(SkPath* path) SK_OVERRIDE { + void makePath(SkPath* path) override { SkRandom rand; SkRandom randWeight; int size = SK_ARRAY_COUNT(points); @@ -180,10 +180,10 @@ class CubicPathBench : public HairlinePathBench { public: CubicPathBench(Flags flags) : INHERITED(flags) {} - void appendName(SkString* name) SK_OVERRIDE { + void appendName(SkString* name) override { name->append("cubic"); } - void makePath(SkPath* path) SK_OVERRIDE { + void makePath(SkPath* path) override { SkRandom rand; int size = SK_ARRAY_COUNT(points); int hSize = size / 2; diff --git a/bench/ImageCacheBench.cpp b/bench/ImageCacheBench.cpp index 75adc50dcb..4a068b03ab 100644 --- a/bench/ImageCacheBench.cpp +++ b/bench/ImageCacheBench.cpp @@ -24,8 +24,8 @@ struct TestRec : public SkResourceCache::Rec { TestRec(const TestKey& key, intptr_t value) : fKey(key), fValue(value) {} - const Key& getKey() const SK_OVERRIDE { return fKey; } - size_t bytesUsed() const SK_OVERRIDE { return sizeof(fKey) + sizeof(fValue); } + const Key& getKey() const override { return fKey; } + size_t bytesUsed() const override { return sizeof(fKey) + sizeof(fValue); } static bool Visitor(const SkResourceCache::Rec&, void*) { return true; @@ -49,11 +49,11 @@ public: } protected: - const char* onGetName() SK_OVERRIDE { + const char* onGetName() override { return "imagecache"; } - void onDraw(const int loops, SkCanvas*) SK_OVERRIDE { + void onDraw(const int loops, SkCanvas*) override { if (fCache.getTotalBytesUsed() == 0) { this->populateCache(); } diff --git a/bench/ImageFilterCollapse.cpp b/bench/ImageFilterCollapse.cpp index 4e56c72f57..c631c99262 100644 --- a/bench/ImageFilterCollapse.cpp +++ b/bench/ImageFilterCollapse.cpp @@ -39,7 +39,7 @@ protected: } } - void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE { + void onDraw(const int loops, SkCanvas* canvas) override { makeBitmap(); for(int i = 0; i < loops; i++) { @@ -79,11 +79,11 @@ public: virtual ~TableCollapseBench() {} protected: - virtual const char* onGetName() SK_OVERRIDE { + virtual const char* onGetName() override { return "image_filter_collapse_table"; } - virtual void onPreDraw() SK_OVERRIDE { + virtual void onPreDraw() override { for (int i = 0; i < 256; ++i) { int n = i >> 5; table1[i] = (n << 5) | (n << 2) | (n >> 1); @@ -135,11 +135,11 @@ public: virtual ~MatrixCollapseBench() {} protected: - virtual const char* onGetName() SK_OVERRIDE { + virtual const char* onGetName() override { return "image_filter_collapse_matrix"; } - virtual void onPreDraw() SK_OVERRIDE { + virtual void onPreDraw() override { SkColorFilter* colorFilters[] = { make_brightness(0.1f), make_grayscale(), diff --git a/bench/ImageFilterDAGBench.cpp b/bench/ImageFilterDAGBench.cpp index 0e5d4d1f83..47d59bc782 100644 --- a/bench/ImageFilterDAGBench.cpp +++ b/bench/ImageFilterDAGBench.cpp @@ -21,11 +21,11 @@ public: ImageFilterDAGBench() {} protected: - const char* onGetName() SK_OVERRIDE { + const char* onGetName() override { return "image_filter_dag"; } - void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE { + void onDraw(const int loops, SkCanvas* canvas) override { for (int j = 0; j < loops; j++) { SkAutoTUnref blur(SkBlurImageFilter::Create(20.0f, 20.0f)); SkImageFilter* inputs[kNumInputs]; diff --git a/bench/InterpBench.cpp b/bench/InterpBench.cpp index c03da4b8cc..9d8f32de03 100644 --- a/bench/InterpBench.cpp +++ b/bench/InterpBench.cpp @@ -22,7 +22,7 @@ public: fDx = 0.1257f; } - bool isSuitableFor(Backend backend) SK_OVERRIDE { + bool isSuitableFor(Backend backend) override { return backend == kNonRendering_Backend; } @@ -51,7 +51,7 @@ public: Fixed16D16Interp() : INHERITED("16.16") {} protected: - void performTest(int16_t dst[], float fx, float dx, int count) SK_OVERRIDE { + void performTest(int16_t dst[], float fx, float dx, int count) override { SkFixed curr = SkFloatToFixed(fx); SkFixed step = SkFloatToFixed(dx); for (int i = 0; i < count; i += 4) { @@ -70,7 +70,7 @@ public: Fixed32D32Interp() : INHERITED("32.32") {} protected: - void performTest(int16_t dst[], float fx, float dx, int count) SK_OVERRIDE { + void performTest(int16_t dst[], float fx, float dx, int count) override { int64_t curr = (int64_t)(fx * 65536 * 655536); int64_t step = (int64_t)(dx * 65536 * 655536); SkFixed tmp; @@ -101,7 +101,7 @@ public: Fixed16D48Interp() : INHERITED("16.48") {} protected: - void performTest(int16_t dst[], float fx, float dx, int count) SK_OVERRIDE { + void performTest(int16_t dst[], float fx, float dx, int count) override { int64_t curr = (int64_t)(fx * 65536 * 655536 * 65536); int64_t step = (int64_t)(dx * 65536 * 655536 * 65536); SkFixed tmp; @@ -121,7 +121,7 @@ public: FloatInterp() : INHERITED("float") {} protected: - void performTest(int16_t dst[], float fx, float dx, int count) SK_OVERRIDE { + void performTest(int16_t dst[], float fx, float dx, int count) override { SkFixed tmp; for (int i = 0; i < count; i += 4) { tmp = SkFloatToFixed(fx); dst[i + 0] = TILE(tmp, count); fx += dx; @@ -139,7 +139,7 @@ public: DoubleInterp() : INHERITED("double") {} protected: - void performTest(int16_t dst[], float fx, float dx, int count) SK_OVERRIDE { + void performTest(int16_t dst[], float fx, float dx, int count) override { double ffx = fx; double ddx = dx; SkFixed tmp; diff --git a/bench/LightingBench.cpp b/bench/LightingBench.cpp index ed0c9858ef..a56ed226e2 100644 --- a/bench/LightingBench.cpp +++ b/bench/LightingBench.cpp @@ -101,11 +101,11 @@ public: } protected: - const char* onGetName() SK_OVERRIDE { + const char* onGetName() override { return fIsSmall ? "lightingpointlitdiffuse_small" : "lightingpointlitdiffuse_large"; } - void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE { + void onDraw(const int loops, SkCanvas* canvas) override { draw(loops, canvas, SkLightingImageFilter::CreatePointLitDiffuse(getPointLocation(), getWhite(), getSurfaceScale(), @@ -122,11 +122,11 @@ public: } protected: - const char* onGetName() SK_OVERRIDE { + const char* onGetName() override { return fIsSmall ? "lightingdistantlitdiffuse_small" : "lightingdistantlitdiffuse_large"; } - void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE { + void onDraw(const int loops, SkCanvas* canvas) override { draw(loops, canvas, SkLightingImageFilter::CreateDistantLitDiffuse(getDistantDirection(), getWhite(), getSurfaceScale(), @@ -143,11 +143,11 @@ public: } protected: - const char* onGetName() SK_OVERRIDE { + const char* onGetName() override { return fIsSmall ? "lightingspotlitdiffuse_small" : "lightingspotlitdiffuse_large"; } - void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE { + void onDraw(const int loops, SkCanvas* canvas) override { draw(loops, canvas, SkLightingImageFilter::CreateSpotLitDiffuse(getSpotLocation(), getSpotTarget(), getSpotExponent(), @@ -167,11 +167,11 @@ public: } protected: - const char* onGetName() SK_OVERRIDE { + const char* onGetName() override { return fIsSmall ? "lightingpointlitspecular_small" : "lightingpointlitspecular_large"; } - void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE { + void onDraw(const int loops, SkCanvas* canvas) override { draw(loops, canvas, SkLightingImageFilter::CreatePointLitSpecular(getPointLocation(), getWhite(), getSurfaceScale(), @@ -189,11 +189,11 @@ public: } protected: - const char* onGetName() SK_OVERRIDE { + const char* onGetName() override { return fIsSmall ? "lightingdistantlitspecular_small" : "lightingdistantlitspecular_large"; } - void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE { + void onDraw(const int loops, SkCanvas* canvas) override { draw(loops, canvas, SkLightingImageFilter::CreateDistantLitSpecular(getDistantDirection(), getWhite(), getSurfaceScale(), @@ -211,11 +211,11 @@ public: } protected: - const char* onGetName() SK_OVERRIDE { + const char* onGetName() override { return fIsSmall ? "lightingspotlitspecular_small" : "lightingspotlitspecular_large"; } - void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE { + void onDraw(const int loops, SkCanvas* canvas) override { draw(loops, canvas, SkLightingImageFilter::CreateSpotLitSpecular(getSpotLocation(), getSpotTarget(), getSpotExponent(), diff --git a/bench/LineBench.cpp b/bench/LineBench.cpp index e5065d2dab..76231b8e95 100644 --- a/bench/LineBench.cpp +++ b/bench/LineBench.cpp @@ -38,11 +38,11 @@ public: } protected: - const char* onGetName() SK_OVERRIDE { + const char* onGetName() override { return fName.c_str(); } - void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE { + void onDraw(const int loops, SkCanvas* canvas) override { SkPaint paint; this->setupPaint(&paint); diff --git a/bench/MagnifierBench.cpp b/bench/MagnifierBench.cpp index 39bec98e28..24bd53c88f 100644 --- a/bench/MagnifierBench.cpp +++ b/bench/MagnifierBench.cpp @@ -22,18 +22,18 @@ public: } protected: - const char* onGetName() SK_OVERRIDE { + const char* onGetName() override { return fIsSmall ? "magnifier_small" : "magnifier_large"; } - void onPreDraw() SK_OVERRIDE { + void onPreDraw() override { if (!fInitialized) { make_checkerboard(); fInitialized = true; } } - void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE { + void onDraw(const int loops, SkCanvas* canvas) override { const int w = fIsSmall ? FILTER_WIDTH_SMALL : FILTER_WIDTH_LARGE; const int h = fIsSmall ? FILTER_HEIGHT_SMALL : FILTER_HEIGHT_LARGE; SkPaint paint; diff --git a/bench/MathBench.cpp b/bench/MathBench.cpp index 5b46d1c704..16a6a5a47f 100644 --- a/bench/MathBench.cpp +++ b/bench/MathBench.cpp @@ -31,7 +31,7 @@ public: } } - bool isSuitableFor(Backend backend) SK_OVERRIDE { + bool isSuitableFor(Backend backend) override { return backend == kNonRendering_Backend; } @@ -68,7 +68,7 @@ protected: virtual void performTest(float* SK_RESTRICT dst, const float* SK_RESTRICT src, - int count) SK_OVERRIDE { + int count) override { uint32_t* d = SkTCast(dst); const uint32_t* s = SkTCast(src); this->performITest(d, s, count); @@ -166,7 +166,7 @@ public: protected: virtual void performITest(uint32_t* SK_RESTRICT dst, const uint32_t* SK_RESTRICT src, - int count) SK_OVERRIDE { + int count) override { for (int i = 0; i < count; ++i) { dst[i] = QMul64(src[i], (uint8_t)i); } @@ -181,7 +181,7 @@ public: protected: virtual void performITest(uint32_t* SK_RESTRICT dst, const uint32_t* SK_RESTRICT src, - int count) SK_OVERRIDE { + int count) override { for (int i = 0; i < count; ++i) { dst[i] = SkAlphaMulQ(src[i], (uint8_t)i); } @@ -285,7 +285,7 @@ public: } } - bool isSuitableFor(Backend backend) SK_OVERRIDE { + bool isSuitableFor(Backend backend) override { return backend == kNonRendering_Backend; } @@ -353,7 +353,7 @@ public: } } - bool isSuitableFor(Backend backend) SK_OVERRIDE { + bool isSuitableFor(Backend backend) override { return backend == kNonRendering_Backend; } @@ -414,7 +414,7 @@ public: } } - bool isSuitableFor(Backend backend) SK_OVERRIDE { + bool isSuitableFor(Backend backend) override { return backend == kNonRendering_Backend; } @@ -470,7 +470,7 @@ public: fName = "point_normalize"; } - bool isSuitableFor(Backend backend) SK_OVERRIDE { + bool isSuitableFor(Backend backend) override { return backend == kNonRendering_Backend; } @@ -517,7 +517,7 @@ public: } - bool isSuitableFor(Backend backend) SK_OVERRIDE { + bool isSuitableFor(Backend backend) override { return backend == kNonRendering_Backend; } @@ -553,7 +553,7 @@ public: fName.printf("divmod_%s", name); } - bool isSuitableFor(Backend backend) SK_OVERRIDE { + bool isSuitableFor(Backend backend) override { return backend == kNonRendering_Backend; } diff --git a/bench/Matrix44Bench.cpp b/bench/Matrix44Bench.cpp index 3739458b22..5093fd2745 100644 --- a/bench/Matrix44Bench.cpp +++ b/bench/Matrix44Bench.cpp @@ -17,7 +17,7 @@ public: fName.printf("matrix44_%s", name); } - bool isSuitableFor(Backend backend) SK_OVERRIDE { + bool isSuitableFor(Backend backend) override { return backend == kNonRendering_Backend; } diff --git a/bench/MatrixBench.cpp b/bench/MatrixBench.cpp index 1d8e81115b..6bd1e2a8a6 100644 --- a/bench/MatrixBench.cpp +++ b/bench/MatrixBench.cpp @@ -18,7 +18,7 @@ public: fName.printf("matrix_%s", name); } - bool isSuitableFor(Backend backend) SK_OVERRIDE { + bool isSuitableFor(Backend backend) override { return backend == kNonRendering_Backend; } @@ -290,7 +290,7 @@ public: } } - void performTest() SK_OVERRIDE { + void performTest() override { if (fNewWay) { for (int i = 0; i < 1000000; ++i) { fM.mapPts(fDst, fSrc, N); diff --git a/bench/MemcpyBench.cpp b/bench/MemcpyBench.cpp index 4778d548d7..4bc1285607 100644 --- a/bench/MemcpyBench.cpp +++ b/bench/MemcpyBench.cpp @@ -18,15 +18,15 @@ public: , fMemcpy32(memcpy32) , fName(SkStringPrintf("%s_%d", name, count)) {} - const char* onGetName() SK_OVERRIDE { + const char* onGetName() override { return fName.c_str(); } - bool isSuitableFor(Backend backend) SK_OVERRIDE { + bool isSuitableFor(Backend backend) override { return backend == kNonRendering_Backend; } - void onPreDraw() SK_OVERRIDE { + void onPreDraw() override { fDst.reset(fCount); fSrc.reset(fCount); @@ -36,7 +36,7 @@ public: } } - void onDraw(const int loops, SkCanvas*) SK_OVERRIDE { + void onDraw(const int loops, SkCanvas*) override { for (int i = 0; i < loops; i++) { fMemcpy32(fDst, fSrc, fCount); } diff --git a/bench/MemoryBench.cpp b/bench/MemoryBench.cpp index c2c9a1ae33..2b0f2abc79 100644 --- a/bench/MemoryBench.cpp +++ b/bench/MemoryBench.cpp @@ -21,16 +21,16 @@ public: fName.printf("chunkalloc_" SK_SIZE_T_SPECIFIER, minSize); } - bool isSuitableFor(Backend backend) SK_OVERRIDE { + bool isSuitableFor(Backend backend) override { return backend == kNonRendering_Backend; } protected: - const char* onGetName() SK_OVERRIDE { + const char* onGetName() override { return fName.c_str(); } - void onDraw(const int loops, SkCanvas*) SK_OVERRIDE { + void onDraw(const int loops, SkCanvas*) override { size_t inc = fMinSize >> 4; SkASSERT(inc > 0); size_t total = fMinSize * 64; diff --git a/bench/MemsetBench.cpp b/bench/MemsetBench.cpp index 41b802c36d..e0390bba38 100644 --- a/bench/MemsetBench.cpp +++ b/bench/MemsetBench.cpp @@ -35,18 +35,18 @@ public: fName.printf("memset%d_%d_%d", type, minSize, maxSize); } - bool isSuitableFor(Backend backend) SK_OVERRIDE { + bool isSuitableFor(Backend backend) override { return backend == kNonRendering_Backend; } virtual void performTest() = 0; protected: - const char* onGetName() SK_OVERRIDE { + const char* onGetName() override { return fName.c_str(); } - void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE { + void onDraw(const int loops, SkCanvas* canvas) override { for (int i = 0; i < loops; ++i) { this->performTest(); } @@ -63,7 +63,7 @@ public: : INHERITED(MEMSET32, minSize, maxSize) {} protected: - void performTest() SK_OVERRIDE { + void performTest() override { for(int j = fMinSize; j < fMaxSize; ++j){ sk_memset32(kBuffer, VALUE32, j); sk_memset32(kBuffer + 1, VALUE32, j); @@ -82,7 +82,7 @@ public: : INHERITED(MEMSET16, minSize, maxSize) {} protected: - void performTest() SK_OVERRIDE { + void performTest() override { for(int j = fMinSize; j < fMaxSize; ++j){ sk_memset16(kBuffer, VALUE16, j); sk_memset16(kBuffer + 1, VALUE16, j); diff --git a/bench/MergeBench.cpp b/bench/MergeBench.cpp index 1e8069ee0e..05d6822f4c 100644 --- a/bench/MergeBench.cpp +++ b/bench/MergeBench.cpp @@ -20,11 +20,11 @@ public: MergeBench(bool small) : fIsSmall(small), fInitialized(false) { } protected: - const char* onGetName() SK_OVERRIDE { + const char* onGetName() override { return fIsSmall ? "merge_small" : "merge_large"; } - void onPreDraw() SK_OVERRIDE { + void onPreDraw() override { if (!fInitialized) { make_bitmap(); make_checkerboard(); @@ -32,7 +32,7 @@ protected: } } - void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE { + void onDraw(const int loops, SkCanvas* canvas) override { SkRect r = fIsSmall ? SkRect::MakeWH(FILTER_WIDTH_SMALL, FILTER_HEIGHT_SMALL) : SkRect::MakeWH(FILTER_WIDTH_LARGE, FILTER_HEIGHT_LARGE); SkPaint paint; diff --git a/bench/MipMapBench.cpp b/bench/MipMapBench.cpp index cb4658ae0f..a8156ed5f9 100644 --- a/bench/MipMapBench.cpp +++ b/bench/MipMapBench.cpp @@ -16,18 +16,18 @@ public: MipMapBench() {} protected: - bool isSuitableFor(Backend backend) SK_OVERRIDE { + bool isSuitableFor(Backend backend) override { return kNonRendering_Backend == backend; } - const char* onGetName() SK_OVERRIDE { return "mipmap_build"; } + const char* onGetName() override { return "mipmap_build"; } - void onPreDraw() SK_OVERRIDE { + void onPreDraw() override { fBitmap.allocN32Pixels(1000, 1000, true); fBitmap.eraseColor(SK_ColorWHITE); // so we don't read uninitialized memory } - void onDraw(const int loops, SkCanvas*) SK_OVERRIDE { + void onDraw(const int loops, SkCanvas*) override { for (int i = 0; i < loops; i++) { SkMipMap::Build(fBitmap, NULL)->unref(); } diff --git a/bench/MutexBench.cpp b/bench/MutexBench.cpp index b9d54f190c..7fd8fabba1 100644 --- a/bench/MutexBench.cpp +++ b/bench/MutexBench.cpp @@ -9,7 +9,7 @@ class MutexBench : public Benchmark { public: - bool isSuitableFor(Backend backend) SK_OVERRIDE { + bool isSuitableFor(Backend backend) override { return backend == kNonRendering_Backend; } diff --git a/bench/PMFloatBench.cpp b/bench/PMFloatBench.cpp index 62dc444d58..d748144c4b 100644 --- a/bench/PMFloatBench.cpp +++ b/bench/PMFloatBench.cpp @@ -24,7 +24,7 @@ template struct PMFloatGetSetBench : public Benchmark { PMFloatGetSetBench() {} - const char* onGetName() SK_OVERRIDE { + const char* onGetName() override { switch (kClamp << 1 | kWide) { case 0: return "SkPMFloat_get_1x"; case 1: return "SkPMFloat_get_4x"; @@ -34,9 +34,9 @@ struct PMFloatGetSetBench : public Benchmark { SkFAIL("unreachable"); return "oh bother"; } - bool isSuitableFor(Backend backend) SK_OVERRIDE { return backend == kNonRendering_Backend; } + bool isSuitableFor(Backend backend) override { return backend == kNonRendering_Backend; } - void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE { + void onDraw(const int loops, SkCanvas* canvas) override { // Unlike blackhole, junk can and probably will be a register. uint32_t junk = 0; uint32_t seed = 0; diff --git a/bench/PatchBench.cpp b/bench/PatchBench.cpp index cc9cb84438..097e68ec8c 100644 --- a/bench/PatchBench.cpp +++ b/bench/PatchBench.cpp @@ -82,7 +82,7 @@ public: } protected: - const char* onGetName() SK_OVERRIDE { + const char* onGetName() override { SkString vertexMode; switch (fVertexMode) { case kNone_VertexMode: @@ -107,7 +107,7 @@ protected: return fName.c_str(); } - void onPreDraw() SK_OVERRIDE { + void onPreDraw() override { this->setCubics(); this->setColors(); this->setTexCoords(); @@ -123,7 +123,7 @@ protected: } } - void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE { + void onDraw(const int loops, SkCanvas* canvas) override { canvas->scale(fScale.x(), fScale.y()); for (int i = 0; i < loops; i++) { switch (fVertexMode) { @@ -161,11 +161,11 @@ public: SquarePatchBench(SkPoint scale, VertexMode vertexMode) : INHERITED(scale, vertexMode) { } - void appendName(SkString* name) SK_OVERRIDE { + void appendName(SkString* name) override { name->append("square"); } - void setCubics() SK_OVERRIDE { + void setCubics() override { const SkPoint points[SkPatchUtils::kNumCtrlPts] = { //top points {100,100},{150,100},{250,100}, {300,100}, @@ -187,11 +187,11 @@ public: LODDiffPatchBench(SkPoint scale, VertexMode vertexMode) : INHERITED(scale, vertexMode) { } - void appendName(SkString* name) SK_OVERRIDE { + void appendName(SkString* name) override { name->append("LOD_Diff"); } - void setCubics() SK_OVERRIDE { + void setCubics() override { const SkPoint points[SkPatchUtils::kNumCtrlPts] = { //top points {100,175},{150,100},{250,100}, {300,0}, @@ -213,11 +213,11 @@ public: LoopPatchBench(SkPoint scale, VertexMode vertexMode) : INHERITED(scale, vertexMode) { } - void appendName(SkString* name) SK_OVERRIDE { + void appendName(SkString* name) override { name->append("loop"); } - void setCubics() SK_OVERRIDE { + void setCubics() override { const SkPoint points[SkPatchUtils::kNumCtrlPts] = { //top points {100,100},{300,200},{100,200}, {300,100}, diff --git a/bench/PatchGridBench.cpp b/bench/PatchGridBench.cpp index 0fe12e2f8f..610d8e7232 100644 --- a/bench/PatchGridBench.cpp +++ b/bench/PatchGridBench.cpp @@ -163,7 +163,7 @@ public: } protected: - const char* onGetName() SK_OVERRIDE { + const char* onGetName() override { SkString vertexMode; switch (fVertexMode) { case kNone_VertexMode: @@ -200,7 +200,7 @@ protected: return fName.c_str(); } - void onPreDraw() SK_OVERRIDE { + void onPreDraw() override { this->setGrid(); switch (fVertexMode) { case kTexCoords_VertexMode: @@ -214,7 +214,7 @@ protected: this->setupPaint(&fPaint); } - void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE { + void onDraw(const int loops, SkCanvas* canvas) override { this->setScale(canvas); for (int i = 0; i < loops; i++) { fGrid.draw(canvas, fPaint); diff --git a/bench/PathBench.cpp b/bench/PathBench.cpp index 3a4eb63830..2e91a0b390 100644 --- a/bench/PathBench.cpp +++ b/bench/PathBench.cpp @@ -42,7 +42,7 @@ public: virtual int complexity() { return 0; } protected: - const char* onGetName() SK_OVERRIDE { + const char* onGetName() override { fName.printf("path_%s_%s_", fFlags & kStroke_Flag ? "stroke" : "fill", fFlags & kBig_Flag ? "big" : "small"); @@ -50,7 +50,7 @@ protected: return fName.c_str(); } - void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE { + void onDraw(const int loops, SkCanvas* canvas) override { SkPaint paint(fPaint); this->setupPaint(&paint); @@ -81,10 +81,10 @@ class TrianglePathBench : public PathBench { public: TrianglePathBench(Flags flags) : INHERITED(flags) {} - void appendName(SkString* name) SK_OVERRIDE { + void appendName(SkString* name) override { name->append("triangle"); } - void makePath(SkPath* path) SK_OVERRIDE { + void makePath(SkPath* path) override { static const int gCoord[] = { 10, 10, 15, 5, 20, 20 }; @@ -101,10 +101,10 @@ class RectPathBench : public PathBench { public: RectPathBench(Flags flags) : INHERITED(flags) {} - void appendName(SkString* name) SK_OVERRIDE { + void appendName(SkString* name) override { name->append("rect"); } - void makePath(SkPath* path) SK_OVERRIDE { + void makePath(SkPath* path) override { SkRect r = { 10, 10, 20, 20 }; path->addRect(r); } @@ -116,10 +116,10 @@ class OvalPathBench : public PathBench { public: OvalPathBench(Flags flags) : INHERITED(flags) {} - void appendName(SkString* name) SK_OVERRIDE { + void appendName(SkString* name) override { name->append("oval"); } - void makePath(SkPath* path) SK_OVERRIDE { + void makePath(SkPath* path) override { SkRect r = { 10, 10, 23, 20 }; path->addOval(r); } @@ -131,10 +131,10 @@ class CirclePathBench: public PathBench { public: CirclePathBench(Flags flags) : INHERITED(flags) {} - void appendName(SkString* name) SK_OVERRIDE { + void appendName(SkString* name) override { name->append("circle"); } - void makePath(SkPath* path) SK_OVERRIDE { + void makePath(SkPath* path) override { path->addCircle(SkIntToScalar(20), SkIntToScalar(20), SkIntToScalar(10)); } @@ -146,7 +146,7 @@ class SawToothPathBench : public PathBench { public: SawToothPathBench(Flags flags) : INHERITED(flags) {} - void appendName(SkString* name) SK_OVERRIDE { + void appendName(SkString* name) override { name->append("sawtooth"); } virtual void makePath(SkPath* path) { @@ -167,7 +167,7 @@ public: path->lineTo(x0, y + 2 * dy); path->close(); } - int complexity() SK_OVERRIDE { return 1; } + int complexity() override { return 1; } private: typedef PathBench INHERITED; }; @@ -176,10 +176,10 @@ class LongCurvedPathBench : public PathBench { public: LongCurvedPathBench(Flags flags) : INHERITED(flags) {} - void appendName(SkString* name) SK_OVERRIDE { + void appendName(SkString* name) override { name->append("long_curved"); } - void makePath(SkPath* path) SK_OVERRIDE { + void makePath(SkPath* path) override { SkRandom rand (12); int i; for (i = 0; i < 100; i++) { @@ -190,7 +190,7 @@ public: } path->close(); } - int complexity() SK_OVERRIDE { return 2; } + int complexity() override { return 2; } private: typedef PathBench INHERITED; }; @@ -199,24 +199,24 @@ class LongLinePathBench : public PathBench { public: LongLinePathBench(Flags flags) : INHERITED(flags) {} - void appendName(SkString* name) SK_OVERRIDE { + void appendName(SkString* name) override { name->append("long_line"); } - void makePath(SkPath* path) SK_OVERRIDE { + void makePath(SkPath* path) override { SkRandom rand; path->moveTo(rand.nextUScalar1() * 640, rand.nextUScalar1() * 480); for (size_t i = 1; i < 100; i++) { path->lineTo(rand.nextUScalar1() * 640, rand.nextUScalar1() * 480); } } - int complexity() SK_OVERRIDE { return 2; } + int complexity() override { return 2; } private: typedef PathBench INHERITED; }; class RandomPathBench : public Benchmark { public: - bool isSuitableFor(Backend backend) SK_OVERRIDE { + bool isSuitableFor(Backend backend) override { return backend == kNonRendering_Backend; } @@ -321,15 +321,15 @@ public: } protected: - const char* onGetName() SK_OVERRIDE { + const char* onGetName() override { return "path_create"; } - void onPreDraw() SK_OVERRIDE { + void onPreDraw() override { this->createData(10, 100); } - void onDraw(const int loops, SkCanvas*) SK_OVERRIDE { + void onDraw(const int loops, SkCanvas*) override { for (int i = 0; i < loops; ++i) { if (i % 1000 == 0) { fPath.reset(); // PathRef memory can grow without bound otherwise. @@ -351,10 +351,10 @@ public: } protected: - const char* onGetName() SK_OVERRIDE { + const char* onGetName() override { return "path_copy"; } - void onPreDraw() SK_OVERRIDE { + void onPreDraw() override { this->createData(10, 100); fPaths.reset(kPathCnt); fCopies.reset(kPathCnt); @@ -363,7 +363,7 @@ protected: } this->finishedMakingPaths(); } - void onDraw(const int loops, SkCanvas*) SK_OVERRIDE { + void onDraw(const int loops, SkCanvas*) override { for (int i = 0; i < loops; ++i) { int idx = i & (kPathCnt - 1); fCopies[idx] = fPaths[idx]; @@ -386,11 +386,11 @@ public: PathTransformBench(bool inPlace) : fInPlace(inPlace) {} protected: - const char* onGetName() SK_OVERRIDE { + const char* onGetName() override { return fInPlace ? "path_transform_in_place" : "path_transform_copy"; } - void onPreDraw() SK_OVERRIDE { + void onPreDraw() override { fMatrix.setScale(5 * SK_Scalar1, 6 * SK_Scalar1); this->createData(10, 100); fPaths.reset(kPathCnt); @@ -403,7 +403,7 @@ protected: } } - void onDraw(const int loops, SkCanvas*) SK_OVERRIDE { + void onDraw(const int loops, SkCanvas*) override { if (fInPlace) { for (int i = 0; i < loops; ++i) { fPaths[i & (kPathCnt - 1)].transform(fMatrix); @@ -434,11 +434,11 @@ public: PathEqualityBench() { } protected: - const char* onGetName() SK_OVERRIDE { + const char* onGetName() override { return "path_equality_50%"; } - void onPreDraw() SK_OVERRIDE { + void onPreDraw() override { fParity = 0; this->createData(10, 100); fPaths.reset(kPathCnt); @@ -450,7 +450,7 @@ protected: this->finishedMakingPaths(); } - void onDraw(const int loops, SkCanvas*) SK_OVERRIDE { + void onDraw(const int loops, SkCanvas*) override { for (int i = 0; i < loops; ++i) { int idx = i & (kPathCnt - 1); fParity ^= (fPaths[idx] == fCopies[idx & ~0x1]); @@ -483,7 +483,7 @@ public: } protected: - const char* onGetName() SK_OVERRIDE { + const char* onGetName() override { switch (fType) { case kAdd_AddType: return "path_add_path"; @@ -501,7 +501,7 @@ protected: } } - void onPreDraw() SK_OVERRIDE { + void onPreDraw() override { // reversePathTo assumes a single contour path. bool allowMoves = kReversePathTo_AddType != fType; this->createData(10, 100, allowMoves); @@ -514,7 +514,7 @@ protected: this->finishedMakingPaths(); } - void onDraw(const int loops, SkCanvas*) SK_OVERRIDE { + void onDraw(const int loops, SkCanvas*) override { switch (fType) { case kAdd_AddType: for (int i = 0; i < loops; ++i) { @@ -578,11 +578,11 @@ public: } protected: - const char* onGetName() SK_OVERRIDE { + const char* onGetName() override { return fName.c_str(); } - void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE { + void onDraw(const int loops, SkCanvas* canvas) override { SkPaint paint; paint.setColor(SK_ColorBLACK); @@ -642,7 +642,7 @@ public: } protected: - const char* onGetName() SK_OVERRIDE { + const char* onGetName() override { return fName.c_str(); } @@ -688,7 +688,7 @@ protected: SkASSERT(path->isConvex()); } - void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE { + void onDraw(const int loops, SkCanvas* canvas) override { SkRandom rand; SkRect r; @@ -753,23 +753,23 @@ public: } } - bool isSuitableFor(Backend backend) SK_OVERRIDE { + bool isSuitableFor(Backend backend) override { return backend == kNonRendering_Backend; } private: - const char* onGetName() SK_OVERRIDE { + const char* onGetName() override { return fName.c_str(); } - void onDraw(const int loops, SkCanvas*) SK_OVERRIDE { + void onDraw(const int loops, SkCanvas*) override { for (int i = 0; i < loops; ++i) { const SkRect& rect = fQueryRects[i % kQueryRectCnt]; fParity = fParity != fPath.conservativelyContainsRect(rect); } } - void onPreDraw() SK_OVERRIDE { + void onPreDraw() override { fQueryRects.setCount(kQueryRectCnt); SkRandom rand; @@ -817,11 +817,11 @@ public: } private: - const char* onGetName() SK_OVERRIDE { + const char* onGetName() override { return "ratquad-chop-0.5"; } - void onDraw(const int loops, SkCanvas*) SK_OVERRIDE { + void onDraw(const int loops, SkCanvas*) override { SkConic dst[2]; for (int i = 0; i < loops; ++i) { fRQ.chopAt(0.5f, dst); @@ -846,14 +846,14 @@ public: fName.printf("conic-chop-half%d", useV2); } - bool isSuitableFor(Backend backend) SK_OVERRIDE { + bool isSuitableFor(Backend backend) override { return backend == kNonRendering_Backend; } private: - const char* onGetName() SK_OVERRIDE { return fName.c_str(); } + const char* onGetName() override { return fName.c_str(); } - void onDraw(const int loops, SkCanvas*) SK_OVERRIDE { + void onDraw(const int loops, SkCanvas*) override { if (fUseV2) { for (int i = 0; i < loops; ++i) { fRQ.chop2(fDst); @@ -875,7 +875,7 @@ public: ConicBench_EvalPos(bool useV2) : ConicBench_ChopHalf(useV2) { fName.printf("conic-eval-pos%d", useV2); } - void onDraw(const int loops, SkCanvas*) SK_OVERRIDE { + void onDraw(const int loops, SkCanvas*) override { if (fUseV2) { for (int i = 0; i < loops; ++i) { for (int j = 0; j < 1000; ++j) { @@ -899,7 +899,7 @@ public: ConicBench_EvalTan(bool useV2) : ConicBench_ChopHalf(useV2) { fName.printf("conic-eval-tan%d", useV2); } - void onDraw(const int loops, SkCanvas*) SK_OVERRIDE { + void onDraw(const int loops, SkCanvas*) override { if (fUseV2) { for (int i = 0; i < loops; ++i) { for (int j = 0; j < 1000; ++j) { @@ -940,7 +940,7 @@ public: } } - bool isSuitableFor(Backend backend) SK_OVERRIDE { + bool isSuitableFor(Backend backend) override { return backend == kNonRendering_Backend; } @@ -959,11 +959,11 @@ public: ConicBench_ComputeError() {} protected: - const char* onGetName() SK_OVERRIDE { + const char* onGetName() override { return "conic-compute-error"; } - void onDraw(const int loops, SkCanvas*) SK_OVERRIDE { + void onDraw(const int loops, SkCanvas*) override { SkVector err; for (int i = 0; i < loops; ++i) { for (int j = 0; j < CONICS; ++j) { @@ -981,11 +981,11 @@ public: ConicBench_asQuadTol() {} protected: - const char* onGetName() SK_OVERRIDE { + const char* onGetName() override { return "conic-asQuadTol"; } - void onDraw(const int loops, SkCanvas*) SK_OVERRIDE { + void onDraw(const int loops, SkCanvas*) override { for (int i = 0; i < loops; ++i) { for (int j = 0; j < CONICS; ++j) { fConics[j].asQuadTol(SK_ScalarHalf); @@ -1002,11 +1002,11 @@ public: ConicBench_quadPow2() {} protected: - const char* onGetName() SK_OVERRIDE { + const char* onGetName() override { return "conic-quadPow2"; } - void onDraw(const int loops, SkCanvas*) SK_OVERRIDE { + void onDraw(const int loops, SkCanvas*) override { for (int i = 0; i < loops; ++i) { for (int j = 0; j < CONICS; ++j) { fConics[j].computeQuadPOW2(SK_ScalarHalf); diff --git a/bench/PathIterBench.cpp b/bench/PathIterBench.cpp index c7a04bdd79..bbc3c035e7 100644 --- a/bench/PathIterBench.cpp +++ b/bench/PathIterBench.cpp @@ -56,16 +56,16 @@ public: } } - bool isSuitableFor(Backend backend) SK_OVERRIDE { + bool isSuitableFor(Backend backend) override { return backend == kNonRendering_Backend; } protected: - const char* onGetName() SK_OVERRIDE { + const char* onGetName() override { return fName.c_str(); } - void onDraw(const int loops, SkCanvas*) SK_OVERRIDE { + void onDraw(const int loops, SkCanvas*) override { if (fRaw) { for (int i = 0; i < loops; ++i) { SkPath::RawIter iter(fPath); diff --git a/bench/PerlinNoiseBench.cpp b/bench/PerlinNoiseBench.cpp index 17260a9cb8..b8237c0655 100644 --- a/bench/PerlinNoiseBench.cpp +++ b/bench/PerlinNoiseBench.cpp @@ -17,11 +17,11 @@ public: } protected: - const char* onGetName() SK_OVERRIDE { + const char* onGetName() override { return "perlinnoise"; } - void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE { + void onDraw(const int loops, SkCanvas* canvas) override { this->test(loops, canvas, 0, 0, SkPerlinNoiseShader::kFractalNoise_Type, 0.1f, 0.1f, 3, 0, false); } diff --git a/bench/PictureNestingBench.cpp b/bench/PictureNestingBench.cpp index b2220b7ed4..a649dcc636 100644 --- a/bench/PictureNestingBench.cpp +++ b/bench/PictureNestingBench.cpp @@ -26,7 +26,7 @@ public: } protected: - const char* onGetName() SK_OVERRIDE { + const char* onGetName() override { return fName.c_str(); } @@ -139,7 +139,7 @@ public: : INHERITED("playback", maxLevel, maxPictureLevel) { } protected: - void onPreDraw() SK_OVERRIDE { + void onPreDraw() override { this->INHERITED::onPreDraw(); SkIPoint canvasSize = onGetSize(); diff --git a/bench/PicturePlaybackBench.cpp b/bench/PicturePlaybackBench.cpp index 67945ce001..e11d7c8360 100644 --- a/bench/PicturePlaybackBench.cpp +++ b/bench/PicturePlaybackBench.cpp @@ -72,7 +72,7 @@ class TextPlaybackBench : public PicturePlaybackBench { public: TextPlaybackBench() : INHERITED("drawText") { } protected: - void recordCanvas(SkCanvas* canvas) SK_OVERRIDE { + void recordCanvas(SkCanvas* canvas) override { SkPaint paint; paint.setTextSize(fTextSize); paint.setColor(SK_ColorBLACK); @@ -97,7 +97,7 @@ public: : INHERITED(drawPosH ? "drawPosTextH" : "drawPosText") , fDrawPosH(drawPosH) { } protected: - void recordCanvas(SkCanvas* canvas) SK_OVERRIDE { + void recordCanvas(SkCanvas* canvas) override { SkPaint paint; paint.setTextSize(fTextSize); paint.setColor(SK_ColorBLACK); @@ -159,10 +159,10 @@ public: } } - const char* onGetName() SK_OVERRIDE { return fName.c_str(); } - SkIPoint onGetSize() SK_OVERRIDE { return SkIPoint::Make(1024,1024); } + const char* onGetName() override { return fName.c_str(); } + SkIPoint onGetSize() override { return SkIPoint::Make(1024,1024); } - void onPreDraw() SK_OVERRIDE { + void onPreDraw() override { SkAutoTDelete factory; switch (fBBH) { case kNone: break; @@ -185,7 +185,7 @@ public: fPic.reset(recorder.endRecording()); } - void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE { + void onDraw(const int loops, SkCanvas* canvas) override { for (int i = 0; i < loops; i++) { // This inner loop guarantees we make the same choices for all bench variants. SkRandom rand; diff --git a/bench/PremulAndUnpremulAlphaOpsBench.cpp b/bench/PremulAndUnpremulAlphaOpsBench.cpp index 4d9dbcd623..6e795417a6 100644 --- a/bench/PremulAndUnpremulAlphaOpsBench.cpp +++ b/bench/PremulAndUnpremulAlphaOpsBench.cpp @@ -25,11 +25,11 @@ public: } protected: - const char* onGetName() SK_OVERRIDE { + const char* onGetName() override { return fName.c_str(); } - void onPreDraw() SK_OVERRIDE { + void onPreDraw() override { SkImageInfo info = SkImageInfo::Make(W, H, fColorType, kUnpremul_SkAlphaType); fBmp1.allocPixels(info); // used in writePixels @@ -43,7 +43,7 @@ protected: fBmp2.allocPixels(info); // used in readPixels() } - void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE { + void onDraw(const int loops, SkCanvas* canvas) override { canvas->clear(SK_ColorBLACK); for (int loop = 0; loop < loops; ++loop) { diff --git a/bench/RTreeBench.cpp b/bench/RTreeBench.cpp index cdbdf35e01..6f76bd19bd 100644 --- a/bench/RTreeBench.cpp +++ b/bench/RTreeBench.cpp @@ -26,15 +26,15 @@ public: fName.printf("rtree_%s_build", name); } - bool isSuitableFor(Backend backend) SK_OVERRIDE { + bool isSuitableFor(Backend backend) override { return backend == kNonRendering_Backend; } protected: - const char* onGetName() SK_OVERRIDE { + const char* onGetName() override { return fName.c_str(); } - void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE { + void onDraw(const int loops, SkCanvas* canvas) override { SkRandom rand; SkAutoTMalloc rects(NUM_BUILD_RECTS); for (int i = 0; i < NUM_BUILD_RECTS; ++i) { @@ -60,14 +60,14 @@ public: fName.printf("rtree_%s_query", name); } - bool isSuitableFor(Backend backend) SK_OVERRIDE { + bool isSuitableFor(Backend backend) override { return backend == kNonRendering_Backend; } protected: - const char* onGetName() SK_OVERRIDE { + const char* onGetName() override { return fName.c_str(); } - void onPreDraw() SK_OVERRIDE { + void onPreDraw() override { SkRandom rand; SkAutoTMalloc rects(NUM_QUERY_RECTS); for (int i = 0; i < NUM_QUERY_RECTS; ++i) { @@ -76,7 +76,7 @@ protected: fTree.insert(rects.get(), NUM_QUERY_RECTS); } - void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE { + void onDraw(const int loops, SkCanvas* canvas) override { SkRandom rand; for (int i = 0; i < loops; ++i) { SkTDArray hits; diff --git a/bench/ReadPixBench.cpp b/bench/ReadPixBench.cpp index f019401ea3..917b917ab6 100644 --- a/bench/ReadPixBench.cpp +++ b/bench/ReadPixBench.cpp @@ -20,11 +20,11 @@ public: ReadPixBench() {} protected: - const char* onGetName() SK_OVERRIDE { + const char* onGetName() override { return "readpix"; } - void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE { + void onDraw(const int loops, SkCanvas* canvas) override { canvas->clear(SK_ColorBLACK); SkISize size = canvas->getDeviceSize(); diff --git a/bench/RecordingBench.h b/bench/RecordingBench.h index 783596d827..6cb5d51326 100644 --- a/bench/RecordingBench.h +++ b/bench/RecordingBench.h @@ -16,10 +16,10 @@ public: RecordingBench(const char* name, const SkPicture*, bool useBBH); protected: - const char* onGetName() SK_OVERRIDE; - bool isSuitableFor(Backend) SK_OVERRIDE; - void onDraw(const int loops, SkCanvas*) SK_OVERRIDE; - SkIPoint onGetSize() SK_OVERRIDE; + const char* onGetName() override; + bool isSuitableFor(Backend) override; + void onDraw(const int loops, SkCanvas*) override; + SkIPoint onGetSize() override; private: SkAutoTUnref fSrc; diff --git a/bench/RectBench.cpp b/bench/RectBench.cpp index 6228e00a57..4aa6b8bd1a 100644 --- a/bench/RectBench.cpp +++ b/bench/RectBench.cpp @@ -92,14 +92,14 @@ public: } protected: - void setupPaint(SkPaint* paint) SK_OVERRIDE { + void setupPaint(SkPaint* paint) override { this->INHERITED::setupPaint(paint); // srcmode is most interesting when we're not opaque paint->setAlpha(0x80); paint->setXfermode(fMode); } - const char* onGetName() SK_OVERRIDE { + const char* onGetName() override { fName.set(this->INHERITED::onGetName()); fName.prepend("srcmode_"); return fName.c_str(); diff --git a/bench/RectanizerBench.cpp b/bench/RectanizerBench.cpp index a5fad06366..f7e1f04ac8 100644 --- a/bench/RectanizerBench.cpp +++ b/bench/RectanizerBench.cpp @@ -64,15 +64,15 @@ public: } protected: - bool isSuitableFor(Backend backend) SK_OVERRIDE { + bool isSuitableFor(Backend backend) override { return kNonRendering_Backend == backend; } - const char* onGetName() SK_OVERRIDE { + const char* onGetName() override { return fName.c_str(); } - void onPreDraw() SK_OVERRIDE { + void onPreDraw() override { SkASSERT(NULL == fRectanizer.get()); if (kPow2_RectanizerType == fRectanizerType) { @@ -83,7 +83,7 @@ protected: } } - void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE { + void onDraw(const int loops, SkCanvas* canvas) override { SkRandom rand; SkIPoint16 loc; SkISize size; diff --git a/bench/RectoriBench.cpp b/bench/RectoriBench.cpp index de725a7cb2..b777fbe0eb 100644 --- a/bench/RectoriBench.cpp +++ b/bench/RectoriBench.cpp @@ -20,11 +20,11 @@ public: protected: - const char* onGetName() SK_OVERRIDE { + const char* onGetName() override { return "rectori"; } - void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE { + void onDraw(const int loops, SkCanvas* canvas) override { SkRandom Random; for (int i = 0; i < loops; i++) { diff --git a/bench/RefCntBench.cpp b/bench/RefCntBench.cpp index 7aa5746318..aacdf18edb 100644 --- a/bench/RefCntBench.cpp +++ b/bench/RefCntBench.cpp @@ -18,7 +18,7 @@ class AtomicInc32 : public Benchmark { public: AtomicInc32() : fX(0) {} - bool isSuitableFor(Backend backend) SK_OVERRIDE { + bool isSuitableFor(Backend backend) override { return backend == kNonRendering_Backend; } @@ -42,7 +42,7 @@ class AtomicInc64 : public Benchmark { public: AtomicInc64() : fX(0) {} - bool isSuitableFor(Backend backend) SK_OVERRIDE { + bool isSuitableFor(Backend backend) override { return backend == kNonRendering_Backend; } @@ -64,7 +64,7 @@ private: class RefCntBench_Stack : public Benchmark { public: - bool isSuitableFor(Backend backend) SK_OVERRIDE { + bool isSuitableFor(Backend backend) override { return backend == kNonRendering_Backend; } @@ -100,7 +100,7 @@ private: class RefCntBench_Heap : public Benchmark { public: - bool isSuitableFor(Backend backend) SK_OVERRIDE { + bool isSuitableFor(Backend backend) override { return backend == kNonRendering_Backend; } @@ -127,7 +127,7 @@ private: class RefCntBench_New : public Benchmark { public: - bool isSuitableFor(Backend backend) SK_OVERRIDE { + bool isSuitableFor(Backend backend) override { return backend == kNonRendering_Backend; } @@ -155,7 +155,7 @@ private: class WeakRefCntBench_Stack : public Benchmark { public: - bool isSuitableFor(Backend backend) SK_OVERRIDE { + bool isSuitableFor(Backend backend) override { return backend == kNonRendering_Backend; } @@ -186,16 +186,16 @@ public: class WeakRefCntBench_Heap : public Benchmark { public: - bool isSuitableFor(Backend backend) SK_OVERRIDE { + bool isSuitableFor(Backend backend) override { return backend == kNonRendering_Backend; } protected: - const char* onGetName() SK_OVERRIDE { + const char* onGetName() override { return "ref_cnt_heap_weak"; } - void onDraw(const int loops, SkCanvas*) SK_OVERRIDE { + void onDraw(const int loops, SkCanvas*) override { char memory[sizeof(PlacedWeakRefCnt)]; for (int i = 0; i < loops; ++i) { PlacedWeakRefCnt* ref = new (memory) PlacedWeakRefCnt(); @@ -213,16 +213,16 @@ private: class WeakRefCntBench_New : public Benchmark { public: - bool isSuitableFor(Backend backend) SK_OVERRIDE { + bool isSuitableFor(Backend backend) override { return backend == kNonRendering_Backend; } protected: - const char* onGetName() SK_OVERRIDE { + const char* onGetName() override { return "ref_cnt_new_weak"; } - void onDraw(const int loops, SkCanvas*) SK_OVERRIDE { + void onDraw(const int loops, SkCanvas*) override { for (int i = 0; i < loops; ++i) { SkWeakRefCnt* ref = new SkWeakRefCnt(); for (int j = 0; j < M; ++j) { diff --git a/bench/RegionBench.cpp b/bench/RegionBench.cpp index 5cd6779cb7..84e8d1b057 100644 --- a/bench/RegionBench.cpp +++ b/bench/RegionBench.cpp @@ -99,7 +99,7 @@ public: } } - bool isSuitableFor(Backend backend) SK_OVERRIDE { + bool isSuitableFor(Backend backend) override { return backend == kNonRendering_Backend; } diff --git a/bench/RegionContainBench.cpp b/bench/RegionContainBench.cpp index 3a0980907a..dfee9561b5 100644 --- a/bench/RegionContainBench.cpp +++ b/bench/RegionContainBench.cpp @@ -45,14 +45,14 @@ public: fB.setRect(0, 0, H, W); } - bool isSuitableFor(Backend backend) SK_OVERRIDE { + bool isSuitableFor(Backend backend) override { return backend == kNonRendering_Backend; } protected: - const char* onGetName() SK_OVERRIDE { return fName.c_str(); } + const char* onGetName() override { return fName.c_str(); } - void onDraw(const int loops, SkCanvas*) SK_OVERRIDE { + void onDraw(const int loops, SkCanvas*) override { Proc proc = fProc; for (int i = 0; i < loops; ++i) { diff --git a/bench/RepeatTileBench.cpp b/bench/RepeatTileBench.cpp index 0e63336a0f..afbc5b27f1 100644 --- a/bench/RepeatTileBench.cpp +++ b/bench/RepeatTileBench.cpp @@ -104,11 +104,11 @@ public: } protected: - const char* onGetName() SK_OVERRIDE { + const char* onGetName() override { return fName.c_str(); } - void onPreDraw() SK_OVERRIDE { + void onPreDraw() override { fBitmap.allocPixels(); fBitmap.eraseColor(kOpaque_SkAlphaType == fAlphaType ? SK_ColorWHITE : 0); @@ -127,7 +127,7 @@ protected: } - void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE { + void onDraw(const int loops, SkCanvas* canvas) override { SkPaint paint(fPaint); this->setupPaint(&paint); diff --git a/bench/RotatedRectBench.cpp b/bench/RotatedRectBench.cpp index 90bf611eb4..c37a6bef09 100644 --- a/bench/RotatedRectBench.cpp +++ b/bench/RotatedRectBench.cpp @@ -75,9 +75,9 @@ public: } protected: - const char* onGetName() SK_OVERRIDE { return fName.c_str(); } + const char* onGetName() override { return fName.c_str(); } - void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE { + void onDraw(const int loops, SkCanvas* canvas) override { SkPaint paint; paint.setAntiAlias(fAA); paint.setXfermodeMode(fMode); diff --git a/bench/SKPBench.h b/bench/SKPBench.h index 36d7dfd4cf..f17281c13a 100644 --- a/bench/SKPBench.h +++ b/bench/SKPBench.h @@ -19,16 +19,16 @@ class SKPBench : public Benchmark { public: SKPBench(const char* name, const SkPicture*, const SkIRect& devClip, SkScalar scale, bool useMultiPictureDraw); - ~SKPBench() SK_OVERRIDE; + ~SKPBench() override; protected: - const char* onGetName() SK_OVERRIDE; - const char* onGetUniqueName() SK_OVERRIDE; - void onPerCanvasPreDraw(SkCanvas*) SK_OVERRIDE; - void onPerCanvasPostDraw(SkCanvas*) SK_OVERRIDE; - bool isSuitableFor(Backend backend) SK_OVERRIDE; - void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE; - SkIPoint onGetSize() SK_OVERRIDE; + const char* onGetName() override; + const char* onGetUniqueName() override; + void onPerCanvasPreDraw(SkCanvas*) override; + void onPerCanvasPostDraw(SkCanvas*) override; + bool isSuitableFor(Backend backend) override; + void onDraw(const int loops, SkCanvas* canvas) override; + SkIPoint onGetSize() override; private: SkAutoTUnref fPic; diff --git a/bench/ScalarBench.cpp b/bench/ScalarBench.cpp index f1a9b9adee..2c59fa5a32 100644 --- a/bench/ScalarBench.cpp +++ b/bench/ScalarBench.cpp @@ -18,7 +18,7 @@ public: fName.printf("scalar_%s", name); } - bool isSuitableFor(Backend backend) SK_OVERRIDE { + bool isSuitableFor(Backend backend) override { return backend == kNonRendering_Backend; } @@ -27,11 +27,11 @@ public: protected: virtual int mulLoopCount() const { return 1; } - const char* onGetName() SK_OVERRIDE { + const char* onGetName() override { return fName.c_str(); } - void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE { + void onDraw(const int loops, SkCanvas* canvas) override { for (int i = 0; i < loops; i++) { this->performTest(); } @@ -101,8 +101,8 @@ public: } } protected: - int mulLoopCount() const SK_OVERRIDE { return 1; } - void performTest() SK_OVERRIDE { + int mulLoopCount() const override { return 1; } + void performTest() override { int sum = 0; for (size_t i = 0; i < ARRAY_N; ++i) { // We pass -fArray[i], so the compiler can't cheat and treat the @@ -140,16 +140,16 @@ public: } } - bool isSuitableFor(Backend backend) SK_OVERRIDE { + bool isSuitableFor(Backend backend) override { return backend == kNonRendering_Backend; } protected: - const char* onGetName() SK_OVERRIDE { + const char* onGetName() override { return "rect_bounds"; } - void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE { + void onDraw(const int loops, SkCanvas* canvas) override { SkRect r; for (int i = 0; i < loops; ++i) { for (int i = 0; i < 1000; ++i) { diff --git a/bench/SkipZeroesBench.cpp b/bench/SkipZeroesBench.cpp index 1587e01f11..7840a8aacb 100644 --- a/bench/SkipZeroesBench.cpp +++ b/bench/SkipZeroesBench.cpp @@ -36,16 +36,16 @@ public: } } - bool isSuitableFor(Backend backend) SK_OVERRIDE { + bool isSuitableFor(Backend backend) override { return backend == kNonRendering_Backend; } protected: - const char* onGetName() SK_OVERRIDE { + const char* onGetName() override { return fName.c_str(); } - void onPreDraw() SK_OVERRIDE { + void onPreDraw() override { SkString resourcePath = GetResourcePath(); if (resourcePath.isEmpty()) { fValid = false; @@ -73,7 +73,7 @@ protected: } } - void onDraw(const int loops, SkCanvas*) SK_OVERRIDE { + void onDraw(const int loops, SkCanvas*) override { if (!fValid) { #ifdef SK_DEBUG SkDebugf("stream was invalid: %s\n", fFilename.c_str()); diff --git a/bench/SortBench.cpp b/bench/SortBench.cpp index b46b805890..4cf91ba82e 100644 --- a/bench/SortBench.cpp +++ b/bench/SortBench.cpp @@ -107,22 +107,22 @@ public: fName.printf("sort_%s_%s", gSorts[s].fName, gRec[t].fName); } - bool isSuitableFor(Backend backend) SK_OVERRIDE { + bool isSuitableFor(Backend backend) override { return backend == kNonRendering_Backend; } protected: - const char* onGetName() SK_OVERRIDE { + const char* onGetName() override { return fName.c_str(); } // Delayed initialization only done if onDraw will be called. - void onPreDraw() SK_OVERRIDE { + void onPreDraw() override { fUnsorted.reset(N); gRec[fType].fProc(fUnsorted.get()); } - void onDraw(const int loops, SkCanvas*) SK_OVERRIDE { + void onDraw(const int loops, SkCanvas*) override { SkAutoTMalloc sorted(N); for (int i = 0; i < loops; i++) { memcpy(sorted.get(), fUnsorted.get(), N*sizeof(int)); diff --git a/bench/WritePixelsBench.cpp b/bench/WritePixelsBench.cpp index 3353ba2b8d..3ee90345fa 100644 --- a/bench/WritePixelsBench.cpp +++ b/bench/WritePixelsBench.cpp @@ -41,11 +41,11 @@ public: } protected: - const char* onGetName() SK_OVERRIDE { + const char* onGetName() override { return fName.c_str(); } - void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE { + void onDraw(const int loops, SkCanvas* canvas) override { SkISize size = canvas->getDeviceSize(); canvas->clear(0xFFFF0000); diff --git a/bench/WriterBench.cpp b/bench/WriterBench.cpp index 4dcd3a3d07..6db1cf19fe 100644 --- a/bench/WriterBench.cpp +++ b/bench/WriterBench.cpp @@ -12,16 +12,16 @@ class WriterBench : public Benchmark { public: - bool isSuitableFor(Backend backend) SK_OVERRIDE { + bool isSuitableFor(Backend backend) override { return backend == kNonRendering_Backend; } protected: - const char* onGetName() SK_OVERRIDE { + const char* onGetName() override { return "writer"; } - void onDraw(const int loops, SkCanvas*) SK_OVERRIDE { + void onDraw(const int loops, SkCanvas*) override { static const char gStr[] = "abcdefghimjklmnopqrstuvwxyz"; static const size_t gLen = strlen(gStr); SkWriter32 writer; diff --git a/bench/XfermodeBench.cpp b/bench/XfermodeBench.cpp index 4afd06b261..c5cb714104 100644 --- a/bench/XfermodeBench.cpp +++ b/bench/XfermodeBench.cpp @@ -29,9 +29,9 @@ public: } protected: - const char* onGetName() SK_OVERRIDE { return fName.c_str(); } + const char* onGetName() override { return fName.c_str(); } - void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE { + void onDraw(const int loops, SkCanvas* canvas) override { SkISize size = canvas->getDeviceSize(); SkRandom random; for (int i = 0; i < loops; ++i) { @@ -63,14 +63,14 @@ private: class XferCreateBench : public Benchmark { public: - bool isSuitableFor(Backend backend) SK_OVERRIDE { + bool isSuitableFor(Backend backend) override { return backend == kNonRendering_Backend; } protected: - const char* onGetName() SK_OVERRIDE { return "xfermode_create"; } + const char* onGetName() override { return "xfermode_create"; } - void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE { + void onDraw(const int loops, SkCanvas* canvas) override { for (int outer = 0; outer < loops * 10; ++outer) { for (int i = 0; i <= SkXfermode::kLastMode; ++i) { SkXfermode* xfer = SkXfermode::Create(SkXfermode::Mode(i)); diff --git a/dm/DM.cpp b/dm/DM.cpp index 86a75983e3..870b371cc4 100644 --- a/dm/DM.cpp +++ b/dm/DM.cpp @@ -215,9 +215,9 @@ static void push_sink(const char* tag, Sink* s) { } // Try a noop Src as a canary. If it fails, skip this sink. struct : public Src { - Error draw(SkCanvas*) const SK_OVERRIDE { return ""; } - SkISize size() const SK_OVERRIDE { return SkISize::Make(16, 16); } - Name name() const SK_OVERRIDE { return "noop"; } + Error draw(SkCanvas*) const override { return ""; } + SkISize size() const override { return SkISize::Make(16, 16); } + Name name() const override { return "noop"; } } noop; SkBitmap bitmap; @@ -526,14 +526,14 @@ static void gather_tests() { static void run_test(skiatest::Test* test) { struct : public skiatest::Reporter { - void reportFailed(const skiatest::Failure& failure) SK_OVERRIDE { + void reportFailed(const skiatest::Failure& failure) override { fail(failure.toString()); JsonWriter::AddTestFailure(failure); } - bool allowExtendedTest() const SK_OVERRIDE { + bool allowExtendedTest() const override { return FLAGS_pathOpsExtended; } - bool verbose() const SK_OVERRIDE { return FLAGS_veryVerbose; } + bool verbose() const override { return FLAGS_veryVerbose; } } reporter; WallTimer timer; timer.start(); diff --git a/dm/DMSrcSink.cpp b/dm/DMSrcSink.cpp index 5242c95e83..8bb1b25cbd 100644 --- a/dm/DMSrcSink.cpp +++ b/dm/DMSrcSink.cpp @@ -450,12 +450,12 @@ Error ViaMatrix::draw(const Src& src, SkBitmap* bitmap, SkWStream* stream, SkStr fSize = auto_compute_translate(&fMatrix, src.size().width(), src.size().height()); } - Error draw(SkCanvas* canvas) const SK_OVERRIDE { + Error draw(SkCanvas* canvas) const override { canvas->concat(fMatrix); return fSrc.draw(canvas); } - SkISize size() const SK_OVERRIDE { return fSize; } - Name name() const SK_OVERRIDE { sk_throw(); return ""; } // No one should be calling this. + SkISize size() const override { return fSize; } + Name name() const override { sk_throw(); return ""; } // No one should be calling this. } proxy(src, fMatrix); return fSink->draw(proxy, bitmap, stream, log); } @@ -505,15 +505,15 @@ Error ViaPipe::draw(const Src& src, SkBitmap* bitmap, SkWStream* stream, SkStrin const Src& fSrc; ProxySrc(const Src& src) : fSrc(src) {} - Error draw(SkCanvas* canvas) const SK_OVERRIDE { + Error draw(SkCanvas* canvas) const override { SkISize size = this->size(); PipeController controller(canvas, &SkImageDecoder::DecodeMemory); SkGPipeWriter pipe; const uint32_t kFlags = 0; // We mirror SkDeferredCanvas, which doesn't use any flags. return fSrc.draw(pipe.startRecording(&controller, kFlags, size.width(), size.height())); } - SkISize size() const SK_OVERRIDE { return fSrc.size(); } - Name name() const SK_OVERRIDE { sk_throw(); return ""; } // No one should be calling this. + SkISize size() const override { return fSrc.size(); } + Name name() const override { sk_throw(); return ""; } // No one should be calling this. } proxy(src); return fSink->draw(proxy, bitmap, stream, log); } @@ -546,12 +546,12 @@ Error ViaSerialization::draw(const Src& src, SkBitmap* bitmap, SkWStream* stream const SkISize fSize; ProxySrc(const SkPicture* pic, SkISize size) : fPic(pic), fSize(size) {} - Error draw(SkCanvas* canvas) const SK_OVERRIDE { + Error draw(SkCanvas* canvas) const override { canvas->drawPicture(fPic); return ""; } - SkISize size() const SK_OVERRIDE { return fSize; } - Name name() const SK_OVERRIDE { sk_throw(); return ""; } // No one should be calling this. + SkISize size() const override { return fSize; } + Name name() const override { sk_throw(); return ""; } // No one should be calling this. } proxy(deserialized, src.size()); return fSink->draw(proxy, bitmap, stream, log); } @@ -583,7 +583,7 @@ Error ViaTiles::draw(const Src& src, SkBitmap* bitmap, SkWStream* stream, SkStri ProxySrc(int w, int h, const SkPicture* pic, SkISize size) : fW(w), fH(h), fPic(pic), fSize(size) {} - Error draw(SkCanvas* canvas) const SK_OVERRIDE { + Error draw(SkCanvas* canvas) const override { const int xTiles = (fSize.width() + fW - 1) / fW, yTiles = (fSize.height() + fH - 1) / fH; SkMultiPictureDraw mpd(xTiles*yTiles); @@ -616,8 +616,8 @@ Error ViaTiles::draw(const Src& src, SkBitmap* bitmap, SkWStream* stream, SkStri surfaces.unrefAll(); return ""; } - SkISize size() const SK_OVERRIDE { return fSize; } - Name name() const SK_OVERRIDE { sk_throw(); return ""; } // No one should be calling this. + SkISize size() const override { return fSize; } + Name name() const override { sk_throw(); return ""; } // No one should be calling this. } proxy(fW, fH, pic, src.size()); return fSink->draw(proxy, bitmap, stream, log); } diff --git a/dm/DMSrcSink.h b/dm/DMSrcSink.h index 3a0eab020f..2c21e87ef6 100644 --- a/dm/DMSrcSink.h +++ b/dm/DMSrcSink.h @@ -81,9 +81,9 @@ class GMSrc : public Src { public: explicit GMSrc(skiagm::GMRegistry::Factory); - Error draw(SkCanvas*) const SK_OVERRIDE; - SkISize size() const SK_OVERRIDE; - Name name() const SK_OVERRIDE; + Error draw(SkCanvas*) const override; + SkISize size() const override; + Name name() const override; private: skiagm::GMRegistry::Factory fFactory; }; @@ -96,9 +96,9 @@ public: }; CodecSrc(Path, Mode); - Error draw(SkCanvas*) const SK_OVERRIDE; - SkISize size() const SK_OVERRIDE; - Name name() const SK_OVERRIDE; + Error draw(SkCanvas*) const override; + SkISize size() const override; + Name name() const override; private: Path fPath; Mode fMode; @@ -111,9 +111,9 @@ public: // divisor > 0 means decode in subsets, dividing into a divisor x divisor grid. explicit ImageSrc(Path path, int divisor = 0); - Error draw(SkCanvas*) const SK_OVERRIDE; - SkISize size() const SK_OVERRIDE; - Name name() const SK_OVERRIDE; + Error draw(SkCanvas*) const override; + SkISize size() const override; + Name name() const override; private: Path fPath; const int fDivisor; @@ -123,9 +123,9 @@ class SKPSrc : public Src { public: explicit SKPSrc(Path path); - Error draw(SkCanvas*) const SK_OVERRIDE; - SkISize size() const SK_OVERRIDE; - Name name() const SK_OVERRIDE; + Error draw(SkCanvas*) const override; + SkISize size() const override; + Name name() const override; private: Path fPath; }; @@ -136,9 +136,9 @@ class NullSink : public Sink { public: NullSink() {} - Error draw(const Src& src, SkBitmap*, SkWStream*, SkString*) const SK_OVERRIDE; - int enclave() const SK_OVERRIDE { return kAnyThread_Enclave; } - const char* fileExtension() const SK_OVERRIDE { return ""; } + Error draw(const Src& src, SkBitmap*, SkWStream*, SkString*) const override; + int enclave() const override { return kAnyThread_Enclave; } + const char* fileExtension() const override { return ""; } }; @@ -146,9 +146,9 @@ class GPUSink : public Sink { public: GPUSink(GrContextFactory::GLContextType, GrGLStandard, int samples, bool dfText, bool threaded); - Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const SK_OVERRIDE; - int enclave() const SK_OVERRIDE; - const char* fileExtension() const SK_OVERRIDE { return "png"; } + Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override; + int enclave() const override; + const char* fileExtension() const override { return "png"; } private: GrContextFactory::GLContextType fContextType; GrGLStandard fGpuAPI; @@ -161,27 +161,27 @@ class PDFSink : public Sink { public: PDFSink(); - Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const SK_OVERRIDE; - int enclave() const SK_OVERRIDE { return kAnyThread_Enclave; } - const char* fileExtension() const SK_OVERRIDE { return "pdf"; } + Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override; + int enclave() const override { return kAnyThread_Enclave; } + const char* fileExtension() const override { return "pdf"; } }; class XPSSink : public Sink { public: XPSSink(); - Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const SK_OVERRIDE; - int enclave() const SK_OVERRIDE { return kAnyThread_Enclave; } - const char* fileExtension() const SK_OVERRIDE { return "xps"; } + Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override; + int enclave() const override { return kAnyThread_Enclave; } + const char* fileExtension() const override { return "xps"; } }; class RasterSink : public Sink { public: explicit RasterSink(SkColorType); - Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const SK_OVERRIDE; - int enclave() const SK_OVERRIDE { return kAnyThread_Enclave; } - const char* fileExtension() const SK_OVERRIDE { return "png"; } + Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override; + int enclave() const override { return kAnyThread_Enclave; } + const char* fileExtension() const override { return "png"; } private: SkColorType fColorType; }; @@ -190,18 +190,18 @@ class SKPSink : public Sink { public: SKPSink(); - Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const SK_OVERRIDE; - int enclave() const SK_OVERRIDE { return kAnyThread_Enclave; } - const char* fileExtension() const SK_OVERRIDE { return "skp"; } + Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override; + int enclave() const override { return kAnyThread_Enclave; } + const char* fileExtension() const override { return "skp"; } }; class SVGSink : public Sink { public: SVGSink(); - Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const SK_OVERRIDE; - int enclave() const SK_OVERRIDE { return kAnyThread_Enclave; } - const char* fileExtension() const SK_OVERRIDE { return "svg"; } + Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override; + int enclave() const override { return kAnyThread_Enclave; } + const char* fileExtension() const override { return "svg"; } }; @@ -211,9 +211,9 @@ class ViaMatrix : public Sink { public: ViaMatrix(SkMatrix, Sink*); - Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const SK_OVERRIDE; - int enclave() const SK_OVERRIDE { return fSink->enclave(); } - const char* fileExtension() const SK_OVERRIDE { return fSink->fileExtension(); } + Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override; + int enclave() const override { return fSink->enclave(); } + const char* fileExtension() const override { return fSink->fileExtension(); } private: SkMatrix fMatrix; SkAutoTDelete fSink; @@ -223,9 +223,9 @@ class ViaUpright : public Sink { public: ViaUpright(SkMatrix, Sink*); - Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const SK_OVERRIDE; - int enclave() const SK_OVERRIDE { return fSink->enclave(); } - const char* fileExtension() const SK_OVERRIDE { return fSink->fileExtension(); } + Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override; + int enclave() const override { return fSink->enclave(); } + const char* fileExtension() const override { return fSink->fileExtension(); } private: SkMatrix fMatrix; SkAutoTDelete fSink; @@ -235,9 +235,9 @@ class ViaPipe : public Sink { public: explicit ViaPipe(Sink*); - Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const SK_OVERRIDE; - int enclave() const SK_OVERRIDE { return fSink->enclave(); } - const char* fileExtension() const SK_OVERRIDE { return fSink->fileExtension(); } + Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override; + int enclave() const override { return fSink->enclave(); } + const char* fileExtension() const override { return fSink->fileExtension(); } private: SkAutoTDelete fSink; }; @@ -246,9 +246,9 @@ class ViaSerialization : public Sink { public: explicit ViaSerialization(Sink*); - Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const SK_OVERRIDE; - int enclave() const SK_OVERRIDE { return fSink->enclave(); } - const char* fileExtension() const SK_OVERRIDE { return fSink->fileExtension(); } + Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override; + int enclave() const override { return fSink->enclave(); } + const char* fileExtension() const override { return fSink->fileExtension(); } private: SkAutoTDelete fSink; }; @@ -257,9 +257,9 @@ class ViaTiles : public Sink { public: ViaTiles(int w, int h, SkBBHFactory*, Sink*); - Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const SK_OVERRIDE; - int enclave() const SK_OVERRIDE { return fSink->enclave(); } - const char* fileExtension() const SK_OVERRIDE { return fSink->fileExtension(); } + Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override; + int enclave() const override { return fSink->enclave(); } + const char* fileExtension() const override { return fSink->fileExtension(); } private: const int fW, fH; SkAutoTDelete fFactory; diff --git a/dm/DMSrcSinkAndroid.cpp b/dm/DMSrcSinkAndroid.cpp index fc83ea4174..29cf055b4d 100644 --- a/dm/DMSrcSinkAndroid.cpp +++ b/dm/DMSrcSinkAndroid.cpp @@ -39,7 +39,7 @@ namespace { class ContextFactory : public android::uirenderer::IContextFactory { public: android::uirenderer::AnimationContext* createAnimationContext - (android::uirenderer::renderthread::TimeLord& clock) SK_OVERRIDE { + (android::uirenderer::renderthread::TimeLord& clock) override { return new android::uirenderer::AnimationContext(clock); } }; @@ -181,7 +181,7 @@ Error ViaAndroidSDK::draw(const Src& src, ProxySrc(const Src& src) : fSrc(src) {} - Error draw(SkCanvas* canvas) const SK_OVERRIDE { + Error draw(SkCanvas* canvas) const override { // Pass through HWUI's upper layers to get operational transforms SkAutoTDelete ac (android::Canvas::create_canvas(canvas)); SkAutoTUnref scProxy @@ -195,8 +195,8 @@ Error ViaAndroidSDK::draw(const Src& src, return ""; } - SkISize size() const SK_OVERRIDE { return fSrc.size(); } - Name name() const SK_OVERRIDE { sk_throw(); return ""; } + SkISize size() const override { return fSrc.size(); } + Name name() const override { sk_throw(); return ""; } } proxy(src); return fSink->draw(proxy, bitmap, stream, log); diff --git a/dm/DMSrcSinkAndroid.h b/dm/DMSrcSinkAndroid.h index 1a7459f6e8..bd4adcbe24 100644 --- a/dm/DMSrcSinkAndroid.h +++ b/dm/DMSrcSinkAndroid.h @@ -22,9 +22,9 @@ class HWUISink : public Sink { public: HWUISink() { } - Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const SK_OVERRIDE; - int enclave() const SK_OVERRIDE { return kGPU_Enclave; } - const char* fileExtension() const SK_OVERRIDE { return "png"; } + Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override; + int enclave() const override { return kGPU_Enclave; } + const char* fileExtension() const override { return "png"; } }; /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ @@ -35,9 +35,9 @@ class ViaAndroidSDK : public Sink { public: explicit ViaAndroidSDK(Sink*); - Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const SK_OVERRIDE; - int enclave() const SK_OVERRIDE { return fSink->enclave(); } - const char* fileExtension() const SK_OVERRIDE { return fSink->fileExtension(); } + Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override; + int enclave() const override { return fSink->enclave(); } + const char* fileExtension() const override { return fSink->fileExtension(); } private: SkAutoTDelete fSink; diff --git a/example/HelloWorld.h b/example/HelloWorld.h index e5cde271bf..a1508c582d 100644 --- a/example/HelloWorld.h +++ b/example/HelloWorld.h @@ -25,7 +25,7 @@ public: kGPU_DeviceType, }; HelloWorldWindow(void* hwnd); - virtual ~HelloWorldWindow() SK_OVERRIDE; + virtual ~HelloWorldWindow() override; // Changes the device type of the object. bool setUpBackend(); @@ -33,7 +33,7 @@ public: DeviceType getDeviceType() const { return fType; } protected: - SkSurface* createSurface() SK_OVERRIDE { + SkSurface* createSurface() override { if (kGPU_DeviceType == fType) { SkSurfaceProps props(INHERITED::getSurfaceProps()); return SkSurface::NewRenderTargetDirect(fRenderTarget, &props); @@ -43,16 +43,16 @@ protected: return fSurface = SkSurface::NewRaster(info); } - void draw(SkCanvas* canvas) SK_OVERRIDE; + void draw(SkCanvas* canvas) override; void drawContents(SkCanvas* canvas); - void onSizeChange() SK_OVERRIDE; + void onSizeChange() override; private: bool findNextMatch(); // Set example to the first one that matches FLAGS_match. void setTitle(); void setUpRenderTarget(); - bool onHandleChar(SkUnichar unichar) SK_OVERRIDE; + bool onHandleChar(SkUnichar unichar) override; void tearDownBackend(); // draw contents diff --git a/experimental/AndroidPathRenderer/GrAndroidPathRenderer.h b/experimental/AndroidPathRenderer/GrAndroidPathRenderer.h index 38d2030468..a7225fa660 100644 --- a/experimental/AndroidPathRenderer/GrAndroidPathRenderer.h +++ b/experimental/AndroidPathRenderer/GrAndroidPathRenderer.h @@ -16,13 +16,13 @@ public: virtual bool canDrawPath(const SkPath& path, const SkStrokeRec& stroke, const GrDrawTarget* target, - bool antiAlias) const SK_OVERRIDE; + bool antiAlias) const override; protected: virtual bool onDrawPath(const SkPath& path, const SkStrokeRec& stroke, GrDrawTarget* target, - bool antiAlias) SK_OVERRIDE; + bool antiAlias) override; private: typedef GrPathRenderer INHERITED; diff --git a/experimental/PdfViewer/SkNulCanvas.h b/experimental/PdfViewer/SkNulCanvas.h index 58c239a053..c8a95e9e95 100644 --- a/experimental/PdfViewer/SkNulCanvas.h +++ b/experimental/PdfViewer/SkNulCanvas.h @@ -26,13 +26,13 @@ public: explicit SkNulCanvas(const SkBitmap& bitmap) : SkCanvas(bitmap) {} virtual ~SkNulCanvas() {} - void beginCommentGroup(const char* description) SK_OVERRIDE {} - void addComment(const char* kywd, const char* value) SK_OVERRIDE {} - void endCommentGroup() SK_OVERRIDE {} - SkDrawFilter* setDrawFilter(SkDrawFilter* filter) SK_OVERRIDE {return NULL;} + void beginCommentGroup(const char* description) override {} + void addComment(const char* kywd, const char* value) override {} + void endCommentGroup() override {} + SkDrawFilter* setDrawFilter(SkDrawFilter* filter) override {return NULL;} - bool isClipEmpty() const SK_OVERRIDE { return false; } - bool getClipBounds(SkRect* bounds) const SK_OVERRIDE { + bool isClipEmpty() const override { return false; } + bool getClipBounds(SkRect* bounds) const override { if (NULL != bounds) { bounds->setXYWH(0, 0, SkIntToScalar(this->imageInfo().width()), @@ -40,7 +40,7 @@ public: } return true; } - bool getClipDeviceBounds(SkIRect* bounds) const SK_OVERRIDE { + bool getClipDeviceBounds(SkIRect* bounds) const override { if (NULL != bounds) { bounds->setLargest(); } @@ -52,54 +52,54 @@ protected: virtual SkBaseDevice* setDevice(SkBaseDevice* device) {return NULL;} virtual SaveLayerStrategy willSaveLayer(const SkRect* bounds, const SkPaint* paint, - SaveFlags flags) SK_OVERRIDE { + SaveFlags flags) override { this->INHERITED::willSaveLayer(bounds, paint, flags); return kNoLayer_SaveLayerStrategy; } virtual void onDrawText(const void* text, size_t byteLength, SkScalar x, - SkScalar y, const SkPaint& paint) SK_OVERRIDE {} + SkScalar y, const SkPaint& paint) override {} virtual void onDrawPosText(const void* text, size_t byteLength, - const SkPoint pos[], const SkPaint& paint) SK_OVERRIDE {} + const SkPoint pos[], const SkPaint& paint) override {} virtual void onDrawPosTextH(const void* text, size_t byteLength, const SkScalar xpos[], SkScalar constY, - const SkPaint& paint) SK_OVERRIDE {} + const SkPaint& paint) override {} virtual void onDrawTextOnPath(const void* text, size_t byteLength, const SkPath& path, const SkMatrix* matrix, - const SkPaint& paint) SK_OVERRIDE {} + const SkPaint& paint) override {} - void onClipRect(const SkRect&, SkRegion::Op, ClipEdgeStyle) SK_OVERRIDE {} - void onClipRRect(const SkRRect&, SkRegion::Op, ClipEdgeStyle) SK_OVERRIDE {} - void onClipPath(const SkPath&, SkRegion::Op, ClipEdgeStyle) SK_OVERRIDE {} - void onClipRegion(const SkRegion&, SkRegion::Op) SK_OVERRIDE {} + void onClipRect(const SkRect&, SkRegion::Op, ClipEdgeStyle) override {} + void onClipRRect(const SkRRect&, SkRegion::Op, ClipEdgeStyle) override {} + void onClipPath(const SkPath&, SkRegion::Op, ClipEdgeStyle) override {} + void onClipRegion(const SkRegion&, SkRegion::Op) override {} - void onDrawPicture(const SkPicture*, const SkMatrix*, const SkPaint*) SK_OVERRIDE {} + void onDrawPicture(const SkPicture*, const SkMatrix*, const SkPaint*) override {} - void onDrawPaint(const SkPaint& paint) SK_OVERRIDE {} + void onDrawPaint(const SkPaint& paint) override {} void onDrawPoints(PointMode mode, size_t count, const SkPoint pts[], - const SkPaint& paint) SK_OVERRIDE {} - void onDrawRect(const SkRect& rect, const SkPaint& paint) SK_OVERRIDE {} - void onDrawOval(const SkRect& oval, const SkPaint&) SK_OVERRIDE {} - void onDrawRRect(const SkRRect& rrect, const SkPaint& paint) SK_OVERRIDE {} - void onDrawPath(const SkPath& path, const SkPaint& paint) SK_OVERRIDE {} + const SkPaint& paint) override {} + void onDrawRect(const SkRect& rect, const SkPaint& paint) override {} + void onDrawOval(const SkRect& oval, const SkPaint&) override {} + void onDrawRRect(const SkRRect& rrect, const SkPaint& paint) override {} + void onDrawPath(const SkPath& path, const SkPaint& paint) override {} void onDrawBitmap(const SkBitmap& bitmap, SkScalar left, SkScalar top, - const SkPaint* paint = NULL) SK_OVERRIDE {} + const SkPaint* paint = NULL) override {} void onDrawBitmapRect(const SkBitmap& bitmap, const SkRect* src, const SkRect& dst, const SkPaint* paint, - DrawBitmapRectFlags flags) SK_OVERRIDE {} - void onDrawImage(const SkImage*, SkScalar left, SkScalar top, const SkPaint*) SK_OVERRIDE {} + DrawBitmapRectFlags flags) override {} + void onDrawImage(const SkImage*, SkScalar left, SkScalar top, const SkPaint*) override {} void onDrawImageRect(const SkImage*, const SkRect* src, const SkRect& dst, - const SkPaint*) SK_OVERRIDE{} + const SkPaint*) override{} void onDrawBitmapNine(const SkBitmap& bitmap, const SkIRect& center, - const SkRect& dst, const SkPaint* paint = NULL) SK_OVERRIDE {} + const SkRect& dst, const SkPaint* paint = NULL) override {} void onDrawSprite(const SkBitmap& bitmap, int left, int top, - const SkPaint* paint = NULL) SK_OVERRIDE {} + const SkPaint* paint = NULL) override {} void onDrawVertices(VertexMode vmode, int vertexCount, const SkPoint vertices[], const SkPoint texs[], const SkColor colors[], SkXfermode* xmode, const uint16_t indices[], int indexCount, - const SkPaint& paint) SK_OVERRIDE {} + const SkPaint& paint) override {} private: diff --git a/experimental/PdfViewer/src/SkPdfContext.cpp b/experimental/PdfViewer/src/SkPdfContext.cpp index 038d38e84e..835a89c86a 100644 --- a/experimental/PdfViewer/src/SkPdfContext.cpp +++ b/experimental/PdfViewer/src/SkPdfContext.cpp @@ -19,8 +19,8 @@ public: SkCanvas* canvas) : INHERITED(tokenizer, pdfContext, canvas) {} - SkPdfResult consumeToken(PdfToken& token) SK_OVERRIDE; - void loop() SK_OVERRIDE; + SkPdfResult consumeToken(PdfToken& token) override; + void loop() override; private: typedef SkPdfTokenLooper INHERITED; diff --git a/experimental/PdfViewer/src/SkPdfRenderer.cpp b/experimental/PdfViewer/src/SkPdfRenderer.cpp index 037606694e..ead65039a6 100644 --- a/experimental/PdfViewer/src/SkPdfRenderer.cpp +++ b/experimental/PdfViewer/src/SkPdfRenderer.cpp @@ -212,8 +212,8 @@ public: explicit PdfInlineImageLooper(SkPdfTokenLooper* parent) : INHERITED(parent) {} - SkPdfResult consumeToken(PdfToken& token) SK_OVERRIDE; - void loop() SK_OVERRIDE; + SkPdfResult consumeToken(PdfToken& token) override; + void loop() override; private: typedef SkPdfTokenLooper INHERITED; @@ -224,8 +224,8 @@ public: explicit PdfCompatibilitySectionLooper(SkPdfTokenLooper* parent) : INHERITED (parent) {} - SkPdfResult consumeToken(PdfToken& token) SK_OVERRIDE; - void loop() SK_OVERRIDE; + SkPdfResult consumeToken(PdfToken& token) override; + void loop() override; private: typedef SkPdfTokenLooper INHERITED; diff --git a/experimental/SkV8Example/SkV8Example.h b/experimental/SkV8Example/SkV8Example.h index 38a9c8561a..5185722a77 100644 --- a/experimental/SkV8Example/SkV8Example.h +++ b/experimental/SkV8Example/SkV8Example.h @@ -25,15 +25,15 @@ public: virtual ~SkV8ExampleWindow(); protected: - void onDraw(SkCanvas* canvas) SK_OVERRIDE; - void onSizeChange() SK_OVERRIDE; + void onDraw(SkCanvas* canvas) override; + void onSizeChange() override; #if SK_SUPPORT_GPU - SkSurface* createSurface() SK_OVERRIDE; + SkSurface* createSurface() override; #endif #ifdef SK_BUILD_FOR_WIN - void onHandleInval(const SkIRect&) SK_OVERRIDE; + void onHandleInval(const SkIRect&) override; #endif void windowSizeChanged(); diff --git a/experimental/StrokePathRenderer/GrStrokePathRenderer.h b/experimental/StrokePathRenderer/GrStrokePathRenderer.h index 9cf34d8712..85752c5681 100644 --- a/experimental/StrokePathRenderer/GrStrokePathRenderer.h +++ b/experimental/StrokePathRenderer/GrStrokePathRenderer.h @@ -20,11 +20,11 @@ public: virtual bool canDrawPath(const SkPath& path, const SkStrokeRec& stroke, const GrDrawTarget* target, - bool antiAlias) const SK_OVERRIDE; + bool antiAlias) const override; protected: virtual bool onDrawPath(const SkPath& path, const SkStrokeRec& stroke, GrDrawTarget* target, - bool antiAlias) SK_OVERRIDE; + bool antiAlias) override; }; diff --git a/experimental/iOSSampleApp/SkSampleUIView.mm b/experimental/iOSSampleApp/SkSampleUIView.mm index 1d27e11469..0d7a4db2bd 100644 --- a/experimental/iOSSampleApp/SkSampleUIView.mm +++ b/experimental/iOSSampleApp/SkSampleUIView.mm @@ -40,7 +40,7 @@ public: #endif } - void setUpBackend(SampleWindow* win, int msaaSampleCount) SK_OVERRIDE { + void setUpBackend(SampleWindow* win, int msaaSampleCount) override { SkASSERT(SkOSWindow::kNone_BackEndType == fBackend); fBackend = SkOSWindow::kNone_BackEndType; @@ -101,7 +101,7 @@ public: this->windowSizeChanged(win); } - void tearDownBackend(SampleWindow *win) SK_OVERRIDE { + void tearDownBackend(SampleWindow *win) override { #if SK_SUPPORT_GPU SkSafeUnref(fCurContext); fCurContext = NULL; @@ -116,7 +116,7 @@ public: fBackend = SampleWindow::kNone_BackEndType; } - SkSurface* createSurface(SampleWindow::DeviceType dType, SampleWindow* win) SK_OVERRIDE{ + SkSurface* createSurface(SampleWindow::DeviceType dType, SampleWindow* win) override{ #if SK_SUPPORT_GPU if (SampleWindow::IsGpuDeviceType(dType) && fCurContext) { SkSurfaceProps props(win->getSurfaceProps()); @@ -128,7 +128,7 @@ public: virtual void publishCanvas(SampleWindow::DeviceType dType, SkCanvas* canvas, - SampleWindow* win) SK_OVERRIDE { + SampleWindow* win) override { #if SK_SUPPORT_GPU if (NULL != fCurContext) { fCurContext->flush(); @@ -137,7 +137,7 @@ public: win->present(); } - void windowSizeChanged(SampleWindow* win) SK_OVERRIDE { + void windowSizeChanged(SampleWindow* win) override { #if SK_SUPPORT_GPU if (NULL != fCurContext) { SkOSWindow::AttachmentInfo info; @@ -159,7 +159,7 @@ public: #endif } - GrContext* getGrContext() SK_OVERRIDE { + GrContext* getGrContext() override { #if SK_SUPPORT_GPU return fCurContext; #else @@ -167,7 +167,7 @@ public: #endif } - GrRenderTarget* getGrRenderTarget() SK_OVERRIDE { + GrRenderTarget* getGrRenderTarget() override { #if SK_SUPPORT_GPU return fCurRenderTarget; #else diff --git a/experimental/tools/PageCachingDocument.cpp b/experimental/tools/PageCachingDocument.cpp index 7822d55e9e..9baf45c721 100644 --- a/experimental/tools/PageCachingDocument.cpp +++ b/experimental/tools/PageCachingDocument.cpp @@ -25,10 +25,10 @@ public: virtual ~PageCachingDocument(); virtual SkCanvas* onBeginPage(SkScalar width, SkScalar height, - const SkRect& content) SK_OVERRIDE; - void onEndPage() SK_OVERRIDE; - bool onClose(SkWStream*) SK_OVERRIDE; - void onAbort() SK_OVERRIDE; + const SkRect& content) override; + void onEndPage() override; + bool onClose(SkWStream*) override; + void onAbort() override; private: struct Page { diff --git a/experimental/tools/SkDmuxWStream.h b/experimental/tools/SkDmuxWStream.h index 52376c527f..aac8b18a88 100644 --- a/experimental/tools/SkDmuxWStream.h +++ b/experimental/tools/SkDmuxWStream.h @@ -19,10 +19,10 @@ class SkDmuxWStream : public SkWStream { public: SkDmuxWStream(SkWStream* const streamArray[], size_t count); ~SkDmuxWStream(); - virtual bool write(const void* buffer, size_t size) SK_OVERRIDE; - virtual void newline() SK_OVERRIDE; - virtual void flush() SK_OVERRIDE; - virtual size_t bytesWritten() const SK_OVERRIDE; + virtual bool write(const void* buffer, size_t size) override; + virtual void newline() override; + virtual void flush() override; + virtual size_t bytesWritten() const override; private: SkTDArray fWStreams; diff --git a/experimental/tools/multipage_pdf_profiler.cpp b/experimental/tools/multipage_pdf_profiler.cpp index 337db1f91a..08a32a2436 100644 --- a/experimental/tools/multipage_pdf_profiler.cpp +++ b/experimental/tools/multipage_pdf_profiler.cpp @@ -31,11 +31,11 @@ class NullWStream : public SkWStream { public: NullWStream() : fBytesWritten(0) { } - bool write(const void*, size_t size) SK_OVERRIDE { + bool write(const void*, size_t size) override { fBytesWritten += size; return true; } - size_t bytesWritten() const SK_OVERRIDE { + size_t bytesWritten() const override { return fBytesWritten; } size_t fBytesWritten; diff --git a/gm/aaclip.cpp b/gm/aaclip.cpp index e977f5f05f..e613af66bd 100644 --- a/gm/aaclip.cpp +++ b/gm/aaclip.cpp @@ -71,15 +71,15 @@ public: } protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("aaclip"); } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(240, 120); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { // Initial pixel-boundary-aligned draw draw_rect_tests(canvas); @@ -154,15 +154,15 @@ public: CGImageGM() {} protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("cgimage"); } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(800, 250); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { const struct { SkColorType fCT; SkAlphaType fAT; diff --git a/gm/aarectmodes.cpp b/gm/aarectmodes.cpp index 83456a011e..f4889a8cab 100644 --- a/gm/aarectmodes.cpp +++ b/gm/aarectmodes.cpp @@ -134,13 +134,13 @@ namespace skiagm { protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("aarectmodes"); } - SkISize onISize() SK_OVERRIDE { return SkISize::Make(640, 480); } + SkISize onISize() override { return SkISize::Make(640, 480); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { if (false) { // avoid bit rot, suppress warning test4(canvas); } diff --git a/gm/addarc.cpp b/gm/addarc.cpp index 8bdbca3e84..742f16fce5 100644 --- a/gm/addarc.cpp +++ b/gm/addarc.cpp @@ -16,11 +16,11 @@ public: AddArcGM() : fRotate(0) {} protected: - SkString onShortName() SK_OVERRIDE { return SkString("addarc"); } + SkString onShortName() override { return SkString("addarc"); } - SkISize onISize() SK_OVERRIDE { return SkISize::Make(1040, 1040); } + SkISize onISize() override { return SkISize::Make(1040, 1040); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { canvas->translate(20, 20); SkRect r = SkRect::MakeWH(1000, 1000); @@ -51,7 +51,7 @@ protected: } } - bool onAnimate(const SkAnimTimer& timer) SK_OVERRIDE { + bool onAnimate(const SkAnimTimer& timer) override { fRotate = timer.scaled(1, 360); return true; } @@ -71,11 +71,11 @@ public: AddArcMeasGM() {} protected: - SkString onShortName() SK_OVERRIDE { return SkString("addarc_meas"); } + SkString onShortName() override { return SkString("addarc_meas"); } - SkISize onISize() SK_OVERRIDE { return SkISize::Make(2*R + 40, 2*R + 40); } + SkISize onISize() override { return SkISize::Make(2*R + 40, 2*R + 40); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { canvas->translate(R + 20, R + 20); SkPaint paint; @@ -122,11 +122,11 @@ public: StrokeCircleGM() : fRotate(0) {} protected: - SkString onShortName() SK_OVERRIDE { return SkString("strokecircle"); } + SkString onShortName() override { return SkString("strokecircle"); } - SkISize onISize() SK_OVERRIDE { return SkISize::Make(520, 520); } + SkISize onISize() override { return SkISize::Make(520, 520); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { canvas->scale(20, 20); canvas->translate(13, 13); @@ -151,7 +151,7 @@ protected: } } - bool onAnimate(const SkAnimTimer& timer) SK_OVERRIDE { + bool onAnimate(const SkAnimTimer& timer) override { fRotate = timer.scaled(60, 360); return true; } @@ -178,11 +178,11 @@ public: ManyArcsGM() {} protected: - SkString onShortName() SK_OVERRIDE { return SkString("manyarcs"); } + SkString onShortName() override { return SkString("manyarcs"); } - SkISize onISize() SK_OVERRIDE { return SkISize::Make(620, 330); } + SkISize onISize() override { return SkISize::Make(620, 330); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { SkPaint paint; paint.setAntiAlias(true); paint.setStyle(SkPaint::kStroke_Style); diff --git a/gm/alphagradients.cpp b/gm/alphagradients.cpp index 304c523ac5..426acaafcf 100644 --- a/gm/alphagradients.cpp +++ b/gm/alphagradients.cpp @@ -14,11 +14,11 @@ public: AlphaGradientsGM() {} protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("alphagradients"); } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(640, 480); } @@ -38,7 +38,7 @@ protected: canvas->drawRect(r, paint); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { static const struct { SkColor fColor0; SkColor fColor1; diff --git a/gm/arcofzorro.cpp b/gm/arcofzorro.cpp index 9aa4bb4c39..ef2a36b9fa 100644 --- a/gm/arcofzorro.cpp +++ b/gm/arcofzorro.cpp @@ -21,15 +21,15 @@ public: protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("arcofzorro"); } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(1000, 1000); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { SkRandom rand; SkRect rect = SkRect::MakeXYWH(10, 10, 200, 200); diff --git a/gm/astcbitmap.cpp b/gm/astcbitmap.cpp index 808b23e3f2..316bf88ec2 100644 --- a/gm/astcbitmap.cpp +++ b/gm/astcbitmap.cpp @@ -53,15 +53,15 @@ public: virtual ~ASTCBitmapGM() { } protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("astcbitmap"); } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(kGMDimension, kGMDimension); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { for (int j = 0; j < 4; ++j) { for (int i = 0; i < 4; ++i) { SkString filename = GetResourcePath(get_astc_filename(j*4+i)); diff --git a/gm/beziereffects.cpp b/gm/beziereffects.cpp index d86a8b8163..80f3c24a2c 100644 --- a/gm/beziereffects.cpp +++ b/gm/beziereffects.cpp @@ -36,7 +36,7 @@ public: SkRect fBounds; }; - const char* name() const SK_OVERRIDE { return "BezierCubicOrConicTestBatch"; } + const char* name() const override { return "BezierCubicOrConicTestBatch"; } static GrBatch* Create(const GrGeometryProcessor* gp, const Geometry& geo, const SkScalar klmEqs[9], SkScalar sign) { @@ -60,12 +60,12 @@ private: float fKLM[4]; // The last value is ignored. The effect expects a vec4f. }; - Geometry* geoData(int index) SK_OVERRIDE { + Geometry* geoData(int index) override { SkASSERT(0 == index); return &fGeometry; } - void onGenerateGeometry(GrBatchTarget* batchTarget, const GrPipeline* pipeline) SK_OVERRIDE { + void onGenerateGeometry(GrBatchTarget* batchTarget, const GrPipeline* pipeline) override { size_t vertexStride = this->geometryProcessor()->getVertexStride(); const GrVertexBuffer* vertexBuffer; @@ -124,15 +124,15 @@ public: } protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("bezier_cubic_effects"); } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(800, 800); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { GrRenderTarget* rt = canvas->internal_private_accessTopLayerRenderTarget(); if (NULL == rt) { this->drawGpuOnlyMessage(canvas); @@ -270,16 +270,16 @@ public: } protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("bezier_conic_effects"); } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(800, 800); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { GrRenderTarget* rt = canvas->internal_private_accessTopLayerRenderTarget(); if (NULL == rt) { this->drawGpuOnlyMessage(canvas); @@ -447,7 +447,7 @@ public: SkRect fBounds; }; - const char* name() const SK_OVERRIDE { return "BezierQuadTestBatch"; } + const char* name() const override { return "BezierQuadTestBatch"; } static GrBatch* Create(const GrGeometryProcessor* gp, const Geometry& geo, const GrPathUtils::QuadUVMatrix& devToUV) { @@ -467,12 +467,12 @@ private: float fKLM[4]; // The last value is ignored. The effect expects a vec4f. }; - Geometry* geoData(int index) SK_OVERRIDE { + Geometry* geoData(int index) override { SkASSERT(0 == index); return &fGeometry; } - void onGenerateGeometry(GrBatchTarget* batchTarget, const GrPipeline* pipeline) SK_OVERRIDE { + void onGenerateGeometry(GrBatchTarget* batchTarget, const GrPipeline* pipeline) override { size_t vertexStride = this->geometryProcessor()->getVertexStride(); const GrVertexBuffer* vertexBuffer; @@ -528,16 +528,16 @@ public: } protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("bezier_quad_effects"); } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(800, 800); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { GrRenderTarget* rt = canvas->internal_private_accessTopLayerRenderTarget(); if (NULL == rt) { this->drawGpuOnlyMessage(canvas); diff --git a/gm/beziers.cpp b/gm/beziers.cpp index 5ad34fb633..3dd8fa7900 100755 --- a/gm/beziers.cpp +++ b/gm/beziers.cpp @@ -47,15 +47,15 @@ public: protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("beziers"); } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(W, H*2); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { SkPaint paint; paint.setStyle(SkPaint::kStroke_Style); paint.setStrokeWidth(SkIntToScalar(9)/2); diff --git a/gm/bigblurs.cpp b/gm/bigblurs.cpp index 39713c5a71..2f1011b67d 100644 --- a/gm/bigblurs.cpp +++ b/gm/bigblurs.cpp @@ -23,15 +23,15 @@ public: } protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("bigblurs"); } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(kWidth, kHeight); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { static const int kBig = 65536; static const SkScalar kSigma = SkBlurMask::ConvertRadiusToSigma(SkIntToScalar(4)); diff --git a/gm/bigtext.cpp b/gm/bigtext.cpp index 4fe77cc71a..c69d9b973b 100644 --- a/gm/bigtext.cpp +++ b/gm/bigtext.cpp @@ -20,15 +20,15 @@ public: protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("bigtext"); } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(640, 480); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { SkPaint paint; paint.setAntiAlias(true); sk_tool_utils::set_portable_typeface(&paint); diff --git a/gm/bitmappremul.cpp b/gm/bitmappremul.cpp index 975dd67ae1..b87f749b06 100644 --- a/gm/bitmappremul.cpp +++ b/gm/bitmappremul.cpp @@ -109,15 +109,15 @@ public: } protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("bitmap_premul"); } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(SLIDE_SIZE * 2, SLIDE_SIZE * 2); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { SkScalar slideSize = SkIntToScalar(SLIDE_SIZE); canvas->drawBitmap(make_argb8888_gradient(), 0, 0); canvas->drawBitmap(make_argb4444_gradient(), slideSize, 0); diff --git a/gm/bitmaprect.cpp b/gm/bitmaprect.cpp index 32eb7b17bb..ca5b26d992 100644 --- a/gm/bitmaprect.cpp +++ b/gm/bitmaprect.cpp @@ -35,17 +35,17 @@ public: } protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { SkString str; str.printf("bitmaprect_%s", fUseIRect ? "i" : "s"); return str; } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(640, 480); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { canvas->drawColor(0xFFCCCCCC); const SkIRect src[] = { @@ -124,17 +124,17 @@ public: } protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { SkString str; str.printf("3x3bitmaprect"); return str; } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(640, 480); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { SkBitmap bitmap; make_3x3_bitmap(&bitmap); @@ -183,21 +183,21 @@ public: } protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { SkString str; str.printf("bigbitmaprect_%s", fUseIRect ? "i" : "s"); return str; } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(640, 480); } - void onOnceBeforeDraw() SK_OVERRIDE { + void onOnceBeforeDraw() override { make_big_bitmap(&fBigBitmap); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { SkXfermode* mode = SkXfermode::Create(SkXfermode::kXor_Mode); @@ -236,17 +236,17 @@ public: BitmapRectRounding() {} protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { SkString str; str.printf("bitmaprect_rounding"); return str; } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(640, 480); } - void onOnceBeforeDraw() SK_OVERRIDE { + void onOnceBeforeDraw() override { fBM.allocN32Pixels(10, 10); fBM.eraseColor(SK_ColorBLUE); } @@ -256,7 +256,7 @@ protected: // If it does, we may see a red-line at the bottom, instead of the bitmap exactly matching // the clip (in which case we should see all blue). // The correct image should be all blue. - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { SkPaint paint; paint.setColor(SK_ColorRED); diff --git a/gm/bitmaprecttest.cpp b/gm/bitmaprecttest.cpp index dba63744fc..eaa7a3a743 100644 --- a/gm/bitmaprecttest.cpp +++ b/gm/bitmaprecttest.cpp @@ -56,15 +56,15 @@ public: } protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("bitmaprecttest"); } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(320, 240); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { test_bitmaprect(canvas); } diff --git a/gm/bitmapscroll.cpp b/gm/bitmapscroll.cpp index 9f8aacae54..0603c3c472 100644 --- a/gm/bitmapscroll.cpp +++ b/gm/bitmapscroll.cpp @@ -59,15 +59,15 @@ public: } protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("bitmapscroll"); } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(800, 600); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { this->init(); SkIRect scrollCenterRegion = SkIRect::MakeXYWH( quarterWidth, quarterHeight, quarterWidth*2+1, quarterHeight*2+1); diff --git a/gm/bitmapshader.cpp b/gm/bitmapshader.cpp index ac8bf663c9..1d866c6010 100644 --- a/gm/bitmapshader.cpp +++ b/gm/bitmapshader.cpp @@ -43,7 +43,7 @@ static void adopt_shader(SkPaint* paint, SkShader* shader) { class BitmapShaderGM : public GM { protected: - void onOnceBeforeDraw() SK_OVERRIDE { + void onOnceBeforeDraw() override { this->setBGColor(SK_ColorGRAY); draw_bm(&fBitmap); draw_mask(&fMask); diff --git a/gm/bitmapsource.cpp b/gm/bitmapsource.cpp index 1c35a0bdc9..d59524f011 100644 --- a/gm/bitmapsource.cpp +++ b/gm/bitmapsource.cpp @@ -17,7 +17,7 @@ public: } protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("bitmapsource"); } @@ -34,9 +34,9 @@ protected: canvas.drawText(str, strlen(str), SkIntToScalar(20), SkIntToScalar(70), paint); } - SkISize onISize() SK_OVERRIDE { return SkISize::Make(500, 150); } + SkISize onISize() override { return SkISize::Make(500, 150); } - void onOnceBeforeDraw() SK_OVERRIDE { + void onOnceBeforeDraw() override { this->makeBitmap(); } @@ -49,7 +49,7 @@ protected: canvas->restore(); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { canvas->clear(0x00000000); { SkRect srcRect = SkRect::MakeXYWH(20, 20, 30, 30); diff --git a/gm/bleed.cpp b/gm/bleed.cpp index 7fd2a15209..75cf8ca9a5 100644 --- a/gm/bleed.cpp +++ b/gm/bleed.cpp @@ -86,15 +86,15 @@ public: protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("bleed"); } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(kWidth, 780); } - void onOnceBeforeDraw() SK_OVERRIDE { + void onOnceBeforeDraw() override { make_ringed_bitmap(&fBitmapSmall, kSmallTextureSize, kSmallTextureSize); // To exercise the GPU's tiling path we need a texture @@ -173,7 +173,7 @@ protected: canvas->restore(); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { canvas->clear(SK_ColorGRAY); diff --git a/gm/blurcircles.cpp b/gm/blurcircles.cpp index ee30200d36..e4f956fc43 100644 --- a/gm/blurcircles.cpp +++ b/gm/blurcircles.cpp @@ -20,15 +20,15 @@ public: protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return fName; } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(950, 950); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { canvas->scale(1.5f, 1.5f); canvas->translate(50,50); diff --git a/gm/blurquickreject.cpp b/gm/blurquickreject.cpp index c2fee72f01..11697fca5d 100644 --- a/gm/blurquickreject.cpp +++ b/gm/blurquickreject.cpp @@ -22,15 +22,15 @@ public: BlurQuickRejectGM() {} protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("blurquickreject"); } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(kWidth, kHeight); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { static const SkScalar kBlurRadius = SkIntToScalar(20); static const SkScalar kBoxSize = SkIntToScalar(100); diff --git a/gm/blurrect.cpp b/gm/blurrect.cpp index fb3ee37903..e6c6911380 100644 --- a/gm/blurrect.cpp +++ b/gm/blurrect.cpp @@ -93,7 +93,7 @@ public: } protected: - void onOnceBeforeDraw() SK_OVERRIDE { + void onOnceBeforeDraw() override { for (int i = 0; i <= kLastEnum_SkBlurStyle; ++i) { fMaskFilters[i].reset(SkBlurMaskFilter::Create((SkBlurStyle)i, SkBlurMask::ConvertRadiusToSigma(SkIntToScalar(STROKE_WIDTH/2)), @@ -101,15 +101,15 @@ protected: } } - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return fName; } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(860, 820); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { canvas->translate(STROKE_WIDTH*3/2, STROKE_WIDTH*3/2); SkRect r = { 0, 0, 100, 50 }; @@ -329,7 +329,7 @@ public: } protected: - bool makeMask(SkMask *m, const SkRect& r) SK_OVERRIDE { + bool makeMask(SkMask *m, const SkRect& r) override { return SkBlurMask::BlurRect(SkBlurMask::ConvertRadiusToSigma(this->radius()), m, r, this->style()); } @@ -345,7 +345,7 @@ public: } protected: - bool makeMask(SkMask *m, const SkRect& r) SK_OVERRIDE { + bool makeMask(SkMask *m, const SkRect& r) override { SkMask src; r.roundOut(&src.fBounds); src.fBounds.offset(-src.fBounds.fLeft, -src.fBounds.fTop); // move to origin @@ -376,7 +376,7 @@ public: } protected: - SkBlurQuality getQuality() SK_OVERRIDE { + SkBlurQuality getQuality() override { return kLow_SkBlurQuality; } private: @@ -391,7 +391,7 @@ public: } protected: - bool makeMask(SkMask *m, const SkRect& r) SK_OVERRIDE { + bool makeMask(SkMask *m, const SkRect& r) override { SkMask src; r.roundOut(&src.fBounds); src.fBounds.offset(-src.fBounds.fLeft, -src.fBounds.fTop); // move to origin diff --git a/gm/blurroundrect.cpp b/gm/blurroundrect.cpp index 45a110315f..dcb0e9765b 100644 --- a/gm/blurroundrect.cpp +++ b/gm/blurroundrect.cpp @@ -42,16 +42,16 @@ public: fRRect.setRectRadii(r, radii); } - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return fName; } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(SkScalarCeilToInt(fRRect.rect().width()), SkScalarCeilToInt(fRRect.rect().height())); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { SkLayerDrawLooper::Builder looperBuilder; { SkLayerDrawLooper::LayerInfo info; @@ -127,15 +127,15 @@ public: protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return fName; } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(1000, 500); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { canvas->scale(1.5f, 1.5f); canvas->translate(50,50); diff --git a/gm/blurs.cpp b/gm/blurs.cpp index 96a9e30401..fdf10be9f5 100644 --- a/gm/blurs.cpp +++ b/gm/blurs.cpp @@ -17,15 +17,15 @@ public: protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("blurs"); } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(700, 500); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { SkBlurStyle NONE = SkBlurStyle(-999); static const struct { SkBlurStyle fStyle; @@ -101,15 +101,15 @@ DEF_GM( return new BlursGM; ) // class Blur2RectsGM : public skiagm::GM { public: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("blur2rects"); } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(700, 500); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { SkPaint paint; paint.setMaskFilter(SkBlurMaskFilter::Create(kNormal_SkBlurStyle, @@ -133,15 +133,15 @@ DEF_GM( return new Blur2RectsGM; ) class Blur2RectsNonNinePatchGM : public skiagm::GM { public: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("blur2rectsnonninepatch"); } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(700, 500); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { SkPaint paint; paint.setMaskFilter(SkBlurMaskFilter::Create(kNormal_SkBlurStyle, 4.3f))->unref(); diff --git a/gm/cgms.cpp b/gm/cgms.cpp index 4f2c1b1822..e3e84b03e1 100644 --- a/gm/cgms.cpp +++ b/gm/cgms.cpp @@ -15,15 +15,15 @@ public: C_GM() {} protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("c_gms"); } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(640, 480); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { sk_test_c_api((sk_canvas_t*)canvas); } diff --git a/gm/circles.cpp b/gm/circles.cpp index c0503fdc1d..a178ba9b8e 100644 --- a/gm/circles.cpp +++ b/gm/circles.cpp @@ -26,11 +26,11 @@ public: protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("circles"); } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(1200, 900); } @@ -152,7 +152,7 @@ protected: } } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { // Draw a giant AA circle as the background. SkISize size = this->getISize(); SkScalar giantRadius = SkTMin(SkIntToScalar(size.fWidth), diff --git a/gm/circularclips.cpp b/gm/circularclips.cpp index 614ebb6097..4a98de4efa 100644 --- a/gm/circularclips.cpp +++ b/gm/circularclips.cpp @@ -14,7 +14,7 @@ class CircularClipsGM : public skiagm::GM { SkPath fCircle1, fCircle2; protected: - void onOnceBeforeDraw() SK_OVERRIDE { + void onOnceBeforeDraw() override { fX1 = 80; fX2 = 120; fY = 50; @@ -25,17 +25,17 @@ protected: } - bool runAsBench() const SK_OVERRIDE { return true; } + bool runAsBench() const override { return true; } - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("circular-clips"); } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(800, 600); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { SkRegion::Op ops[] = { SkRegion::kDifference_Op, SkRegion::kIntersect_Op, diff --git a/gm/clip_strokerect.cpp b/gm/clip_strokerect.cpp index a0dc7fd2ff..0175eda984 100644 --- a/gm/clip_strokerect.cpp +++ b/gm/clip_strokerect.cpp @@ -16,15 +16,15 @@ public: } protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("clip_strokerect"); } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(200, 400); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { SkPaint p; p.setColor(SK_ColorRED); p.setAntiAlias(true); diff --git a/gm/clipdrawdraw.cpp b/gm/clipdrawdraw.cpp index 3846dc0b53..11561b29a6 100644 --- a/gm/clipdrawdraw.cpp +++ b/gm/clipdrawdraw.cpp @@ -23,9 +23,9 @@ public: ClipDrawDrawGM() { this->setBGColor(0xFFCCCCCC); } protected: - SkString onShortName() SK_OVERRIDE { return SkString("clipdrawdraw"); } + SkString onShortName() override { return SkString("clipdrawdraw"); } - SkISize onISize() SK_OVERRIDE { return SkISize::Make(512, 512); } + SkISize onISize() override { return SkISize::Make(512, 512); } static void Draw(SkCanvas* canvas, const SkRect& rect) { SkPaint p; @@ -46,7 +46,7 @@ protected: canvas->restore(); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { // Vertical remnant const SkRect rect1 = SkRect::MakeLTRB(136.5f, 137.5f, 338.5f, 293.5f); diff --git a/gm/cmykjpeg.cpp b/gm/cmykjpeg.cpp index 75be712821..851e9c74a9 100644 --- a/gm/cmykjpeg.cpp +++ b/gm/cmykjpeg.cpp @@ -22,7 +22,7 @@ public: CMYKJpegGM() {} protected: - void onOnceBeforeDraw() SK_OVERRIDE { + void onOnceBeforeDraw() override { // parameters to the "decode" call bool dither = false; @@ -42,15 +42,15 @@ protected: } } - virtual SkString onShortName() SK_OVERRIDE { + virtual SkString onShortName() override { return SkString("cmykjpeg"); } - virtual SkISize onISize() SK_OVERRIDE { + virtual SkISize onISize() override { return SkISize::Make(640, 480); } - virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE { + virtual void onDraw(SkCanvas* canvas) override { canvas->translate(20*SK_Scalar1, 20*SK_Scalar1); canvas->drawBitmap(fBitmap, 0, 0); diff --git a/gm/coloremoji.cpp b/gm/coloremoji.cpp index 8276ea8974..5a2703b4af 100644 --- a/gm/coloremoji.cpp +++ b/gm/coloremoji.cpp @@ -53,7 +53,7 @@ protected: SkTypeface* typeface; const char* text; } emojiFonts[2]; - virtual void onOnceBeforeDraw() SK_OVERRIDE { + virtual void onOnceBeforeDraw() override { SkString filename = GetResourcePath("/Funkster.ttf"); SkAutoTDelete stream(new SkFILEStream(filename.c_str())); if (stream->isValid()) { @@ -74,15 +74,15 @@ protected: "\xF0\x9F\x87\xBA" "\xF0\x9F\x87\xB8" "\xF0\x9F\x87\xA6"; // 🇺🇸🇦 } - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("coloremoji"); } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(650, 900); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { canvas->drawColor(SK_ColorGRAY); diff --git a/gm/colorfilters.cpp b/gm/colorfilters.cpp index 20208066b2..bedb7f6058 100644 --- a/gm/colorfilters.cpp +++ b/gm/colorfilters.cpp @@ -41,15 +41,15 @@ public: } protected: - virtual SkString onShortName() SK_OVERRIDE { + virtual SkString onShortName() override { return fName; } - virtual SkISize onISize() SK_OVERRIDE { + virtual SkISize onISize() override { return SkISize::Make(640, 480); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { SkPaint paint; SkRect r; r.setWH(600, 50); diff --git a/gm/colortype.cpp b/gm/colortype.cpp index c75a16635f..48e39d086e 100644 --- a/gm/colortype.cpp +++ b/gm/colortype.cpp @@ -40,15 +40,15 @@ public: } protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("colortype"); } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(640, 480); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { SkPaint paint; paint.setAntiAlias(true); paint.setTypeface(fColorType); diff --git a/gm/colortypexfermode.cpp b/gm/colortypexfermode.cpp index 1b6e2894ae..bf86565648 100644 --- a/gm/colortypexfermode.cpp +++ b/gm/colortypexfermode.cpp @@ -18,7 +18,7 @@ static uint16_t gData[] = { 0xFFFF, 0xCCCF, 0xCCCF, 0xFFFF }; class ColorTypeXfermodeGM : public GM { SkBitmap fBG; - void onOnceBeforeDraw() SK_OVERRIDE { + void onOnceBeforeDraw() override { fBG.installPixels(SkImageInfo::Make(2, 2, kARGB_4444_SkColorType, kOpaque_SkAlphaType), gData, 4); } @@ -54,15 +54,15 @@ public: } protected: - virtual SkString onShortName() SK_OVERRIDE { + virtual SkString onShortName() override { return SkString("colortype_xfermodes"); } - virtual SkISize onISize() SK_OVERRIDE { + virtual SkISize onISize() override { return SkISize::Make(400, 640); } - virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE { + virtual void onDraw(SkCanvas* canvas) override { canvas->translate(SkIntToScalar(10), SkIntToScalar(20)); const struct { diff --git a/gm/complexclip2.cpp b/gm/complexclip2.cpp index 361b1c0b97..dfec4e73e1 100644 --- a/gm/complexclip2.cpp +++ b/gm/complexclip2.cpp @@ -38,7 +38,7 @@ public: } protected: - void onOnceBeforeDraw() SK_OVERRIDE { + void onOnceBeforeDraw() override { this->setBGColor(SkColorSetRGB(0xDD,0xA0,0xDD)); // offset the rects a bit so we get antialiasing even in the rect case diff --git a/gm/composeshader.cpp b/gm/composeshader.cpp index 76ff8edfc4..8933cf3965 100644 --- a/gm/composeshader.cpp +++ b/gm/composeshader.cpp @@ -49,15 +49,15 @@ public: } protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("composeshader"); } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(120, 120); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { SkPaint paint; @@ -79,15 +79,15 @@ public: ComposeShaderAlphaGM() {} protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("composeshader_alpha"); } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(220, 750); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { SkAutoTUnref shader0(make_shader(SkXfermode::kDstIn_Mode)); SkAutoTUnref shader1(make_shader(SkXfermode::kSrcOver_Mode)); SkShader* shaders[] = { shader0.get(), shader1.get() }; diff --git a/gm/concavepaths.cpp b/gm/concavepaths.cpp index bc1b533bd3..46b2ef4e0f 100644 --- a/gm/concavepaths.cpp +++ b/gm/concavepaths.cpp @@ -344,15 +344,15 @@ public: ConcavePathsGM() {} protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("concavepaths"); } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(WIDTH, HEIGHT); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { SkPaint paint; paint.setAntiAlias(true); diff --git a/gm/conicpaths.cpp b/gm/conicpaths.cpp index 661f19fba9..717dd8e1dd 100644 --- a/gm/conicpaths.cpp +++ b/gm/conicpaths.cpp @@ -12,15 +12,15 @@ class ConicPathsGM : public skiagm::GM { protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("conicpaths"); } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(920, 960); } - void onOnceBeforeDraw() SK_OVERRIDE { + void onOnceBeforeDraw() override { { const SkScalar w = SkScalarSqrt(2)/2; SkPath* conicCirlce = &fPaths.push_back(); @@ -88,7 +88,7 @@ protected: canvas->drawPath(fGiantCircle, paint); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { const SkAlpha kAlphaValue[] = { 0xFF, 0x40 }; const SkScalar margin = 15; diff --git a/gm/convexpolyclip.cpp b/gm/convexpolyclip.cpp index 8d54b00cd0..7e616735ea 100644 --- a/gm/convexpolyclip.cpp +++ b/gm/convexpolyclip.cpp @@ -79,11 +79,11 @@ public: } protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("convex_poly_clip"); } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { // When benchmarking the saveLayer set of draws is skipped. int w = 435; if (kBench_Mode != this->getMode()) { @@ -92,7 +92,7 @@ protected: return SkISize::Make(w, 540); } - void onOnceBeforeDraw() SK_OVERRIDE { + void onOnceBeforeDraw() override { SkPath tri; tri.moveTo(5.f, 5.f); tri.lineTo(100.f, 20.f); @@ -135,7 +135,7 @@ protected: fBmp = make_bmp(100, 100); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { SkScalar y = 0; static const SkScalar kMargin = 10.f; @@ -214,7 +214,7 @@ protected: } } - bool runAsBench() const SK_OVERRIDE { return true; } + bool runAsBench() const override { return true; } private: class Clip { diff --git a/gm/convexpolyeffect.cpp b/gm/convexpolyeffect.cpp index f3335c94e5..03f4634bf9 100644 --- a/gm/convexpolyeffect.cpp +++ b/gm/convexpolyeffect.cpp @@ -34,7 +34,7 @@ public: SkRect fBounds; }; - const char* name() const SK_OVERRIDE { return "ConvexPolyTestBatch"; } + const char* name() const override { return "ConvexPolyTestBatch"; } static GrBatch* Create(const GrGeometryProcessor* gp, const Geometry& geo) { return SkNEW_ARGS(ConvexPolyTestBatch, (gp, geo)); @@ -46,12 +46,12 @@ private: , fGeometry(geo) { } - Geometry* geoData(int index) SK_OVERRIDE { + Geometry* geoData(int index) override { SkASSERT(0 == index); return &fGeometry; } - void onGenerateGeometry(GrBatchTarget* batchTarget, const GrPipeline* pipeline) SK_OVERRIDE { + void onGenerateGeometry(GrBatchTarget* batchTarget, const GrPipeline* pipeline) override { size_t vertexStride = this->geometryProcessor()->getVertexStride(); const GrVertexBuffer* vertexBuffer; @@ -104,15 +104,15 @@ public: } protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("convex_poly_effect"); } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(720, 800); } - void onOnceBeforeDraw() SK_OVERRIDE { + void onOnceBeforeDraw() override { SkPath tri; tri.moveTo(5.f, 5.f); tri.lineTo(100.f, 20.f); @@ -162,7 +162,7 @@ protected: fRects.addToTail(SkRect::MakeLTRB(100.f, 50.5f, 5.f, 0.5f)); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { GrRenderTarget* rt = canvas->internal_private_accessTopLayerRenderTarget(); if (NULL == rt) { this->drawGpuOnlyMessage(canvas); diff --git a/gm/dashing.cpp b/gm/dashing.cpp index ba3ede4fcd..bd906cbab2 100644 --- a/gm/dashing.cpp +++ b/gm/dashing.cpp @@ -403,9 +403,9 @@ public: protected: - bool runAsBench() const SK_OVERRIDE { return true; } + bool runAsBench() const override { return true; } - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { if (fDoAA) { return SkString("dashing5_aa"); } else { @@ -413,9 +413,9 @@ protected: } } - SkISize onISize() SK_OVERRIDE { return SkISize::Make(400, 200); } + SkISize onISize() override { return SkISize::Make(400, 200); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { static const int kOn = 4; static const int kOff = 4; static const int kIntervalLength = kOn + kOff; diff --git a/gm/dcshader.cpp b/gm/dcshader.cpp index 4b8f5eddc7..bbe035ad41 100644 --- a/gm/dcshader.cpp +++ b/gm/dcshader.cpp @@ -29,16 +29,16 @@ public: SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(DCShader); - void flatten(SkWriteBuffer& buf) const SK_OVERRIDE { + void flatten(SkWriteBuffer& buf) const override { buf.writeMatrix(fDeviceMatrix); } bool asFragmentProcessor(GrContext*, const SkPaint& paint, const SkMatrix& viewM, const SkMatrix* localMatrix, GrColor* color, - GrFragmentProcessor** fp) const SK_OVERRIDE; + GrFragmentProcessor** fp) const override; #ifndef SK_IGNORE_TO_STRING - void toString(SkString* str) const SK_OVERRIDE { + void toString(SkString* str) const override { str->appendf("DCShader: ()"); } #endif @@ -61,9 +61,9 @@ public: } void getGLProcessorKey(const GrGLCaps& caps, - GrProcessorKeyBuilder* b) const SK_OVERRIDE {} + GrProcessorKeyBuilder* b) const override {} - GrGLFragmentProcessor* createGLInstance() const SK_OVERRIDE { + GrGLFragmentProcessor* createGLInstance() const override { class DCGLFP : public GrGLFragmentProcessor { void emitCode(GrGLFPBuilder* builder, const GrFragmentProcessor& fp, @@ -82,19 +82,19 @@ public: "%s = color * %s;", outputColor, GrGLSLExpr4(inputColor).c_str()); } - void setData(const GrGLProgramDataManager&, const GrProcessor&) SK_OVERRIDE {} + void setData(const GrGLProgramDataManager&, const GrProcessor&) override {} }; return SkNEW(DCGLFP); } - const char* name() const SK_OVERRIDE { return "DCFP"; } + const char* name() const override { return "DCFP"; } - void onComputeInvariantOutput(GrInvariantOutput* inout) const SK_OVERRIDE { + void onComputeInvariantOutput(GrInvariantOutput* inout) const override { inout->mulByUnknownFourComponents(); } private: - bool onIsEqual(const GrFragmentProcessor&) const SK_OVERRIDE { return true; } + bool onIsEqual(const GrFragmentProcessor&) const override { return true; } GrCoordTransform fDeviceTransform; }; @@ -113,7 +113,7 @@ public: this->setBGColor(0xFFAABBCC); } - ~DCShaderGM() SK_OVERRIDE { + ~DCShaderGM() override { for (int i = 0; i < fPrims.count(); ++i) { SkDELETE(fPrims[i]); } @@ -121,15 +121,15 @@ public: protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("dcshader"); } - SkISize onISize() SK_OVERRIDE { return SkISize::Make(1000, 900); } + SkISize onISize() override { return SkISize::Make(1000, 900); } - void onOnceBeforeDraw() SK_OVERRIDE { + void onOnceBeforeDraw() override { struct Rect : public Prim { - SkRect draw(SkCanvas* canvas, const SkPaint& paint) SK_OVERRIDE { + SkRect draw(SkCanvas* canvas, const SkPaint& paint) override { SkRect rect = SkRect::MakeXYWH(0, 0, 50, 50); canvas->drawRect(rect, paint); return rect; @@ -137,7 +137,7 @@ protected: }; struct Circle : public Prim { - SkRect draw(SkCanvas* canvas, const SkPaint& paint) SK_OVERRIDE { + SkRect draw(SkCanvas* canvas, const SkPaint& paint) override { static const SkScalar radius = 25; canvas->drawCircle(radius, radius, radius, paint); return SkRect::MakeXYWH(0, 0, 2 * radius, 2 * radius); @@ -145,7 +145,7 @@ protected: }; struct RRect : public Prim { - SkRect draw(SkCanvas* canvas, const SkPaint& paint) SK_OVERRIDE { + SkRect draw(SkCanvas* canvas, const SkPaint& paint) override { SkRRect rrect; rrect.setRectXY(SkRect::MakeXYWH(0, 0, 50, 50), 10, 10); canvas->drawRRect(rrect, paint); @@ -154,7 +154,7 @@ protected: }; struct DRRect : public Prim { - SkRect draw(SkCanvas* canvas, const SkPaint& paint) SK_OVERRIDE { + SkRect draw(SkCanvas* canvas, const SkPaint& paint) override { SkRRect outerRRect; outerRRect.setRectXY(SkRect::MakeXYWH(0, 0, 50, 50), 5, 5); SkRRect innerRRect; @@ -164,7 +164,7 @@ protected: } }; struct Path : public Prim { - SkRect draw(SkCanvas* canvas, const SkPaint& paint) SK_OVERRIDE { + SkRect draw(SkCanvas* canvas, const SkPaint& paint) override { SkPath path; path.addCircle(15, 15, 10); path.addOval(SkRect::MakeXYWH(2, 2, 22, 37)); @@ -177,7 +177,7 @@ protected: struct Points : public Prim { Points(SkCanvas::PointMode mode) : fMode(mode) {} - SkRect draw(SkCanvas* canvas, const SkPaint& paint) SK_OVERRIDE { + SkRect draw(SkCanvas* canvas, const SkPaint& paint) override { SkRandom random; SkPoint points[500]; SkRect bounds = SkRect::MakeWH(50, 50); @@ -196,7 +196,7 @@ protected: }; struct Text : public Prim { - SkRect draw(SkCanvas* canvas, const SkPaint& origPaint) SK_OVERRIDE { + SkRect draw(SkCanvas* canvas, const SkPaint& origPaint) override { SkPaint paint = origPaint; paint.setTextSize(30.f); this->setFont(&paint); @@ -217,7 +217,7 @@ protected: }; struct BmpText : public Text { - void setFont(SkPaint* paint) SK_OVERRIDE { + void setFont(SkPaint* paint) override { if (!fTypeface) { SkString filename = GetResourcePath("/Funkster.ttf"); SkAutoTDelete stream(new SkFILEStream(filename.c_str())); @@ -231,7 +231,7 @@ protected: paint->setTypeface(fTypeface); } - const char* text() const SK_OVERRIDE { return "Hi, Skia!"; } + const char* text() const override { return "Hi, Skia!"; } SkAutoTUnref fTypeface; }; @@ -247,7 +247,7 @@ protected: fPrims.push_back(SkNEW(BmpText)); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { // This GM exists to test a specific feature of the GPU backend. It does not work with the // sw rasterizer, tile modes, etc. if (NULL == canvas->getGrContext()) { diff --git a/gm/dftext.cpp b/gm/dftext.cpp index f3d39e527c..314ee71389 100755 --- a/gm/dftext.cpp +++ b/gm/dftext.cpp @@ -23,7 +23,7 @@ public: } protected: - void onOnceBeforeDraw() SK_OVERRIDE { + void onOnceBeforeDraw() override { SkString filename = GetResourcePath("/Funkster.ttf"); SkAutoTDelete stream(new SkFILEStream(filename.c_str())); if (!stream->isValid()) { @@ -34,11 +34,11 @@ protected: fTypeface = SkTypeface::CreateFromStream(stream.detach()); } - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("dftext"); } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(1024, 768); } @@ -50,7 +50,7 @@ protected: canvas->translate(-px, -py); } - virtual void onDraw(SkCanvas* inputCanvas) SK_OVERRIDE { + virtual void onDraw(SkCanvas* inputCanvas) override { #ifdef SK_BUILD_FOR_ANDROID SkScalar textSizes[] = { 9.0f, 9.0f*2.0f, 9.0f*5.0f, 9.0f*2.0f*5.0f }; #else diff --git a/gm/discard.cpp b/gm/discard.cpp index fc271d27c2..a76228897e 100644 --- a/gm/discard.cpp +++ b/gm/discard.cpp @@ -26,15 +26,15 @@ public: } protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("discard"); } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(100, 100); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { GrContext* context = canvas->getGrContext(); if (NULL == context) { return; diff --git a/gm/downsamplebitmap.cpp b/gm/downsamplebitmap.cpp index 9523e068a4..8decc69f60 100644 --- a/gm/downsamplebitmap.cpp +++ b/gm/downsamplebitmap.cpp @@ -57,11 +57,11 @@ public: protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return fName; } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { make_bitmap_wrapper(); return SkISize::Make(fBM.width(), 4 * fBM.height()); } @@ -75,7 +75,7 @@ protected: virtual void make_bitmap() = 0; - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { make_bitmap_wrapper(); int curY = 0; @@ -116,7 +116,7 @@ class DownsampleBitmapTextGM: public DownsampleBitmapGM { protected: float fTextSize; - void make_bitmap() SK_OVERRIDE { + void make_bitmap() override { fBM.allocN32Pixels(int(fTextSize * 8), int(fTextSize * 6)); SkCanvas canvas(fBM); canvas.drawColor(SK_ColorWHITE); @@ -151,7 +151,7 @@ class DownsampleBitmapCheckerboardGM: public DownsampleBitmapGM { int fSize; int fNumChecks; - void make_bitmap() SK_OVERRIDE { + void make_bitmap() override { make_checker(&fBM, fSize, fNumChecks); } private: @@ -170,7 +170,7 @@ class DownsampleBitmapImageGM: public DownsampleBitmapGM { SkString fFilename; int fSize; - void make_bitmap() SK_OVERRIDE { + void make_bitmap() override { SkImageDecoder* codec = NULL; SkString resourcePath = GetResourcePath(fFilename.c_str()); SkFILEStream stream(resourcePath.c_str()); @@ -208,15 +208,15 @@ public: protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("showmiplevels"); } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(fBM.width() + 8, 2 * fBM.height() + 80); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { SkScalar x = 4; SkScalar y = 4; canvas->drawBitmap(fBM, x, y, NULL); diff --git a/gm/drawbitmaprect.cpp b/gm/drawbitmaprect.cpp index 84766a9b61..715f45b904 100644 --- a/gm/drawbitmaprect.cpp +++ b/gm/drawbitmaprect.cpp @@ -141,15 +141,15 @@ public: SkString fName; protected: - SkString onShortName() SK_OVERRIDE { return fName; } + SkString onShortName() override { return fName; } - SkISize onISize() SK_OVERRIDE { return SkISize::Make(gSize, gSize); } + SkISize onISize() override { return SkISize::Make(gSize, gSize); } - void onOnceBeforeDraw() SK_OVERRIDE { + void onOnceBeforeDraw() override { fImage.reset(makebm(&fLargeBitmap, gBmpSize, gBmpSize)); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { SkRect dstRect = { 0, 0, SkIntToScalar(64), SkIntToScalar(64)}; static const int kMaxSrcRectSize = 1 << (SkNextLog2(gBmpSize) + 2); diff --git a/gm/drawfilter.cpp b/gm/drawfilter.cpp index 85bec15130..40323c9ac8 100644 --- a/gm/drawfilter.cpp +++ b/gm/drawfilter.cpp @@ -21,7 +21,7 @@ class TestFilter : public SkDrawFilter { public: - bool filter(SkPaint* p, Type) SK_OVERRIDE { + bool filter(SkPaint* p, Type) override { p->setColor(SK_ColorRED); p->setMaskFilter(NULL); return true; @@ -32,21 +32,21 @@ class DrawFilterGM : public skiagm::GM { SkAutoTUnref fBlur; protected: - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(320, 240); } - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("drawfilter"); } - void onOnceBeforeDraw() SK_OVERRIDE { + void onOnceBeforeDraw() override { fBlur.reset(SkBlurMaskFilter::Create(kNormal_SkBlurStyle, SkBlurMask::ConvertRadiusToSigma(10.0f), kLow_SkBlurQuality)); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { SkPaint p; p.setColor(SK_ColorBLUE); p.setMaskFilter(fBlur.get()); diff --git a/gm/drawlooper.cpp b/gm/drawlooper.cpp index 56b412533a..5fcdc30bb2 100644 --- a/gm/drawlooper.cpp +++ b/gm/drawlooper.cpp @@ -27,15 +27,15 @@ public: } protected: - virtual SkISize onISize() SK_OVERRIDE { + virtual SkISize onISize() override { return SkISize::Make(520, 160); } - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("drawlooper"); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { this->init(); SkPaint paint; diff --git a/gm/drrect.cpp b/gm/drrect.cpp index fd5a93651b..e3d3e6e9ab 100644 --- a/gm/drrect.cpp +++ b/gm/drrect.cpp @@ -16,15 +16,15 @@ public: protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("drrect"); } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(640, 480); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { SkPaint paint; paint.setAntiAlias(true); diff --git a/gm/dstreadshuffle.cpp b/gm/dstreadshuffle.cpp index b98b10e318..5a7768590c 100644 --- a/gm/dstreadshuffle.cpp +++ b/gm/dstreadshuffle.cpp @@ -33,11 +33,11 @@ protected: kNumShapeTypes }; - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("dstreadshuffle"); } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(kWidth, kHeight); } @@ -133,7 +133,7 @@ protected: } } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { SkRandom random; SkScalar y = 100; for (int i = 0; i < kNumShapeTypes; i++) { diff --git a/gm/emboss.cpp b/gm/emboss.cpp index a72e64d760..d3a893747d 100644 --- a/gm/emboss.cpp +++ b/gm/emboss.cpp @@ -29,15 +29,15 @@ public: } protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("emboss"); } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(600, 120); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { SkPaint paint; SkBitmap bm = make_bm(); canvas->drawBitmap(bm, 10, 10, &paint); diff --git a/gm/etc1bitmap.cpp b/gm/etc1bitmap.cpp index e93ed1d7e8..c66f7b23b9 100644 --- a/gm/etc1bitmap.cpp +++ b/gm/etc1bitmap.cpp @@ -81,19 +81,19 @@ public: virtual ~ETC1BitmapGM() { } protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { SkString str = SkString("etc1bitmap_"); str.append(this->fileExtension()); return str; } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(128, 128); } virtual SkString fileExtension() const = 0; - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { SkBitmap bm; SkString filename = GetResourcePath("mandrill_128."); filename.append(this->fileExtension()); @@ -123,7 +123,7 @@ public: protected: - SkString fileExtension() const SK_OVERRIDE { return SkString("pkm"); } + SkString fileExtension() const override { return SkString("pkm"); } private: typedef ETC1BitmapGM INHERITED; @@ -137,7 +137,7 @@ public: protected: - SkString fileExtension() const SK_OVERRIDE { return SkString("ktx"); } + SkString fileExtension() const override { return SkString("ktx"); } private: typedef ETC1BitmapGM INHERITED; @@ -151,7 +151,7 @@ public: protected: - SkString fileExtension() const SK_OVERRIDE { return SkString("r11.ktx"); } + SkString fileExtension() const override { return SkString("r11.ktx"); } private: typedef ETC1BitmapGM INHERITED; @@ -170,15 +170,15 @@ public: virtual ~ETC1Bitmap_NPOT_GM() { } protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("etc1bitmap_npot"); } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(124, 124); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { SkBitmap bm; SkString pkmFilename = GetResourcePath("mandrill_128.pkm"); SkAutoDataUnref fileData(SkData::NewFromFileName(pkmFilename.c_str())); diff --git a/gm/extractbitmap.cpp b/gm/extractbitmap.cpp index c324483336..1b9f0188c2 100644 --- a/gm/extractbitmap.cpp +++ b/gm/extractbitmap.cpp @@ -32,15 +32,15 @@ public: protected: // overrides from SkEventSink - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("extractbitmap"); } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(600, 600); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { SkBitmap bitmap; create_bitmap(&bitmap); int x = bitmap.width() / 2; diff --git a/gm/factory.cpp b/gm/factory.cpp index 08701d3cfc..519b8eac79 100644 --- a/gm/factory.cpp +++ b/gm/factory.cpp @@ -27,7 +27,7 @@ public: FactoryGM() {} protected: - void onOnceBeforeDraw() SK_OVERRIDE { + void onOnceBeforeDraw() override { // Copyright-free file from http://openclipart.org/detail/29213/paper-plane-by-ddoo SkString pngFilename = GetResourcePath("plane.png"); SkAutoDataUnref data(SkData::NewFromFileName(pngFilename.c_str())); @@ -41,15 +41,15 @@ protected: } } - virtual SkString onShortName() SK_OVERRIDE { + virtual SkString onShortName() override { return SkString("factory"); } - virtual SkISize onISize() SK_OVERRIDE { + virtual SkISize onISize() override { return SkISize::Make(640, 480); } - virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE { + virtual void onDraw(SkCanvas* canvas) override { canvas->drawBitmap(fBitmap, 0, 0); } diff --git a/gm/filltypes.cpp b/gm/filltypes.cpp index 19249b27bc..4ba3aeb975 100644 --- a/gm/filltypes.cpp +++ b/gm/filltypes.cpp @@ -26,11 +26,11 @@ public: protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("filltypes"); } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(835, 840); } @@ -61,7 +61,7 @@ protected: scale, paint); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { this->makePath(); canvas->translate(SkIntToScalar(20), SkIntToScalar(20)); diff --git a/gm/filltypespersp.cpp b/gm/filltypespersp.cpp index c76a0fa4e7..92fce3ab0c 100644 --- a/gm/filltypespersp.cpp +++ b/gm/filltypespersp.cpp @@ -25,11 +25,11 @@ public: protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("filltypespersp"); } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(835, 840); } @@ -73,7 +73,7 @@ protected: scale, paint); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { this->makePath(); // do perspective drawPaint as the background; diff --git a/gm/filterbitmap.cpp b/gm/filterbitmap.cpp index c76a70a8ea..7d7c40ff50 100644 --- a/gm/filterbitmap.cpp +++ b/gm/filterbitmap.cpp @@ -43,7 +43,7 @@ static void draw_row(SkCanvas* canvas, const SkBitmap& bm, const SkMatrix& mat, } class FilterBitmapGM : public skiagm::GM { - void onOnceBeforeDraw() SK_OVERRIDE { + void onOnceBeforeDraw() override { this->makeBitmap(); @@ -71,18 +71,18 @@ public: protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return fName; } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(1024, 768); } virtual void makeBitmap() = 0; virtual SkScalar getScale() = 0; - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { canvas->translate(10, 10); for (size_t i = 0; i < SK_ARRAY_COUNT(fMatrix); ++i) { @@ -110,11 +110,11 @@ class FilterBitmapTextGM: public FilterBitmapGM { protected: float fTextSize; - SkScalar getScale() SK_OVERRIDE { + SkScalar getScale() override { return 32.f/fTextSize; } - void makeBitmap() SK_OVERRIDE { + void makeBitmap() override { fBM.allocN32Pixels(int(fTextSize * 8), int(fTextSize * 6)); SkCanvas canvas(fBM); canvas.drawColor(SK_ColorWHITE); @@ -150,11 +150,11 @@ public: int fSize; int fNumChecks; - SkScalar getScale() SK_OVERRIDE { + SkScalar getScale() override { return 192.f/fSize; } - void makeBitmap() SK_OVERRIDE { + void makeBitmap() override { fBM.allocN32Pixels(fSize, fSize); for (int y = 0; y < fSize; y ++) { for (int x = 0; x < fSize; x ++) { @@ -191,11 +191,11 @@ protected: SkString fFilename; int fSize; - SkScalar getScale() SK_OVERRIDE { + SkScalar getScale() override { return 192.f/fSize; } - void makeBitmap() SK_OVERRIDE { + void makeBitmap() override { SkImageDecoder* codec = NULL; SkString resourcePath = GetResourcePath(fFilename.c_str()); SkFILEStream stream(resourcePath.c_str()); diff --git a/gm/filterfastbounds.cpp b/gm/filterfastbounds.cpp index d0fed529f5..5ff398e9ad 100644 --- a/gm/filterfastbounds.cpp +++ b/gm/filterfastbounds.cpp @@ -159,9 +159,9 @@ protected: static const int kNumVertTiles = 6; static const int kNumXtraCols = 2; - SkString onShortName() SK_OVERRIDE{ return SkString("filterfastbounds"); } + SkString onShortName() override{ return SkString("filterfastbounds"); } - SkISize onISize() SK_OVERRIDE{ + SkISize onISize() override{ return SkISize::Make((SK_ARRAY_COUNT(gDrawMthds) + kNumXtraCols) * kTileWidth, kNumVertTiles * kTileHeight); } @@ -224,7 +224,7 @@ protected: canvas->restore(); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE{ + void onDraw(SkCanvas* canvas) override{ SkPaint blackFill; diff --git a/gm/filterindiabox.cpp b/gm/filterindiabox.cpp index 2c39a1064b..d2fc30b82c 100644 --- a/gm/filterindiabox.cpp +++ b/gm/filterindiabox.cpp @@ -43,7 +43,7 @@ static void draw_row(SkCanvas* canvas, const SkBitmap& bm, const SkMatrix& mat, } class FilterIndiaBoxGM : public skiagm::GM { - void onOnceBeforeDraw() SK_OVERRIDE { + void onOnceBeforeDraw() override { this->makeBitmap(); SkScalar cx = SkScalarHalf(fBM.width()); @@ -70,15 +70,15 @@ public: } protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return fName; } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(1024, 768); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { canvas->translate(10, 10); for (size_t i = 0; i < SK_ARRAY_COUNT(fMatrix); ++i) { SkSize size = computeSize(fBM, fMatrix[i]); diff --git a/gm/fontcache.cpp b/gm/fontcache.cpp index 0f5080e15d..5f1141e1e9 100644 --- a/gm/fontcache.cpp +++ b/gm/fontcache.cpp @@ -31,20 +31,20 @@ public: } protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("fontcache"); } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(1280, 640); } - void onOnceBeforeDraw() SK_OVERRIDE { + void onOnceBeforeDraw() override { fTypefaces[0] = sk_tool_utils::create_portable_typeface("serif", SkTypeface::kItalic); fTypefaces[1] = sk_tool_utils::create_portable_typeface("sans-serif", SkTypeface::kItalic); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { SkPaint paint; paint.setAntiAlias(true); paint.setLCDRenderText(true); diff --git a/gm/fontmgr.cpp b/gm/fontmgr.cpp index e89e585fde..5ef5c6d516 100644 --- a/gm/fontmgr.cpp +++ b/gm/fontmgr.cpp @@ -68,15 +68,15 @@ public: } protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return fName; } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(1536, 768); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { SkScalar y = 20; SkPaint paint; paint.setAntiAlias(true); @@ -130,11 +130,11 @@ public: } protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("fontmgr_match"); } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(640, 1024); } @@ -176,7 +176,7 @@ protected: } } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { SkPaint paint; paint.setAntiAlias(true); paint.setLCDRenderText(true); @@ -237,15 +237,15 @@ public: } protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return fName; } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(1024, 850); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { SkPaint paint; paint.setAntiAlias(true); paint.setSubpixelText(true); diff --git a/gm/fontscaler.cpp b/gm/fontscaler.cpp index 3fefd56080..c3b2c87af2 100644 --- a/gm/fontscaler.cpp +++ b/gm/fontscaler.cpp @@ -20,11 +20,11 @@ public: protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("fontscaler"); } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(1450, 750); } @@ -36,7 +36,7 @@ protected: canvas->translate(-px, -py); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { SkPaint paint; paint.setAntiAlias(true); diff --git a/gm/gammatext.cpp b/gm/gammatext.cpp index 036d04380b..ed8c82929d 100644 --- a/gm/gammatext.cpp +++ b/gm/gammatext.cpp @@ -39,11 +39,11 @@ static bool setFont(SkPaint* paint, const char name[]) { class GammaTextGM : public skiagm::GM { protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("gammatext"); } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(1024, HEIGHT); } @@ -58,7 +58,7 @@ protected: canvas->drawRect(r, paint); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { drawGrad(canvas); const SkColor fg[] = { @@ -137,28 +137,28 @@ public: } } - ~GammaShaderTextGM() SK_OVERRIDE { + ~GammaShaderTextGM() override { for (size_t i = 0; i < SK_ARRAY_COUNT(fShaders); ++i) { SkSafeUnref(fShaders[i]); } } protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("gammagradienttext"); } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(300, 300); } - void onOnceBeforeDraw() SK_OVERRIDE { + void onOnceBeforeDraw() override { for (size_t i = 0; i < SK_ARRAY_COUNT(fShaders); ++i) { fShaders[i] = make_gradient(fColors[i]); } } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { SkPaint paint; paint.setAntiAlias(true); paint.setLCDRenderText(true); diff --git a/gm/getpostextpath.cpp b/gm/getpostextpath.cpp index db50969744..2286602aa7 100644 --- a/gm/getpostextpath.cpp +++ b/gm/getpostextpath.cpp @@ -17,11 +17,11 @@ public: protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("getpostextpath"); } - SkISize onISize() SK_OVERRIDE { return SkISize::Make(480, 780); } + SkISize onISize() override { return SkISize::Make(480, 780); } static void strokePath(SkCanvas* canvas, const SkPath& path) { SkPaint paint; @@ -31,7 +31,7 @@ protected: canvas->drawPath(path, paint); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { // explicitly add spaces, to test a prev. bug const char* text = "Ham bur ge fons"; int len = SkToInt(strlen(text)); diff --git a/gm/giantbitmap.cpp b/gm/giantbitmap.cpp index bb9a655868..2ee3797825 100644 --- a/gm/giantbitmap.cpp +++ b/gm/giantbitmap.cpp @@ -72,7 +72,7 @@ public: protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { SkString str("giantbitmap_"); switch (fMode) { case SkShader::kClamp_TileMode: @@ -92,9 +92,9 @@ protected: return str; } - SkISize onISize() SK_OVERRIDE { return SkISize::Make(640, 480); } + SkISize onISize() override { return SkISize::Make(640, 480); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { SkPaint paint; SkMatrix m; diff --git a/gm/glyph_pos.cpp b/gm/glyph_pos.cpp index 3f1ea35e0a..0da59ac6f9 100644 --- a/gm/glyph_pos.cpp +++ b/gm/glyph_pos.cpp @@ -28,7 +28,7 @@ public: protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { SkString str("glyph_pos"); if (fStrokeWidth == 0.0f) { str.append("_h"); // h == Hairline. @@ -45,9 +45,9 @@ protected: return str; } - SkISize onISize() SK_OVERRIDE { return SkISize::Make(800, 600); } + SkISize onISize() override { return SkISize::Make(800, 600); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { if (!fProp) { fProp.reset(sk_tool_utils::create_portable_typeface("Helvetica", SkTypeface::kNormal)); } diff --git a/gm/glyph_pos_align.cpp b/gm/glyph_pos_align.cpp index 031476098d..e8528047aa 100644 --- a/gm/glyph_pos_align.cpp +++ b/gm/glyph_pos_align.cpp @@ -22,13 +22,13 @@ namespace skiagm { class GlyphPosAlignGM : public GM { protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("glyph_pos_align"); } - SkISize onISize() SK_OVERRIDE { return SkISize::Make(kWidth, kHeight); } + SkISize onISize() override { return SkISize::Make(kWidth, kHeight); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { canvas->clear(SK_ColorBLACK); SkPaint paint; diff --git a/gm/gm.h b/gm/gm.h index e263528f90..87ad92722a 100644 --- a/gm/gm.h +++ b/gm/gm.h @@ -126,9 +126,9 @@ namespace skiagm { const SkISize& size) : fName(name), fDrawProc(drawProc), fSize(size) {} protected: - void onDraw(SkCanvas* canvas) SK_OVERRIDE; - SkISize onISize() SK_OVERRIDE; - SkString onShortName() SK_OVERRIDE; + void onDraw(SkCanvas* canvas) override; + SkISize onISize() override; + SkString onShortName() override; private: SkString fName; void (*fDrawProc)(SkCanvas*); diff --git a/gm/gm_expectations.h b/gm/gm_expectations.h index 1cd6a1f756..89ba38579b 100644 --- a/gm/gm_expectations.h +++ b/gm/gm_expectations.h @@ -193,7 +193,7 @@ namespace skiagm { */ explicit IndividualImageExpectationsSource(const char *rootDir) : fRootDir(rootDir) {} - Expectations get(const char *testName) const SK_OVERRIDE ; + Expectations get(const char *testName) const override ; private: const SkString fRootDir; @@ -212,7 +212,7 @@ namespace skiagm { */ explicit JsonExpectationsSource(const char *jsonPath); - Expectations get(const char *testName) const SK_OVERRIDE; + Expectations get(const char *testName) const override; private: diff --git a/gm/gradientDirtyLaundry.cpp b/gm/gradientDirtyLaundry.cpp index 8c27b8f429..ed5ad51f44 100644 --- a/gm/gradientDirtyLaundry.cpp +++ b/gm/gradientDirtyLaundry.cpp @@ -70,10 +70,10 @@ public: } protected: - SkString onShortName() SK_OVERRIDE { return SkString("gradient_dirty_laundry"); } - SkISize onISize() SK_OVERRIDE { return SkISize::Make(640, 615); } + SkString onShortName() override { return SkString("gradient_dirty_laundry"); } + SkISize onISize() override { return SkISize::Make(640, 615); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { SkPoint pts[2] = { { 0, 0 }, { SkIntToScalar(100), SkIntToScalar(100) } }; diff --git a/gm/gradient_matrix.cpp b/gm/gradient_matrix.cpp index daeea37aef..77a02475d2 100644 --- a/gm/gradient_matrix.cpp +++ b/gm/gradient_matrix.cpp @@ -121,15 +121,15 @@ public: protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("gradient_matrix"); } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(800, 800); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { draw_gradients(canvas, &make_linear_gradient, linearPts, SK_ARRAY_COUNT(linearPts)); diff --git a/gm/gradients.cpp b/gm/gradients.cpp index 43f8c94e92..9b416fa89f 100644 --- a/gm/gradients.cpp +++ b/gm/gradients.cpp @@ -329,12 +329,12 @@ public: protected: - SkString onShortName() SK_OVERRIDE { return SkString("radial_gradient"); } - SkISize onISize() SK_OVERRIDE { return SkISize::Make(1280, 1280); } + SkString onShortName() override { return SkString("radial_gradient"); } + SkISize onISize() override { return SkISize::Make(1280, 1280); } void drawBG(SkCanvas* canvas) { canvas->drawColor(0xFF000000); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { const SkISize dim = this->getISize(); this->drawBG(canvas); @@ -369,14 +369,14 @@ public: protected: - SkString onShortName() SK_OVERRIDE { return SkString("radial_gradient2"); } - SkISize onISize() SK_OVERRIDE { return SkISize::Make(800, 400); } + SkString onShortName() override { return SkString("radial_gradient2"); } + SkISize onISize() override { return SkISize::Make(800, 400); } void drawBG(SkCanvas* canvas) { canvas->drawColor(0xFF000000); } // Reproduces the example given in bug 7671058. - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { SkPaint paint1, paint2, paint3; paint1.setStyle(SkPaint::kFill_Style); paint2.setStyle(SkPaint::kFill_Style); diff --git a/gm/gradients_no_texture.cpp b/gm/gradients_no_texture.cpp index c180209498..8b97b25ef6 100644 --- a/gm/gradients_no_texture.cpp +++ b/gm/gradients_no_texture.cpp @@ -86,10 +86,10 @@ public: protected: - SkString onShortName() SK_OVERRIDE { return SkString("gradients_no_texture"); } - SkISize onISize() SK_OVERRIDE { return SkISize::Make(640, 615); } + SkString onShortName() override { return SkString("gradients_no_texture"); } + SkISize onISize() override { return SkISize::Make(640, 615); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { static const SkPoint kPts[2] = { { 0, 0 }, { SkIntToScalar(50), SkIntToScalar(50) } }; static const SkShader::TileMode kTM = SkShader::kClamp_TileMode; @@ -209,10 +209,10 @@ public: protected: - SkString onShortName() SK_OVERRIDE { return SkString("gradients_many"); } - SkISize onISize() SK_OVERRIDE { return SkISize::Make(850, 100); } + SkString onShortName() override { return SkString("gradients_many"); } + SkISize onISize() override { return SkISize::Make(850, 100); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { const Proc procs[] = { make0, make1, make2, }; diff --git a/gm/gradtext.cpp b/gm/gradtext.cpp index 87c3b38968..eeaff5665f 100644 --- a/gm/gradtext.cpp +++ b/gm/gradtext.cpp @@ -102,11 +102,11 @@ public: GradTextGM () {} protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("gradtext"); } - SkISize onISize() SK_OVERRIDE { return SkISize::Make(500, 480); } + SkISize onISize() override { return SkISize::Make(500, 480); } static void draw_text(SkCanvas* canvas, const SkPaint& paint) { const char* text = "When in the course of human events"; @@ -127,7 +127,7 @@ protected: draw_text(canvas, p); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { SkPaint paint; sk_tool_utils::set_portable_typeface(&paint); paint.setTextSize(SkIntToScalar(26)); diff --git a/gm/hairlines.cpp b/gm/hairlines.cpp index 8b0510ce3e..e7e47c1d4e 100644 --- a/gm/hairlines.cpp +++ b/gm/hairlines.cpp @@ -15,13 +15,13 @@ class HairlinesGM : public GM { protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("hairlines"); } - SkISize onISize() SK_OVERRIDE { return SkISize::Make(1250, 1250); } + SkISize onISize() override { return SkISize::Make(1250, 1250); } - void onOnceBeforeDraw() SK_OVERRIDE { + void onOnceBeforeDraw() override { { SkPath* lineAnglesPath = &fPaths.push_back(); enum { @@ -161,7 +161,7 @@ protected: } } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { static const SkAlpha kAlphaValue[] = { 0xFF, 0x40 }; static const SkScalar kWidths[] = { 0, 0.5f, 1.5f }; diff --git a/gm/hairmodes.cpp b/gm/hairmodes.cpp index aa1af0335c..06ae7edf55 100644 --- a/gm/hairmodes.cpp +++ b/gm/hairmodes.cpp @@ -78,17 +78,17 @@ namespace skiagm { SkPaint fBGPaint; protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("hairmodes"); } - virtual SkISize onISize() SK_OVERRIDE { return SkISize::Make(640, 480); } + virtual SkISize onISize() override { return SkISize::Make(640, 480); } - void onOnceBeforeDraw() SK_OVERRIDE { + void onOnceBeforeDraw() override { fBGPaint.setShader(make_bg_shader())->unref(); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { const SkRect bounds = SkRect::MakeWH(W, H); static const SkAlpha gAlphaValue[] = { 0xFF, 0x88, 0x88 }; diff --git a/gm/hittestpath.cpp b/gm/hittestpath.cpp index 11fe834dd6..42e3671551 100644 --- a/gm/hittestpath.cpp +++ b/gm/hittestpath.cpp @@ -35,13 +35,13 @@ public: protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("hittestpath"); } - SkISize onISize() SK_OVERRIDE { return SkISize::Make(700, 460); } + SkISize onISize() override { return SkISize::Make(700, 460); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { SkPath path; SkRandom rand; diff --git a/gm/image.cpp b/gm/image.cpp index ca28dd1119..c420c95eef 100644 --- a/gm/image.cpp +++ b/gm/image.cpp @@ -122,15 +122,15 @@ public: } protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("image-surface"); } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(960, 1200); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { drawJpeg(canvas, this->getISize()); canvas->scale(2, 2); @@ -202,9 +202,9 @@ public: ImageResizeGM() {} protected: - SkString onShortName() SK_OVERRIDE { return SkString("image-resize"); } + SkString onShortName() override { return SkString("image-resize"); } - SkISize onISize() SK_OVERRIDE { return SkISize::Make(510, 480); } + SkISize onISize() override { return SkISize::Make(510, 480); } void drawIntoImage(SkCanvas* canvas) { SkPaint paint; @@ -260,7 +260,7 @@ protected: this->drawResized(canvas, image, W, H, &subset, fq); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { canvas->translate(10, 10); SkAutoTUnref image(this->makeImage(canvas)); diff --git a/gm/imagealphathreshold.cpp b/gm/imagealphathreshold.cpp index a6b00e4c94..a418f0fe68 100644 --- a/gm/imagealphathreshold.cpp +++ b/gm/imagealphathreshold.cpp @@ -22,15 +22,15 @@ public: protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("imagealphathreshold"); } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(WIDTH, HEIGHT); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { SkIRect rects[2]; rects[0] = SkIRect::MakeXYWH(0, 150, WIDTH, HEIGHT - 300); rects[1] = SkIRect::MakeXYWH(150, 0, WIDTH - 300, HEIGHT); diff --git a/gm/imageblur.cpp b/gm/imageblur.cpp index e424fbf8a2..c7139b4f65 100644 --- a/gm/imageblur.cpp +++ b/gm/imageblur.cpp @@ -24,15 +24,15 @@ public: protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return fName; } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(WIDTH, HEIGHT); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { SkPaint paint; paint.setImageFilter(SkBlurImageFilter::Create(fSigmaX, fSigmaY))->unref(); canvas->saveLayer(NULL, &paint); diff --git a/gm/imageblur2.cpp b/gm/imageblur2.cpp index 978be7a039..480f09390f 100644 --- a/gm/imageblur2.cpp +++ b/gm/imageblur2.cpp @@ -37,15 +37,15 @@ public: protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return fName; } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(WIDTH, HEIGHT); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { const int sigmaCount = SK_ARRAY_COUNT(kBlurSigmas); const int testStringCount = SK_ARRAY_COUNT(kTestStrings); SkScalar dx = WIDTH / sigmaCount; diff --git a/gm/imagefiltersbase.cpp b/gm/imagefiltersbase.cpp index b21f83d6f1..6e8ac29dea 100644 --- a/gm/imagefiltersbase.cpp +++ b/gm/imagefiltersbase.cpp @@ -37,7 +37,7 @@ protected: FailImageFilter() : INHERITED(0, NULL) {} bool onFilterImage(Proxy*, const SkBitmap& src, const Context&, - SkBitmap* result, SkIPoint* offset) const SK_OVERRIDE { + SkBitmap* result, SkIPoint* offset) const override { return false; } @@ -79,7 +79,7 @@ protected: IdentityImageFilter(SkImageFilter* input) : INHERITED(1, &input) {} bool onFilterImage(Proxy*, const SkBitmap& src, const Context&, - SkBitmap* result, SkIPoint* offset) const SK_OVERRIDE { + SkBitmap* result, SkIPoint* offset) const override { *result = src; offset->set(0, 0); return true; @@ -194,11 +194,11 @@ public: ImageFiltersBaseGM () {} protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("imagefiltersbase"); } - SkISize onISize() SK_OVERRIDE { return SkISize::Make(700, 500); } + SkISize onISize() override { return SkISize::Make(700, 500); } void draw_frame(SkCanvas* canvas, const SkRect& r) { SkPaint paint; @@ -207,7 +207,7 @@ protected: canvas->drawRect(r, paint); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { void (*drawProc[])(SkCanvas*, const SkRect&, SkImageFilter*) = { draw_paint, draw_line, draw_rect, draw_path, draw_text, @@ -268,13 +268,13 @@ public: ImageFiltersTextBaseGM(const char suffix[]) : fSuffix(suffix) {} protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { SkString name; name.printf("%s_%s", "textfilter", fSuffix.c_str()); return name; } - SkISize onISize() SK_OVERRIDE { return SkISize::Make(512, 342); } + SkISize onISize() override { return SkISize::Make(512, 342); } void drawWaterfall(SkCanvas* canvas, const SkPaint& origPaint) { const uint32_t flags[] = { @@ -295,7 +295,7 @@ protected: virtual void installFilter(SkPaint* paint) = 0; - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { SkPaint paint; canvas->translate(20, 40); @@ -331,7 +331,7 @@ class ImageFiltersText_IF : public ImageFiltersTextBaseGM { public: ImageFiltersText_IF() : ImageFiltersTextBaseGM("image") {} - void installFilter(SkPaint* paint) SK_OVERRIDE { + void installFilter(SkPaint* paint) override { paint->setImageFilter(SkBlurImageFilter::Create(1.5f, 1.5f))->unref(); } }; @@ -341,7 +341,7 @@ class ImageFiltersText_CF : public ImageFiltersTextBaseGM { public: ImageFiltersText_CF() : ImageFiltersTextBaseGM("color") {} - void installFilter(SkPaint* paint) SK_OVERRIDE { + void installFilter(SkPaint* paint) override { paint->setColorFilter(SkColorFilter::CreateModeFilter(SK_ColorBLUE, SkXfermode::kSrcIn_Mode))->unref(); } }; diff --git a/gm/imagefiltersclipped.cpp b/gm/imagefiltersclipped.cpp index 9b91929e3a..44510fb70e 100644 --- a/gm/imagefiltersclipped.cpp +++ b/gm/imagefiltersclipped.cpp @@ -32,11 +32,11 @@ public: protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("imagefiltersclipped"); } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(860, 500); } @@ -59,7 +59,7 @@ protected: canvas.drawCircle(x, y, radius, paint); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { if (!fInitialized) { fCheckerboard.allocN32Pixels(64, 64); SkCanvas checkerboardCanvas(fCheckerboard); diff --git a/gm/imagefilterscropped.cpp b/gm/imagefilterscropped.cpp index 3db0b123c8..929f2fe3fc 100644 --- a/gm/imagefilterscropped.cpp +++ b/gm/imagefilterscropped.cpp @@ -96,11 +96,11 @@ public: ImageFiltersCroppedGM () {} protected: - virtual SkString onShortName() SK_OVERRIDE { + virtual SkString onShortName() override { return SkString("imagefilterscropped"); } - virtual SkISize onISize() SK_OVERRIDE { return SkISize::Make(400, 880); } + virtual SkISize onISize() override { return SkISize::Make(400, 880); } void make_checkerboard() { fCheckerboard.allocN32Pixels(80, 80); @@ -130,11 +130,11 @@ protected: canvas->drawRect(r, paint); } - virtual void onOnceBeforeDraw() SK_OVERRIDE{ + virtual void onOnceBeforeDraw() override{ make_checkerboard(); } - virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE { + virtual void onDraw(SkCanvas* canvas) override { void (*drawProc[])(SkCanvas*, const SkRect&, SkImageFilter*) = { draw_sprite, draw_bitmap, draw_path, draw_paint, draw_text }; diff --git a/gm/imagefiltersgraph.cpp b/gm/imagefiltersgraph.cpp index 4fa59a8766..05118191bb 100644 --- a/gm/imagefiltersgraph.cpp +++ b/gm/imagefiltersgraph.cpp @@ -38,7 +38,7 @@ public: } virtual bool onFilterImage(Proxy* proxy, const SkBitmap& src, const Context& ctx, - SkBitmap* dst, SkIPoint* offset) const SK_OVERRIDE { + SkBitmap* dst, SkIPoint* offset) const override { SkBitmap source = src; SkImageFilter* input = getInput(0); SkIPoint srcOffset = SkIPoint::Make(0, 0); @@ -66,7 +66,7 @@ public: SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SimpleOffsetFilter); protected: - void flatten(SkWriteBuffer& buffer) const SK_OVERRIDE { + void flatten(SkWriteBuffer& buffer) const override { this->INHERITED::flatten(buffer); buffer.writeScalar(fDX); buffer.writeScalar(fDY); diff --git a/gm/imagefilterstransformed.cpp b/gm/imagefilterstransformed.cpp index 3bac0e5714..794a47167a 100644 --- a/gm/imagefilterstransformed.cpp +++ b/gm/imagefilterstransformed.cpp @@ -30,9 +30,9 @@ public: protected: - SkString onShortName() SK_OVERRIDE { return SkString("imagefilterstransformed"); } + SkString onShortName() override { return SkString("imagefilterstransformed"); } - SkISize onISize() SK_OVERRIDE { return SkISize::Make(420, 240); } + SkISize onISize() override { return SkISize::Make(420, 240); } void makeGradientCircle(int width, int height) { SkScalar x = SkIntToScalar(width / 2); @@ -53,7 +53,7 @@ protected: canvas.drawCircle(x, y, radius, paint); } - void onOnceBeforeDraw() SK_OVERRIDE { + void onOnceBeforeDraw() override { fCheckerboard.allocN32Pixels(64, 64); SkCanvas checkerboardCanvas(fCheckerboard); sk_tool_utils::draw_checkerboard(&checkerboardCanvas, 0xFFA0A0A0, 0xFF404040, 8); @@ -61,7 +61,7 @@ protected: this->makeGradientCircle(64, 64); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { SkAutoTUnref gradient(SkBitmapSource::Create(fGradientCircle)); SkAutoTUnref checkerboard(SkBitmapSource::Create(fCheckerboard)); SkImageFilter* filters[] = { diff --git a/gm/imagemagnifier.cpp b/gm/imagemagnifier.cpp index 30be060460..5e4835033a 100644 --- a/gm/imagemagnifier.cpp +++ b/gm/imagemagnifier.cpp @@ -22,15 +22,15 @@ public: protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("imagemagnifier"); } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(WIDTH, HEIGHT); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { SkPaint filterPaint; filterPaint.setImageFilter( SkMagnifierImageFilter::Create( diff --git a/gm/imageresizetiled.cpp b/gm/imageresizetiled.cpp index 4899d352ba..bc640bc6aa 100644 --- a/gm/imageresizetiled.cpp +++ b/gm/imageresizetiled.cpp @@ -23,15 +23,15 @@ public: protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("imageresizetiled"); } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(WIDTH, HEIGHT); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { SkPaint paint; SkMatrix matrix; matrix.setScale(RESIZE_FACTOR, RESIZE_FACTOR); diff --git a/gm/inversepaths.cpp b/gm/inversepaths.cpp index 87a977a919..ae54bee218 100644 --- a/gm/inversepaths.cpp +++ b/gm/inversepaths.cpp @@ -71,15 +71,15 @@ public: protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("inverse_paths"); } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(800, 900); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { SkScalar cx = slideWidth / 2 + slideBoundary; SkScalar cy = slideHeight / 2 + slideBoundary; SkScalar dx = slideWidth + 2 * slideBoundary; diff --git a/gm/lerpmode.cpp b/gm/lerpmode.cpp index 7b567a24a4..b483c13787 100644 --- a/gm/lerpmode.cpp +++ b/gm/lerpmode.cpp @@ -39,15 +39,15 @@ public: LerpXfermodeGM() {} protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("lerpmode"); } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(240, 120); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { show_circlelayers(canvas, NULL); canvas->translate(150, 0); SkAutoTUnref mode(SkLerpXfermode::Create(0.5f)); diff --git a/gm/lighting.cpp b/gm/lighting.cpp index 7abfbceabc..36c8ba0e45 100644 --- a/gm/lighting.cpp +++ b/gm/lighting.cpp @@ -21,7 +21,7 @@ public: protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("lighting"); } @@ -38,7 +38,7 @@ protected: canvas.drawText(str, strlen(str), SkIntToScalar(20), SkIntToScalar(70), paint); } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(WIDTH, HEIGHT); } @@ -51,7 +51,7 @@ protected: canvas->restore(); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { if (!fInitialized) { make_bitmap(); fInitialized = true; diff --git a/gm/lumafilter.cpp b/gm/lumafilter.cpp index e83f3272d4..66221f8303 100644 --- a/gm/lumafilter.cpp +++ b/gm/lumafilter.cpp @@ -99,15 +99,15 @@ public: protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("lumafilter"); } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(600, 420); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { SkXfermode::Mode modes[] = { SkXfermode::kSrcOver_Mode, SkXfermode::kDstOver_Mode, SkXfermode::kSrcATop_Mode, diff --git a/gm/mipmap.cpp b/gm/mipmap.cpp index 70543a91f1..2d4ee0d26e 100644 --- a/gm/mipmap.cpp +++ b/gm/mipmap.cpp @@ -53,11 +53,11 @@ public: MipMapGM() {} protected: - SkString onShortName() SK_OVERRIDE { return SkString("mipmap"); } + SkString onShortName() override { return SkString("mipmap"); } - SkISize onISize() SK_OVERRIDE { return SkISize::Make(400, 200); } + SkISize onISize() override { return SkISize::Make(400, 200); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { test_mip(canvas); } diff --git a/gm/mixedxfermodes.cpp b/gm/mixedxfermodes.cpp index f818719bcd..dc858cb88b 100644 --- a/gm/mixedxfermodes.cpp +++ b/gm/mixedxfermodes.cpp @@ -31,11 +31,11 @@ protected: kNumShapeTypes }; - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("mixed_xfermodes"); } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(790, 640); } @@ -87,7 +87,7 @@ protected: } } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { if (NULL == fBG.get()) { static uint32_t kCheckerPixelData[] = { 0xFFFFFFFF, 0xFFCCCCCC, diff --git a/gm/multipicturedraw.cpp b/gm/multipicturedraw.cpp index 97a5ffcdba..0625b5a35b 100644 --- a/gm/multipicturedraw.cpp +++ b/gm/multipicturedraw.cpp @@ -486,14 +486,14 @@ namespace skiagm { Layout fLayout; const SkPicture* fPictures[kNumPictures]; - void onOnceBeforeDraw() SK_OVERRIDE { + void onOnceBeforeDraw() override { fPictures[0] = make_hex_plane_picture(SK_ColorWHITE); fPictures[1] = make_hex_plane_picture(SK_ColorGRAY); fPictures[2] = make_sierpinski_picture(); fPictures[3] = make_single_layer_hex_plane_picture(); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { SkMultiPictureDraw mpd; SkTArray composeSteps; @@ -514,9 +514,9 @@ namespace skiagm { } } - SkISize onISize() SK_OVERRIDE { return SkISize::Make(kPicWidth, kPicHeight); } + SkISize onISize() override { return SkISize::Make(kPicWidth, kPicHeight); } - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { static const char* gContentNames[] = { "noclip", "rectclip", "rrectclip", "pathclip", "invpathclip", "sierpinski", "biglayer" @@ -534,7 +534,7 @@ namespace skiagm { return name; } - bool runAsBench() const SK_OVERRIDE { return true; } + bool runAsBench() const override { return true; } private: typedef GM INHERITED; diff --git a/gm/nested.cpp b/gm/nested.cpp index 025bdce441..3dd2c2c27e 100644 --- a/gm/nested.cpp +++ b/gm/nested.cpp @@ -20,7 +20,7 @@ public: protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { SkString name("nested"); if (fDoAA) { name.append("_aa"); @@ -30,7 +30,7 @@ protected: return name; } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(kImageWidth, kImageHeight); } @@ -60,7 +60,7 @@ protected: } } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { SkPaint shapePaint; shapePaint.setColor(SK_ColorBLACK); diff --git a/gm/nonclosedpaths.cpp b/gm/nonclosedpaths.cpp index bf49ca0766..a3d91b50a3 100644 --- a/gm/nonclosedpaths.cpp +++ b/gm/nonclosedpaths.cpp @@ -33,12 +33,12 @@ public: protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("nonclosedpaths"); } // 12 * 18 + 3 cases, every case is 100 * 100 pixels. - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(1220, 1920); } @@ -67,7 +67,7 @@ protected: canvas->translate(x, y); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { // Stroke widths are: // 0(may use hairline rendering), 10(common case for stroke-style) // 40 and 50(>= geometry width/height, make the contour filled in fact) diff --git a/gm/ovals.cpp b/gm/ovals.cpp index 7af996ee91..b0c207b4ce 100755 --- a/gm/ovals.cpp +++ b/gm/ovals.cpp @@ -27,11 +27,11 @@ public: protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("ovals"); } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(1200, 900); } @@ -135,7 +135,7 @@ protected: return SkHSVToColor(hsv); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { SkRandom rand(1); canvas->translate(20 * SK_Scalar1, 20 * SK_Scalar1); SkRect oval = SkRect::MakeLTRB(-20, -30, 20, 30); diff --git a/gm/patch.cpp b/gm/patch.cpp index 61a6cad221..ea7954c636 100644 --- a/gm/patch.cpp +++ b/gm/patch.cpp @@ -76,15 +76,15 @@ public: } protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("patch_primitive"); } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(800, 800); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { SkPaint paint; diff --git a/gm/patchgrid.cpp b/gm/patchgrid.cpp index 7c0ee9c9e0..5c719bf0a8 100644 --- a/gm/patchgrid.cpp +++ b/gm/patchgrid.cpp @@ -64,15 +64,15 @@ public: } protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("patch_grid"); } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(800, 800); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { SkPaint paint; diff --git a/gm/patheffects.cpp b/gm/patheffects.cpp index c51ac12c6a..c71d32bb75 100644 --- a/gm/patheffects.cpp +++ b/gm/patheffects.cpp @@ -108,13 +108,13 @@ public: protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("patheffect"); } - SkISize onISize() SK_OVERRIDE { return SkISize::Make(800, 600); } + SkISize onISize() override { return SkISize::Make(800, 600); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { SkPaint paint; paint.setAntiAlias(true); paint.setStyle(SkPaint::kStroke_Style); diff --git a/gm/pathfill.cpp b/gm/pathfill.cpp index 461a4f5fc8..1260654979 100644 --- a/gm/pathfill.cpp +++ b/gm/pathfill.cpp @@ -118,22 +118,22 @@ class PathFillGM : public skiagm::GM { SkPath fPath[N]; SkScalar fDY[N]; protected: - void onOnceBeforeDraw() SK_OVERRIDE { + void onOnceBeforeDraw() override { for (size_t i = 0; i < N; i++) { fDY[i] = gProcs[i](&fPath[i]); } } - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("pathfill"); } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(640, 480); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { SkPaint paint; paint.setAntiAlias(true); @@ -152,17 +152,17 @@ class PathInverseFillGM : public skiagm::GM { SkPath fPath[N]; SkScalar fDY[N]; protected: - void onOnceBeforeDraw() SK_OVERRIDE { + void onOnceBeforeDraw() override { for (size_t i = 0; i < N; i++) { fDY[i] = gProcs[i](&fPath[i]); } } - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("pathinvfill"); } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(450, 220); } @@ -179,7 +179,7 @@ protected: canvas->restore(); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { SkPath path; path.addCircle(SkIntToScalar(50), SkIntToScalar(50), SkIntToScalar(40)); diff --git a/gm/pathinterior.cpp b/gm/pathinterior.cpp index a354513664..f56681ab8a 100644 --- a/gm/pathinterior.cpp +++ b/gm/pathinterior.cpp @@ -25,11 +25,11 @@ public: } protected: - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(770, 770); } - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("pathinterior"); } @@ -57,7 +57,7 @@ protected: } } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { canvas->translate(8.5f, 8.5f); const SkRect rect = { 0, 0, 80, 80 }; diff --git a/gm/pathopsinverse.cpp b/gm/pathopsinverse.cpp index 9fe787206a..4b87778619 100644 --- a/gm/pathopsinverse.cpp +++ b/gm/pathopsinverse.cpp @@ -19,7 +19,7 @@ public: } protected: - void onOnceBeforeDraw() SK_OVERRIDE { + void onOnceBeforeDraw() override { const unsigned oneColor = 0xFF8080FF; const unsigned twoColor = 0x807F1f1f; SkColor blendColor = blend(oneColor, twoColor); @@ -50,15 +50,15 @@ protected: paint->setColor(color); } - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("pathopsinverse"); } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(1200, 900); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { SkPath one, two; int yPos = 0; for (int oneFill = 0; oneFill <= 1; ++oneFill) { diff --git a/gm/pathopsskpclip.cpp b/gm/pathopsskpclip.cpp index ee6765af55..c9092f4ad2 100644 --- a/gm/pathopsskpclip.cpp +++ b/gm/pathopsskpclip.cpp @@ -24,15 +24,15 @@ public: } protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("pathopsskpclip"); } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(1200, 900); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { SkPictureRecorder recorder; SkCanvas* rec = recorder.beginRecording(1200, 900, NULL, 0); SkPath p; diff --git a/gm/pathreverse.cpp b/gm/pathreverse.cpp index f304467662..9f4deb484b 100644 --- a/gm/pathreverse.cpp +++ b/gm/pathreverse.cpp @@ -69,15 +69,15 @@ public: protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("path-reverse"); } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(640, 480); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { if (false) test_rev(canvas); // avoid bit rot, suppress warning SkRect r = { 10, 10, 100, 60 }; diff --git a/gm/peekpixels.cpp b/gm/peekpixels.cpp index 3a881ff8c5..37ec32fa74 100644 --- a/gm/peekpixels.cpp +++ b/gm/peekpixels.cpp @@ -24,15 +24,15 @@ public: PeekPixelsGM() {} protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("peekpixels"); } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(360, 120); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { SkImageInfo info = SkImageInfo::MakeN32Premul(100, 100); SkAutoTUnref surface(canvas->newSurface(info)); if (surface.get()) { diff --git a/gm/picture.cpp b/gm/picture.cpp index 5432fc93ef..f1d2a7965b 100644 --- a/gm/picture.cpp +++ b/gm/picture.cpp @@ -44,19 +44,19 @@ public: {} protected: - void onOnceBeforeDraw() SK_OVERRIDE { + void onOnceBeforeDraw() override { fPicture.reset(make_picture()); } - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("pictures"); } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(450, 120); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { canvas->translate(10, 10); SkMatrix matrix; diff --git a/gm/pictureimagefilter.cpp b/gm/pictureimagefilter.cpp index 36b0817ac9..a4cb6b3f5f 100644 --- a/gm/pictureimagefilter.cpp +++ b/gm/pictureimagefilter.cpp @@ -18,7 +18,7 @@ public: } protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("pictureimagefilter"); } @@ -36,9 +36,9 @@ protected: fPicture.reset(recorder.endRecording()); } - SkISize onISize() SK_OVERRIDE { return SkISize::Make(600, 300); } + SkISize onISize() override { return SkISize::Make(600, 300); } - void onOnceBeforeDraw() SK_OVERRIDE { + void onOnceBeforeDraw() override { this->makePicture(); } @@ -51,7 +51,7 @@ protected: canvas->restore(); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { canvas->clear(0x00000000); { SkRect srcRect = SkRect::MakeXYWH(20, 20, 30, 30); diff --git a/gm/pictureshader.cpp b/gm/pictureshader.cpp index 3f184ec2d6..220649be1c 100644 --- a/gm/pictureshader.cpp +++ b/gm/pictureshader.cpp @@ -30,7 +30,7 @@ public: } protected: - void onOnceBeforeDraw() SK_OVERRIDE { + void onOnceBeforeDraw() override { // Build the picture. SkPictureRecorder recorder; SkCanvas* pictureCanvas = recorder.beginRecording(fTileSize, fTileSize, NULL, 0); @@ -45,15 +45,15 @@ public: } - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("pictureshader"); } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(1400, 1450); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { this->drawSceneColumn(canvas, SkPoint::Make(0, 0), 1, 1, 0); this->drawSceneColumn(canvas, SkPoint::Make(0, fSceneSize * 6.4f), 1, 2, 0); this->drawSceneColumn(canvas, SkPoint::Make(fSceneSize * 2.4f, 0), 1, 1, 1); diff --git a/gm/pictureshadertile.cpp b/gm/pictureshadertile.cpp index 46a4386720..11d6b34bea 100644 --- a/gm/pictureshadertile.cpp +++ b/gm/pictureshadertile.cpp @@ -83,15 +83,15 @@ static void draw_scene(SkCanvas* canvas, SkScalar pictureSize) { class PictureShaderTileGM : public skiagm::GM { protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("pictureshadertile"); } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(800, 600); } - void onOnceBeforeDraw() SK_OVERRIDE { + void onOnceBeforeDraw() override { SkPictureRecorder recorder; SkCanvas* pictureCanvas = recorder.beginRecording(kPictureSize, kPictureSize); draw_scene(pictureCanvas, kPictureSize); @@ -132,7 +132,7 @@ protected: } } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { canvas->clear(SK_ColorBLACK); SkPaint paint; diff --git a/gm/points.cpp b/gm/points.cpp index a634f3b29f..eda31210a3 100644 --- a/gm/points.cpp +++ b/gm/points.cpp @@ -16,11 +16,11 @@ public: protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("points"); } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(640, 490); } @@ -35,7 +35,7 @@ protected: } } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { canvas->translate(SK_Scalar1, SK_Scalar1); SkRandom rand; diff --git a/gm/poly2poly.cpp b/gm/poly2poly.cpp index 823616e88f..e2563e2f7e 100644 --- a/gm/poly2poly.cpp +++ b/gm/poly2poly.cpp @@ -180,11 +180,11 @@ public: protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("poly2poly"); } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(835, 840); } @@ -222,7 +222,7 @@ protected: canvas->restore(); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { if (false) { test_stroke(canvas); return; } SkPaint paint; diff --git a/gm/polygons.cpp b/gm/polygons.cpp index 1751eadfe9..a5756bbcc7 100644 --- a/gm/polygons.cpp +++ b/gm/polygons.cpp @@ -23,18 +23,18 @@ public: protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("polygons"); } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { int width = kNumPolygons * kCellSize + 40; int height = (kNumJoins * kNumStrokeWidths + kNumExtraStyles) * kCellSize + 40; return SkISize::Make(width, height); } // Construct all polygons - void onOnceBeforeDraw() SK_OVERRIDE { + void onOnceBeforeDraw() override { SkPoint p0[] = {{0, 0}, {60, 0}, {90, 40}}; // triangle SkPoint p1[] = {{0, 0}, {0, 40}, {60, 40}, {40, 0}}; // trapezoid SkPoint p2[] = {{0, 0}, {40, 40}, {80, 40}, {40, 0}}; // diamond @@ -94,7 +94,7 @@ protected: } } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { // Stroke widths are: // 0(may use hairline rendering), 10(common case for stroke-style) // 40(>= geometry width/height, make the contour filled in fact) diff --git a/gm/quadpaths.cpp b/gm/quadpaths.cpp index d9448b6baf..d5eb646313 100644 --- a/gm/quadpaths.cpp +++ b/gm/quadpaths.cpp @@ -17,11 +17,11 @@ public: protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("quadpath"); } - SkISize onISize() SK_OVERRIDE { return SkISize::Make(1240, 390); } + SkISize onISize() override { return SkISize::Make(1240, 390); } void drawPath(SkPath& path,SkCanvas* canvas,SkColor color, const SkRect& clip,SkPaint::Cap cap, SkPaint::Join join, @@ -40,7 +40,7 @@ protected: canvas->restore(); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { struct FillAndName { SkPath::FillType fFill; const char* fName; @@ -162,11 +162,11 @@ public: protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("quadclosepath"); } - SkISize onISize() SK_OVERRIDE { return SkISize::Make(1240, 390); } + SkISize onISize() override { return SkISize::Make(1240, 390); } void drawPath(SkPath& path,SkCanvas* canvas,SkColor color, const SkRect& clip,SkPaint::Cap cap, SkPaint::Join join, @@ -185,7 +185,7 @@ protected: canvas->restore(); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { struct FillAndName { SkPath::FillType fFill; const char* fName; diff --git a/gm/rects.cpp b/gm/rects.cpp index 686f03dae5..8fb113d76f 100644 --- a/gm/rects.cpp +++ b/gm/rects.cpp @@ -26,11 +26,11 @@ public: protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("rects"); } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(1200, 900); } @@ -251,7 +251,7 @@ protected: SK_Scalar1 * 100 * (testCount / 10) + 3 * SK_Scalar1 / 4); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { SkAutoCommentBlock acb(canvas, "onDraw"); canvas->translate(20 * SK_Scalar1, 20 * SK_Scalar1); diff --git a/gm/roundrects.cpp b/gm/roundrects.cpp index b012e51ef5..5e2813b02c 100644 --- a/gm/roundrects.cpp +++ b/gm/roundrects.cpp @@ -28,11 +28,11 @@ public: protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("roundrects"); } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(1200, 900); } @@ -136,7 +136,7 @@ protected: return SkHSVToColor(hsv); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { SkRandom rand(1); canvas->translate(20 * SK_Scalar1, 20 * SK_Scalar1); SkRect rect = SkRect::MakeLTRB(-20, -30, 20, 30); diff --git a/gm/rrect.cpp b/gm/rrect.cpp index f174c96177..4c556542c6 100644 --- a/gm/rrect.cpp +++ b/gm/rrect.cpp @@ -127,15 +127,15 @@ public: protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("rrect"); } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(820, 710); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { static const InsetProc insetProcs[] = { inset0, inset1, inset2, inset3 }; diff --git a/gm/rrects.cpp b/gm/rrects.cpp index 642376f16c..be46929045 100644 --- a/gm/rrects.cpp +++ b/gm/rrects.cpp @@ -32,7 +32,7 @@ public: } protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { SkString name("rrect"); switch (fType) { case kBW_Draw_Type: @@ -54,9 +54,9 @@ protected: return name; } - SkISize onISize() SK_OVERRIDE { return SkISize::Make(kImageWidth, kImageHeight); } + SkISize onISize() override { return SkISize::Make(kImageWidth, kImageHeight); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { GrContext* context = NULL; #if SK_SUPPORT_GPU GrRenderTarget* rt = canvas->internal_private_accessTopLayerRenderTarget(); diff --git a/gm/samplerstress.cpp b/gm/samplerstress.cpp index 7f77463ee5..ec072708cb 100644 --- a/gm/samplerstress.cpp +++ b/gm/samplerstress.cpp @@ -29,11 +29,11 @@ public: protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("gpusamplerstress"); } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(640, 480); } @@ -88,7 +88,7 @@ protected: fMaskFilter.reset(SkBlurMaskFilter::Create(kNormal_SkBlurStyle, sigma)); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { createShader(); createMaskFilter(); diff --git a/gm/shaderbounds.cpp b/gm/shaderbounds.cpp index a7de479c1a..e86ab05431 100644 --- a/gm/shaderbounds.cpp +++ b/gm/shaderbounds.cpp @@ -35,13 +35,13 @@ public: protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return fName; } - SkISize onISize() SK_OVERRIDE { return SkISize::Make(320, 240); } + SkISize onISize() override { return SkISize::Make(320, 240); } - SkMatrix onGetInitialTransform() const SK_OVERRIDE { + SkMatrix onGetInitialTransform() const override { SkMatrix result; SkScalar scale = 0.8f; result.setScale(scale, scale); @@ -49,7 +49,7 @@ protected: return result; } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { // The PDF device has already clipped to the content area, but we // do it again here so that the raster and pdf results are consistent. canvas->clipRect(SkRect::MakeWH(SkIntToScalar(320), diff --git a/gm/shadertext.cpp b/gm/shadertext.cpp index fa8e2b59ef..79f7b860a0 100644 --- a/gm/shadertext.cpp +++ b/gm/shadertext.cpp @@ -92,13 +92,13 @@ public: protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("shadertext"); } - SkISize onISize() SK_OVERRIDE { return SkISize::Make(1450, 500); } + SkISize onISize() override { return SkISize::Make(1450, 500); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { const char text[] = "Shaded Text"; const int textLen = SK_ARRAY_COUNT(text) - 1; const int pointSize = 36; diff --git a/gm/shadertext2.cpp b/gm/shadertext2.cpp index b0637da831..92a0138acd 100644 --- a/gm/shadertext2.cpp +++ b/gm/shadertext2.cpp @@ -48,13 +48,13 @@ public: protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("shadertext2"); } - SkISize onISize() SK_OVERRIDE { return SkISize::Make(1800, 900); } + SkISize onISize() override { return SkISize::Make(1800, 900); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { static const char kText[] = "SKIA"; static const int kTextLen = SK_ARRAY_COUNT(kText) - 1; static const int kPointSize = 55; diff --git a/gm/shadertext3.cpp b/gm/shadertext3.cpp index 1e0216ebda..49cdced97e 100644 --- a/gm/shadertext3.cpp +++ b/gm/shadertext3.cpp @@ -53,17 +53,17 @@ public: protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("shadertext3"); } - SkISize onISize() SK_OVERRIDE{ return SkISize::Make(800, 1000); } + SkISize onISize() override{ return SkISize::Make(800, 1000); } - void onOnceBeforeDraw() SK_OVERRIDE { + void onOnceBeforeDraw() override { makebm(&fBmp, kPointSize / 4, kPointSize / 4); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { SkPaint bmpPaint; bmpPaint.setAntiAlias(true); diff --git a/gm/shadows.cpp b/gm/shadows.cpp index 66ad32e089..adb34b6f0a 100644 --- a/gm/shadows.cpp +++ b/gm/shadows.cpp @@ -29,7 +29,7 @@ public: SkRect fRect; protected: - void onOnceBeforeDraw() SK_OVERRIDE { + void onOnceBeforeDraw() override { this->setBGColor(0xFFDDDDDD); fCirclePath.addCircle(SkIntToScalar(20), SkIntToScalar(20), SkIntToScalar(10) ); fRect.set(SkIntToScalar(10), SkIntToScalar(10), diff --git a/gm/shallowgradient.cpp b/gm/shallowgradient.cpp index 2b7dfbd9b6..415ed41489 100644 --- a/gm/shallowgradient.cpp +++ b/gm/shallowgradient.cpp @@ -43,15 +43,15 @@ public: protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return fName; } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(800, 800); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { const SkColor colors[] = { 0xFF555555, 0xFF444444 }; const int colorCount = SK_ARRAY_COUNT(colors); diff --git a/gm/simpleaaclip.cpp b/gm/simpleaaclip.cpp index 8a18f48e62..c232a2575a 100644 --- a/gm/simpleaaclip.cpp +++ b/gm/simpleaaclip.cpp @@ -52,7 +52,7 @@ public: } protected: - void onOnceBeforeDraw() SK_OVERRIDE { + void onOnceBeforeDraw() override { // offset the rects a bit so we get anti-aliasing in the rect case fBase.set(100.65f, 100.65f, diff --git a/gm/skbug1719.cpp b/gm/skbug1719.cpp index 10936013e2..dc5de45b2b 100644 --- a/gm/skbug1719.cpp +++ b/gm/skbug1719.cpp @@ -24,21 +24,21 @@ public: SkBug1719GM() {} protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("skbug1719"); } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(300, 100); } - void onDrawBackground(SkCanvas* canvas) SK_OVERRIDE { + void onDrawBackground(SkCanvas* canvas) override { SkPaint bgPaint; bgPaint.setColor(0xFF303030); canvas->drawPaint(bgPaint); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { canvas->translate(SkIntToScalar(-800), SkIntToScalar(-650)); // The data is lifted from an SKP that exhibited the bug. diff --git a/gm/smallarc.cpp b/gm/smallarc.cpp index ff7f07c2ec..76611b763c 100755 --- a/gm/smallarc.cpp +++ b/gm/smallarc.cpp @@ -19,15 +19,15 @@ public: protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("smallarc"); } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(762, 762); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { SkPaint p; p.setColor(SK_ColorRED); p.setAntiAlias(true); diff --git a/gm/spritebitmap.cpp b/gm/spritebitmap.cpp index eeb4b73a82..7c8677d143 100644 --- a/gm/spritebitmap.cpp +++ b/gm/spritebitmap.cpp @@ -63,15 +63,15 @@ public: protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("spritebitmap"); } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(640, 480); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { SkBitmap bm; make_bm(&bm); diff --git a/gm/stlouisarch.cpp b/gm/stlouisarch.cpp index 06f607803a..176fb4b619 100644 --- a/gm/stlouisarch.cpp +++ b/gm/stlouisarch.cpp @@ -14,13 +14,13 @@ namespace skiagm { // this GM tests hairlines which fill nearly the entire render target class StLouisArchGM : public GM { protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("stlouisarch"); } - SkISize onISize() SK_OVERRIDE { return SkISize::Make((int)kWidth, (int)kHeight); } + SkISize onISize() override { return SkISize::Make((int)kWidth, (int)kHeight); } - void onOnceBeforeDraw() SK_OVERRIDE { + void onOnceBeforeDraw() override { { SkPath* bigQuad = &fPaths.push_back(); bigQuad->moveTo(0, 0); @@ -66,7 +66,7 @@ protected: } } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { canvas->save(); canvas->scale(1, -1); canvas->translate(0, -kHeight); diff --git a/gm/stringart.cpp b/gm/stringart.cpp index fe69626447..ed5fe0e78f 100644 --- a/gm/stringart.cpp +++ b/gm/stringart.cpp @@ -24,15 +24,15 @@ public: protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("stringart"); } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(kWidth, kHeight); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { SkScalar angle = kAngle*SK_ScalarPI + SkScalarHalf(SK_ScalarPI); SkScalar size = SkIntToScalar(SkMin32(kWidth, kHeight)); SkPoint center = SkPoint::Make(SkScalarHalf(kWidth), SkScalarHalf(kHeight)); diff --git a/gm/strokefill.cpp b/gm/strokefill.cpp index 256c7a2148..b6e888b047 100644 --- a/gm/strokefill.cpp +++ b/gm/strokefill.cpp @@ -20,11 +20,11 @@ public: protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("stroke-fill"); } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(640, 480); } @@ -36,7 +36,7 @@ protected: canvas->drawText(text, len, x, y + SkIntToScalar(120), p); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { SkScalar x = SkIntToScalar(100); SkScalar y = SkIntToScalar(88); diff --git a/gm/strokerect.cpp b/gm/strokerect.cpp index da551e799c..8854c6b891 100644 --- a/gm/strokerect.cpp +++ b/gm/strokerect.cpp @@ -47,15 +47,15 @@ public: protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("strokerect"); } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(1024, 740); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { canvas->drawColor(SK_ColorWHITE); canvas->translate(STROKE_WIDTH*3/2, STROKE_WIDTH*3/2); diff --git a/gm/strokerects.cpp b/gm/strokerects.cpp index 5609c5f6b3..f5167bbedc 100644 --- a/gm/strokerects.cpp +++ b/gm/strokerects.cpp @@ -26,11 +26,11 @@ public: protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("strokerects"); } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(W*2, H*2); } @@ -46,7 +46,7 @@ protected: r->offset(-w/2 + woffset, -h/2 + hoffset); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { SkPaint paint; paint.setStyle(SkPaint::kStroke_Style); diff --git a/gm/strokes.cpp b/gm/strokes.cpp index cadd0d6d9e..a258dfe005 100644 --- a/gm/strokes.cpp +++ b/gm/strokes.cpp @@ -40,15 +40,15 @@ public: protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("strokes_round"); } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(W, H*2); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { SkPaint paint; paint.setStyle(SkPaint::kStroke_Style); paint.setStrokeWidth(SkIntToScalar(9)/2); @@ -81,7 +81,7 @@ private: class Strokes2GM : public skiagm::GM { SkPath fPath; protected: - void onOnceBeforeDraw() SK_OVERRIDE { + void onOnceBeforeDraw() override { SkRandom rand; fPath.moveTo(0, 0); for (int i = 0; i < 13; i++) { @@ -92,11 +92,11 @@ protected: } - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("strokes_poly"); } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(W, H*2); } @@ -106,7 +106,7 @@ protected: canvas->concat(matrix); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { canvas->drawColor(SK_ColorWHITE); SkPaint paint; @@ -190,15 +190,15 @@ public: protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("strokes3"); } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(1500, 1500); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { SkPaint origPaint; origPaint.setAntiAlias(true); origPaint.setStyle(SkPaint::kStroke_Style); diff --git a/gm/stroketext.cpp b/gm/stroketext.cpp index 914462cbd2..6ec425b5b2 100644 --- a/gm/stroketext.cpp +++ b/gm/stroketext.cpp @@ -72,15 +72,15 @@ public: protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("stroketext"); } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(1200, 480); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { if (true) { test_nulldev(canvas); } SkPaint paint; paint.setAntiAlias(true); diff --git a/gm/surface.cpp b/gm/surface.cpp index 5a4c09a54d..913de994e4 100644 --- a/gm/surface.cpp +++ b/gm/surface.cpp @@ -61,15 +61,15 @@ public: SurfacePropsGM() {} protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("surfaceprops"); } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(W * 4, H * 5); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { GrContext* ctx = canvas->getGrContext(); // must be opaque to have a hope of testing LCD text @@ -118,11 +118,11 @@ public: NewSurfaceGM() {} protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("surfacenew"); } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(300, 140); } @@ -130,7 +130,7 @@ protected: canvas->drawColor(SK_ColorRED); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { SkImageInfo info = SkImageInfo::MakeN32Premul(100, 100); SkAutoTUnref surf(canvas->newSurface(info, NULL)); diff --git a/gm/tallstretchedbitmaps.cpp b/gm/tallstretchedbitmaps.cpp index e62c5d7f81..424aa3a94f 100644 --- a/gm/tallstretchedbitmaps.cpp +++ b/gm/tallstretchedbitmaps.cpp @@ -59,15 +59,15 @@ public: TallStretchedBitmapsGM() {} protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("tall_stretched_bitmaps"); } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(750, 750); } - void onOnceBeforeDraw() SK_OVERRIDE { + void onOnceBeforeDraw() override { for (size_t i = 0; i < SK_ARRAY_COUNT(fTallBmps); ++i) { int h = SkToInt((4 + i) * 1024); @@ -75,7 +75,7 @@ protected: } } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { canvas->scale(1.3f, 1.3f); for (size_t i = 0; i < SK_ARRAY_COUNT(fTallBmps); ++i) { SkASSERT(fTallBmps[i].fItemCnt > 10); diff --git a/gm/testimagefilters.cpp b/gm/testimagefilters.cpp index b85c0aa86c..2c4fadb092 100644 --- a/gm/testimagefilters.cpp +++ b/gm/testimagefilters.cpp @@ -97,13 +97,13 @@ public: protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("testimagefilters"); } - SkISize onISize() SK_OVERRIDE { return SkISize::Make(700, 460); } + SkISize onISize() override { return SkISize::Make(700, 460); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { // this->drawSizeBounds(canvas, 0xFFCCCCCC); static SkImageFilter* (*gFilterProc[])() = { diff --git a/gm/texdata.cpp b/gm/texdata.cpp index 927bea5db6..88dbce9dc4 100644 --- a/gm/texdata.cpp +++ b/gm/texdata.cpp @@ -27,15 +27,15 @@ public: } protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("texdata"); } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(2*S, 2*S); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { GrRenderTarget* target = canvas->internal_private_accessTopLayerRenderTarget(); GrContext* ctx = canvas->getGrContext(); if (ctx && target) { diff --git a/gm/textblob.cpp b/gm/textblob.cpp index e802d9bd45..7c0fd87546 100644 --- a/gm/textblob.cpp +++ b/gm/textblob.cpp @@ -78,15 +78,15 @@ public: } protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("textblob"); } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(640, 480); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { for (unsigned b = 0; b < SK_ARRAY_COUNT(blobConfigs); ++b) { SkAutoTUnref blob(this->makeBlob(b)); diff --git a/gm/textblobshader.cpp b/gm/textblobshader.cpp index 0738d82662..5b9b2e9e1c 100644 --- a/gm/textblobshader.cpp +++ b/gm/textblobshader.cpp @@ -27,7 +27,7 @@ public: protected: - void onOnceBeforeDraw() SK_OVERRIDE { + void onOnceBeforeDraw() override { SkPaint p; p.setAntiAlias(true); p.setSubpixelText(true); @@ -73,15 +73,15 @@ protected: SkShader::kRepeat_TileMode)); } - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("textblobshader"); } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(640, 480); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { SkPaint p; p.setStyle(SkPaint::kFill_Style); p.setShader(fShader); diff --git a/gm/texteffects.cpp b/gm/texteffects.cpp index 3fce5db7c1..03dbd68cc1 100644 --- a/gm/texteffects.cpp +++ b/gm/texteffects.cpp @@ -175,15 +175,15 @@ public: TextEffectsGM() {} protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("texteffects"); } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(460, 680); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { canvas->save(); SkPaint paint; diff --git a/gm/texturedomaineffect.cpp b/gm/texturedomaineffect.cpp index 72a5839632..b85d2089d6 100644 --- a/gm/texturedomaineffect.cpp +++ b/gm/texturedomaineffect.cpp @@ -30,18 +30,18 @@ public: } protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("texture_domain_effect"); } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { const SkScalar canvasWidth = kDrawPad + (kTargetWidth + 2 * kDrawPad) * GrTextureDomain::kModeCount + kTestPad * GrTextureDomain::kModeCount; return SkISize::Make(SkScalarCeilToInt(canvasWidth), 800); } - void onOnceBeforeDraw() SK_OVERRIDE { + void onOnceBeforeDraw() override { fBmp.allocN32Pixels(kTargetWidth, kTargetHeight); SkCanvas canvas(fBmp); canvas.clear(0x00000000); @@ -68,7 +68,7 @@ protected: fBmp.width() + 10.f, fBmp.height() + 10.f), paint); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { GrRenderTarget* rt = canvas->internal_private_accessTopLayerRenderTarget(); if (NULL == rt) { return; diff --git a/gm/thinrects.cpp b/gm/thinrects.cpp index 3facaa9705..a25176c476 100644 --- a/gm/thinrects.cpp +++ b/gm/thinrects.cpp @@ -17,15 +17,15 @@ public: } protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("thinrects"); } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(240, 320); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { SkPaint white; white.setColor(SK_ColorWHITE); diff --git a/gm/thinstrokedrects.cpp b/gm/thinstrokedrects.cpp index 40c23e18e2..8bde1022ce 100644 --- a/gm/thinstrokedrects.cpp +++ b/gm/thinstrokedrects.cpp @@ -17,15 +17,15 @@ public: } protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("thinstrokedrects"); } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(240, 320); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { SkPaint paint; paint.setColor(SK_ColorWHITE); diff --git a/gm/tiledscaledbitmap.cpp b/gm/tiledscaledbitmap.cpp index 16935ede6b..79e1111ffe 100644 --- a/gm/tiledscaledbitmap.cpp +++ b/gm/tiledscaledbitmap.cpp @@ -31,11 +31,11 @@ public: } protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("tiledscaledbitmap"); } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(1016, 616); } @@ -50,11 +50,11 @@ protected: return bm; } - void onOnceBeforeDraw() SK_OVERRIDE { + void onOnceBeforeDraw() override { fBitmap = make_bm(360, 288); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { SkPaint paint; paint.setAntiAlias(true); diff --git a/gm/tilemodes.cpp b/gm/tilemodes.cpp index 193f8a6ced..391d969c08 100644 --- a/gm/tilemodes.cpp +++ b/gm/tilemodes.cpp @@ -61,7 +61,7 @@ protected: kNPOTSize = 21, }; - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { SkString name("tilemodes"); if (!fPowerOfTwoSize) { name.append("_npot"); @@ -69,16 +69,16 @@ protected: return name; } - SkISize onISize() SK_OVERRIDE { return SkISize::Make(880, 560); } + SkISize onISize() override { return SkISize::Make(880, 560); } - void onOnceBeforeDraw() SK_OVERRIDE { + void onOnceBeforeDraw() override { int size = fPowerOfTwoSize ? kPOTSize : kNPOTSize; for (size_t i = 0; i < SK_ARRAY_COUNT(gColorTypes); i++) { makebm(&fTexture[i], gColorTypes[i], size, size); } } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { int size = fPowerOfTwoSize ? kPOTSize : kNPOTSize; @@ -195,13 +195,13 @@ public: protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return fName; } - SkISize onISize() SK_OVERRIDE { return SkISize::Make(880, 560); } + SkISize onISize() override { return SkISize::Make(880, 560); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { canvas->scale(SkIntToScalar(3)/2, SkIntToScalar(3)/2); const SkScalar w = SkIntToScalar(gWidth); diff --git a/gm/tilemodes_scaled.cpp b/gm/tilemodes_scaled.cpp index a8227a005b..efb6f8537a 100644 --- a/gm/tilemodes_scaled.cpp +++ b/gm/tilemodes_scaled.cpp @@ -65,7 +65,7 @@ protected: kNPOTSize = 3, }; - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { SkString name("scaled_tilemodes"); if (!fPowerOfTwoSize) { name.append("_npot"); @@ -73,16 +73,16 @@ protected: return name; } - SkISize onISize() SK_OVERRIDE { return SkISize::Make(880, 760); } + SkISize onISize() override { return SkISize::Make(880, 760); } - void onOnceBeforeDraw() SK_OVERRIDE { + void onOnceBeforeDraw() override { int size = fPowerOfTwoSize ? kPOTSize : kNPOTSize; for (size_t i = 0; i < SK_ARRAY_COUNT(gColorTypes); i++) { makebm(&fTexture[i], gColorTypes[i], size, size); } } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { float scale = 32.f/kPOTSize; int size = fPowerOfTwoSize ? kPOTSize : kNPOTSize; @@ -207,13 +207,13 @@ public: protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return fName; } - SkISize onISize() SK_OVERRIDE { return SkISize::Make(880, 560); } + SkISize onISize() override { return SkISize::Make(880, 560); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { canvas->scale(SkIntToScalar(3)/2, SkIntToScalar(3)/2); const SkScalar w = SkIntToScalar(gWidth); diff --git a/gm/typeface.cpp b/gm/typeface.cpp index 1606cef3cb..4114d2cc33 100644 --- a/gm/typeface.cpp +++ b/gm/typeface.cpp @@ -36,15 +36,15 @@ public: } protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("typeface"); } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(640, 480); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { SkString text("Typefaces are fun!"); SkScalar y = 0; @@ -171,7 +171,7 @@ public: } protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { SkString name("typefacestyles"); if (fApplyKerning) { name.append("_kerning"); @@ -179,11 +179,11 @@ protected: return name; } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(640, 480); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { SkPaint paint; paint.setAntiAlias(true); paint.setTextSize(SkIntToScalar(30)); diff --git a/gm/variedtext.cpp b/gm/variedtext.cpp index bbdbc8a6d2..989bebd328 100644 --- a/gm/variedtext.cpp +++ b/gm/variedtext.cpp @@ -31,7 +31,7 @@ public: } protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { SkString name("varied_text"); if (fEffectiveClip) { name.append("_clipped"); @@ -46,11 +46,11 @@ protected: return name; } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(640, 480); } - void onOnceBeforeDraw() SK_OVERRIDE { + void onOnceBeforeDraw() override { fPaint.setAntiAlias(true); fPaint.setLCDRenderText(fLCD); @@ -111,7 +111,7 @@ protected: } } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { for (int i = 0; i < kCnt; ++i) { fPaint.setColor(fColors[i]); fPaint.setTextSize(fPtSizes[i]); @@ -136,7 +136,7 @@ protected: } } - bool runAsBench() const SK_OVERRIDE { return true; } + bool runAsBench() const override { return true; } private: static const int kCnt = 30; diff --git a/gm/vertices.cpp b/gm/vertices.cpp index 5d156339d0..2f7a9b99d4 100644 --- a/gm/vertices.cpp +++ b/gm/vertices.cpp @@ -39,7 +39,7 @@ public: protected: - void onOnceBeforeDraw() SK_OVERRIDE { + void onOnceBeforeDraw() override { const SkScalar X = 150; const SkScalar Y = 150; @@ -62,7 +62,7 @@ protected: } } - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { SkString name("vertices"); if (0xFF != fAlpha) { name.appendf("_%02X", fAlpha); @@ -70,11 +70,11 @@ protected: return name; } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(600, 600); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { // start with the center of a 3x3 grid static const uint16_t fan[] = { 4, diff --git a/gm/verttext.cpp b/gm/verttext.cpp index ba355a589e..9039685206 100644 --- a/gm/verttext.cpp +++ b/gm/verttext.cpp @@ -50,11 +50,11 @@ public: protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("verttext"); } - SkISize onISize() SK_OVERRIDE { return SkISize::Make(640, 480); } + SkISize onISize() override { return SkISize::Make(640, 480); } static void drawBaseline(SkCanvas* canvas, const SkPaint& paint, SkScalar x, SkScalar y) { @@ -82,7 +82,7 @@ protected: canvas->drawCircle(x, y, SK_Scalar1 * 3 / 2, p); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { SkScalar x = SkIntToScalar(100); SkScalar y = SkIntToScalar(50); diff --git a/gm/verttext2.cpp b/gm/verttext2.cpp index 6cb5235aff..77bdc92dd1 100644 --- a/gm/verttext2.cpp +++ b/gm/verttext2.cpp @@ -33,13 +33,13 @@ public: protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("verttext2"); } - SkISize onISize() SK_OVERRIDE { return SkISize::Make(640, 480); } + SkISize onISize() override { return SkISize::Make(640, 480); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { for (int i = 0; i < 3; ++i) { SkPaint paint; paint.setColor(SK_ColorRED); diff --git a/gm/verylargebitmap.cpp b/gm/verylargebitmap.cpp index 1cfecd8ad7..753786b97e 100644 --- a/gm/verylargebitmap.cpp +++ b/gm/verylargebitmap.cpp @@ -59,15 +59,15 @@ public: VeryLargeBitmapGM() {} protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("verylargebitmap"); } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(500, 600); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { int veryBig = 65*1024; // 64K < size int big = 33*1024; // 32K < size < 64K // smaller than many max texture sizes, but large enough to gpu-tile for memory reasons. diff --git a/gm/xfermodeimagefilter.cpp b/gm/xfermodeimagefilter.cpp index 0134bd3cd3..c764f1c68a 100644 --- a/gm/xfermodeimagefilter.cpp +++ b/gm/xfermodeimagefilter.cpp @@ -25,7 +25,7 @@ public: } protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("xfermodeimagefilter"); } @@ -42,7 +42,7 @@ protected: canvas.drawText(str, strlen(str), SkIntToScalar(15), SkIntToScalar(65), paint); } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(WIDTH, HEIGHT); } @@ -65,7 +65,7 @@ protected: canvas->restore(); } - void onOnceBeforeDraw() SK_OVERRIDE { + void onOnceBeforeDraw() override { make_bitmap(); fCheckerboard.allocN32Pixels(80, 80); @@ -73,7 +73,7 @@ protected: sk_tool_utils::draw_checkerboard(&checkerboardCanvas, 0xFFA0A0A0, 0xFF404040, 8); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { canvas->clear(0x00000000); SkPaint paint; diff --git a/gm/xfermodes.cpp b/gm/xfermodes.cpp index 82d1cef478..066ad5b695 100644 --- a/gm/xfermodes.cpp +++ b/gm/xfermodes.cpp @@ -154,7 +154,7 @@ class XfermodesGM : public GM { } } - void onOnceBeforeDraw() SK_OVERRIDE { + void onOnceBeforeDraw() override { fBG.installPixels(SkImageInfo::Make(2, 2, kARGB_4444_SkColorType, kOpaque_SkAlphaType), gData, 4); @@ -168,15 +168,15 @@ public: XfermodesGM() {} protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("xfermodes"); } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(1990, 640); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { canvas->translate(SkIntToScalar(10), SkIntToScalar(20)); const struct { diff --git a/gm/xfermodes2.cpp b/gm/xfermodes2.cpp index 98e6f3a85c..493a0c0802 100644 --- a/gm/xfermodes2.cpp +++ b/gm/xfermodes2.cpp @@ -18,15 +18,15 @@ public: Xfermodes2GM() {} protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("xfermodes2"); } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(455, 475); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { canvas->translate(SkIntToScalar(10), SkIntToScalar(20)); const SkScalar w = SkIntToScalar(kSize); @@ -86,7 +86,7 @@ protected: } private: - void onOnceBeforeDraw() SK_OVERRIDE { + void onOnceBeforeDraw() override { static const uint32_t kCheckData[] = { SkPackARGB32(0xFF, 0x40, 0x40, 0x40), SkPackARGB32(0xFF, 0xD0, 0xD0, 0xD0), diff --git a/gm/xfermodes3.cpp b/gm/xfermodes3.cpp index ffbee1c042..003b771e1f 100644 --- a/gm/xfermodes3.cpp +++ b/gm/xfermodes3.cpp @@ -27,21 +27,21 @@ public: Xfermodes3GM() {} protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("xfermodes3"); } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(630, 1215); } - void onDrawBackground(SkCanvas* canvas) SK_OVERRIDE { + void onDrawBackground(SkCanvas* canvas) override { SkPaint bgPaint; bgPaint.setColor(0xFF70D0E0); canvas->drawPaint(bgPaint); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { canvas->translate(SkIntToScalar(10), SkIntToScalar(20)); SkPaint labelP; @@ -179,7 +179,7 @@ private: canvas->restore(); } - void onOnceBeforeDraw() SK_OVERRIDE { + void onOnceBeforeDraw() override { static const uint32_t kCheckData[] = { SkPackARGB32(0xFF, 0x40, 0x40, 0x40), SkPackARGB32(0xFF, 0xD0, 0xD0, 0xD0), diff --git a/gm/yuvtorgbeffect.cpp b/gm/yuvtorgbeffect.cpp index 4448265fb9..62855cfbbb 100644 --- a/gm/yuvtorgbeffect.cpp +++ b/gm/yuvtorgbeffect.cpp @@ -34,15 +34,15 @@ public: } protected: - SkString onShortName() SK_OVERRIDE { + SkString onShortName() override { return SkString("yuv_to_rgb_effect"); } - SkISize onISize() SK_OVERRIDE { + SkISize onISize() override { return SkISize::Make(238, 84); } - void onOnceBeforeDraw() SK_OVERRIDE { + void onOnceBeforeDraw() override { SkImageInfo yinfo = SkImageInfo::MakeA8(YSIZE, YSIZE); fBmp[0].allocPixels(yinfo); SkImageInfo uinfo = SkImageInfo::MakeA8(USIZE, USIZE); @@ -66,7 +66,7 @@ protected: } } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { GrRenderTarget* rt = canvas->internal_private_accessTopLayerRenderTarget(); if (NULL == rt) { return; diff --git a/gyp/common_conditions.gypi b/gyp/common_conditions.gypi index 7f02cef5a6..b9a9296ba4 100644 --- a/gyp/common_conditions.gypi +++ b/gyp/common_conditions.gypi @@ -417,7 +417,7 @@ # We can't use the skia_shared_library gyp setting because we need expose # this define globally and the the implemention define as a cflag. 'SKIA_DLL', - 'SK_OVERRIDE override', + 'override override', # Defines from skia_for_android_framework_defines.gypi '<@(skia_for_android_framework_defines)', ], diff --git a/include/codec/SkCodec.h b/include/codec/SkCodec.h index 7337006769..1d9c9179e0 100644 --- a/include/codec/SkCodec.h +++ b/include/codec/SkCodec.h @@ -101,7 +101,7 @@ protected: * reveals that the image is actually opaque. */ #ifdef SK_SUPPORT_LEGACY_BOOL_ONGETINFO - bool onGetInfo(SkImageInfo* info) SK_OVERRIDE { + bool onGetInfo(SkImageInfo* info) override { *info = fInfo; return true; } diff --git a/include/core/SkBBHFactory.h b/include/core/SkBBHFactory.h index 57baf6beb9..f0c49f1f4f 100644 --- a/include/core/SkBBHFactory.h +++ b/include/core/SkBBHFactory.h @@ -23,7 +23,7 @@ public: class SK_API SkRTreeFactory : public SkBBHFactory { public: - SkBBoxHierarchy* operator()(const SkRect& bounds) const SK_OVERRIDE; + SkBBoxHierarchy* operator()(const SkRect& bounds) const override; private: typedef SkBBHFactory INHERITED; }; diff --git a/include/core/SkBitmap.h b/include/core/SkBitmap.h index 059a8d734c..dbaca621af 100644 --- a/include/core/SkBitmap.h +++ b/include/core/SkBitmap.h @@ -694,7 +694,7 @@ public: */ class HeapAllocator : public Allocator { public: - bool allocPixelRef(SkBitmap*, SkColorTable*) SK_OVERRIDE; + bool allocPixelRef(SkBitmap*, SkColorTable*) override; }; class RLEPixels { diff --git a/include/core/SkBitmapDevice.h b/include/core/SkBitmapDevice.h index caff6857da..9d8c4c5c3e 100644 --- a/include/core/SkBitmapDevice.h +++ b/include/core/SkBitmapDevice.h @@ -35,25 +35,25 @@ public: return Create(info, NULL); } - SkImageInfo imageInfo() const SK_OVERRIDE; + SkImageInfo imageInfo() const override; protected: - bool onShouldDisableLCD(const SkPaint&) const SK_OVERRIDE; + bool onShouldDisableLCD(const SkPaint&) const override; /** These are called inside the per-device-layer loop for each draw call. When these are called, we have already applied any saveLayer operations, and are handling any looping from the paint, and any effects from the DrawFilter. */ - void drawPaint(const SkDraw&, const SkPaint& paint) SK_OVERRIDE; + void drawPaint(const SkDraw&, const SkPaint& paint) override; virtual void drawPoints(const SkDraw&, SkCanvas::PointMode mode, size_t count, - const SkPoint[], const SkPaint& paint) SK_OVERRIDE; + const SkPoint[], const SkPaint& paint) override; virtual void drawRect(const SkDraw&, const SkRect& r, - const SkPaint& paint) SK_OVERRIDE; + const SkPaint& paint) override; virtual void drawOval(const SkDraw&, const SkRect& oval, - const SkPaint& paint) SK_OVERRIDE; + const SkPaint& paint) override; virtual void drawRRect(const SkDraw&, const SkRRect& rr, - const SkPaint& paint) SK_OVERRIDE; + const SkPaint& paint) override; /** * If pathIsMutable, then the implementation is allowed to cast path to a @@ -69,11 +69,11 @@ protected: virtual void drawPath(const SkDraw&, const SkPath& path, const SkPaint& paint, const SkMatrix* prePathMatrix = NULL, - bool pathIsMutable = false) SK_OVERRIDE; + bool pathIsMutable = false) override; virtual void drawBitmap(const SkDraw&, const SkBitmap& bitmap, - const SkMatrix& matrix, const SkPaint& paint) SK_OVERRIDE; + const SkMatrix& matrix, const SkPaint& paint) override; virtual void drawSprite(const SkDraw&, const SkBitmap& bitmap, - int x, int y, const SkPaint& paint) SK_OVERRIDE; + int x, int y, const SkPaint& paint) override; /** * The default impl. will create a bitmap-shader from the bitmap, @@ -82,23 +82,23 @@ protected: virtual void drawBitmapRect(const SkDraw&, const SkBitmap&, const SkRect* srcOrNull, const SkRect& dst, const SkPaint& paint, - SkCanvas::DrawBitmapRectFlags flags) SK_OVERRIDE; + SkCanvas::DrawBitmapRectFlags flags) override; /** * Does not handle text decoration. * Decorations (underline and stike-thru) will be handled by SkCanvas. */ virtual void drawText(const SkDraw&, const void* text, size_t len, - SkScalar x, SkScalar y, const SkPaint& paint) SK_OVERRIDE; + SkScalar x, SkScalar y, const SkPaint& paint) override; virtual void drawPosText(const SkDraw&, const void* text, size_t len, const SkScalar pos[], int scalarsPerPos, - const SkPoint& offset, const SkPaint& paint) SK_OVERRIDE; + const SkPoint& offset, const SkPaint& paint) override; virtual void drawVertices(const SkDraw&, SkCanvas::VertexMode, int vertexCount, const SkPoint verts[], const SkPoint texs[], const SkColor colors[], SkXfermode* xmode, const uint16_t indices[], int indexCount, - const SkPaint& paint) SK_OVERRIDE; - virtual void drawDevice(const SkDraw&, SkBaseDevice*, int x, int y, const SkPaint&) SK_OVERRIDE; + const SkPaint& paint) override; + virtual void drawDevice(const SkDraw&, SkBaseDevice*, int x, int y, const SkPaint&) override; /////////////////////////////////////////////////////////////////////////// @@ -107,7 +107,7 @@ protected: altered. The config/width/height/rowbytes must remain unchanged. @return the device contents as a bitmap */ - const SkBitmap& onAccessBitmap() SK_OVERRIDE; + const SkBitmap& onAccessBitmap() override; SkPixelRef* getPixelRef() const { return fBitmap.pixelRef(); } // just for subclasses, to assign a custom pixelref @@ -116,15 +116,15 @@ protected: return pr; } - bool onReadPixels(const SkImageInfo&, void*, size_t, int x, int y) SK_OVERRIDE; - bool onWritePixels(const SkImageInfo&, const void*, size_t, int, int) SK_OVERRIDE; - void* onAccessPixels(SkImageInfo* info, size_t* rowBytes) SK_OVERRIDE; + bool onReadPixels(const SkImageInfo&, void*, size_t, int x, int y) override; + bool onWritePixels(const SkImageInfo&, const void*, size_t, int, int) override; + void* onAccessPixels(SkImageInfo* info, size_t* rowBytes) override; /** Called when this device is installed into a Canvas. Balanced by a call to unlockPixels() when the device is removed from a Canvas. */ - void lockPixels() SK_OVERRIDE; - void unlockPixels() SK_OVERRIDE; + void lockPixels() override; + void unlockPixels() override; private: friend class SkCanvas; @@ -139,14 +139,14 @@ private: // used to change the backend's pixels (and possibly config/rowbytes) // but cannot change the width/height, so there should be no change to // any clip information. - void replaceBitmapBackendForRasterSurface(const SkBitmap&) SK_OVERRIDE; + void replaceBitmapBackendForRasterSurface(const SkBitmap&) override; - SkBaseDevice* onCreateDevice(const CreateInfo&, const SkPaint*) SK_OVERRIDE; + SkBaseDevice* onCreateDevice(const CreateInfo&, const SkPaint*) override; - SkSurface* newSurface(const SkImageInfo&, const SkSurfaceProps&) SK_OVERRIDE; - const void* peekPixels(SkImageInfo*, size_t* rowBytes) SK_OVERRIDE; + SkSurface* newSurface(const SkImageInfo&, const SkSurfaceProps&) override; + const void* peekPixels(SkImageInfo*, size_t* rowBytes) override; - SkImageFilter::Cache* getImageFilterCache() SK_OVERRIDE; + SkImageFilter::Cache* getImageFilterCache() override; SkBitmap fBitmap; diff --git a/include/core/SkComposeShader.h b/include/core/SkComposeShader.h index 8e0d93f7e8..dd10447a04 100644 --- a/include/core/SkComposeShader.h +++ b/include/core/SkComposeShader.h @@ -34,7 +34,7 @@ public: SkComposeShader(SkShader* sA, SkShader* sB, SkXfermode* mode = NULL); virtual ~SkComposeShader(); - size_t contextSize() const SK_OVERRIDE; + size_t contextSize() const override; class ComposeShaderContext : public SkShader::Context { public: @@ -48,7 +48,7 @@ public: virtual ~ComposeShaderContext(); - void shadeSpan(int x, int y, SkPMColor[], int count) SK_OVERRIDE; + void shadeSpan(int x, int y, SkPMColor[], int count) override; private: SkShader::Context* fShaderContextA; @@ -62,15 +62,15 @@ public: SkShader* getShaderB() { return fShaderB; } #endif - bool asACompose(ComposeRec* rec) const SK_OVERRIDE; + bool asACompose(ComposeRec* rec) const override; SK_TO_STRING_OVERRIDE() SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkComposeShader) protected: SkComposeShader(SkReadBuffer& ); - void flatten(SkWriteBuffer&) const SK_OVERRIDE; - Context* onCreateContext(const ContextRec&, void*) const SK_OVERRIDE; + void flatten(SkWriteBuffer&) const override; + Context* onCreateContext(const ContextRec&, void*) const override; private: SkShader* fShaderA; diff --git a/include/core/SkDrawPictureCallback.h b/include/core/SkDrawPictureCallback.h index ea30f59a24..ab6ca0aa7a 100644 --- a/include/core/SkDrawPictureCallback.h +++ b/include/core/SkDrawPictureCallback.h @@ -27,7 +27,7 @@ class SK_API SkDrawPictureCallback : public SkPicture::AbortCallback { public: virtual bool abortDrawing() = 0; - bool abort() SK_OVERRIDE { return this->abortDrawing(); } + bool abort() override { return this->abortDrawing(); } }; #endif diff --git a/include/core/SkFlattenable.h b/include/core/SkFlattenable.h index 1868176924..74f8717b68 100644 --- a/include/core/SkFlattenable.h +++ b/include/core/SkFlattenable.h @@ -49,7 +49,7 @@ class SkWriteBuffer; static SkFlattenable* CreateProc(SkReadBuffer&); \ friend class SkPrivateEffectInitializer; \ public: \ - Factory getFactory() const SK_OVERRIDE { return CreateProc; } + Factory getFactory() const override { return CreateProc; } /** For SkFlattenable derived objects with a valid type This macro should only be used in base class objects in core diff --git a/include/core/SkImageFilter.h b/include/core/SkImageFilter.h index 40bd38a949..dab46ae716 100644 --- a/include/core/SkImageFilter.h +++ b/include/core/SkImageFilter.h @@ -266,7 +266,7 @@ protected: */ explicit SkImageFilter(int inputCount, SkReadBuffer& rb); - void flatten(SkWriteBuffer&) const SK_OVERRIDE; + void flatten(SkWriteBuffer&) const override; /** * This is the virtual which should be overridden by the derived class diff --git a/include/core/SkMallocPixelRef.h b/include/core/SkMallocPixelRef.h index 4cb187597e..1cc9c4eb81 100644 --- a/include/core/SkMallocPixelRef.h +++ b/include/core/SkMallocPixelRef.h @@ -84,7 +84,7 @@ public: public: virtual SkPixelRef* create(const SkImageInfo&, size_t rowBytes, - SkColorTable*) SK_OVERRIDE; + SkColorTable*) override; }; protected: @@ -93,9 +93,9 @@ protected: bool ownPixels); virtual ~SkMallocPixelRef(); - bool onNewLockPixels(LockRec*) SK_OVERRIDE; - void onUnlockPixels() SK_OVERRIDE; - size_t getAllocatedSizeInBytes() const SK_OVERRIDE; + bool onNewLockPixels(LockRec*) override; + void onUnlockPixels() override; + size_t getAllocatedSizeInBytes() const override; private: void* fStorage; diff --git a/include/core/SkPathEffect.h b/include/core/SkPathEffect.h index 7e2d1ae6a4..09070bd331 100644 --- a/include/core/SkPathEffect.h +++ b/include/core/SkPathEffect.h @@ -163,7 +163,7 @@ public: protected: SkPairPathEffect(SkPathEffect* pe0, SkPathEffect* pe1); - void flatten(SkWriteBuffer&) const SK_OVERRIDE; + void flatten(SkWriteBuffer&) const override; // these are visible to our subclasses SkPathEffect* fPE0, *fPE1; @@ -191,13 +191,13 @@ public: } virtual bool filterPath(SkPath* dst, const SkPath& src, - SkStrokeRec*, const SkRect*) const SK_OVERRIDE; + SkStrokeRec*, const SkRect*) const override; SK_TO_STRING_OVERRIDE() SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkComposePathEffect) #ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK - bool exposedInAndroidJavaAPI() const SK_OVERRIDE { return true; } + bool exposedInAndroidJavaAPI() const override { return true; } #endif protected: @@ -228,13 +228,13 @@ public: } virtual bool filterPath(SkPath* dst, const SkPath& src, - SkStrokeRec*, const SkRect*) const SK_OVERRIDE; + SkStrokeRec*, const SkRect*) const override; SK_TO_STRING_OVERRIDE() SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkSumPathEffect) #ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK - bool exposedInAndroidJavaAPI() const SK_OVERRIDE { return true; } + bool exposedInAndroidJavaAPI() const override { return true; } #endif protected: diff --git a/include/core/SkPostConfig.h b/include/core/SkPostConfig.h index d08f68a1d9..22427d2016 100644 --- a/include/core/SkPostConfig.h +++ b/include/core/SkPostConfig.h @@ -284,32 +284,6 @@ ////////////////////////////////////////////////////////////////////// -#ifndef SK_OVERRIDE -# if defined(_MSC_VER) -# define SK_OVERRIDE override -# elif defined(__clang__) - // Using __attribute__((override)) on clang does not appear to always work. - // Clang defaults to C++03 and warns about using override. Squelch that. Intentionally no - // push/pop here so all users of SK_OVERRIDE ignore the warning too. This is like passing - // -Wno-c++11-extensions, except that GCC won't die (because it won't see this pragma). -# pragma clang diagnostic ignored "-Wc++11-extensions" -# -# if __has_feature(cxx_override_control) -# define SK_OVERRIDE override -# elif defined(__has_extension) && __has_extension(cxx_override_control) -# define SK_OVERRIDE override -# endif - // if GCC >= 4.7 -# elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7)) -# define SK_OVERRIDE override -# endif -# ifndef SK_OVERRIDE -# define SK_OVERRIDE -# endif -#endif - -////////////////////////////////////////////////////////////////////// - #if !defined(SK_UNUSED) # define SK_UNUSED SK_ATTRIBUTE(unused) #endif diff --git a/include/core/SkShader.h b/include/core/SkShader.h index 5efd46d595..91d431f11b 100644 --- a/include/core/SkShader.h +++ b/include/core/SkShader.h @@ -476,7 +476,7 @@ public: SK_DEFINE_FLATTENABLE_TYPE(SkShader) protected: - void flatten(SkWriteBuffer&) const SK_OVERRIDE; + void flatten(SkWriteBuffer&) const override; bool computeTotalInverse(const ContextRec&, SkMatrix* totalInverse) const; diff --git a/include/core/SkStream.h b/include/core/SkStream.h index 9e6c261cbe..829ece6496 100644 --- a/include/core/SkStream.h +++ b/include/core/SkStream.h @@ -130,39 +130,39 @@ public: /** SkStreamRewindable is a SkStream for which rewind and duplicate are required. */ class SK_API SkStreamRewindable : public SkStream { public: - bool rewind() SK_OVERRIDE = 0; - SkStreamRewindable* duplicate() const SK_OVERRIDE = 0; + bool rewind() override = 0; + SkStreamRewindable* duplicate() const override = 0; }; /** SkStreamSeekable is a SkStreamRewindable for which position, seek, move, and fork are required. */ class SK_API SkStreamSeekable : public SkStreamRewindable { public: - SkStreamSeekable* duplicate() const SK_OVERRIDE = 0; + SkStreamSeekable* duplicate() const override = 0; - bool hasPosition() const SK_OVERRIDE { return true; } - size_t getPosition() const SK_OVERRIDE = 0; - bool seek(size_t position) SK_OVERRIDE = 0; - bool move(long offset) SK_OVERRIDE = 0; - SkStreamSeekable* fork() const SK_OVERRIDE = 0; + bool hasPosition() const override { return true; } + size_t getPosition() const override = 0; + bool seek(size_t position) override = 0; + bool move(long offset) override = 0; + SkStreamSeekable* fork() const override = 0; }; /** SkStreamAsset is a SkStreamSeekable for which getLength is required. */ class SK_API SkStreamAsset : public SkStreamSeekable { public: - SkStreamAsset* duplicate() const SK_OVERRIDE = 0; - SkStreamAsset* fork() const SK_OVERRIDE = 0; + SkStreamAsset* duplicate() const override = 0; + SkStreamAsset* fork() const override = 0; - bool hasLength() const SK_OVERRIDE { return true; } - size_t getLength() const SK_OVERRIDE = 0; + bool hasLength() const override { return true; } + size_t getLength() const override = 0; }; /** SkStreamMemory is a SkStreamAsset for which getMemoryBase is required. */ class SK_API SkStreamMemory : public SkStreamAsset { public: - SkStreamMemory* duplicate() const SK_OVERRIDE = 0; - SkStreamMemory* fork() const SK_OVERRIDE = 0; + SkStreamMemory* duplicate() const override = 0; + SkStreamMemory* fork() const override = 0; - const void* getMemoryBase() SK_OVERRIDE = 0; + const void* getMemoryBase() override = 0; }; class SK_API SkWStream : SkNoncopyable { @@ -245,20 +245,20 @@ public: */ void setPath(const char path[]); - size_t read(void* buffer, size_t size) SK_OVERRIDE; - bool isAtEnd() const SK_OVERRIDE; + size_t read(void* buffer, size_t size) override; + bool isAtEnd() const override; - bool rewind() SK_OVERRIDE; - SkStreamAsset* duplicate() const SK_OVERRIDE; + bool rewind() override; + SkStreamAsset* duplicate() const override; - size_t getPosition() const SK_OVERRIDE; - bool seek(size_t position) SK_OVERRIDE; - bool move(long offset) SK_OVERRIDE; - SkStreamAsset* fork() const SK_OVERRIDE; + size_t getPosition() const override; + bool seek(size_t position) override; + bool move(long offset) override; + SkStreamAsset* fork() const override; - size_t getLength() const SK_OVERRIDE; + size_t getLength() const override; - const void* getMemoryBase() SK_OVERRIDE; + const void* getMemoryBase() override; private: SkFILE* fFILE; @@ -317,20 +317,20 @@ public: const void* getAtPos(); size_t peek() const { return fOffset; } - size_t read(void* buffer, size_t size) SK_OVERRIDE; - bool isAtEnd() const SK_OVERRIDE; + size_t read(void* buffer, size_t size) override; + bool isAtEnd() const override; - bool rewind() SK_OVERRIDE; - SkMemoryStream* duplicate() const SK_OVERRIDE; + bool rewind() override; + SkMemoryStream* duplicate() const override; - size_t getPosition() const SK_OVERRIDE; - bool seek(size_t position) SK_OVERRIDE; - bool move(long offset) SK_OVERRIDE; - SkMemoryStream* fork() const SK_OVERRIDE; + size_t getPosition() const override; + bool seek(size_t position) override; + bool move(long offset) override; + SkMemoryStream* fork() const override; - size_t getLength() const SK_OVERRIDE; + size_t getLength() const override; - const void* getMemoryBase() SK_OVERRIDE; + const void* getMemoryBase() override; private: SkData* fData; @@ -352,9 +352,9 @@ public: */ bool isValid() const { return fFILE != NULL; } - bool write(const void* buffer, size_t size) SK_OVERRIDE; - void flush() SK_OVERRIDE; - size_t bytesWritten() const SK_OVERRIDE; + bool write(const void* buffer, size_t size) override; + void flush() override; + size_t bytesWritten() const override; private: SkFILE* fFILE; @@ -367,8 +367,8 @@ public: SK_DECLARE_INST_COUNT(SkMemoryWStream) SkMemoryWStream(void* buffer, size_t size); - bool write(const void* buffer, size_t size) SK_OVERRIDE; - size_t bytesWritten() const SK_OVERRIDE { return fBytesWritten; } + bool write(const void* buffer, size_t size) override; + size_t bytesWritten() const override { return fBytesWritten; } private: char* fBuffer; @@ -385,8 +385,8 @@ public: SkDynamicMemoryWStream(); virtual ~SkDynamicMemoryWStream(); - bool write(const void* buffer, size_t size) SK_OVERRIDE; - size_t bytesWritten() const SK_OVERRIDE { return fBytesWritten; } + bool write(const void* buffer, size_t size) override; + size_t bytesWritten() const override { return fBytesWritten; } // random access write // modifies stream and returns true if offset + size is less than or equal to getOffset() bool write(const void* buffer, size_t offset, size_t size); @@ -432,9 +432,9 @@ public: SK_DECLARE_INST_COUNT(SkDebugWStream) // overrides - bool write(const void* buffer, size_t size) SK_OVERRIDE; - void newline() SK_OVERRIDE; - size_t bytesWritten() const SK_OVERRIDE { return fBytesWritten; } + bool write(const void* buffer, size_t size) override; + void newline() override; + size_t bytesWritten() const override { return fBytesWritten; } private: size_t fBytesWritten; diff --git a/include/core/SkTypes.h b/include/core/SkTypes.h index 39923c59b7..3f4bc2cf34 100644 --- a/include/core/SkTypes.h +++ b/include/core/SkTypes.h @@ -73,7 +73,7 @@ static inline void sk_bzero(void* buffer, size_t size) { /////////////////////////////////////////////////////////////////////////////// -#ifdef SK_OVERRIDE_GLOBAL_NEW +#ifdef override_GLOBAL_NEW #include inline void* operator new(size_t size) { @@ -138,7 +138,7 @@ inline void operator delete(void* p) { #define SK_TO_STRING_NONVIRT() void toString(SkString* str) const; #define SK_TO_STRING_VIRT() virtual void toString(SkString* str) const; #define SK_TO_STRING_PUREVIRT() virtual void toString(SkString* str) const = 0; - #define SK_TO_STRING_OVERRIDE() void toString(SkString* str) const SK_OVERRIDE; + #define SK_TO_STRING_OVERRIDE() void toString(SkString* str) const override; #endif template diff --git a/include/core/SkWeakRefCnt.h b/include/core/SkWeakRefCnt.h index 3eb8ea5ca5..91795f7adb 100644 --- a/include/core/SkWeakRefCnt.h +++ b/include/core/SkWeakRefCnt.h @@ -147,7 +147,7 @@ private: on the object and releases the implicit weak reference held collectively by the strong references. */ - void internal_dispose() const SK_OVERRIDE { + void internal_dispose() const override { weak_dispose(); weak_unref(); } diff --git a/include/device/xps/SkXPSDevice.h b/include/device/xps/SkXPSDevice.h index 10dab81183..9efb6f3dc8 100644 --- a/include/device/xps/SkXPSDevice.h +++ b/include/device/xps/SkXPSDevice.h @@ -71,54 +71,54 @@ public: virtual bool endPortfolio(); protected: - void drawPaint(const SkDraw&, const SkPaint& paint) SK_OVERRIDE; + void drawPaint(const SkDraw&, const SkPaint& paint) override; virtual void drawPoints( const SkDraw&, SkCanvas::PointMode mode, size_t count, const SkPoint[], - const SkPaint& paint) SK_OVERRIDE; + const SkPaint& paint) override; virtual void drawRect( const SkDraw&, const SkRect& r, - const SkPaint& paint) SK_OVERRIDE; + const SkPaint& paint) override; virtual void drawRRect( const SkDraw&, const SkRRect&, - const SkPaint& paint) SK_OVERRIDE; + const SkPaint& paint) override; virtual void drawPath( const SkDraw&, const SkPath& platonicPath, const SkPaint& paint, const SkMatrix* prePathMatrix, - bool pathIsMutable) SK_OVERRIDE; + bool pathIsMutable) override; virtual void drawBitmap( const SkDraw&, const SkBitmap& bitmap, const SkMatrix& matrix, - const SkPaint& paint) SK_OVERRIDE; + const SkPaint& paint) override; virtual void drawSprite( const SkDraw&, const SkBitmap& bitmap, int x, int y, - const SkPaint& paint) SK_OVERRIDE; + const SkPaint& paint) override; virtual void drawText( const SkDraw&, const void* text, size_t len, SkScalar x, SkScalar y, - const SkPaint& paint) SK_OVERRIDE; + const SkPaint& paint) override; virtual void drawPosText( const SkDraw&, const void* text, size_t len, const SkScalar pos[], int scalarsPerPos, - const SkPoint& offset, const SkPaint& paint) SK_OVERRIDE; + const SkPoint& offset, const SkPaint& paint) override; virtual void drawVertices( const SkDraw&, @@ -127,13 +127,13 @@ protected: const SkPoint texs[], const SkColor colors[], SkXfermode* xmode, const uint16_t indices[], int indexCount, - const SkPaint& paint) SK_OVERRIDE; + const SkPaint& paint) override; virtual void drawDevice( const SkDraw&, SkBaseDevice* device, int x, int y, - const SkPaint& paint) SK_OVERRIDE; + const SkPaint& paint) override; private: class TypefaceUse : ::SkNoncopyable { @@ -309,7 +309,7 @@ private: const SkVector& ppuScale, IXpsOMPath* shadedPath); - SkBaseDevice* onCreateDevice(const CreateInfo&, const SkPaint*) SK_OVERRIDE; + SkBaseDevice* onCreateDevice(const CreateInfo&, const SkPaint*) override; // Disable the default copy and assign implementation. SkXPSDevice(const SkXPSDevice&); diff --git a/include/effects/Sk1DPathEffect.h b/include/effects/Sk1DPathEffect.h index e5a3b5c160..6b3ec6d673 100644 --- a/include/effects/Sk1DPathEffect.h +++ b/include/effects/Sk1DPathEffect.h @@ -17,7 +17,7 @@ class SkPathMeasure; class SK_API Sk1DPathEffect : public SkPathEffect { public: virtual bool filterPath(SkPath* dst, const SkPath& src, - SkStrokeRec*, const SkRect*) const SK_OVERRIDE; + SkStrokeRec*, const SkRect*) const override; protected: /** Called at the start of each contour, returns the initial offset @@ -32,7 +32,7 @@ protected: virtual SkScalar next(SkPath* dst, SkScalar dist, SkPathMeasure&) const = 0; #ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK - bool exposedInAndroidJavaAPI() const SK_OVERRIDE { return true; } + bool exposedInAndroidJavaAPI() const override { return true; } #endif private: @@ -62,18 +62,18 @@ public: } virtual bool filterPath(SkPath*, const SkPath&, - SkStrokeRec*, const SkRect*) const SK_OVERRIDE; + SkStrokeRec*, const SkRect*) const override; SK_TO_STRING_OVERRIDE() SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkPath1DPathEffect) protected: SkPath1DPathEffect(const SkPath& path, SkScalar advance, SkScalar phase, Style); - void flatten(SkWriteBuffer&) const SK_OVERRIDE; + void flatten(SkWriteBuffer&) const override; // overrides from Sk1DPathEffect - SkScalar begin(SkScalar contourLength) const SK_OVERRIDE; - SkScalar next(SkPath*, SkScalar, SkPathMeasure&) const SK_OVERRIDE; + SkScalar begin(SkScalar contourLength) const override; + SkScalar next(SkPath*, SkScalar, SkPathMeasure&) const override; private: SkPath fPath; // copied from constructor diff --git a/include/effects/Sk2DPathEffect.h b/include/effects/Sk2DPathEffect.h index 7971ef431c..7fbf94b14d 100644 --- a/include/effects/Sk2DPathEffect.h +++ b/include/effects/Sk2DPathEffect.h @@ -14,7 +14,7 @@ class SK_API Sk2DPathEffect : public SkPathEffect { public: - bool filterPath(SkPath*, const SkPath&, SkStrokeRec*, const SkRect*) const SK_OVERRIDE; + bool filterPath(SkPath*, const SkPath&, SkStrokeRec*, const SkRect*) const override; protected: /** New virtual, to be overridden by subclasses. @@ -37,7 +37,7 @@ protected: // protected so that subclasses can call this during unflattening explicit Sk2DPathEffect(const SkMatrix& mat); - void flatten(SkWriteBuffer&) const SK_OVERRIDE; + void flatten(SkWriteBuffer&) const override; SK_TO_STRING_OVERRIDE() @@ -60,7 +60,7 @@ public: } virtual bool filterPath(SkPath* dst, const SkPath& src, - SkStrokeRec*, const SkRect*) const SK_OVERRIDE; + SkStrokeRec*, const SkRect*) const override; SK_TO_STRING_OVERRIDE() SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkLine2DPathEffect) @@ -68,9 +68,9 @@ public: protected: SkLine2DPathEffect(SkScalar width, const SkMatrix& matrix) : Sk2DPathEffect(matrix), fWidth(width) {} - void flatten(SkWriteBuffer&) const SK_OVERRIDE; + void flatten(SkWriteBuffer&) const override; - void nextSpan(int u, int v, int ucount, SkPath*) const SK_OVERRIDE; + void nextSpan(int u, int v, int ucount, SkPath*) const override; private: SkScalar fWidth; @@ -93,9 +93,9 @@ public: protected: SkPath2DPathEffect(const SkMatrix&, const SkPath&); - void flatten(SkWriteBuffer&) const SK_OVERRIDE; + void flatten(SkWriteBuffer&) const override; - void next(const SkPoint&, int u, int v, SkPath*) const SK_OVERRIDE; + void next(const SkPoint&, int u, int v, SkPath*) const override; private: SkPath fPath; diff --git a/include/effects/SkArcToPathEffect.h b/include/effects/SkArcToPathEffect.h index 7a96cd72ce..6ae7e36485 100644 --- a/include/effects/SkArcToPathEffect.h +++ b/include/effects/SkArcToPathEffect.h @@ -22,14 +22,14 @@ public: return SkNEW_ARGS(SkArcToPathEffect, (radius)); } - bool filterPath(SkPath* dst, const SkPath& src, SkStrokeRec*, const SkRect*) const SK_OVERRIDE; + bool filterPath(SkPath* dst, const SkPath& src, SkStrokeRec*, const SkRect*) const override; SK_TO_STRING_OVERRIDE() SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkArcToPathEffect) protected: explicit SkArcToPathEffect(SkScalar radius); - void flatten(SkWriteBuffer&) const SK_OVERRIDE; + void flatten(SkWriteBuffer&) const override; private: SkScalar fRadius; diff --git a/include/effects/SkBitmapSource.h b/include/effects/SkBitmapSource.h index 327ff6477e..cd43e8f61f 100644 --- a/include/effects/SkBitmapSource.h +++ b/include/effects/SkBitmapSource.h @@ -20,7 +20,7 @@ public: const SkRect& dstRect) { return SkNEW_ARGS(SkBitmapSource, (bitmap, srcRect, dstRect)); } - void computeFastBounds(const SkRect& src, SkRect* dst) const SK_OVERRIDE; + void computeFastBounds(const SkRect& src, SkRect* dst) const override; SK_TO_STRING_OVERRIDE() SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkBitmapSource) @@ -28,10 +28,10 @@ public: protected: explicit SkBitmapSource(const SkBitmap& bitmap); SkBitmapSource(const SkBitmap& bitmap, const SkRect& srcRect, const SkRect& dstRect); - void flatten(SkWriteBuffer&) const SK_OVERRIDE; + void flatten(SkWriteBuffer&) const override; virtual bool onFilterImage(Proxy*, const SkBitmap& src, const Context&, - SkBitmap* result, SkIPoint* offset) const SK_OVERRIDE; + SkBitmap* result, SkIPoint* offset) const override; private: SkBitmap fBitmap; diff --git a/include/effects/SkBlurDrawLooper.h b/include/effects/SkBlurDrawLooper.h index 5e6b9df502..26bcd52252 100644 --- a/include/effects/SkBlurDrawLooper.h +++ b/include/effects/SkBlurDrawLooper.h @@ -42,9 +42,9 @@ public: virtual ~SkBlurDrawLooper(); - SkDrawLooper::Context* createContext(SkCanvas*, void* storage) const SK_OVERRIDE; + SkDrawLooper::Context* createContext(SkCanvas*, void* storage) const override; - size_t contextSize() const SK_OVERRIDE { return sizeof(BlurDrawLooperContext); } + size_t contextSize() const override { return sizeof(BlurDrawLooperContext); } SK_TO_STRING_OVERRIDE() SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkBlurDrawLooper) @@ -53,9 +53,9 @@ protected: SkBlurDrawLooper(SkColor color, SkScalar sigma, SkScalar dx, SkScalar dy, uint32_t flags); - void flatten(SkWriteBuffer&) const SK_OVERRIDE; + void flatten(SkWriteBuffer&) const override; - bool asABlurShadow(BlurShadowRec*) const SK_OVERRIDE; + bool asABlurShadow(BlurShadowRec*) const override; private: SkMaskFilter* fBlur; @@ -74,7 +74,7 @@ private: public: explicit BlurDrawLooperContext(const SkBlurDrawLooper* looper); - bool next(SkCanvas* canvas, SkPaint* paint) SK_OVERRIDE; + bool next(SkCanvas* canvas, SkPaint* paint) override; private: const SkBlurDrawLooper* fLooper; diff --git a/include/effects/SkBlurImageFilter.h b/include/effects/SkBlurImageFilter.h index 6f4537fed7..ec29c8e237 100644 --- a/include/effects/SkBlurImageFilter.h +++ b/include/effects/SkBlurImageFilter.h @@ -20,7 +20,7 @@ public: return SkNEW_ARGS(SkBlurImageFilter, (sigmaX, sigmaY, input, cropRect)); } - void computeFastBounds(const SkRect&, SkRect*) const SK_OVERRIDE; + void computeFastBounds(const SkRect&, SkRect*) const override; SK_TO_STRING_OVERRIDE() SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkBlurImageFilter) @@ -30,16 +30,16 @@ protected: SkScalar sigmaY, SkImageFilter* input, const CropRect* cropRect); - void flatten(SkWriteBuffer&) const SK_OVERRIDE; + void flatten(SkWriteBuffer&) const override; virtual bool onFilterImage(Proxy*, const SkBitmap& src, const Context&, - SkBitmap* result, SkIPoint* offset) const SK_OVERRIDE; + SkBitmap* result, SkIPoint* offset) const override; virtual bool onFilterBounds(const SkIRect& src, const SkMatrix&, - SkIRect* dst) const SK_OVERRIDE; + SkIRect* dst) const override; - bool canFilterImageGPU() const SK_OVERRIDE { return true; } + bool canFilterImageGPU() const override { return true; } virtual bool filterImageGPU(Proxy* proxy, const SkBitmap& src, const Context& ctx, - SkBitmap* result, SkIPoint* offset) const SK_OVERRIDE; + SkBitmap* result, SkIPoint* offset) const override; private: SkSize fSigma; diff --git a/include/effects/SkColorCubeFilter.h b/include/effects/SkColorCubeFilter.h index 4500a0c292..4999bc5777 100644 --- a/include/effects/SkColorCubeFilter.h +++ b/include/effects/SkColorCubeFilter.h @@ -21,11 +21,11 @@ public: */ static SkColorFilter* Create(SkData* cubeData, int cubeDimension); - void filterSpan(const SkPMColor src[], int count, SkPMColor[]) const SK_OVERRIDE; - uint32_t getFlags() const SK_OVERRIDE; + void filterSpan(const SkPMColor src[], int count, SkPMColor[]) const override; + uint32_t getFlags() const override; #if SK_SUPPORT_GPU - bool asFragmentProcessors(GrContext*, SkTDArray*) const SK_OVERRIDE; + bool asFragmentProcessors(GrContext*, SkTDArray*) const override; #endif SK_TO_STRING_OVERRIDE() @@ -33,7 +33,7 @@ public: protected: SkColorCubeFilter(SkData* cubeData, int cubeDimension); - void flatten(SkWriteBuffer&) const SK_OVERRIDE; + void flatten(SkWriteBuffer&) const override; private: /** The cache is initialized on-demand when getProcessingLuts is called. diff --git a/include/effects/SkColorFilterImageFilter.h b/include/effects/SkColorFilterImageFilter.h index 7f775dbd68..0076a87c20 100644 --- a/include/effects/SkColorFilterImageFilter.h +++ b/include/effects/SkColorFilterImageFilter.h @@ -23,12 +23,12 @@ public: SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkColorFilterImageFilter) protected: - void flatten(SkWriteBuffer&) const SK_OVERRIDE; + void flatten(SkWriteBuffer&) const override; virtual bool onFilterImage(Proxy*, const SkBitmap& src, const Context&, - SkBitmap* result, SkIPoint* loc) const SK_OVERRIDE; + SkBitmap* result, SkIPoint* loc) const override; - bool onIsColorFilterNode(SkColorFilter**) const SK_OVERRIDE; + bool onIsColorFilterNode(SkColorFilter**) const override; private: SkColorFilterImageFilter(SkColorFilter* cf, diff --git a/include/effects/SkColorMatrixFilter.h b/include/effects/SkColorMatrixFilter.h index 4cb24bad5d..27a2be835b 100644 --- a/include/effects/SkColorMatrixFilter.h +++ b/include/effects/SkColorMatrixFilter.h @@ -20,13 +20,13 @@ public: return SkNEW_ARGS(SkColorMatrixFilter, (array)); } - void filterSpan(const SkPMColor src[], int count, SkPMColor[]) const SK_OVERRIDE; - uint32_t getFlags() const SK_OVERRIDE; - bool asColorMatrix(SkScalar matrix[20]) const SK_OVERRIDE; - SkColorFilter* newComposed(const SkColorFilter*) const SK_OVERRIDE; + void filterSpan(const SkPMColor src[], int count, SkPMColor[]) const override; + uint32_t getFlags() const override; + bool asColorMatrix(SkScalar matrix[20]) const override; + SkColorFilter* newComposed(const SkColorFilter*) const override; #if SK_SUPPORT_GPU - bool asFragmentProcessors(GrContext*, SkTDArray*) const SK_OVERRIDE; + bool asFragmentProcessors(GrContext*, SkTDArray*) const override; #endif struct State { @@ -41,7 +41,7 @@ public: protected: explicit SkColorMatrixFilter(const SkColorMatrix&); explicit SkColorMatrixFilter(const SkScalar array[20]); - void flatten(SkWriteBuffer&) const SK_OVERRIDE; + void flatten(SkWriteBuffer&) const override; private: SkColorMatrix fMatrix; diff --git a/include/effects/SkComposeImageFilter.h b/include/effects/SkComposeImageFilter.h index 361ca2b8fe..e3dc1ffb23 100644 --- a/include/effects/SkComposeImageFilter.h +++ b/include/effects/SkComposeImageFilter.h @@ -24,7 +24,7 @@ public: SkImageFilter* inputs[2] = { outer, inner }; return SkNEW_ARGS(SkComposeImageFilter, (inputs)); } - void computeFastBounds(const SkRect& src, SkRect* dst) const SK_OVERRIDE; + void computeFastBounds(const SkRect& src, SkRect* dst) const override; SK_TO_STRING_OVERRIDE() SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkComposeImageFilter) @@ -35,8 +35,8 @@ protected: SkASSERT(inputs[1]); } virtual bool onFilterImage(Proxy*, const SkBitmap& src, const Context&, - SkBitmap* result, SkIPoint* loc) const SK_OVERRIDE; - bool onFilterBounds(const SkIRect&, const SkMatrix&, SkIRect*) const SK_OVERRIDE; + SkBitmap* result, SkIPoint* loc) const override; + bool onFilterBounds(const SkIRect&, const SkMatrix&, SkIRect*) const override; private: typedef SkImageFilter INHERITED; diff --git a/include/effects/SkCornerPathEffect.h b/include/effects/SkCornerPathEffect.h index 636de400d3..19357903ec 100644 --- a/include/effects/SkCornerPathEffect.h +++ b/include/effects/SkCornerPathEffect.h @@ -26,18 +26,18 @@ public: virtual ~SkCornerPathEffect(); virtual bool filterPath(SkPath* dst, const SkPath& src, - SkStrokeRec*, const SkRect*) const SK_OVERRIDE; + SkStrokeRec*, const SkRect*) const override; SK_TO_STRING_OVERRIDE() SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkCornerPathEffect) #ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK - bool exposedInAndroidJavaAPI() const SK_OVERRIDE { return true; } + bool exposedInAndroidJavaAPI() const override { return true; } #endif protected: explicit SkCornerPathEffect(SkScalar radius); - void flatten(SkWriteBuffer&) const SK_OVERRIDE; + void flatten(SkWriteBuffer&) const override; private: SkScalar fRadius; diff --git a/include/effects/SkDashPathEffect.h b/include/effects/SkDashPathEffect.h index dcb7577404..0fd00d70af 100644 --- a/include/effects/SkDashPathEffect.h +++ b/include/effects/SkDashPathEffect.h @@ -43,24 +43,24 @@ public: virtual ~SkDashPathEffect(); virtual bool filterPath(SkPath* dst, const SkPath& src, - SkStrokeRec*, const SkRect*) const SK_OVERRIDE; + SkStrokeRec*, const SkRect*) const override; virtual bool asPoints(PointData* results, const SkPath& src, const SkStrokeRec&, const SkMatrix&, - const SkRect*) const SK_OVERRIDE; + const SkRect*) const override; - DashType asADash(DashInfo* info) const SK_OVERRIDE; + DashType asADash(DashInfo* info) const override; SK_TO_STRING_OVERRIDE() SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkDashPathEffect) #ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK - bool exposedInAndroidJavaAPI() const SK_OVERRIDE { return true; } + bool exposedInAndroidJavaAPI() const override { return true; } #endif protected: SkDashPathEffect(const SkScalar intervals[], int count, SkScalar phase); - void flatten(SkWriteBuffer&) const SK_OVERRIDE; + void flatten(SkWriteBuffer&) const override; private: SkScalar* fIntervals; diff --git a/include/effects/SkDiscretePathEffect.h b/include/effects/SkDiscretePathEffect.h index ea44d654cf..d05d181de0 100644 --- a/include/effects/SkDiscretePathEffect.h +++ b/include/effects/SkDiscretePathEffect.h @@ -37,20 +37,20 @@ public: } virtual bool filterPath(SkPath* dst, const SkPath& src, - SkStrokeRec*, const SkRect*) const SK_OVERRIDE; + SkStrokeRec*, const SkRect*) const override; SK_TO_STRING_OVERRIDE() SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkDiscretePathEffect) #ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK - bool exposedInAndroidJavaAPI() const SK_OVERRIDE { return true; } + bool exposedInAndroidJavaAPI() const override { return true; } #endif protected: SkDiscretePathEffect(SkScalar segLength, SkScalar deviation, uint32_t seedAssist); - void flatten(SkWriteBuffer&) const SK_OVERRIDE; + void flatten(SkWriteBuffer&) const override; private: SkScalar fSegLength, fPerterb; diff --git a/include/effects/SkDisplacementMapEffect.h b/include/effects/SkDisplacementMapEffect.h index b3fa8d5f00..9513a54f15 100644 --- a/include/effects/SkDisplacementMapEffect.h +++ b/include/effects/SkDisplacementMapEffect.h @@ -35,16 +35,16 @@ public: const SkBitmap& src, const Context& ctx, SkBitmap* dst, - SkIPoint* offset) const SK_OVERRIDE; - void computeFastBounds(const SkRect& src, SkRect* dst) const SK_OVERRIDE; + SkIPoint* offset) const override; + void computeFastBounds(const SkRect& src, SkRect* dst) const override; virtual bool onFilterBounds(const SkIRect& src, const SkMatrix&, - SkIRect* dst) const SK_OVERRIDE; + SkIRect* dst) const override; #if SK_SUPPORT_GPU - bool canFilterImageGPU() const SK_OVERRIDE { return true; } + bool canFilterImageGPU() const override { return true; } virtual bool filterImageGPU(Proxy* proxy, const SkBitmap& src, const Context& ctx, - SkBitmap* result, SkIPoint* offset) const SK_OVERRIDE; + SkBitmap* result, SkIPoint* offset) const override; #endif SK_TO_STRING_OVERRIDE() @@ -54,7 +54,7 @@ protected: ChannelSelectorType yChannelSelector, SkScalar scale, SkImageFilter* inputs[2], const CropRect* cropRect); - void flatten(SkWriteBuffer&) const SK_OVERRIDE; + void flatten(SkWriteBuffer&) const override; private: ChannelSelectorType fXChannelSelector; diff --git a/include/effects/SkDropShadowImageFilter.h b/include/effects/SkDropShadowImageFilter.h index 7dea4dfa48..3ff3d8044e 100644 --- a/include/effects/SkDropShadowImageFilter.h +++ b/include/effects/SkDropShadowImageFilter.h @@ -29,17 +29,17 @@ public: shadowMode, input, cropRect)); } - void computeFastBounds(const SkRect&, SkRect*) const SK_OVERRIDE; + void computeFastBounds(const SkRect&, SkRect*) const override; SK_TO_STRING_OVERRIDE() SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkDropShadowImageFilter) protected: SkDropShadowImageFilter(SkScalar dx, SkScalar dy, SkScalar sigmaX, SkScalar sigmaY, SkColor, ShadowMode shadowMode, SkImageFilter* input, const CropRect* cropRect); - void flatten(SkWriteBuffer&) const SK_OVERRIDE; - bool onFilterImage(Proxy*, const SkBitmap& source, const Context&, SkBitmap* result, SkIPoint* loc) const SK_OVERRIDE; + void flatten(SkWriteBuffer&) const override; + bool onFilterImage(Proxy*, const SkBitmap& source, const Context&, SkBitmap* result, SkIPoint* loc) const override; virtual bool onFilterBounds(const SkIRect& src, const SkMatrix&, - SkIRect* dst) const SK_OVERRIDE; + SkIRect* dst) const override; private: SkScalar fDx, fDy, fSigmaX, fSigmaY; diff --git a/include/effects/SkEmbossMaskFilter.h b/include/effects/SkEmbossMaskFilter.h index 3fa15fd5c3..41dfa2a66c 100644 --- a/include/effects/SkEmbossMaskFilter.h +++ b/include/effects/SkEmbossMaskFilter.h @@ -27,17 +27,17 @@ public: // overrides from SkMaskFilter // This method is not exported to java. - SkMask::Format getFormat() const SK_OVERRIDE; + SkMask::Format getFormat() const override; // This method is not exported to java. virtual bool filterMask(SkMask* dst, const SkMask& src, const SkMatrix&, - SkIPoint* margin) const SK_OVERRIDE; + SkIPoint* margin) const override; SK_TO_STRING_OVERRIDE() SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkEmbossMaskFilter) protected: SkEmbossMaskFilter(SkScalar blurSigma, const Light& light); - void flatten(SkWriteBuffer&) const SK_OVERRIDE; + void flatten(SkWriteBuffer&) const override; private: Light fLight; diff --git a/include/effects/SkLayerDrawLooper.h b/include/effects/SkLayerDrawLooper.h index 9aac01e50d..d93d08ad7e 100644 --- a/include/effects/SkLayerDrawLooper.h +++ b/include/effects/SkLayerDrawLooper.h @@ -73,21 +73,21 @@ public: LayerInfo(); }; - SkDrawLooper::Context* createContext(SkCanvas*, void* storage) const SK_OVERRIDE; + SkDrawLooper::Context* createContext(SkCanvas*, void* storage) const override; - size_t contextSize() const SK_OVERRIDE { return sizeof(LayerDrawLooperContext); } + size_t contextSize() const override { return sizeof(LayerDrawLooperContext); } - bool asABlurShadow(BlurShadowRec* rec) const SK_OVERRIDE; + bool asABlurShadow(BlurShadowRec* rec) const override; SK_TO_STRING_OVERRIDE() - Factory getFactory() const SK_OVERRIDE { return CreateProc; } + Factory getFactory() const override { return CreateProc; } static SkFlattenable* CreateProc(SkReadBuffer& buffer); protected: SkLayerDrawLooper(); - void flatten(SkWriteBuffer&) const SK_OVERRIDE; + void flatten(SkWriteBuffer&) const override; private: struct Rec { @@ -105,7 +105,7 @@ private: explicit LayerDrawLooperContext(const SkLayerDrawLooper* looper); protected: - bool next(SkCanvas*, SkPaint* paint) SK_OVERRIDE; + bool next(SkCanvas*, SkPaint* paint) override; private: Rec* fCurrRec; diff --git a/include/effects/SkLayerRasterizer.h b/include/effects/SkLayerRasterizer.h index 6ea873cdc9..c6ac1de363 100644 --- a/include/effects/SkLayerRasterizer.h +++ b/include/effects/SkLayerRasterizer.h @@ -69,12 +69,12 @@ public: protected: SkLayerRasterizer(); SkLayerRasterizer(SkDeque* layers); - void flatten(SkWriteBuffer&) const SK_OVERRIDE; + void flatten(SkWriteBuffer&) const override; // override from SkRasterizer virtual bool onRasterize(const SkPath& path, const SkMatrix& matrix, const SkIRect* clipBounds, - SkMask* mask, SkMask::CreateMode mode) const SK_OVERRIDE; + SkMask* mask, SkMask::CreateMode mode) const override; private: const SkDeque* const fLayers; diff --git a/include/effects/SkLerpXfermode.h b/include/effects/SkLerpXfermode.h index 4fcc06b554..8ba42302bf 100644 --- a/include/effects/SkLerpXfermode.h +++ b/include/effects/SkLerpXfermode.h @@ -22,17 +22,17 @@ public: // overrides from SkXfermode virtual void xfer32(SkPMColor dst[], const SkPMColor src[], int count, - const SkAlpha aa[]) const SK_OVERRIDE; + const SkAlpha aa[]) const override; virtual void xfer16(uint16_t dst[], const SkPMColor src[], int count, - const SkAlpha aa[]) const SK_OVERRIDE; + const SkAlpha aa[]) const override; virtual void xferA8(SkAlpha dst[], const SkPMColor src[], int count, - const SkAlpha aa[]) const SK_OVERRIDE; + const SkAlpha aa[]) const override; SK_TO_STRING_OVERRIDE() SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkLerpXfermode) protected: - void flatten(SkWriteBuffer&) const SK_OVERRIDE; + void flatten(SkWriteBuffer&) const override; private: SkLerpXfermode(unsigned scale256); diff --git a/include/effects/SkLightingImageFilter.h b/include/effects/SkLightingImageFilter.h index e0f78a8d38..e5048eeac7 100644 --- a/include/effects/SkLightingImageFilter.h +++ b/include/effects/SkLightingImageFilter.h @@ -74,7 +74,7 @@ protected: SkScalar surfaceScale, SkImageFilter* input, const CropRect* cropRect); - void flatten(SkWriteBuffer&) const SK_OVERRIDE; + void flatten(SkWriteBuffer&) const override; const SkLight* light() const { return fLight.get(); } SkScalar surfaceScale() const { return fSurfaceScale; } diff --git a/include/effects/SkLumaColorFilter.h b/include/effects/SkLumaColorFilter.h index c970e8c115..4e8ac798e6 100644 --- a/include/effects/SkLumaColorFilter.h +++ b/include/effects/SkLumaColorFilter.h @@ -25,17 +25,17 @@ class SK_API SkLumaColorFilter : public SkColorFilter { public: static SkColorFilter* Create(); - void filterSpan(const SkPMColor src[], int count, SkPMColor[]) const SK_OVERRIDE; + void filterSpan(const SkPMColor src[], int count, SkPMColor[]) const override; #if SK_SUPPORT_GPU - bool asFragmentProcessors(GrContext*, SkTDArray*) const SK_OVERRIDE; + bool asFragmentProcessors(GrContext*, SkTDArray*) const override; #endif SK_TO_STRING_OVERRIDE() SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkLumaColorFilter) protected: - void flatten(SkWriteBuffer&) const SK_OVERRIDE; + void flatten(SkWriteBuffer&) const override; private: SkLumaColorFilter(); diff --git a/include/effects/SkMagnifierImageFilter.h b/include/effects/SkMagnifierImageFilter.h index a9cc66a2ae..6df95b233a 100644 --- a/include/effects/SkMagnifierImageFilter.h +++ b/include/effects/SkMagnifierImageFilter.h @@ -21,13 +21,13 @@ public: protected: SkMagnifierImageFilter(const SkRect& srcRect, SkScalar inset, SkImageFilter* input); - void flatten(SkWriteBuffer&) const SK_OVERRIDE; + void flatten(SkWriteBuffer&) const override; virtual bool onFilterImage(Proxy*, const SkBitmap& src, const Context&, - SkBitmap* result, SkIPoint* offset) const SK_OVERRIDE; + SkBitmap* result, SkIPoint* offset) const override; #if SK_SUPPORT_GPU virtual bool asFragmentProcessor(GrFragmentProcessor**, GrTexture*, const SkMatrix&, - const SkIRect& bounds) const SK_OVERRIDE; + const SkIRect& bounds) const override; #endif private: diff --git a/include/effects/SkMatrixConvolutionImageFilter.h b/include/effects/SkMatrixConvolutionImageFilter.h index ddb421f011..3bbfc4f09b 100644 --- a/include/effects/SkMatrixConvolutionImageFilter.h +++ b/include/effects/SkMatrixConvolutionImageFilter.h @@ -75,16 +75,16 @@ protected: bool convolveAlpha, SkImageFilter* input, const CropRect* cropRect); - void flatten(SkWriteBuffer&) const SK_OVERRIDE; + void flatten(SkWriteBuffer&) const override; virtual bool onFilterImage(Proxy*, const SkBitmap& src, const Context&, - SkBitmap* result, SkIPoint* loc) const SK_OVERRIDE; - bool onFilterBounds(const SkIRect&, const SkMatrix&, SkIRect*) const SK_OVERRIDE; + SkBitmap* result, SkIPoint* loc) const override; + bool onFilterBounds(const SkIRect&, const SkMatrix&, SkIRect*) const override; #if SK_SUPPORT_GPU virtual bool asFragmentProcessor(GrFragmentProcessor**, GrTexture*, const SkMatrix&, - const SkIRect& bounds) const SK_OVERRIDE; + const SkIRect& bounds) const override; #endif private: diff --git a/include/effects/SkMergeImageFilter.h b/include/effects/SkMergeImageFilter.h index 52ff9d7776..5bb6826b6b 100644 --- a/include/effects/SkMergeImageFilter.h +++ b/include/effects/SkMergeImageFilter.h @@ -36,10 +36,10 @@ protected: SkMergeImageFilter(SkImageFilter* filters[], int count, const SkXfermode::Mode modes[], const CropRect* cropRect); - void flatten(SkWriteBuffer&) const SK_OVERRIDE; + void flatten(SkWriteBuffer&) const override; virtual bool onFilterImage(Proxy*, const SkBitmap& src, const Context&, - SkBitmap* result, SkIPoint* loc) const SK_OVERRIDE; + SkBitmap* result, SkIPoint* loc) const override; private: uint8_t* fModes; // SkXfermode::Mode diff --git a/include/effects/SkModeColorFilter.h b/include/effects/SkModeColorFilter.h index 6d0d3ccaa0..a2cb841699 100644 --- a/include/effects/SkModeColorFilter.h +++ b/include/effects/SkModeColorFilter.h @@ -25,12 +25,12 @@ public: SkXfermode::Mode getMode() const { return fMode; } SkPMColor getPMColor() const { return fPMColor; } - bool asColorMode(SkColor*, SkXfermode::Mode*) const SK_OVERRIDE; - uint32_t getFlags() const SK_OVERRIDE; - void filterSpan(const SkPMColor shader[], int count, SkPMColor result[]) const SK_OVERRIDE; + bool asColorMode(SkColor*, SkXfermode::Mode*) const override; + uint32_t getFlags() const override; + void filterSpan(const SkPMColor shader[], int count, SkPMColor result[]) const override; #ifndef SK_IGNORE_TO_STRING - void toString(SkString* str) const SK_OVERRIDE { + void toString(SkString* str) const override { str->append("SkModeColorFilter: color: 0x"); str->appendHex(fColor); str->append(" mode: "); @@ -39,12 +39,12 @@ public: #endif #if SK_SUPPORT_GPU - bool asFragmentProcessors(GrContext*, SkTDArray*) const SK_OVERRIDE; + bool asFragmentProcessors(GrContext*, SkTDArray*) const override; #endif SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkModeColorFilter) protected: - void flatten(SkWriteBuffer&) const SK_OVERRIDE; + void flatten(SkWriteBuffer&) const override; private: SkColor fColor; diff --git a/include/effects/SkMorphologyImageFilter.h b/include/effects/SkMorphologyImageFilter.h index c5c5c7401e..7d409e8753 100644 --- a/include/effects/SkMorphologyImageFilter.h +++ b/include/effects/SkMorphologyImageFilter.h @@ -15,8 +15,8 @@ class SK_API SkMorphologyImageFilter : public SkImageFilter { public: - void computeFastBounds(const SkRect& src, SkRect* dst) const SK_OVERRIDE; - bool onFilterBounds(const SkIRect& src, const SkMatrix& ctm, SkIRect* dst) const SK_OVERRIDE; + void computeFastBounds(const SkRect& src, SkRect* dst) const override; + bool onFilterBounds(const SkIRect& src, const SkMatrix& ctm, SkIRect* dst) const override; /** * All morphology procs have the same signature: src is the source buffer, dst the @@ -34,9 +34,9 @@ protected: bool filterImageGeneric(Proc procX, Proc procY, Proxy*, const SkBitmap& src, const Context&, SkBitmap* result, SkIPoint* offset) const; - void flatten(SkWriteBuffer&) const SK_OVERRIDE; + void flatten(SkWriteBuffer&) const override; #if SK_SUPPORT_GPU - bool canFilterImageGPU() const SK_OVERRIDE { return true; } + bool canFilterImageGPU() const override { return true; } bool filterImageGPUGeneric(bool dilate, Proxy* proxy, const SkBitmap& src, const Context& ctm, SkBitmap* result, SkIPoint* offset) const; @@ -61,10 +61,10 @@ public: } virtual bool onFilterImage(Proxy*, const SkBitmap& src, const Context&, - SkBitmap* result, SkIPoint* offset) const SK_OVERRIDE; + SkBitmap* result, SkIPoint* offset) const override; #if SK_SUPPORT_GPU virtual bool filterImageGPU(Proxy* proxy, const SkBitmap& src, const Context&, - SkBitmap* result, SkIPoint* offset) const SK_OVERRIDE; + SkBitmap* result, SkIPoint* offset) const override; #endif SK_TO_STRING_OVERRIDE() @@ -89,10 +89,10 @@ public: } virtual bool onFilterImage(Proxy*, const SkBitmap& src, const Context&, - SkBitmap* result, SkIPoint* offset) const SK_OVERRIDE; + SkBitmap* result, SkIPoint* offset) const override; #if SK_SUPPORT_GPU virtual bool filterImageGPU(Proxy* proxy, const SkBitmap& src, const Context&, - SkBitmap* result, SkIPoint* offset) const SK_OVERRIDE; + SkBitmap* result, SkIPoint* offset) const override; #endif SK_TO_STRING_OVERRIDE() diff --git a/include/effects/SkOffsetImageFilter.h b/include/effects/SkOffsetImageFilter.h index 818869171a..17c9627f83 100644 --- a/include/effects/SkOffsetImageFilter.h +++ b/include/effects/SkOffsetImageFilter.h @@ -22,17 +22,17 @@ public: } return SkNEW_ARGS(SkOffsetImageFilter, (dx, dy, input, cropRect)); } - void computeFastBounds(const SkRect& src, SkRect* dst) const SK_OVERRIDE; + void computeFastBounds(const SkRect& src, SkRect* dst) const override; SK_TO_STRING_OVERRIDE() SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkOffsetImageFilter) protected: SkOffsetImageFilter(SkScalar dx, SkScalar dy, SkImageFilter* input, const CropRect* cropRect); - void flatten(SkWriteBuffer&) const SK_OVERRIDE; + void flatten(SkWriteBuffer&) const override; virtual bool onFilterImage(Proxy*, const SkBitmap& src, const Context&, - SkBitmap* result, SkIPoint* loc) const SK_OVERRIDE; - bool onFilterBounds(const SkIRect&, const SkMatrix&, SkIRect*) const SK_OVERRIDE; + SkBitmap* result, SkIPoint* loc) const override; + bool onFilterBounds(const SkIRect&, const SkMatrix&, SkIRect*) const override; private: SkVector fOffset; diff --git a/include/effects/SkPaintFlagsDrawFilter.h b/include/effects/SkPaintFlagsDrawFilter.h index 0004057e3f..10dd3c4d69 100644 --- a/include/effects/SkPaintFlagsDrawFilter.h +++ b/include/effects/SkPaintFlagsDrawFilter.h @@ -14,7 +14,7 @@ class SK_API SkPaintFlagsDrawFilter : public SkDrawFilter { public: SkPaintFlagsDrawFilter(uint32_t clearFlags, uint32_t setFlags); - bool filter(SkPaint*, Type) SK_OVERRIDE; + bool filter(SkPaint*, Type) override; private: uint16_t fClearFlags; // user specified diff --git a/include/effects/SkPerlinNoiseShader.h b/include/effects/SkPerlinNoiseShader.h index b318ef1cd0..fe1c9c5728 100644 --- a/include/effects/SkPerlinNoiseShader.h +++ b/include/effects/SkPerlinNoiseShader.h @@ -72,15 +72,15 @@ public: } - size_t contextSize() const SK_OVERRIDE; + size_t contextSize() const override; class PerlinNoiseShaderContext : public SkShader::Context { public: PerlinNoiseShaderContext(const SkPerlinNoiseShader& shader, const ContextRec&); virtual ~PerlinNoiseShaderContext(); - void shadeSpan(int x, int y, SkPMColor[], int count) SK_OVERRIDE; - void shadeSpan16(int x, int y, uint16_t[], int count) SK_OVERRIDE; + void shadeSpan(int x, int y, SkPMColor[], int count) override; + void shadeSpan16(int x, int y, uint16_t[], int count) override; private: SkPMColor shade(const SkPoint& point, StitchData& stitchData) const; @@ -98,14 +98,14 @@ public: virtual bool asFragmentProcessor(GrContext* context, const SkPaint&, const SkMatrix& viewM, const SkMatrix*, GrColor*, - GrFragmentProcessor**) const SK_OVERRIDE; + GrFragmentProcessor**) const override; SK_TO_STRING_OVERRIDE() SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkPerlinNoiseShader) protected: - void flatten(SkWriteBuffer&) const SK_OVERRIDE; - Context* onCreateContext(const ContextRec&, void* storage) const SK_OVERRIDE; + void flatten(SkWriteBuffer&) const override; + Context* onCreateContext(const ContextRec&, void* storage) const override; private: SkPerlinNoiseShader(SkPerlinNoiseShader::Type type, SkScalar baseFrequencyX, diff --git a/include/effects/SkPictureImageFilter.h b/include/effects/SkPictureImageFilter.h index 21d25c4693..d62f03f8a3 100644 --- a/include/effects/SkPictureImageFilter.h +++ b/include/effects/SkPictureImageFilter.h @@ -69,9 +69,9 @@ protected: * SkReadBuffer::setBitmapDecoder() before calling this constructor. * @param SkReadBuffer Serialized picture data. */ - void flatten(SkWriteBuffer&) const SK_OVERRIDE; + void flatten(SkWriteBuffer&) const override; virtual bool onFilterImage(Proxy*, const SkBitmap& src, const Context&, - SkBitmap* result, SkIPoint* offset) const SK_OVERRIDE; + SkBitmap* result, SkIPoint* offset) const override; private: diff --git a/include/effects/SkPixelXorXfermode.h b/include/effects/SkPixelXorXfermode.h index ccc61458cb..3e6fa8415a 100644 --- a/include/effects/SkPixelXorXfermode.h +++ b/include/effects/SkPixelXorXfermode.h @@ -26,10 +26,10 @@ public: protected: explicit SkPixelXorXfermode(SkColor opColor) : fOpColor(opColor) {} - void flatten(SkWriteBuffer&) const SK_OVERRIDE; + void flatten(SkWriteBuffer&) const override; // override from SkXfermode - SkPMColor xferColor(SkPMColor src, SkPMColor dst) const SK_OVERRIDE; + SkPMColor xferColor(SkPMColor src, SkPMColor dst) const override; private: SkColor fOpColor; diff --git a/include/effects/SkRectShaderImageFilter.h b/include/effects/SkRectShaderImageFilter.h index 6228736fa1..64b42c701e 100644 --- a/include/effects/SkRectShaderImageFilter.h +++ b/include/effects/SkRectShaderImageFilter.h @@ -35,10 +35,10 @@ public: SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkRectShaderImageFilter) protected: - void flatten(SkWriteBuffer&) const SK_OVERRIDE; + void flatten(SkWriteBuffer&) const override; virtual bool onFilterImage(Proxy*, const SkBitmap& src, const Context&, - SkBitmap* result, SkIPoint* loc) const SK_OVERRIDE; + SkBitmap* result, SkIPoint* loc) const override; private: SkRectShaderImageFilter(SkShader* s, const CropRect* rect); diff --git a/include/effects/SkTableMaskFilter.h b/include/effects/SkTableMaskFilter.h index 444ca019b4..6084ec4061 100644 --- a/include/effects/SkTableMaskFilter.h +++ b/include/effects/SkTableMaskFilter.h @@ -45,9 +45,9 @@ public: return SkNEW_ARGS(SkTableMaskFilter, (table)); } - SkMask::Format getFormat() const SK_OVERRIDE; + SkMask::Format getFormat() const override; virtual bool filterMask(SkMask*, const SkMask&, const SkMatrix&, - SkIPoint*) const SK_OVERRIDE; + SkIPoint*) const override; SK_TO_STRING_OVERRIDE() SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkTableMaskFilter) @@ -55,7 +55,7 @@ public: protected: SkTableMaskFilter(); explicit SkTableMaskFilter(const uint8_t table[256]); - void flatten(SkWriteBuffer&) const SK_OVERRIDE; + void flatten(SkWriteBuffer&) const override; private: uint8_t fTable[256]; diff --git a/include/effects/SkTestImageFilters.h b/include/effects/SkTestImageFilters.h index 5e375aea72..5c6661d662 100644 --- a/include/effects/SkTestImageFilters.h +++ b/include/effects/SkTestImageFilters.h @@ -24,10 +24,10 @@ public: protected: SkDownSampleImageFilter(SkScalar scale, SkImageFilter* input) : INHERITED(1, &input), fScale(scale) {} - void flatten(SkWriteBuffer&) const SK_OVERRIDE; + void flatten(SkWriteBuffer&) const override; virtual bool onFilterImage(Proxy*, const SkBitmap& src, const Context&, - SkBitmap* result, SkIPoint* loc) const SK_OVERRIDE; + SkBitmap* result, SkIPoint* loc) const override; private: SkScalar fScale; diff --git a/include/effects/SkTileImageFilter.h b/include/effects/SkTileImageFilter.h index 95b4c75282..a010205121 100644 --- a/include/effects/SkTileImageFilter.h +++ b/include/effects/SkTileImageFilter.h @@ -23,9 +23,9 @@ public: SkImageFilter* input); virtual bool onFilterImage(Proxy* proxy, const SkBitmap& src, const Context& ctx, - SkBitmap* dst, SkIPoint* offset) const SK_OVERRIDE; + SkBitmap* dst, SkIPoint* offset) const override; virtual bool onFilterBounds(const SkIRect& src, const SkMatrix&, - SkIRect* dst) const SK_OVERRIDE; + SkIRect* dst) const override; SK_TO_STRING_OVERRIDE() SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkTileImageFilter) @@ -34,7 +34,7 @@ protected: SkTileImageFilter(const SkRect& srcRect, const SkRect& dstRect, SkImageFilter* input) : INHERITED(1, &input, NULL), fSrcRect(srcRect), fDstRect(dstRect) {} - void flatten(SkWriteBuffer& buffer) const SK_OVERRIDE; + void flatten(SkWriteBuffer& buffer) const override; private: SkRect fSrcRect; diff --git a/include/effects/SkTransparentShader.h b/include/effects/SkTransparentShader.h index 254338c579..11aa086fa4 100644 --- a/include/effects/SkTransparentShader.h +++ b/include/effects/SkTransparentShader.h @@ -14,16 +14,16 @@ class SK_API SkTransparentShader : public SkShader { public: SkTransparentShader() {} - size_t contextSize() const SK_OVERRIDE; + size_t contextSize() const override; class TransparentShaderContext : public SkShader::Context { public: TransparentShaderContext(const SkTransparentShader& shader, const ContextRec&); virtual ~TransparentShaderContext(); - uint32_t getFlags() const SK_OVERRIDE; - void shadeSpan(int x, int y, SkPMColor[], int count) SK_OVERRIDE; - void shadeSpan16(int x, int y, uint16_t span[], int count) SK_OVERRIDE; + uint32_t getFlags() const override; + void shadeSpan(int x, int y, SkPMColor[], int count) override; + void shadeSpan16(int x, int y, uint16_t span[], int count) override; private: const SkBitmap* fDevice; @@ -35,10 +35,10 @@ public: SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkTransparentShader) protected: - Context* onCreateContext(const ContextRec&, void* storage) const SK_OVERRIDE; + Context* onCreateContext(const ContextRec&, void* storage) const override; // we don't need to flatten anything at all - void flatten(SkWriteBuffer&) const SK_OVERRIDE {} + void flatten(SkWriteBuffer&) const override {} private: typedef SkShader INHERITED; diff --git a/include/effects/SkXfermodeImageFilter.h b/include/effects/SkXfermodeImageFilter.h index 66df053ba7..2115ee44dd 100644 --- a/include/effects/SkXfermodeImageFilter.h +++ b/include/effects/SkXfermodeImageFilter.h @@ -37,17 +37,17 @@ public: const SkBitmap& src, const Context& ctx, SkBitmap* dst, - SkIPoint* offset) const SK_OVERRIDE; + SkIPoint* offset) const override; #if SK_SUPPORT_GPU - bool canFilterImageGPU() const SK_OVERRIDE; + bool canFilterImageGPU() const override; virtual bool filterImageGPU(Proxy* proxy, const SkBitmap& src, const Context& ctx, - SkBitmap* result, SkIPoint* offset) const SK_OVERRIDE; + SkBitmap* result, SkIPoint* offset) const override; #endif protected: SkXfermodeImageFilter(SkXfermode* mode, SkImageFilter* inputs[2], const CropRect* cropRect); - void flatten(SkWriteBuffer&) const SK_OVERRIDE; + void flatten(SkWriteBuffer&) const override; private: SkXfermode* fMode; diff --git a/include/gpu/GrRenderTarget.h b/include/gpu/GrRenderTarget.h index 40e006aa8a..ae420cea6c 100644 --- a/include/gpu/GrRenderTarget.h +++ b/include/gpu/GrRenderTarget.h @@ -26,8 +26,8 @@ public: SK_DECLARE_INST_COUNT(GrRenderTarget) // GrSurface overrides - GrRenderTarget* asRenderTarget() SK_OVERRIDE { return this; } - const GrRenderTarget* asRenderTarget() const SK_OVERRIDE { return this; } + GrRenderTarget* asRenderTarget() override { return this; } + const GrRenderTarget* asRenderTarget() const override { return this; } // GrRenderTarget /** @@ -101,8 +101,8 @@ protected: } // override of GrResource - void onAbandon() SK_OVERRIDE; - void onRelease() SK_OVERRIDE; + void onAbandon() override; + void onRelease() override; private: // Checked when this object is asked to attach a stencil buffer. diff --git a/include/gpu/GrTexture.h b/include/gpu/GrTexture.h index ccf958098a..d565f2f9a7 100644 --- a/include/gpu/GrTexture.h +++ b/include/gpu/GrTexture.h @@ -18,8 +18,8 @@ class GrTexturePriv; class GrTexture : virtual public GrSurface { public: - GrTexture* asTexture() SK_OVERRIDE { return this; } - const GrTexture* asTexture() const SK_OVERRIDE { return this; } + GrTexture* asTexture() override { return this; } + const GrTexture* asTexture() const override { return this; } /** * Return the native ID or handle to the texture, depending on the @@ -50,7 +50,7 @@ protected: void validateDesc() const; private: - size_t onGpuMemorySize() const SK_OVERRIDE; + size_t onGpuMemorySize() const override; void dirtyMipMaps(bool mipMapsDirty); enum MipMapsStatus { diff --git a/include/gpu/SkGrPixelRef.h b/include/gpu/SkGrPixelRef.h index 4eab59c7a6..eae19dbbe6 100644 --- a/include/gpu/SkGrPixelRef.h +++ b/include/gpu/SkGrPixelRef.h @@ -25,9 +25,9 @@ public: virtual ~SkROLockPixelsPixelRef(); protected: - bool onNewLockPixels(LockRec*) SK_OVERRIDE; - void onUnlockPixels() SK_OVERRIDE; - bool onLockPixelsAreWritable() const SK_OVERRIDE; // return false; + bool onNewLockPixels(LockRec*) override; + void onUnlockPixels() override; + bool onLockPixelsAreWritable() const override; // return false; private: SkBitmap fBitmap; @@ -47,13 +47,13 @@ public: virtual ~SkGrPixelRef(); // override from SkPixelRef - GrTexture* getTexture() SK_OVERRIDE; + GrTexture* getTexture() override; protected: // overrides from SkPixelRef - bool onReadPixels(SkBitmap* dst, const SkIRect* subset) SK_OVERRIDE; + bool onReadPixels(SkBitmap* dst, const SkIRect* subset) override; virtual SkPixelRef* deepCopy(SkColorType, SkColorProfileType, - const SkIRect* subset) SK_OVERRIDE; + const SkIRect* subset) override; private: GrSurface* fSurface; diff --git a/include/gpu/effects/GrCoverageSetOpXP.h b/include/gpu/effects/GrCoverageSetOpXP.h index 9435b845d4..64002d5b97 100644 --- a/include/gpu/effects/GrCoverageSetOpXP.h +++ b/include/gpu/effects/GrCoverageSetOpXP.h @@ -24,14 +24,14 @@ public: static GrXPFactory* Create(SkRegion::Op regionOp, bool invertCoverage = false); bool supportsRGBCoverage(GrColor /*knownColor*/, - uint32_t /*knownColorFlags*/) const SK_OVERRIDE { + uint32_t /*knownColorFlags*/) const override { return true; } - bool canTweakAlphaForCoverage() const SK_OVERRIDE { return false; } + bool canTweakAlphaForCoverage() const override { return false; } void getInvariantOutput(const GrProcOptInfo& colorPOI, const GrProcOptInfo& coveragePOI, - GrXPFactory::InvariantOutput*) const SK_OVERRIDE; + GrXPFactory::InvariantOutput*) const override; private: GrCoverageSetOpXPFactory(SkRegion::Op regionOp, bool invertCoverage); @@ -39,15 +39,15 @@ private: GrXferProcessor* onCreateXferProcessor(const GrDrawTargetCaps& caps, const GrProcOptInfo& colorPOI, const GrProcOptInfo& coveragePOI, - const GrDeviceCoordTexture* dstCopy) const SK_OVERRIDE; + const GrDeviceCoordTexture* dstCopy) const override; bool willReadDstColor(const GrDrawTargetCaps& /*caps*/, const GrProcOptInfo& /*colorPOI*/, - const GrProcOptInfo& /*coveragePOI*/) const SK_OVERRIDE { + const GrProcOptInfo& /*coveragePOI*/) const override { return false; } - bool onIsEqual(const GrXPFactory& xpfBase) const SK_OVERRIDE { + bool onIsEqual(const GrXPFactory& xpfBase) const override { const GrCoverageSetOpXPFactory& xpf = xpfBase.cast(); return fRegionOp == xpf.fRegionOp; } diff --git a/include/gpu/effects/GrPorterDuffXferProcessor.h b/include/gpu/effects/GrPorterDuffXferProcessor.h index 3bcdf0edff..65d7a723f6 100644 --- a/include/gpu/effects/GrPorterDuffXferProcessor.h +++ b/include/gpu/effects/GrPorterDuffXferProcessor.h @@ -18,12 +18,12 @@ class GrPorterDuffXPFactory : public GrXPFactory { public: static GrXPFactory* Create(SkXfermode::Mode mode); - bool supportsRGBCoverage(GrColor knownColor, uint32_t knownColorFlags) const SK_OVERRIDE; + bool supportsRGBCoverage(GrColor knownColor, uint32_t knownColorFlags) const override; - bool canTweakAlphaForCoverage() const SK_OVERRIDE; + bool canTweakAlphaForCoverage() const override; void getInvariantOutput(const GrProcOptInfo& colorPOI, const GrProcOptInfo& coveragePOI, - GrXPFactory::InvariantOutput*) const SK_OVERRIDE; + GrXPFactory::InvariantOutput*) const override; private: GrPorterDuffXPFactory(GrBlendCoeff src, GrBlendCoeff dst); @@ -31,13 +31,13 @@ private: GrXferProcessor* onCreateXferProcessor(const GrDrawTargetCaps& caps, const GrProcOptInfo& colorPOI, const GrProcOptInfo& coveragePOI, - const GrDeviceCoordTexture* dstCopy) const SK_OVERRIDE; + const GrDeviceCoordTexture* dstCopy) const override; bool willReadDstColor(const GrDrawTargetCaps& caps, const GrProcOptInfo& colorPOI, - const GrProcOptInfo& coveragePOI) const SK_OVERRIDE; + const GrProcOptInfo& coveragePOI) const override; - bool onIsEqual(const GrXPFactory& xpfBase) const SK_OVERRIDE { + bool onIsEqual(const GrXPFactory& xpfBase) const override { const GrPorterDuffXPFactory& xpf = xpfBase.cast(); return (fSrcCoeff == xpf.fSrcCoeff && fDstCoeff == xpf.fDstCoeff); } diff --git a/include/gpu/gl/SkGLContext.h b/include/gpu/gl/SkGLContext.h index 57456c2f51..6ca7bf5624 100644 --- a/include/gpu/gl/SkGLContext.h +++ b/include/gpu/gl/SkGLContext.h @@ -19,7 +19,7 @@ class SK_API SkGLContext : public SkRefCnt { public: SK_DECLARE_INST_COUNT(SkGLContext) - ~SkGLContext() SK_OVERRIDE; + ~SkGLContext() override; bool isValid() const { return NULL != gl(); } diff --git a/include/gpu/gl/SkNullGLContext.h b/include/gpu/gl/SkNullGLContext.h index 82b96a9752..ca71ddeb0e 100644 --- a/include/gpu/gl/SkNullGLContext.h +++ b/include/gpu/gl/SkNullGLContext.h @@ -12,9 +12,9 @@ class SK_API SkNullGLContext : public SkGLContext { public: - ~SkNullGLContext() SK_OVERRIDE; - void makeCurrent() const SK_OVERRIDE; - void swapBuffers() const SK_OVERRIDE {}; + ~SkNullGLContext() override; + void makeCurrent() const override; + void swapBuffers() const override {}; static SkNullGLContext* Create(GrGLStandard); diff --git a/include/gpu/gl/angle/SkANGLEGLContext.h b/include/gpu/gl/angle/SkANGLEGLContext.h index 6705248f25..f54f29ecba 100644 --- a/include/gpu/gl/angle/SkANGLEGLContext.h +++ b/include/gpu/gl/angle/SkANGLEGLContext.h @@ -14,9 +14,9 @@ class SkANGLEGLContext : public SkGLContext { public: - ~SkANGLEGLContext() SK_OVERRIDE; - void makeCurrent() const SK_OVERRIDE; - void swapBuffers() const SK_OVERRIDE; + ~SkANGLEGLContext() override; + void makeCurrent() const override; + void swapBuffers() const override; static SkANGLEGLContext* Create(GrGLStandard forcedGpuAPI) { if (kGL_GrGLStandard == forcedGpuAPI) { diff --git a/include/ports/SkFontMgr_indirect.h b/include/ports/SkFontMgr_indirect.h index 1ab2750739..0977eea26a 100644 --- a/include/ports/SkFontMgr_indirect.h +++ b/include/ports/SkFontMgr_indirect.h @@ -30,30 +30,30 @@ public: { } protected: - int onCountFamilies() const SK_OVERRIDE; - void onGetFamilyName(int index, SkString* familyName) const SK_OVERRIDE; - SkFontStyleSet* onCreateStyleSet(int index) const SK_OVERRIDE; + int onCountFamilies() const override; + void onGetFamilyName(int index, SkString* familyName) const override; + SkFontStyleSet* onCreateStyleSet(int index) const override; - SkFontStyleSet* onMatchFamily(const char familyName[]) const SK_OVERRIDE; + SkFontStyleSet* onMatchFamily(const char familyName[]) const override; virtual SkTypeface* onMatchFamilyStyle(const char familyName[], - const SkFontStyle& fontStyle) const SK_OVERRIDE; + const SkFontStyle& fontStyle) const override; virtual SkTypeface* onMatchFamilyStyleCharacter(const char familyName[], const SkFontStyle&, const char* bcp47[], int bcp47Count, - SkUnichar character) const SK_OVERRIDE; + SkUnichar character) const override; virtual SkTypeface* onMatchFaceStyle(const SkTypeface* familyMember, - const SkFontStyle& fontStyle) const SK_OVERRIDE; + const SkFontStyle& fontStyle) const override; - SkTypeface* onCreateFromStream(SkStreamAsset* stream, int ttcIndex) const SK_OVERRIDE; - SkTypeface* onCreateFromFile(const char path[], int ttcIndex) const SK_OVERRIDE; - SkTypeface* onCreateFromData(SkData* data, int ttcIndex) const SK_OVERRIDE; + SkTypeface* onCreateFromStream(SkStreamAsset* stream, int ttcIndex) const override; + SkTypeface* onCreateFromFile(const char path[], int ttcIndex) const override; + SkTypeface* onCreateFromData(SkData* data, int ttcIndex) const override; virtual SkTypeface* onLegacyCreateTypeface(const char familyName[], - unsigned styleBits) const SK_OVERRIDE; + unsigned styleBits) const override; private: SkTypeface* createTypefaceFromFontId(const SkFontIdentity& fontId) const; diff --git a/include/utils/SkDeferredCanvas.h b/include/utils/SkDeferredCanvas.h index d3ab73f675..ac8556f539 100644 --- a/include/utils/SkDeferredCanvas.h +++ b/include/utils/SkDeferredCanvas.h @@ -143,61 +143,61 @@ public: */ void silentFlush(); - SkDrawFilter* setDrawFilter(SkDrawFilter* filter) SK_OVERRIDE; + SkDrawFilter* setDrawFilter(SkDrawFilter* filter) override; protected: - void willSave() SK_OVERRIDE; - SaveLayerStrategy willSaveLayer(const SkRect*, const SkPaint*, SaveFlags) SK_OVERRIDE; - void willRestore() SK_OVERRIDE; + void willSave() override; + SaveLayerStrategy willSaveLayer(const SkRect*, const SkPaint*, SaveFlags) override; + void willRestore() override; - void didConcat(const SkMatrix&) SK_OVERRIDE; - void didSetMatrix(const SkMatrix&) SK_OVERRIDE; + void didConcat(const SkMatrix&) override; + void didSetMatrix(const SkMatrix&) override; - void onDrawDRRect(const SkRRect&, const SkRRect&, const SkPaint&) SK_OVERRIDE; + void onDrawDRRect(const SkRRect&, const SkRRect&, const SkPaint&) override; virtual void onDrawText(const void* text, size_t byteLength, SkScalar x, SkScalar y, - const SkPaint&) SK_OVERRIDE; + const SkPaint&) override; virtual void onDrawPosText(const void* text, size_t byteLength, const SkPoint pos[], - const SkPaint&) SK_OVERRIDE; + const SkPaint&) override; virtual void onDrawPosTextH(const void* text, size_t byteLength, const SkScalar xpos[], - SkScalar constY, const SkPaint&) SK_OVERRIDE; + SkScalar constY, const SkPaint&) override; virtual void onDrawTextOnPath(const void* text, size_t byteLength, const SkPath& path, - const SkMatrix* matrix, const SkPaint&) SK_OVERRIDE; + const SkMatrix* matrix, const SkPaint&) override; virtual void onDrawTextBlob(const SkTextBlob* blob, SkScalar x, SkScalar y, - const SkPaint& paint) SK_OVERRIDE; + const SkPaint& paint) override; virtual void onDrawPatch(const SkPoint cubics[12], const SkColor colors[4], const SkPoint texCoords[4], SkXfermode* xmode, - const SkPaint& paint) SK_OVERRIDE; - - void onDrawPaint(const SkPaint&) SK_OVERRIDE; - void onDrawPoints(PointMode, size_t count, const SkPoint pts[], const SkPaint&) SK_OVERRIDE; - void onDrawRect(const SkRect&, const SkPaint&) SK_OVERRIDE; - void onDrawOval(const SkRect&, const SkPaint&) SK_OVERRIDE; - void onDrawRRect(const SkRRect&, const SkPaint&) SK_OVERRIDE; - void onDrawPath(const SkPath&, const SkPaint&) SK_OVERRIDE; - void onDrawBitmap(const SkBitmap&, SkScalar left, SkScalar top, const SkPaint*) SK_OVERRIDE; + const SkPaint& paint) override; + + void onDrawPaint(const SkPaint&) override; + void onDrawPoints(PointMode, size_t count, const SkPoint pts[], const SkPaint&) override; + void onDrawRect(const SkRect&, const SkPaint&) override; + void onDrawOval(const SkRect&, const SkPaint&) override; + void onDrawRRect(const SkRRect&, const SkPaint&) override; + void onDrawPath(const SkPath&, const SkPaint&) override; + void onDrawBitmap(const SkBitmap&, SkScalar left, SkScalar top, const SkPaint*) override; void onDrawBitmapRect(const SkBitmap&, const SkRect* src, const SkRect& dst, const SkPaint*, - DrawBitmapRectFlags flags) SK_OVERRIDE; + DrawBitmapRectFlags flags) override; #if 0 // rely on conversion to bitmap(for now) - void onDrawImage(const SkImage*, SkScalar left, SkScalar top, const SkPaint*) SK_OVERRIDE; + void onDrawImage(const SkImage*, SkScalar left, SkScalar top, const SkPaint*) override; void onDrawImageRect(const SkImage*, const SkRect* src, const SkRect& dst, - const SkPaint*) SK_OVERRIDE; + const SkPaint*) override; #endif void onDrawBitmapNine(const SkBitmap&, const SkIRect& center, const SkRect& dst, - const SkPaint*) SK_OVERRIDE; - void onDrawSprite(const SkBitmap&, int left, int top, const SkPaint*) SK_OVERRIDE; + const SkPaint*) override; + void onDrawSprite(const SkBitmap&, int left, int top, const SkPaint*) override; void onDrawVertices(VertexMode vmode, int vertexCount, const SkPoint vertices[], const SkPoint texs[], const SkColor colors[], SkXfermode* xmode, const uint16_t indices[], int indexCount, - const SkPaint&) SK_OVERRIDE; + const SkPaint&) override; - void onClipRect(const SkRect&, SkRegion::Op, ClipEdgeStyle) SK_OVERRIDE; - void onClipRRect(const SkRRect&, SkRegion::Op, ClipEdgeStyle) SK_OVERRIDE; - void onClipPath(const SkPath&, SkRegion::Op, ClipEdgeStyle) SK_OVERRIDE; - void onClipRegion(const SkRegion&, SkRegion::Op) SK_OVERRIDE; + void onClipRect(const SkRect&, SkRegion::Op, ClipEdgeStyle) override; + void onClipRRect(const SkRRect&, SkRegion::Op, ClipEdgeStyle) override; + void onClipPath(const SkPath&, SkRegion::Op, ClipEdgeStyle) override; + void onClipRegion(const SkRegion&, SkRegion::Op) override; - void onDrawPicture(const SkPicture*, const SkMatrix*, const SkPaint*) SK_OVERRIDE; + void onDrawPicture(const SkPicture*, const SkMatrix*, const SkPaint*) override; public: class NotificationClient { @@ -232,7 +232,7 @@ public: }; protected: - SkCanvas* canvasForDrawIter() SK_OVERRIDE; + SkCanvas* canvasForDrawIter() override; SkDeferredDevice* getDeferredDevice() const; private: diff --git a/include/utils/SkDumpCanvas.h b/include/utils/SkDumpCanvas.h index c6b20ebca9..cd94501a02 100644 --- a/include/utils/SkDumpCanvas.h +++ b/include/utils/SkDumpCanvas.h @@ -75,60 +75,60 @@ public: int getNestLevel() const { return fNestLevel; } - void beginCommentGroup(const char* description) SK_OVERRIDE; - void addComment(const char* kywd, const char* value) SK_OVERRIDE; - void endCommentGroup() SK_OVERRIDE; + void beginCommentGroup(const char* description) override; + void addComment(const char* kywd, const char* value) override; + void endCommentGroup() override; protected: - void willSave() SK_OVERRIDE; - SaveLayerStrategy willSaveLayer(const SkRect*, const SkPaint*, SaveFlags) SK_OVERRIDE; - void willRestore() SK_OVERRIDE; + void willSave() override; + SaveLayerStrategy willSaveLayer(const SkRect*, const SkPaint*, SaveFlags) override; + void willRestore() override; - void didConcat(const SkMatrix&) SK_OVERRIDE; - void didSetMatrix(const SkMatrix&) SK_OVERRIDE; + void didConcat(const SkMatrix&) override; + void didSetMatrix(const SkMatrix&) override; - void onDrawDRRect(const SkRRect&, const SkRRect&, const SkPaint&) SK_OVERRIDE; + void onDrawDRRect(const SkRRect&, const SkRRect&, const SkPaint&) override; virtual void onDrawText(const void* text, size_t byteLength, SkScalar x, SkScalar y, - const SkPaint&) SK_OVERRIDE; + const SkPaint&) override; virtual void onDrawPosText(const void* text, size_t byteLength, const SkPoint pos[], - const SkPaint&) SK_OVERRIDE; + const SkPaint&) override; virtual void onDrawPosTextH(const void* text, size_t byteLength, const SkScalar xpos[], - SkScalar constY, const SkPaint&) SK_OVERRIDE; + SkScalar constY, const SkPaint&) override; virtual void onDrawTextOnPath(const void* text, size_t byteLength, const SkPath& path, - const SkMatrix* matrix, const SkPaint&) SK_OVERRIDE; + const SkMatrix* matrix, const SkPaint&) override; virtual void onDrawTextBlob(const SkTextBlob* blob, SkScalar x, SkScalar y, - const SkPaint& paint) SK_OVERRIDE; + const SkPaint& paint) override; virtual void onDrawPatch(const SkPoint cubics[12], const SkColor colors[4], const SkPoint texCoords[4], SkXfermode* xmode, - const SkPaint& paint) SK_OVERRIDE; - - void onDrawPaint(const SkPaint&) SK_OVERRIDE; - void onDrawPoints(PointMode, size_t count, const SkPoint pts[], const SkPaint&) SK_OVERRIDE; - void onDrawRect(const SkRect&, const SkPaint&) SK_OVERRIDE; - void onDrawOval(const SkRect&, const SkPaint&) SK_OVERRIDE; - void onDrawRRect(const SkRRect&, const SkPaint&) SK_OVERRIDE; - void onDrawPath(const SkPath&, const SkPaint&) SK_OVERRIDE; - void onDrawBitmap(const SkBitmap&, SkScalar left, SkScalar top, const SkPaint*) SK_OVERRIDE; + const SkPaint& paint) override; + + void onDrawPaint(const SkPaint&) override; + void onDrawPoints(PointMode, size_t count, const SkPoint pts[], const SkPaint&) override; + void onDrawRect(const SkRect&, const SkPaint&) override; + void onDrawOval(const SkRect&, const SkPaint&) override; + void onDrawRRect(const SkRRect&, const SkPaint&) override; + void onDrawPath(const SkPath&, const SkPaint&) override; + void onDrawBitmap(const SkBitmap&, SkScalar left, SkScalar top, const SkPaint*) override; void onDrawBitmapRect(const SkBitmap&, const SkRect* src, const SkRect& dst, const SkPaint*, - DrawBitmapRectFlags flags) SK_OVERRIDE; - void onDrawImage(const SkImage*, SkScalar left, SkScalar top, const SkPaint*) SK_OVERRIDE; + DrawBitmapRectFlags flags) override; + void onDrawImage(const SkImage*, SkScalar left, SkScalar top, const SkPaint*) override; void onDrawImageRect(const SkImage*, const SkRect* src, const SkRect& dst, - const SkPaint*) SK_OVERRIDE; + const SkPaint*) override; void onDrawBitmapNine(const SkBitmap&, const SkIRect& center, const SkRect& dst, - const SkPaint*) SK_OVERRIDE; - void onDrawSprite(const SkBitmap&, int left, int top, const SkPaint*) SK_OVERRIDE; + const SkPaint*) override; + void onDrawSprite(const SkBitmap&, int left, int top, const SkPaint*) override; void onDrawVertices(VertexMode vmode, int vertexCount, const SkPoint vertices[], const SkPoint texs[], const SkColor colors[], SkXfermode* xmode, const uint16_t indices[], int indexCount, - const SkPaint&) SK_OVERRIDE; + const SkPaint&) override; - void onClipRect(const SkRect&, SkRegion::Op, ClipEdgeStyle) SK_OVERRIDE; - void onClipRRect(const SkRRect&, SkRegion::Op, ClipEdgeStyle) SK_OVERRIDE; - void onClipPath(const SkPath&, SkRegion::Op, ClipEdgeStyle) SK_OVERRIDE; - void onClipRegion(const SkRegion&, SkRegion::Op) SK_OVERRIDE; + void onClipRect(const SkRect&, SkRegion::Op, ClipEdgeStyle) override; + void onClipRRect(const SkRRect&, SkRegion::Op, ClipEdgeStyle) override; + void onClipPath(const SkPath&, SkRegion::Op, ClipEdgeStyle) override; + void onClipRegion(const SkRegion&, SkRegion::Op) override; - void onDrawPicture(const SkPicture*, const SkMatrix*, const SkPaint*) SK_OVERRIDE; + void onDrawPicture(const SkPicture*, const SkMatrix*, const SkPaint*) override; static const char* EdgeStyleToAAString(ClipEdgeStyle edgeStyle); @@ -151,7 +151,7 @@ public: // override from baseclass that does the formatting, and in turn calls // the function pointer that was passed to the constructor virtual void dump(SkDumpCanvas*, SkDumpCanvas::Verb, const char str[], - const SkPaint*) SK_OVERRIDE; + const SkPaint*) override; private: void (*fProc)(const char*, void*); diff --git a/include/utils/SkLuaCanvas.h b/include/utils/SkLuaCanvas.h index e3541f2276..0fd37daca1 100644 --- a/include/utils/SkLuaCanvas.h +++ b/include/utils/SkLuaCanvas.h @@ -21,52 +21,52 @@ public: virtual ~SkLuaCanvas(); protected: - void willSave() SK_OVERRIDE; - SaveLayerStrategy willSaveLayer(const SkRect*, const SkPaint*, SaveFlags) SK_OVERRIDE; - void willRestore() SK_OVERRIDE; + void willSave() override; + SaveLayerStrategy willSaveLayer(const SkRect*, const SkPaint*, SaveFlags) override; + void willRestore() override; - void didConcat(const SkMatrix&) SK_OVERRIDE; - void didSetMatrix(const SkMatrix&) SK_OVERRIDE; + void didConcat(const SkMatrix&) override; + void didSetMatrix(const SkMatrix&) override; - void onDrawDRRect(const SkRRect&, const SkRRect&, const SkPaint&) SK_OVERRIDE; + void onDrawDRRect(const SkRRect&, const SkRRect&, const SkPaint&) override; virtual void onDrawText(const void* text, size_t byteLength, SkScalar x, SkScalar y, - const SkPaint&) SK_OVERRIDE; + const SkPaint&) override; virtual void onDrawPosText(const void* text, size_t byteLength, const SkPoint pos[], - const SkPaint&) SK_OVERRIDE; + const SkPaint&) override; virtual void onDrawPosTextH(const void* text, size_t byteLength, const SkScalar xpos[], - SkScalar constY, const SkPaint&) SK_OVERRIDE; + SkScalar constY, const SkPaint&) override; virtual void onDrawTextOnPath(const void* text, size_t byteLength, const SkPath& path, - const SkMatrix* matrix, const SkPaint&) SK_OVERRIDE; + const SkMatrix* matrix, const SkPaint&) override; virtual void onDrawTextBlob(const SkTextBlob* blob, SkScalar x, SkScalar y, - const SkPaint& paint) SK_OVERRIDE; + const SkPaint& paint) override; - void onDrawPaint(const SkPaint&) SK_OVERRIDE; - void onDrawPoints(PointMode, size_t count, const SkPoint pts[], const SkPaint&) SK_OVERRIDE; - void onDrawRect(const SkRect&, const SkPaint&) SK_OVERRIDE; - void onDrawOval(const SkRect&, const SkPaint&) SK_OVERRIDE; - void onDrawRRect(const SkRRect&, const SkPaint&) SK_OVERRIDE; - void onDrawPath(const SkPath&, const SkPaint&) SK_OVERRIDE; - void onDrawBitmap(const SkBitmap&, SkScalar left, SkScalar top, const SkPaint*) SK_OVERRIDE; + void onDrawPaint(const SkPaint&) override; + void onDrawPoints(PointMode, size_t count, const SkPoint pts[], const SkPaint&) override; + void onDrawRect(const SkRect&, const SkPaint&) override; + void onDrawOval(const SkRect&, const SkPaint&) override; + void onDrawRRect(const SkRRect&, const SkPaint&) override; + void onDrawPath(const SkPath&, const SkPaint&) override; + void onDrawBitmap(const SkBitmap&, SkScalar left, SkScalar top, const SkPaint*) override; void onDrawBitmapRect(const SkBitmap&, const SkRect* src, const SkRect& dst, const SkPaint*, - DrawBitmapRectFlags flags) SK_OVERRIDE; - void onDrawImage(const SkImage*, SkScalar left, SkScalar top, const SkPaint*) SK_OVERRIDE; + DrawBitmapRectFlags flags) override; + void onDrawImage(const SkImage*, SkScalar left, SkScalar top, const SkPaint*) override; void onDrawImageRect(const SkImage*, const SkRect* src, const SkRect& dst, - const SkPaint*) SK_OVERRIDE; + const SkPaint*) override; void onDrawBitmapNine(const SkBitmap&, const SkIRect& center, const SkRect& dst, - const SkPaint*) SK_OVERRIDE; - void onDrawSprite(const SkBitmap&, int left, int top, const SkPaint*) SK_OVERRIDE; + const SkPaint*) override; + void onDrawSprite(const SkBitmap&, int left, int top, const SkPaint*) override; void onDrawVertices(VertexMode vmode, int vertexCount, const SkPoint vertices[], const SkPoint texs[], const SkColor colors[], SkXfermode* xmode, const uint16_t indices[], int indexCount, - const SkPaint&) SK_OVERRIDE; + const SkPaint&) override; - void onClipRect(const SkRect&, SkRegion::Op, ClipEdgeStyle) SK_OVERRIDE; - void onClipRRect(const SkRRect&, SkRegion::Op, ClipEdgeStyle) SK_OVERRIDE; - void onClipPath(const SkPath&, SkRegion::Op, ClipEdgeStyle) SK_OVERRIDE; - void onClipRegion(const SkRegion&, SkRegion::Op) SK_OVERRIDE; + void onClipRect(const SkRect&, SkRegion::Op, ClipEdgeStyle) override; + void onClipRRect(const SkRRect&, SkRegion::Op, ClipEdgeStyle) override; + void onClipPath(const SkPath&, SkRegion::Op, ClipEdgeStyle) override; + void onClipRegion(const SkRegion&, SkRegion::Op) override; - void onDrawPicture(const SkPicture*, const SkMatrix*, const SkPaint*) SK_OVERRIDE; + void onDrawPicture(const SkPicture*, const SkMatrix*, const SkPaint*) override; private: lua_State* fL; diff --git a/include/utils/SkNWayCanvas.h b/include/utils/SkNWayCanvas.h index 02d715b50a..85cd90d899 100644 --- a/include/utils/SkNWayCanvas.h +++ b/include/utils/SkNWayCanvas.h @@ -23,64 +23,64 @@ public: /////////////////////////////////////////////////////////////////////////// // These are forwarded to the N canvases we're referencing - SkDrawFilter* setDrawFilter(SkDrawFilter*) SK_OVERRIDE; + SkDrawFilter* setDrawFilter(SkDrawFilter*) override; - void beginCommentGroup(const char* description) SK_OVERRIDE; - void addComment(const char* kywd, const char* value) SK_OVERRIDE; - void endCommentGroup() SK_OVERRIDE; + void beginCommentGroup(const char* description) override; + void addComment(const char* kywd, const char* value) override; + void endCommentGroup() override; protected: SkTDArray fList; - void willSave() SK_OVERRIDE; - SaveLayerStrategy willSaveLayer(const SkRect*, const SkPaint*, SaveFlags) SK_OVERRIDE; - void willRestore() SK_OVERRIDE; + void willSave() override; + SaveLayerStrategy willSaveLayer(const SkRect*, const SkPaint*, SaveFlags) override; + void willRestore() override; - void didConcat(const SkMatrix&) SK_OVERRIDE; - void didSetMatrix(const SkMatrix&) SK_OVERRIDE; + void didConcat(const SkMatrix&) override; + void didSetMatrix(const SkMatrix&) override; - void onDrawDRRect(const SkRRect&, const SkRRect&, const SkPaint&) SK_OVERRIDE; + void onDrawDRRect(const SkRRect&, const SkRRect&, const SkPaint&) override; virtual void onDrawText(const void* text, size_t byteLength, SkScalar x, SkScalar y, - const SkPaint&) SK_OVERRIDE; + const SkPaint&) override; virtual void onDrawPosText(const void* text, size_t byteLength, const SkPoint pos[], - const SkPaint&) SK_OVERRIDE; + const SkPaint&) override; virtual void onDrawPosTextH(const void* text, size_t byteLength, const SkScalar xpos[], - SkScalar constY, const SkPaint&) SK_OVERRIDE; + SkScalar constY, const SkPaint&) override; virtual void onDrawTextOnPath(const void* text, size_t byteLength, const SkPath& path, - const SkMatrix* matrix, const SkPaint&) SK_OVERRIDE; + const SkMatrix* matrix, const SkPaint&) override; virtual void onDrawTextBlob(const SkTextBlob* blob, SkScalar x, SkScalar y, - const SkPaint& paint) SK_OVERRIDE; + const SkPaint& paint) override; virtual void onDrawPatch(const SkPoint cubics[12], const SkColor colors[4], const SkPoint texCoords[4], SkXfermode* xmode, - const SkPaint& paint) SK_OVERRIDE; - - void onDrawPaint(const SkPaint&) SK_OVERRIDE; - void onDrawPoints(PointMode, size_t count, const SkPoint pts[], const SkPaint&) SK_OVERRIDE; - void onDrawRect(const SkRect&, const SkPaint&) SK_OVERRIDE; - void onDrawOval(const SkRect&, const SkPaint&) SK_OVERRIDE; - void onDrawRRect(const SkRRect&, const SkPaint&) SK_OVERRIDE; - void onDrawPath(const SkPath&, const SkPaint&) SK_OVERRIDE; - void onDrawBitmap(const SkBitmap&, SkScalar left, SkScalar top, const SkPaint*) SK_OVERRIDE; + const SkPaint& paint) override; + + void onDrawPaint(const SkPaint&) override; + void onDrawPoints(PointMode, size_t count, const SkPoint pts[], const SkPaint&) override; + void onDrawRect(const SkRect&, const SkPaint&) override; + void onDrawOval(const SkRect&, const SkPaint&) override; + void onDrawRRect(const SkRRect&, const SkPaint&) override; + void onDrawPath(const SkPath&, const SkPaint&) override; + void onDrawBitmap(const SkBitmap&, SkScalar left, SkScalar top, const SkPaint*) override; void onDrawBitmapRect(const SkBitmap&, const SkRect* src, const SkRect& dst, const SkPaint*, - DrawBitmapRectFlags flags) SK_OVERRIDE; - void onDrawImage(const SkImage*, SkScalar left, SkScalar top, const SkPaint*) SK_OVERRIDE; + DrawBitmapRectFlags flags) override; + void onDrawImage(const SkImage*, SkScalar left, SkScalar top, const SkPaint*) override; void onDrawImageRect(const SkImage*, const SkRect* src, const SkRect& dst, - const SkPaint*) SK_OVERRIDE; + const SkPaint*) override; void onDrawBitmapNine(const SkBitmap&, const SkIRect& center, const SkRect& dst, - const SkPaint*) SK_OVERRIDE; - void onDrawSprite(const SkBitmap&, int left, int top, const SkPaint*) SK_OVERRIDE; + const SkPaint*) override; + void onDrawSprite(const SkBitmap&, int left, int top, const SkPaint*) override; void onDrawVertices(VertexMode vmode, int vertexCount, const SkPoint vertices[], const SkPoint texs[], const SkColor colors[], SkXfermode* xmode, const uint16_t indices[], int indexCount, - const SkPaint&) SK_OVERRIDE; + const SkPaint&) override; - void onClipRect(const SkRect&, SkRegion::Op, ClipEdgeStyle) SK_OVERRIDE; - void onClipRRect(const SkRRect&, SkRegion::Op, ClipEdgeStyle) SK_OVERRIDE; - void onClipPath(const SkPath&, SkRegion::Op, ClipEdgeStyle) SK_OVERRIDE; - void onClipRegion(const SkRegion&, SkRegion::Op) SK_OVERRIDE; + void onClipRect(const SkRect&, SkRegion::Op, ClipEdgeStyle) override; + void onClipRRect(const SkRRect&, SkRegion::Op, ClipEdgeStyle) override; + void onClipPath(const SkPath&, SkRegion::Op, ClipEdgeStyle) override; + void onClipRegion(const SkRegion&, SkRegion::Op) override; - void onDrawPicture(const SkPicture*, const SkMatrix*, const SkPaint*) SK_OVERRIDE; + void onDrawPicture(const SkPicture*, const SkMatrix*, const SkPaint*) override; class Iter; diff --git a/include/utils/SkNoSaveLayerCanvas.h b/include/utils/SkNoSaveLayerCanvas.h index b6926973e0..65cd4a8329 100644 --- a/include/utils/SkNoSaveLayerCanvas.h +++ b/include/utils/SkNoSaveLayerCanvas.h @@ -22,7 +22,7 @@ public: protected: virtual SaveLayerStrategy willSaveLayer(const SkRect* bounds, const SkPaint* paint, - SaveFlags flags) SK_OVERRIDE { + SaveFlags flags) override { this->INHERITED::willSaveLayer(bounds, paint, flags); return kNoLayer_SaveLayerStrategy; } diff --git a/include/views/SkOSWindow_Unix.h b/include/views/SkOSWindow_Unix.h index 8c4d81962a..2811ff855c 100644 --- a/include/views/SkOSWindow_Unix.h +++ b/include/views/SkOSWindow_Unix.h @@ -48,7 +48,7 @@ public: protected: // Overridden from from SkWindow: - void onSetTitle(const char title[]) SK_OVERRIDE; + void onSetTitle(const char title[]) override; private: enum NextXEventResult { diff --git a/include/views/SkWidget.h b/include/views/SkWidget.h index 28f0e9a047..3c9363440b 100644 --- a/include/views/SkWidget.h +++ b/include/views/SkWidget.h @@ -101,10 +101,10 @@ public: SkPushButtonWidget(uint32_t flags = 0) : SkButtonWidget(flags) {} protected: - bool onEvent(const SkEvent&) SK_OVERRIDE; - void onDraw(SkCanvas*) SK_OVERRIDE; - Click* onFindClickHandler(SkScalar x, SkScalar y, unsigned modi) SK_OVERRIDE; - bool onClick(Click* click) SK_OVERRIDE; + bool onEvent(const SkEvent&) override; + void onDraw(SkCanvas*) override; + Click* onFindClickHandler(SkScalar x, SkScalar y, unsigned modi) override; + bool onClick(Click* click) override; private: typedef SkButtonWidget INHERITED; diff --git a/include/xml/SkXMLWriter.h b/include/xml/SkXMLWriter.h index 6e3c7de79d..45356d488f 100644 --- a/include/xml/SkXMLWriter.h +++ b/include/xml/SkXMLWriter.h @@ -69,10 +69,10 @@ public: SkDEBUGCODE(static void UnitTest();) protected: - void onStartElementLen(const char elem[], size_t length) SK_OVERRIDE; - void onEndElement() SK_OVERRIDE; - void onAddAttributeLen(const char name[], const char value[], size_t length) SK_OVERRIDE; - void onAddText(const char text[], size_t length) SK_OVERRIDE; + void onStartElementLen(const char elem[], size_t length) override; + void onEndElement() override; + void onAddAttributeLen(const char name[], const char value[], size_t length) override; + void onAddText(const char text[], size_t length) override; private: SkWStream& fStream; @@ -86,7 +86,7 @@ protected: virtual void onStartElementLen(const char elem[], size_t length); virtual void onEndElement(); virtual void onAddAttributeLen(const char name[], const char value[], size_t length); - virtual void onAddText(const char text[], size_t length) SK_OVERRIDE; + virtual void onAddText(const char text[], size_t length) override; private: SkXMLParser& fParser; }; diff --git a/samplecode/ClockFaceView.cpp b/samplecode/ClockFaceView.cpp index 73ea566598..4717c30d9e 100644 --- a/samplecode/ClockFaceView.cpp +++ b/samplecode/ClockFaceView.cpp @@ -32,7 +32,7 @@ static inline SkPMColor rgb2gray(SkPMColor c) { class SkGrayScaleColorFilter : public SkColorFilter { public: virtual void filterSpan(const SkPMColor src[], int count, - SkPMColor result[]) const SK_OVERRIDE { + SkPMColor result[]) const override { for (int i = 0; i < count; i++) { result[i] = rgb2gray(src[i]); } @@ -46,7 +46,7 @@ public: } virtual void filterSpan(const SkPMColor src[], int count, - SkPMColor result[]) const SK_OVERRIDE { + SkPMColor result[]) const override { SkPMColor mask = fMask; for (int i = 0; i < count; i++) { result[i] = src[i] & mask; @@ -74,7 +74,7 @@ public: SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(Dot2DPathEffect) protected: - void begin(const SkIRect& uvBounds, SkPath* dst) const SK_OVERRIDE { + void begin(const SkIRect& uvBounds, SkPath* dst) const override { if (fPts) { fPts->reset(); } @@ -82,14 +82,14 @@ protected: } virtual void next(const SkPoint& loc, int u, int v, - SkPath* dst) const SK_OVERRIDE { + SkPath* dst) const override { if (fPts) { *fPts->append() = loc; } dst->addCircle(loc.fX, loc.fY, fRadius); } - void flatten(SkWriteBuffer& buffer) const SK_OVERRIDE { + void flatten(SkWriteBuffer& buffer) const override { buffer.writeMatrix(this->getMatrix()); buffer.writeScalar(fRadius); } @@ -111,14 +111,14 @@ class InverseFillPE : public SkPathEffect { public: InverseFillPE() {} virtual bool filterPath(SkPath* dst, const SkPath& src, - SkStrokeRec*, const SkRect*) const SK_OVERRIDE { + SkStrokeRec*, const SkRect*) const override { *dst = src; dst->setFillType(SkPath::kInverseWinding_FillType); return true; } #ifndef SK_IGNORE_TO_STRING - void toString(SkString* str) const SK_OVERRIDE { + void toString(SkString* str) const override { str->appendf("InverseFillPE: ()"); } #endif diff --git a/samplecode/GMSampleView.h b/samplecode/GMSampleView.h index f97ce92d2b..4d29190230 100644 --- a/samplecode/GMSampleView.h +++ b/samplecode/GMSampleView.h @@ -23,11 +23,11 @@ public: static SkEvent* NewShowSizeEvt(bool doShowSize); protected: - bool onQuery(SkEvent*) SK_OVERRIDE; - bool onEvent(const SkEvent&) SK_OVERRIDE; - void onDrawContent(SkCanvas*) SK_OVERRIDE; - void onDrawBackground(SkCanvas*) SK_OVERRIDE; - bool onAnimate(const SkAnimTimer&) SK_OVERRIDE; + bool onQuery(SkEvent*) override; + bool onEvent(const SkEvent&) override; + void onDrawContent(SkCanvas*) override; + void onDrawBackground(SkCanvas*) override; + bool onAnimate(const SkAnimTimer&) override; private: GM* fGM; diff --git a/samplecode/OverView.cpp b/samplecode/OverView.cpp index bbf647ae68..bdb8ddd657 100644 --- a/samplecode/OverView.cpp +++ b/samplecode/OverView.cpp @@ -48,8 +48,8 @@ public: virtual ~OverView(); protected: - bool onEvent(const SkEvent&) SK_OVERRIDE; - bool onQuery(SkEvent* evt) SK_OVERRIDE { + bool onEvent(const SkEvent&) override; + bool onQuery(SkEvent* evt) override { if (SampleCode::TitleQ(*evt)) { SampleCode::TitleR(evt, "Overview"); return true; @@ -66,13 +66,13 @@ protected: return this->INHERITED::onQuery(evt); } - void onDraw(SkCanvas* canvas) SK_OVERRIDE; + void onDraw(SkCanvas* canvas) override; - bool onSendClickToChildren(SkScalar x, SkScalar y, unsigned modi) SK_OVERRIDE { + bool onSendClickToChildren(SkScalar x, SkScalar y, unsigned modi) override { return false; } - Click* onFindClickHandler(SkScalar cx, SkScalar cy, unsigned modi) SK_OVERRIDE { + Click* onFindClickHandler(SkScalar cx, SkScalar cy, unsigned modi) override { const SkRect crect = SkRect::MakeXYWH(cx - 0.5f, cy - 0.5f, 1, 1); SkPoint loc = this->start(); for (int i = 0; i < fCount; ++i) { diff --git a/samplecode/SampleAll.cpp b/samplecode/SampleAll.cpp index 39f7722491..9a39ef9d76 100644 --- a/samplecode/SampleAll.cpp +++ b/samplecode/SampleAll.cpp @@ -53,7 +53,7 @@ static inline SkPMColor rgb2gray(SkPMColor c) { class SkGrayScaleColorFilter : public SkColorFilter { public: virtual void filterSpan(const SkPMColor src[], int count, - SkPMColor result[]) const SK_OVERRIDE { + SkPMColor result[]) const override { for (int i = 0; i < count; i++) result[i] = rgb2gray(src[i]); } @@ -66,7 +66,7 @@ public: } virtual void filterSpan(const SkPMColor src[], int count, - SkPMColor result[]) const SK_OVERRIDE { + SkPMColor result[]) const override { SkPMColor mask = fMask; for (int i = 0; i < count; i++) { result[i] = src[i] & mask; @@ -167,11 +167,11 @@ public: SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(Dot2DPathEffect) protected: - void next(const SkPoint& loc, int u, int v, SkPath* dst) const SK_OVERRIDE { + void next(const SkPoint& loc, int u, int v, SkPath* dst) const override { dst->addCircle(loc.fX, loc.fY, fRadius); } - void flatten(SkWriteBuffer& buffer) const SK_OVERRIDE { + void flatten(SkWriteBuffer& buffer) const override { this->INHERITED::flatten(buffer); buffer.writeScalar(fRadius); } diff --git a/samplecode/SampleAnimBlur.cpp b/samplecode/SampleAnimBlur.cpp index 3c0be83768..98a3560fe9 100644 --- a/samplecode/SampleAnimBlur.cpp +++ b/samplecode/SampleAnimBlur.cpp @@ -28,7 +28,7 @@ public: protected: // overrides from SkEventSink - bool onQuery(SkEvent* evt) SK_OVERRIDE { + bool onQuery(SkEvent* evt) override { if (SampleCode::TitleQ(*evt)) { SampleCode::TitleR(evt, "AnimBlur"); return true; @@ -36,7 +36,7 @@ protected: return this->INHERITED::onQuery(evt); } - void onDrawContent(SkCanvas* canvas) SK_OVERRIDE { + void onDrawContent(SkCanvas* canvas) override { static const SkBlurStyle gStyles[] = { kNormal_SkBlurStyle, kInner_SkBlurStyle, @@ -59,7 +59,7 @@ protected: } } - bool onAnimate(const SkAnimTimer& timer) SK_OVERRIDE { + bool onAnimate(const SkAnimTimer& timer) override { fBlurSigma = get_anim_sin(timer.secs(), 100, 4, 5); fCircleRadius = 3 + get_anim_sin(timer.secs(), 150, 25, 3); return true; diff --git a/samplecode/SampleApp.cpp b/samplecode/SampleApp.cpp index ae30479052..9b5a972ec8 100644 --- a/samplecode/SampleApp.cpp +++ b/samplecode/SampleApp.cpp @@ -48,7 +48,7 @@ class PictFileFactory : public SkViewFactory { SkString fFilename; public: PictFileFactory(const SkString& filename) : fFilename(filename) {} - SkView* operator() () const SK_OVERRIDE { + SkView* operator() () const override { return CreateSamplePictFileView(fFilename.c_str()); } }; @@ -60,7 +60,7 @@ class PdfFileViewerFactory : public SkViewFactory { SkString fFilename; public: PdfFileViewerFactory(const SkString& filename) : fFilename(filename) {} - SkView* operator() () const SK_OVERRIDE { + SkView* operator() () const override { return CreateSamplePdfFileViewer(fFilename.c_str()); } }; @@ -270,7 +270,7 @@ public: } virtual SkSurface* createSurface(SampleWindow::DeviceType dType, - SampleWindow* win) SK_OVERRIDE { + SampleWindow* win) override { #if SK_SUPPORT_GPU if (IsGpuDeviceType(dType) && fCurContext) { SkSurfaceProps props(win->getSurfaceProps()); @@ -324,7 +324,7 @@ public: #endif } - GrRenderTarget* getGrRenderTarget() SK_OVERRIDE { + GrRenderTarget* getGrRenderTarget() override { #if SK_SUPPORT_GPU return fCurRenderTarget; #else diff --git a/samplecode/SampleApp.h b/samplecode/SampleApp.h index 990ad0b6be..55e3f555a3 100644 --- a/samplecode/SampleApp.h +++ b/samplecode/SampleApp.h @@ -99,7 +99,7 @@ public: SampleWindow(void* hwnd, int argc, char** argv, DeviceManager*); virtual ~SampleWindow(); - SkSurface* createSurface() SK_OVERRIDE { + SkSurface* createSurface() override { SkSurface* surface = NULL; if (fDevManager) { surface = fDevManager->createSurface(fDeviceType, this); @@ -110,7 +110,7 @@ public: return surface; } - void draw(SkCanvas*) SK_OVERRIDE; + void draw(SkCanvas*) override; void setDeviceType(DeviceType type); void toggleRendering(); @@ -136,24 +136,24 @@ public: DeviceType getDeviceType() const { return fDeviceType; } protected: - void onDraw(SkCanvas* canvas) SK_OVERRIDE; - bool onHandleKey(SkKey key) SK_OVERRIDE; - bool onHandleChar(SkUnichar) SK_OVERRIDE; - void onSizeChange() SK_OVERRIDE; + void onDraw(SkCanvas* canvas) override; + bool onHandleKey(SkKey key) override; + bool onHandleChar(SkUnichar) override; + void onSizeChange() override; - SkCanvas* beforeChildren(SkCanvas*) SK_OVERRIDE; - void afterChildren(SkCanvas*) SK_OVERRIDE; - void beforeChild(SkView* child, SkCanvas* canvas) SK_OVERRIDE; - void afterChild(SkView* child, SkCanvas* canvas) SK_OVERRIDE; + SkCanvas* beforeChildren(SkCanvas*) override; + void afterChildren(SkCanvas*) override; + void beforeChild(SkView* child, SkCanvas* canvas) override; + void afterChild(SkView* child, SkCanvas* canvas) override; - bool onEvent(const SkEvent& evt) SK_OVERRIDE; - bool onQuery(SkEvent* evt) SK_OVERRIDE; + bool onEvent(const SkEvent& evt) override; + bool onQuery(SkEvent* evt) override; virtual bool onDispatchClick(int x, int y, Click::State, void* owner, - unsigned modi) SK_OVERRIDE; - bool onClick(Click* click) SK_OVERRIDE; + unsigned modi) override; + bool onClick(Click* click) override; virtual Click* onFindClickHandler(SkScalar x, SkScalar y, - unsigned modi) SK_OVERRIDE; + unsigned modi) override; private: class DefaultDeviceManager; diff --git a/samplecode/SampleArc.cpp b/samplecode/SampleArc.cpp index 710901bddf..842e7a0ef9 100644 --- a/samplecode/SampleArc.cpp +++ b/samplecode/SampleArc.cpp @@ -52,7 +52,7 @@ class ArcsView : public SampleView { } } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { SkPaint paint; paint.setAntiAlias(true); paint.setStrokeWidth(SkIntToScalar(2)); @@ -73,7 +73,7 @@ class ArcsView : public SampleView { canvas->drawArc(fR, 0, fSweep, false, paint); } - SkRect onGetBounds() SK_OVERRIDE { + SkRect onGetBounds() override { SkRect r(fR); r.outset(2, 2); return r; @@ -99,14 +99,14 @@ public: fRootDrawable = recorder.endRecordingAsDrawable(); } - ~ArcsView() SK_OVERRIDE { + ~ArcsView() override { fAnimatingDrawable->unref(); fRootDrawable->unref(); } protected: // overrides from SkEventSink - bool onQuery(SkEvent* evt) SK_OVERRIDE { + bool onQuery(SkEvent* evt) override { if (SampleCode::TitleQ(*evt)) { SampleCode::TitleR(evt, "Arcs"); return true; @@ -192,17 +192,17 @@ protected: DrawArcs(canvas); } - void onDrawContent(SkCanvas* canvas) SK_OVERRIDE { + void onDrawContent(SkCanvas* canvas) override { canvas->drawDrawable(fRootDrawable); } - bool onAnimate(const SkAnimTimer& timer) SK_OVERRIDE { + bool onAnimate(const SkAnimTimer& timer) override { SkScalar angle = SkDoubleToScalar(fmod(timer.secs() * 360 / 24, 360)); fAnimatingDrawable->setSweep(angle); return true; } - SkView::Click* onFindClickHandler(SkScalar x, SkScalar y, unsigned modi) SK_OVERRIDE { + SkView::Click* onFindClickHandler(SkScalar x, SkScalar y, unsigned modi) override { // fSweep += SK_Scalar1; this->inval(NULL); return this->INHERITED::onFindClickHandler(x, y, modi); diff --git a/samplecode/SampleBitmapRect.cpp b/samplecode/SampleBitmapRect.cpp index 3c700eca66..123bfb8b12 100644 --- a/samplecode/SampleBitmapRect.cpp +++ b/samplecode/SampleBitmapRect.cpp @@ -103,7 +103,7 @@ public: } protected: - bool onQuery(SkEvent* evt) SK_OVERRIDE { + bool onQuery(SkEvent* evt) override { if (SampleCode::TitleQ(*evt)) { SampleCode::TitleR(evt, "BitmapRect"); return true; @@ -111,7 +111,7 @@ protected: return this->INHERITED::onQuery(evt); } - void onDrawContent(SkCanvas* canvas) SK_OVERRIDE { + void onDrawContent(SkCanvas* canvas) override { SkRect srcR; srcR.set(fSrcPts[0], fSrcPts[1]); srcR = SkRect::MakeXYWH(fSrcPts[0].fX, fSrcPts[0].fY, 32, 32); @@ -136,7 +136,7 @@ protected: } } - bool onAnimate(const SkAnimTimer& timer) SK_OVERRIDE { + bool onAnimate(const SkAnimTimer& timer) override { if (timer.isStopped()) { this->resetBounce(); } else if (timer.isRunning()) { @@ -210,7 +210,7 @@ public: } protected: - bool onQuery(SkEvent* evt) SK_OVERRIDE { + bool onQuery(SkEvent* evt) override { if (SampleCode::TitleQ(*evt)) { SampleCode::TitleR(evt, "BigBitmapRect"); return true; @@ -218,7 +218,7 @@ protected: return this->INHERITED::onQuery(evt); } - void onDrawContent(SkCanvas* canvas) SK_OVERRIDE { + void onDrawContent(SkCanvas* canvas) override { SkPaint paint; paint.setStyle(SkPaint::kStroke_Style); paint.setColor(SK_ColorYELLOW); @@ -230,7 +230,7 @@ protected: } } - bool onAnimate(const SkAnimTimer& timer) SK_OVERRIDE { + bool onAnimate(const SkAnimTimer& timer) override { if (timer.isStopped()) { this->resetBounce(); } else if (timer.isRunning()) { diff --git a/samplecode/SampleCamera.cpp b/samplecode/SampleCamera.cpp index c0d4f4f84e..1f3b8c33fb 100644 --- a/samplecode/SampleCamera.cpp +++ b/samplecode/SampleCamera.cpp @@ -89,7 +89,7 @@ protected: } } - bool onAnimate(const SkAnimTimer& timer) SK_OVERRIDE { + bool onAnimate(const SkAnimTimer& timer) override { if (timer.isStopped()) { fRY = 0; } else { diff --git a/samplecode/SampleChart.cpp b/samplecode/SampleChart.cpp index ec5448cc39..4c128a90d7 100644 --- a/samplecode/SampleChart.cpp +++ b/samplecode/SampleChart.cpp @@ -88,7 +88,7 @@ public: } protected: - bool onQuery(SkEvent* evt) SK_OVERRIDE { + bool onQuery(SkEvent* evt) override { if (SampleCode::TitleQ(*evt)) { SampleCode::TitleR(evt, "Chart"); return true; @@ -96,7 +96,7 @@ protected: return this->INHERITED::onQuery(evt); } - void onDrawContent(SkCanvas* canvas) SK_OVERRIDE { + void onDrawContent(SkCanvas* canvas) override { bool sizeChanged = false; if (canvas->getDeviceSize() != fSize) { fSize = canvas->getDeviceSize(); diff --git a/samplecode/SampleClipDrawMatch.cpp b/samplecode/SampleClipDrawMatch.cpp index 0dbe2b1405..6a2a37b190 100644 --- a/samplecode/SampleClipDrawMatch.cpp +++ b/samplecode/SampleClipDrawMatch.cpp @@ -131,7 +131,7 @@ public: } protected: - bool onQuery(SkEvent* evt) SK_OVERRIDE { + bool onQuery(SkEvent* evt) override { if (SampleCode::TitleQ(*evt)) { SampleCode::TitleR(evt, "ClipDrawMatch"); return true; @@ -227,7 +227,7 @@ protected: } } - void onDrawContent(SkCanvas* canvas) SK_OVERRIDE { + void onDrawContent(SkCanvas* canvas) override { SkScalar trans[2]; fTrans.timeToValues(SkTime::GetMSecs(), trans); diff --git a/samplecode/SampleClock.cpp b/samplecode/SampleClock.cpp index 651a995c8f..ec71f0fd1c 100644 --- a/samplecode/SampleClock.cpp +++ b/samplecode/SampleClock.cpp @@ -22,7 +22,7 @@ public: protected: // overrides from SkEventSink - bool onQuery(SkEvent* evt) SK_OVERRIDE { + bool onQuery(SkEvent* evt) override { if (SampleCode::TitleQ(*evt)) { SampleCode::TitleR(evt, "Clock"); return true; @@ -30,7 +30,7 @@ protected: return this->INHERITED::onQuery(evt); } - void onDrawContent(SkCanvas* canvas) SK_OVERRIDE { + void onDrawContent(SkCanvas* canvas) override { SkPaint paintFill; SkPaint paintStroke; SkPath path; diff --git a/samplecode/SampleCode.h b/samplecode/SampleCode.h index 4152f54c67..6818c445f3 100644 --- a/samplecode/SampleCode.h +++ b/samplecode/SampleCode.h @@ -53,7 +53,7 @@ typedef SkView* (*SkViewCreateFunc)(); class SkFuncViewFactory : public SkViewFactory { public: SkFuncViewFactory(SkViewCreateFunc func); - SkView* operator() () const SK_OVERRIDE; + SkView* operator() () const override; private: SkViewCreateFunc fCreateFunc; @@ -72,7 +72,7 @@ typedef skiagm::GM* (*GMFactoryFunc)(void*); class SkGMSampleViewFactory : public SkViewFactory { public: SkGMSampleViewFactory(GMFactoryFunc func); - SkView* operator() () const SK_OVERRIDE; + SkView* operator() () const override; private: GMFactoryFunc fFunc; }; diff --git a/samplecode/SampleDegenerateTwoPtRadials.cpp b/samplecode/SampleDegenerateTwoPtRadials.cpp index dec985029e..32b45374e6 100644 --- a/samplecode/SampleDegenerateTwoPtRadials.cpp +++ b/samplecode/SampleDegenerateTwoPtRadials.cpp @@ -45,7 +45,7 @@ public: } protected: - bool onQuery(SkEvent* evt) SK_OVERRIDE { + bool onQuery(SkEvent* evt) override { if (SampleCode::TitleQ(*evt)) { SampleCode::TitleR(evt, "DegenerateTwoPtRadials"); return true; @@ -53,7 +53,7 @@ protected: return this->INHERITED::onQuery(evt); } - void onDrawContent(SkCanvas* canvas) SK_OVERRIDE { + void onDrawContent(SkCanvas* canvas) override { SkScalar delta = fTime / 15.f; int intPart = SkScalarFloorToInt(delta); delta = delta - SK_Scalar1 * intPart; @@ -77,7 +77,7 @@ protected: canvas->drawText(txt.c_str(), txt.size(), l + w/2 + w*DELTA_SCALE*delta, t + h + SK_Scalar1 * 10, paint); } - bool onAnimate(const SkAnimTimer& timer) SK_OVERRIDE { + bool onAnimate(const SkAnimTimer& timer) override { fTime = SkDoubleToScalar(timer.secs() / 15); return true; } diff --git a/samplecode/SampleFatBits.cpp b/samplecode/SampleFatBits.cpp index dfe5ba0af7..62d4a3d956 100644 --- a/samplecode/SampleFatBits.cpp +++ b/samplecode/SampleFatBits.cpp @@ -394,7 +394,7 @@ public: } protected: - bool onQuery(SkEvent* evt) SK_OVERRIDE { + bool onQuery(SkEvent* evt) override { if (SampleCode::TitleQ(*evt)) { SampleCode::TitleR(evt, "FatBits"); return true; @@ -474,7 +474,7 @@ protected: } virtual SkView::Click* onFindClickHandler(SkScalar x, SkScalar y, - unsigned modi) SK_OVERRIDE { + unsigned modi) override { SkPoint pt = { x, y }; int index = -1; int count = fFB.getTriangle() ? 3 : 2; @@ -489,7 +489,7 @@ protected: return new IndexClick(this, index); } - bool onClick(Click* click) SK_OVERRIDE { + bool onClick(Click* click) override { int index = IndexClick::GetIndex(click); if (index >= 0 && index <= 2) { fPts[index] = click->fCurr; diff --git a/samplecode/SampleFilterQuality.cpp b/samplecode/SampleFilterQuality.cpp index 79457b8e78..64b7f55322 100644 --- a/samplecode/SampleFilterQuality.cpp +++ b/samplecode/SampleFilterQuality.cpp @@ -156,7 +156,7 @@ public: } protected: - bool onQuery(SkEvent* evt) SK_OVERRIDE { + bool onQuery(SkEvent* evt) override { if (SampleCode::TitleQ(*evt)) { SampleCode::TitleR(evt, "FilterQuality"); return true; @@ -239,7 +239,7 @@ protected: canvas->drawLine(r.centerX(), r.top(), r.centerX(), r.bottom(), p); } - void onDrawContent(SkCanvas* canvas) SK_OVERRIDE { + void onDrawContent(SkCanvas* canvas) override { fCell.set(this->height() / 2, this->height() / 2); SkScalar trans[2]; @@ -276,7 +276,7 @@ protected: canvas->drawText(str.c_str(), str.size(), textX, 250, paint); } - bool onAnimate(const SkAnimTimer& timer) SK_OVERRIDE { + bool onAnimate(const SkAnimTimer& timer) override { fCurrTime = timer.msec(); return true; } diff --git a/samplecode/SampleHT.cpp b/samplecode/SampleHT.cpp index 33fb77105e..20648ccdac 100644 --- a/samplecode/SampleHT.cpp +++ b/samplecode/SampleHT.cpp @@ -83,7 +83,7 @@ public: void setTime(SkMSec time) { fTime = time; } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { SkAutoCanvasRestore acr(canvas, false); SkPaint paint; @@ -112,7 +112,7 @@ public: canvas->drawRect(fR, paint); } - SkRect onGetBounds() SK_OVERRIDE { return fR; } + SkRect onGetBounds() override { return fR; } }; class HTView : public SampleView { @@ -144,7 +144,7 @@ public: } protected: - bool onQuery(SkEvent* evt) SK_OVERRIDE { + bool onQuery(SkEvent* evt) override { if (SampleCode::TitleQ(*evt)) { SampleCode::TitleR(evt, "HT"); return true; @@ -152,11 +152,11 @@ protected: return this->INHERITED::onQuery(evt); } - void onDrawContent(SkCanvas* canvas) SK_OVERRIDE { + void onDrawContent(SkCanvas* canvas) override { canvas->drawDrawable(fRoot); } - bool onAnimate(const SkAnimTimer& timer) SK_OVERRIDE { + bool onAnimate(const SkAnimTimer& timer) override { fTime = timer.msec(); for (int i = 0; i < N; ++i) { fArray[i].fDrawable->setTime(fTime); @@ -164,7 +164,7 @@ protected: return true; } - SkView::Click* onFindClickHandler(SkScalar x, SkScalar y, unsigned modi) SK_OVERRIDE { + SkView::Click* onFindClickHandler(SkScalar x, SkScalar y, unsigned modi) override { // search backwards to find the top-most for (int i = N - 1; i >= 0; --i) { if (fArray[i].fDrawable->hitTest(x, y)) { diff --git a/samplecode/SampleHairline.cpp b/samplecode/SampleHairline.cpp index 76876339b4..bb2e2f171c 100644 --- a/samplecode/SampleHairline.cpp +++ b/samplecode/SampleHairline.cpp @@ -185,7 +185,7 @@ public: protected: // overrides from SkEventSink - bool onQuery(SkEvent* evt) SK_OVERRIDE { + bool onQuery(SkEvent* evt) override { if (SampleCode::TitleQ(*evt)) { SkString str; str.printf("Hair-%s", gProcs[fProcIndex].fName); @@ -201,7 +201,7 @@ protected: canvas->drawBitmap(b1, SkIntToScalar(b0.width()), 0, NULL); } - void onDrawContent(SkCanvas* canvas) SK_OVERRIDE { + void onDrawContent(SkCanvas* canvas) override { gRand.setSeed(fNow); SkBitmap bm, bm2; @@ -222,7 +222,7 @@ protected: canvas->drawBitmap(bm2, SkIntToScalar(10), SkIntToScalar(10), NULL); } - bool onAnimate(const SkAnimTimer&) SK_OVERRIDE { + bool onAnimate(const SkAnimTimer&) override { if (fDoAA) { fProcIndex = cycle_hairproc_index(fProcIndex); // todo: signal that we want to rebuild our TITLE @@ -231,7 +231,7 @@ protected: return true; } - SkView::Click* onFindClickHandler(SkScalar x, SkScalar y, unsigned modi) SK_OVERRIDE { + SkView::Click* onFindClickHandler(SkScalar x, SkScalar y, unsigned modi) override { fDoAA = !fDoAA; this->inval(NULL); return this->INHERITED::onFindClickHandler(x, y, modi); diff --git a/samplecode/SampleIdentityScale.cpp b/samplecode/SampleIdentityScale.cpp index 84b2bd5c77..4450d617a5 100644 --- a/samplecode/SampleIdentityScale.cpp +++ b/samplecode/SampleIdentityScale.cpp @@ -43,7 +43,7 @@ protected: SkBitmap fBM; // overrides from SkEventSink - bool onQuery(SkEvent* evt) SK_OVERRIDE { + bool onQuery(SkEvent* evt) override { if (SampleCode::TitleQ(*evt)) { SampleCode::TitleR(evt, "IdentityScale"); return true; @@ -51,7 +51,7 @@ protected: return this->INHERITED::onQuery(evt); } - void onDrawContent(SkCanvas* canvas) SK_OVERRIDE { + void onDrawContent(SkCanvas* canvas) override { SkPaint paint; diff --git a/samplecode/SampleLayers.cpp b/samplecode/SampleLayers.cpp index 9b61fcca5a..62a8c3beaf 100644 --- a/samplecode/SampleLayers.cpp +++ b/samplecode/SampleLayers.cpp @@ -123,7 +123,7 @@ static void test_fade(SkCanvas* canvas) { class RedFilter : public SkDrawFilter { public: - bool filter(SkPaint* p, SkDrawFilter::Type) SK_OVERRIDE { + bool filter(SkPaint* p, SkDrawFilter::Type) override { fColor = p->getColor(); if (fColor == SK_ColorRED) { p->setColor(SK_ColorGREEN); @@ -215,7 +215,7 @@ protected: } virtual SkView::Click* onFindClickHandler(SkScalar x, SkScalar y, - unsigned modi) SK_OVERRIDE { + unsigned modi) override { this->inval(NULL); return this->INHERITED::onFindClickHandler(x, y, modi); diff --git a/samplecode/SampleLines.cpp b/samplecode/SampleLines.cpp index c2509bc61e..4b491a516f 100644 --- a/samplecode/SampleLines.cpp +++ b/samplecode/SampleLines.cpp @@ -96,7 +96,7 @@ protected: canvas->drawLine(x, y, x + SkIntToScalar(90), y + SkIntToScalar(90), paint); } - SkView::Click* onFindClickHandler(SkScalar x, SkScalar y, unsigned) SK_OVERRIDE { + SkView::Click* onFindClickHandler(SkScalar x, SkScalar y, unsigned) override { fAlpha = SkScalarRoundToInt(y); this->inval(NULL); return NULL; diff --git a/samplecode/SampleLua.cpp b/samplecode/SampleLua.cpp index f21c7de5d8..8865f1a153 100644 --- a/samplecode/SampleLua.cpp +++ b/samplecode/SampleLua.cpp @@ -75,7 +75,7 @@ public: } protected: - bool onQuery(SkEvent* evt) SK_OVERRIDE { + bool onQuery(SkEvent* evt) override { if (SampleCode::TitleQ(*evt)) { SampleCode::TitleR(evt, "Lua"); return true; @@ -101,7 +101,7 @@ protected: return this->INHERITED::onQuery(evt); } - void onDrawContent(SkCanvas* canvas) SK_OVERRIDE { + void onDrawContent(SkCanvas* canvas) override { lua_State* L = this->ensureLua(); lua_getglobal(L, gDrawName); @@ -126,7 +126,7 @@ protected: } virtual SkView::Click* onFindClickHandler(SkScalar x, SkScalar y, - unsigned modi) SK_OVERRIDE { + unsigned modi) override { lua_State* L = this->ensureLua(); lua_getglobal(L, gClickName); if (lua_isfunction(L, -1)) { @@ -147,7 +147,7 @@ protected: return this->INHERITED::onFindClickHandler(x, y, modi); } - bool onClick(Click* click) SK_OVERRIDE { + bool onClick(Click* click) override { if (click->getType() != gLuaClickHandlerName) { return this->INHERITED::onClick(click); } diff --git a/samplecode/SampleManyRects.cpp b/samplecode/SampleManyRects.cpp index c563394725..5032498b6a 100644 --- a/samplecode/SampleManyRects.cpp +++ b/samplecode/SampleManyRects.cpp @@ -26,7 +26,7 @@ public: ManyRectsView() {} protected: - bool onQuery(SkEvent* evt) SK_OVERRIDE { + bool onQuery(SkEvent* evt) override { if (SampleCode::TitleQ(*evt)) { SampleCode::TitleR(evt, "ManyRects"); return true; diff --git a/samplecode/SamplePatch.cpp b/samplecode/SamplePatch.cpp index 478d822bee..ac500bf828 100644 --- a/samplecode/SamplePatch.cpp +++ b/samplecode/SamplePatch.cpp @@ -319,7 +319,7 @@ protected: drawpatches(canvas, paint, nu, nv, &patch); } - bool onAnimate(const SkAnimTimer& timer) SK_OVERRIDE { + bool onAnimate(const SkAnimTimer& timer) override { fAngle = timer.scaled(60, 360); return true; } @@ -335,7 +335,7 @@ protected: } virtual SkView::Click* onFindClickHandler(SkScalar x, SkScalar y, - unsigned modi) SK_OVERRIDE { + unsigned modi) override { x -= DX; y -= DY; for (size_t i = 0; i < SK_ARRAY_COUNT(fPts); i++) { diff --git a/samplecode/SamplePath.cpp b/samplecode/SamplePath.cpp index b5edeb3ad3..4493d397d5 100644 --- a/samplecode/SamplePath.cpp +++ b/samplecode/SamplePath.cpp @@ -195,7 +195,7 @@ protected: } } - bool onAnimate(const SkAnimTimer& timer) SK_OVERRIDE { + bool onAnimate(const SkAnimTimer& timer) override { SkScalar currSecs = timer.scaled(100); SkScalar delta = currSecs - fPrevSecs; fPrevSecs = currSecs; @@ -207,7 +207,7 @@ protected: return true; } - SkView::Click* onFindClickHandler(SkScalar x, SkScalar y, unsigned modi) SK_OVERRIDE { + SkView::Click* onFindClickHandler(SkScalar x, SkScalar y, unsigned modi) override { fShowHairline = !fShowHairline; this->inval(NULL); return this->INHERITED::onFindClickHandler(x, y, modi); @@ -272,7 +272,7 @@ public: protected: // overrides from SkEventSink - bool onQuery(SkEvent* evt) SK_OVERRIDE { + bool onQuery(SkEvent* evt) override { if (SampleCode::TitleQ(*evt)) { SampleCode::TitleR(evt, "ArcTo"); return true; @@ -300,7 +300,7 @@ protected: } } - void onDrawContent(SkCanvas* canvas) SK_OVERRIDE { + void onDrawContent(SkCanvas* canvas) override { canvas->drawPoints(SkCanvas::kPoints_PointMode, N, fPts, fPtsPaint); SkPath path; @@ -316,7 +316,7 @@ protected: canvas->drawPath(path, fSkeletonPaint); } - bool onClick(Click* click) SK_OVERRIDE { + bool onClick(Click* click) override { int32_t index; if (click->fMeta.findS32("index", &index)) { SkASSERT((unsigned)index < N); @@ -327,7 +327,7 @@ protected: return false; } - SkView::Click* onFindClickHandler(SkScalar x, SkScalar y, unsigned modi) SK_OVERRIDE { + SkView::Click* onFindClickHandler(SkScalar x, SkScalar y, unsigned modi) override { const SkScalar tol = 4; const SkRect r = SkRect::MakeXYWH(x - tol, y - tol, tol * 2, tol * 2); for (int i = 0; i < N; ++i) { diff --git a/samplecode/SamplePathClip.cpp b/samplecode/SamplePathClip.cpp index a85038edbd..ab7ed5d0fc 100644 --- a/samplecode/SamplePathClip.cpp +++ b/samplecode/SamplePathClip.cpp @@ -70,7 +70,7 @@ protected: canvas->drawOval(oval, p); } - SkView::Click* onFindClickHandler(SkScalar x, SkScalar y, unsigned) SK_OVERRIDE { + SkView::Click* onFindClickHandler(SkScalar x, SkScalar y, unsigned) override { return new Click(this); } diff --git a/samplecode/SamplePathEffects.cpp b/samplecode/SamplePathEffects.cpp index f1574fbda8..e194793f36 100644 --- a/samplecode/SamplePathEffects.cpp +++ b/samplecode/SamplePathEffects.cpp @@ -99,7 +99,7 @@ public: } protected: - void onOnceBeforeDraw() SK_OVERRIDE { + void onOnceBeforeDraw() override { SkRandom rand; int steps = 20; SkScalar dist = SkIntToScalar(400); @@ -130,7 +130,7 @@ protected: this->setBGColor(0xFFDDDDDD); } - bool onQuery(SkEvent* evt) SK_OVERRIDE { + bool onQuery(SkEvent* evt) override { if (SampleCode::TitleQ(*evt)) { SampleCode::TitleR(evt, "PathEffects"); return true; @@ -138,7 +138,7 @@ protected: return this->INHERITED::onQuery(evt); } - void onDrawContent(SkCanvas* canvas) SK_OVERRIDE { + void onDrawContent(SkCanvas* canvas) override { SkPaint paint; canvas->translate(0, 50); @@ -162,7 +162,7 @@ protected: canvas->drawPath(fPath, paint); } - bool onAnimate(const SkAnimTimer& timer) SK_OVERRIDE { + bool onAnimate(const SkAnimTimer& timer) override { fPhase = timer.scaled(40); return true; } diff --git a/samplecode/SamplePathFuzz.cpp b/samplecode/SamplePathFuzz.cpp index d14d918200..f2595c59ea 100644 --- a/samplecode/SamplePathFuzz.cpp +++ b/samplecode/SamplePathFuzz.cpp @@ -671,7 +671,7 @@ protected: return this->INHERITED::onQuery(evt); } - void onOnceBeforeDraw() SK_OVERRIDE { + void onOnceBeforeDraw() override { fIndex = 0; SkImageInfo info(SkImageInfo::MakeN32Premul(SkScalarRoundToInt(width()), SkScalarRoundToInt(height()))); diff --git a/samplecode/SamplePictFile.cpp b/samplecode/SamplePictFile.cpp index 8f827e10aa..a0bab7da4e 100644 --- a/samplecode/SamplePictFile.cpp +++ b/samplecode/SamplePictFile.cpp @@ -49,7 +49,7 @@ public: } } - void onTileSizeChanged(const SkSize &tileSize) SK_OVERRIDE { + void onTileSizeChanged(const SkSize &tileSize) override { if (tileSize != fTileSize) { fTileSize = tileSize; } @@ -57,7 +57,7 @@ public: protected: // overrides from SkEventSink - bool onQuery(SkEvent* evt) SK_OVERRIDE { + bool onQuery(SkEvent* evt) override { if (SampleCode::TitleQ(*evt)) { SkString name("P:"); const char* basename = strrchr(fFilename.c_str(), SkPATH_SEPARATOR); @@ -79,7 +79,7 @@ protected: return this->INHERITED::onQuery(evt); } - bool onEvent(const SkEvent& evt) SK_OVERRIDE { + bool onEvent(const SkEvent& evt) override { if (evt.isType("PictFileView::toggleBBox")) { fBBox = (BBoxType)((fBBox + 1) % kBBoxTypeCount); return true; @@ -87,7 +87,7 @@ protected: return this->INHERITED::onEvent(evt); } - void onDrawContent(SkCanvas* canvas) SK_OVERRIDE { + void onDrawContent(SkCanvas* canvas) override { SkASSERT(static_cast(fBBox) < kBBoxTypeCount); SkPicture** picture = fPictures + fBBox; diff --git a/samplecode/SamplePicture.cpp b/samplecode/SamplePicture.cpp index 44c494017f..638af054b1 100644 --- a/samplecode/SamplePicture.cpp +++ b/samplecode/SamplePicture.cpp @@ -95,7 +95,7 @@ public: protected: // overrides from SkEventSink - bool onQuery(SkEvent* evt) SK_OVERRIDE { + bool onQuery(SkEvent* evt) override { if (SampleCode::TitleQ(*evt)) { SampleCode::TitleR(evt, "Picture"); return true; @@ -123,7 +123,7 @@ protected: } - void onDrawContent(SkCanvas* canvas) SK_OVERRIDE { + void onDrawContent(SkCanvas* canvas) override { this->drawSomething(canvas); SkPictureRecorder recorder; @@ -159,7 +159,7 @@ private: (new SkEvent(INVAL_ALL_TYPE, this->getSinkID()))->postDelay(delay); } - bool onEvent(const SkEvent& evt) SK_OVERRIDE { + bool onEvent(const SkEvent& evt) override { if (evt.isType(INVAL_ALL_TYPE)) { this->inval(NULL); return true; diff --git a/samplecode/SampleQuadStroker.cpp b/samplecode/SampleQuadStroker.cpp index 37663d22a0..73373a2c97 100644 --- a/samplecode/SampleQuadStroker.cpp +++ b/samplecode/SampleQuadStroker.cpp @@ -175,7 +175,7 @@ public: } protected: - bool onQuery(SkEvent* evt) SK_OVERRIDE { + bool onQuery(SkEvent* evt) override { if (SampleCode::TitleQ(*evt)) { SampleCode::TitleR(evt, "QuadStroker"); return true; @@ -202,7 +202,7 @@ protected: return this->INHERITED::onQuery(evt); } - void onSizeChange() SK_OVERRIDE { + void onSizeChange() override { fWeightControl.setXYWH(this->width() - 150, 30, 30, 400); fErrorControl.setXYWH(this->width() - 100, 30, 30, 400); fWidthControl.setXYWH(this->width() - 50, 30, 30, 400); @@ -445,7 +445,7 @@ protected: } } - void onDrawContent(SkCanvas* canvas) SK_OVERRIDE { + void onDrawContent(SkCanvas* canvas) override { SkPath path; SkScalar width = fWidth; @@ -551,7 +551,7 @@ protected: }; virtual SkView::Click* onFindClickHandler(SkScalar x, SkScalar y, - unsigned modi) SK_OVERRIDE { + unsigned modi) override { for (size_t i = 0; i < SK_ARRAY_COUNT(fPts); ++i) { if (hittest(fPts[i], x, y)) { return new MyClick(this, (int)i); @@ -603,7 +603,7 @@ protected: return (SkIntToScalar(y) - control.fTop) / control.height() * (max - min) + min; } - bool onClick(Click* click) SK_OVERRIDE { + bool onClick(Click* click) override { int index = ((MyClick*)click)->fIndex; if (index < (int) SK_ARRAY_COUNT(fPts)) { fPts[index].offset(SkIntToScalar(click->fICurr.fX - click->fIPrev.fX), diff --git a/samplecode/SampleRectanizer.cpp b/samplecode/SampleRectanizer.cpp index 9d2f6ffc01..7bb712c721 100644 --- a/samplecode/SampleRectanizer.cpp +++ b/samplecode/SampleRectanizer.cpp @@ -51,7 +51,7 @@ public: } protected: - bool onQuery(SkEvent* evt) SK_OVERRIDE { + bool onQuery(SkEvent* evt) override { if (SampleCode::TitleQ(*evt)) { SampleCode::TitleR(evt, "Rectanizer"); return true; @@ -77,7 +77,7 @@ protected: return this->INHERITED::onQuery(evt); } - void onDrawContent(SkCanvas* canvas) SK_OVERRIDE { + void onDrawContent(SkCanvas* canvas) override { if (fCurRandRect < kNumRandRects) { if (fCurRectanizer->addRect((*fCurRects)[fCurRandRect].fWidth, (*fCurRects)[fCurRandRect].fHeight, diff --git a/samplecode/SampleRegion.cpp b/samplecode/SampleRegion.cpp index c25b0733df..3c5fc2e35c 100644 --- a/samplecode/SampleRegion.cpp +++ b/samplecode/SampleRegion.cpp @@ -219,7 +219,7 @@ public: protected: // overrides from SkEventSink - bool onQuery(SkEvent* evt) SK_OVERRIDE { + bool onQuery(SkEvent* evt) override { if (SampleCode::TitleQ(*evt)) { SampleCode::TitleR(evt, "Regions"); return true; @@ -321,7 +321,7 @@ protected: canvas->drawPath(path, paint); } - void onDrawContent(SkCanvas* canvas) SK_OVERRIDE { + void onDrawContent(SkCanvas* canvas) override { if (false) { // avoid bit rot, suppress warning test_strokerect(canvas); return; @@ -394,12 +394,12 @@ protected: } virtual SkView::Click* onFindClickHandler(SkScalar x, SkScalar y, - unsigned modi) SK_OVERRIDE { + unsigned modi) override { return fRect.contains(SkScalarRoundToInt(x), SkScalarRoundToInt(y)) ? new Click(this) : NULL; } - bool onClick(Click* click) SK_OVERRIDE { + bool onClick(Click* click) override { fRect.offset(click->fICurr.fX - click->fIPrev.fX, click->fICurr.fY - click->fIPrev.fY); this->inval(NULL); diff --git a/samplecode/SampleRepeatTile.cpp b/samplecode/SampleRepeatTile.cpp index bfdfab8c19..61bc8cd171 100644 --- a/samplecode/SampleRepeatTile.cpp +++ b/samplecode/SampleRepeatTile.cpp @@ -49,7 +49,7 @@ public: protected: // overrides from SkEventSink - bool onQuery(SkEvent* evt) SK_OVERRIDE { + bool onQuery(SkEvent* evt) override { if (SampleCode::TitleQ(*evt)) { SampleCode::TitleR(evt, "RepeatTile"); return true; @@ -57,7 +57,7 @@ protected: return this->INHERITED::onQuery(evt); } - void onDrawContent(SkCanvas* canvas) SK_OVERRIDE { + void onDrawContent(SkCanvas* canvas) override { SkPaint paint; make_paint(&paint, SkShader::kRepeat_TileMode); @@ -66,13 +66,13 @@ protected: canvas->drawPaint(paint); } - SkView::Click* onFindClickHandler(SkScalar x, SkScalar y, unsigned modi) SK_OVERRIDE { + SkView::Click* onFindClickHandler(SkScalar x, SkScalar y, unsigned modi) override { this->inval(NULL); return this->INHERITED::onFindClickHandler(x, y, modi); } - bool onClick(Click* click) SK_OVERRIDE { + bool onClick(Click* click) override { return this->INHERITED::onClick(click); } diff --git a/samplecode/SampleShaders.cpp b/samplecode/SampleShaders.cpp index 5a358c6af9..093e14f4eb 100644 --- a/samplecode/SampleShaders.cpp +++ b/samplecode/SampleShaders.cpp @@ -83,7 +83,7 @@ public: protected: // overrides from SkEventSink - bool onQuery(SkEvent* evt) SK_OVERRIDE { + bool onQuery(SkEvent* evt) override { if (SampleCode::TitleQ(*evt)) { SampleCode::TitleR(evt, "Shaders"); return true; @@ -91,7 +91,7 @@ protected: return this->INHERITED::onQuery(evt); } - void onDrawContent(SkCanvas* canvas) SK_OVERRIDE { + void onDrawContent(SkCanvas* canvas) override { canvas->drawBitmap(fBitmap, 0, 0); canvas->translate(SkIntToScalar(20), SkIntToScalar(120)); @@ -122,12 +122,12 @@ protected: } virtual SkView::Click* onFindClickHandler(SkScalar x, SkScalar y, - unsigned modi) SK_OVERRIDE { + unsigned modi) override { this->inval(NULL); return this->INHERITED::onFindClickHandler(x, y, modi); } - bool onClick(Click* click) SK_OVERRIDE { + bool onClick(Click* click) override { return this->INHERITED::onClick(click); } diff --git a/samplecode/SampleSlides.cpp b/samplecode/SampleSlides.cpp index b626cdb08e..6899fc111e 100644 --- a/samplecode/SampleSlides.cpp +++ b/samplecode/SampleSlides.cpp @@ -697,7 +697,7 @@ public: protected: // overrides from SkEventSink - bool onQuery(SkEvent* evt) SK_OVERRIDE { + bool onQuery(SkEvent* evt) override { if (SampleCode::TitleQ(*evt)) { SampleCode::TitleR(evt, "Slides"); return true; @@ -705,12 +705,12 @@ protected: return this->INHERITED::onQuery(evt); } - void onDrawContent(SkCanvas* canvas) SK_OVERRIDE { + void onDrawContent(SkCanvas* canvas) override { this->init(); gProc[fIndex](canvas); } - SkView::Click* onFindClickHandler(SkScalar x, SkScalar y, unsigned) SK_OVERRIDE { + SkView::Click* onFindClickHandler(SkScalar x, SkScalar y, unsigned) override { this->init(); fIndex = (fIndex + 1) % SK_ARRAY_COUNT(gProc); this->inval(NULL); diff --git a/samplecode/SampleStringArt.cpp b/samplecode/SampleStringArt.cpp index 8522478783..569fd7f337 100644 --- a/samplecode/SampleStringArt.cpp +++ b/samplecode/SampleStringArt.cpp @@ -19,7 +19,7 @@ public: protected: // overrides from SkEventSink - bool onQuery(SkEvent* evt) SK_OVERRIDE { + bool onQuery(SkEvent* evt) override { if (SampleCode::TitleQ(*evt)) { SampleCode::TitleR(evt, "StringArt"); return true; @@ -27,7 +27,7 @@ protected: return this->INHERITED::onQuery(evt); } - void onDrawContent(SkCanvas* canvas) SK_OVERRIDE { + void onDrawContent(SkCanvas* canvas) override { SkScalar angle = fAngle*SK_ScalarPI + SkScalarHalf(SK_ScalarPI); SkPoint center = SkPoint::Make(SkScalarHalf(this->width()), SkScalarHalf(this->height())); @@ -55,7 +55,7 @@ protected: canvas->drawPath(path, paint); } - SkView::Click* onFindClickHandler(SkScalar x, SkScalar y, unsigned) SK_OVERRIDE { + SkView::Click* onFindClickHandler(SkScalar x, SkScalar y, unsigned) override { fAngle = x/width(); this->inval(NULL); return NULL; diff --git a/samplecode/SampleStrokePath.cpp b/samplecode/SampleStrokePath.cpp index 00e5821937..63809cea75 100644 --- a/samplecode/SampleStrokePath.cpp +++ b/samplecode/SampleStrokePath.cpp @@ -99,7 +99,7 @@ class StrokePathView : public SampleView { SkScalar fWidth; SkPath fPath; protected: - void onOnceBeforeDraw() SK_OVERRIDE { + void onOnceBeforeDraw() override { // test_blur(); fWidth = SkIntToScalar(120); @@ -123,7 +123,7 @@ protected: } // overrides from SkEventSink - bool onQuery(SkEvent* evt) SK_OVERRIDE { + bool onQuery(SkEvent* evt) override { if (SampleCode::TitleQ(*evt)) { SampleCode::TitleR(evt, "StrokePath"); return true; @@ -145,7 +145,7 @@ protected: } } - void onDrawContent(SkCanvas* canvas) SK_OVERRIDE { + void onDrawContent(SkCanvas* canvas) override { test_huge_stroke(canvas); return; canvas->translate(SkIntToScalar(10), SkIntToScalar(10)); @@ -209,7 +209,7 @@ protected: } virtual SkView::Click* onFindClickHandler(SkScalar x, SkScalar y, - unsigned modi) SK_OVERRIDE { + unsigned modi) override { this->inval(NULL); return this->INHERITED::onFindClickHandler(x, y, modi); } diff --git a/samplecode/SampleSubpixelTranslate.cpp b/samplecode/SampleSubpixelTranslate.cpp index fe8062b7a6..02993632cf 100644 --- a/samplecode/SampleSubpixelTranslate.cpp +++ b/samplecode/SampleSubpixelTranslate.cpp @@ -52,7 +52,7 @@ protected: SkPoint fCurPos; // overrides from SkEventSink - bool onQuery(SkEvent* evt) SK_OVERRIDE { + bool onQuery(SkEvent* evt) override { if (SampleCode::TitleQ(*evt)) { SampleCode::TitleR(evt, "SubpixelTranslate"); return true; @@ -60,7 +60,7 @@ protected: return this->INHERITED::onQuery(evt); } - void onDrawContent(SkCanvas* canvas) SK_OVERRIDE { + void onDrawContent(SkCanvas* canvas) override { static const SkFilterQuality gQualitys[] = { kNone_SkFilterQuality, diff --git a/samplecode/SampleText.cpp b/samplecode/SampleText.cpp index 112573e967..aae42c1694 100644 --- a/samplecode/SampleText.cpp +++ b/samplecode/SampleText.cpp @@ -115,7 +115,7 @@ public: protected: // overrides from SkEventSink - bool onQuery(SkEvent* evt) SK_OVERRIDE { + bool onQuery(SkEvent* evt) override { if (SampleCode::TitleQ(*evt)) { SampleCode::TitleR(evt, "Text"); return true; @@ -143,7 +143,7 @@ protected: pts[i].set(rand->nextUScalar1() * 640, rand->nextUScalar1() * 480); } - void onDrawContent(SkCanvas* canvas) SK_OVERRIDE { + void onDrawContent(SkCanvas* canvas) override { SkAutoCanvasRestore restore(canvas, false); { SkRect r; @@ -186,13 +186,13 @@ protected: } virtual SkView::Click* onFindClickHandler(SkScalar x, SkScalar y, - unsigned modi) SK_OVERRIDE { + unsigned modi) override { fClickX = x; this->inval(NULL); return this->INHERITED::onFindClickHandler(x, y, modi); } - bool onClick(Click* click) SK_OVERRIDE { + bool onClick(Click* click) override { return this->INHERITED::onClick(click); } diff --git a/samplecode/SampleTextAlpha.cpp b/samplecode/SampleTextAlpha.cpp index 58e1db2686..f3440213ef 100644 --- a/samplecode/SampleTextAlpha.cpp +++ b/samplecode/SampleTextAlpha.cpp @@ -36,7 +36,7 @@ public: protected: // overrides from SkEventSink - bool onQuery(SkEvent* evt) SK_OVERRIDE { + bool onQuery(SkEvent* evt) override { if (SampleCode::TitleQ(*evt)) { SampleCode::TitleR(evt, "TextAlpha"); return true; @@ -44,7 +44,7 @@ protected: return this->INHERITED::onQuery(evt); } - void onDrawContent(SkCanvas* canvas) SK_OVERRIDE { + void onDrawContent(SkCanvas* canvas) override { const char* str = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; SkPaint paint; SkScalar x = SkIntToScalar(10); @@ -69,11 +69,11 @@ protected: } } - SkView::Click* onFindClickHandler(SkScalar x, SkScalar y, unsigned) SK_OVERRIDE { + SkView::Click* onFindClickHandler(SkScalar x, SkScalar y, unsigned) override { return new Click(this); } - bool onClick(Click* click) SK_OVERRIDE { + bool onClick(Click* click) override { int y = click->fICurr.fY; if (y < 0) { y = 0; diff --git a/samplecode/SampleTextOnPath.cpp b/samplecode/SampleTextOnPath.cpp index 95ae548016..7ea4694761 100644 --- a/samplecode/SampleTextOnPath.cpp +++ b/samplecode/SampleTextOnPath.cpp @@ -94,7 +94,7 @@ public: SkScalar fHOffset; protected: - void onOnceBeforeDraw() SK_OVERRIDE { + void onOnceBeforeDraw() override { SkRect r; r.set(SkIntToScalar(100), SkIntToScalar(100), SkIntToScalar(300), SkIntToScalar(300)); @@ -105,7 +105,7 @@ protected: } // overrides from SkEventSink - bool onQuery(SkEvent* evt) SK_OVERRIDE { + bool onQuery(SkEvent* evt) override { if (SampleCode::TitleQ(*evt)) { SampleCode::TitleR(evt, "Text On Path"); return true; @@ -113,7 +113,7 @@ protected: return this->INHERITED::onQuery(evt); } - void onDrawContent(SkCanvas* canvas) SK_OVERRIDE { + void onDrawContent(SkCanvas* canvas) override { SkPaint paint; paint.setAntiAlias(true); paint.setTextSize(SkIntToScalar(48)); @@ -151,13 +151,13 @@ protected: this->inval(NULL); } - SkView::Click* onFindClickHandler(SkScalar x, SkScalar y, unsigned modi) SK_OVERRIDE { + SkView::Click* onFindClickHandler(SkScalar x, SkScalar y, unsigned modi) override { fHints += 1; this->inval(NULL); return this->INHERITED::onFindClickHandler(x, y, modi); } - bool onClick(Click* click) SK_OVERRIDE { + bool onClick(Click* click) override { return this->INHERITED::onClick(click); } diff --git a/samplecode/SampleUnpremul.cpp b/samplecode/SampleUnpremul.cpp index 7e5c950ccc..ee3ec826b8 100644 --- a/samplecode/SampleUnpremul.cpp +++ b/samplecode/SampleUnpremul.cpp @@ -49,7 +49,7 @@ public: protected: // overrides from SkEventSink - bool onQuery(SkEvent* evt) SK_OVERRIDE { + bool onQuery(SkEvent* evt) override { if (SampleCode::TitleQ(*evt)) { SampleCode::TitleR(evt, "unpremul"); return true; @@ -75,11 +75,11 @@ protected: return this->INHERITED::onQuery(evt); } - void onDrawBackground(SkCanvas* canvas) SK_OVERRIDE { + void onDrawBackground(SkCanvas* canvas) override { sk_tool_utils::draw_checkerboard(canvas, 0xFFCCCCCC, 0xFFFFFFFF, 12); } - void onDrawContent(SkCanvas* canvas) SK_OVERRIDE { + void onDrawContent(SkCanvas* canvas) override { SkPaint paint; paint.setAntiAlias(true); paint.setTextSize(SkIntToScalar(24)); diff --git a/samplecode/SampleVertices.cpp b/samplecode/SampleVertices.cpp index f334a87d39..138ab2e5ba 100644 --- a/samplecode/SampleVertices.cpp +++ b/samplecode/SampleVertices.cpp @@ -77,7 +77,7 @@ public: protected: // overrides from SkEventSink - bool onQuery(SkEvent* evt) SK_OVERRIDE { + bool onQuery(SkEvent* evt) override { if (SampleCode::TitleQ(*evt)) { SampleCode::TitleR(evt, "Vertices"); return true; @@ -87,7 +87,7 @@ protected: SkScalar fScale; - void onDrawContent(SkCanvas* canvas) SK_OVERRIDE { + void onDrawContent(SkCanvas* canvas) override { SkPaint paint; paint.setDither(true); paint.setFilterQuality(kLow_SkFilterQuality); @@ -119,11 +119,11 @@ protected: } } - SkView::Click* onFindClickHandler(SkScalar x, SkScalar y, unsigned) SK_OVERRIDE { + SkView::Click* onFindClickHandler(SkScalar x, SkScalar y, unsigned) override { return new Click(this); } - bool onClick(Click* click) SK_OVERRIDE { + bool onClick(Click* click) override { // fCurrX = click->fICurr.fX; // fCurrY = click->fICurr.fY; this->inval(NULL); diff --git a/site/dev/contrib/flatten.md b/site/dev/contrib/flatten.md index c06a14b812..192571e1c7 100644 --- a/site/dev/contrib/flatten.md +++ b/site/dev/contrib/flatten.md @@ -11,7 +11,7 @@ do a few things so that it will work on all platforms: ~~~~ -virtual void flatten(SkFlattenableWriteBuffer& buffer) const SK_OVERRIDE { +virtual void flatten(SkFlattenableWriteBuffer& buffer) const override { this->INHERITED::flatten(buffer); // Write any private data that needs to be stored to recreate this object } diff --git a/site/dev/contrib/style.md b/site/dev/contrib/style.md index ac31f4ad56..e952ed1b68 100644 --- a/site/dev/contrib/style.md +++ b/site/dev/contrib/style.md @@ -321,12 +321,12 @@ private: }; ~~~~ -Virtual functions that are overridden in derived classes should use SK_OVERRIDE +Virtual functions that are overridden in derived classes should use override (and not the override keyword). The virtual keyword can be omitted. ~~~~ -void myVirtual() SK_OVERRIDE { +void myVirtual() override { } ~~~~ @@ -335,7 +335,7 @@ base-class implementations of a virtual function should be explicitly qualified: ~~~~ -void myVirtual() SK_OVERRIDE { +void myVirtual() override { ... this->INHERITED::myVirtual(); ... @@ -343,7 +343,7 @@ void myVirtual() SK_OVERRIDE { ~~~~ As in the above example, derived classes that redefine virtual functions should -use SK_OVERRIDE to note that explicitly. +use override to note that explicitly. Constructor initializers should be one per line, indented, with punctuation placed before the initializer. This is a fairly new rule so much of the existing diff --git a/site/user/sample/hello.md b/site/user/sample/hello.md index d917cf778c..f4c83e0dde 100644 --- a/site/user/sample/hello.md +++ b/site/user/sample/hello.md @@ -73,7 +73,7 @@ class HelloTutorial : public SkExample { } protected: - void draw(SkCanvas* canvas) SK_OVERRIDE { + void draw(SkCanvas* canvas) override { // Clear background canvas->drawColor(SK_ColorWHITE); diff --git a/src/animator/SkAnimate.h b/src/animator/SkAnimate.h index 225d27d35e..ee391fcd93 100644 --- a/src/animator/SkAnimate.h +++ b/src/animator/SkAnimate.h @@ -19,11 +19,11 @@ class SkAnimate : public SkAnimateBase { DECLARE_MEMBER_INFO(Animate); SkAnimate(); virtual ~SkAnimate(); - int components() SK_OVERRIDE; + int components() override; #ifdef SK_DUMP_ENABLED - void dump(SkAnimateMaker* ) SK_OVERRIDE; + void dump(SkAnimateMaker* ) override; #endif - void onEndElement(SkAnimateMaker& maker) SK_OVERRIDE; + void onEndElement(SkAnimateMaker& maker) override; protected: bool resolveCommon(SkAnimateMaker& ); int fComponents; diff --git a/src/animator/SkAnimateBase.h b/src/animator/SkAnimateBase.h index 69272977b9..0da4af1173 100644 --- a/src/animator/SkAnimateBase.h +++ b/src/animator/SkAnimateBase.h @@ -24,26 +24,26 @@ public: SkAnimateBase(); virtual ~SkAnimateBase(); virtual int components(); - SkDisplayable* deepCopy(SkAnimateMaker* ) SK_OVERRIDE; - void dirty() SK_OVERRIDE; + SkDisplayable* deepCopy(SkAnimateMaker* ) override; + void dirty() override; #ifdef SK_DUMP_ENABLED - void dump(SkAnimateMaker* ) SK_OVERRIDE; + void dump(SkAnimateMaker* ) override; #endif int entries() { return fValues.count() / components(); } virtual bool hasExecute() const; bool isDynamic() const { return SkToBool(fDynamic); } - SkDisplayable* getParent() const SK_OVERRIDE; - bool getProperty(int index, SkScriptValue* value) const SK_OVERRIDE; + SkDisplayable* getParent() const override; + bool getProperty(int index, SkScriptValue* value) const override; SkMSec getStart() const { return fStart; } SkOperand* getValues() { return fValues.begin(); } SkDisplayTypes getValuesType() { return fValues.getType(); } - void onEndElement(SkAnimateMaker& ) SK_OVERRIDE; + void onEndElement(SkAnimateMaker& ) override; void packARGB(SkScalar [], int count, SkTDOperandArray* ); virtual void refresh(SkAnimateMaker& ); void setChanged(bool changed) { fChanged = changed; } void setHasEndEvent() { fHasEndEvent = true; } - bool setParent(SkDisplayable* ) SK_OVERRIDE; - bool setProperty(int index, SkScriptValue& value) SK_OVERRIDE; + bool setParent(SkDisplayable* ) override; + bool setProperty(int index, SkScriptValue& value) override; void setTarget(SkAnimateMaker& ); virtual bool targetNeedsInitialization() const; protected: diff --git a/src/animator/SkAnimateSet.h b/src/animator/SkAnimateSet.h index c1ccde3b51..32a91979e7 100644 --- a/src/animator/SkAnimateSet.h +++ b/src/animator/SkAnimateSet.h @@ -16,10 +16,10 @@ class SkSet : public SkAnimate { DECLARE_MEMBER_INFO(Set); SkSet(); #ifdef SK_DUMP_ENABLED - void dump(SkAnimateMaker* ) SK_OVERRIDE; + void dump(SkAnimateMaker* ) override; #endif - void onEndElement(SkAnimateMaker& ) SK_OVERRIDE; - void refresh(SkAnimateMaker& ) SK_OVERRIDE; + void onEndElement(SkAnimateMaker& ) override; + void refresh(SkAnimateMaker& ) override; private: typedef SkAnimate INHERITED; }; diff --git a/src/animator/SkDisplayAdd.h b/src/animator/SkDisplayAdd.h index 9e0ff303dc..c106d867b1 100644 --- a/src/animator/SkDisplayAdd.h +++ b/src/animator/SkDisplayAdd.h @@ -22,15 +22,15 @@ class SkAdd : public SkADrawable { kMode_immediate }; - SkDisplayable* deepCopy(SkAnimateMaker* ) SK_OVERRIDE; - bool draw(SkAnimateMaker& ) SK_OVERRIDE; + SkDisplayable* deepCopy(SkAnimateMaker* ) override; + bool draw(SkAnimateMaker& ) override; #ifdef SK_DUMP_ENABLED - void dump(SkAnimateMaker* ) SK_OVERRIDE; + void dump(SkAnimateMaker* ) override; #endif - bool enable(SkAnimateMaker& ) SK_OVERRIDE; - bool hasEnable() const SK_OVERRIDE; - void initialize() SK_OVERRIDE; - bool isDrawable() const SK_OVERRIDE; + bool enable(SkAnimateMaker& ) override; + bool hasEnable() const override; + void initialize() override; + bool isDrawable() const override; protected: // struct _A { Mode mode; diff --git a/src/animator/SkDisplayApply.h b/src/animator/SkDisplayApply.h index 9e7e12f078..12cf6cee7a 100644 --- a/src/animator/SkDisplayApply.h +++ b/src/animator/SkDisplayApply.h @@ -38,41 +38,41 @@ public: void appendActive(SkActive* ); void applyValues(int animatorIndex, SkOperand* values, int count, SkDisplayTypes , SkMSec time); - bool contains(SkDisplayable*) SK_OVERRIDE; + bool contains(SkDisplayable*) override; // void createActive(SkAnimateMaker& ); - SkDisplayable* deepCopy(SkAnimateMaker* ) SK_OVERRIDE; + SkDisplayable* deepCopy(SkAnimateMaker* ) override; void disable(); - bool draw(SkAnimateMaker& ) SK_OVERRIDE; + bool draw(SkAnimateMaker& ) override; #ifdef SK_DUMP_ENABLED - void dump(SkAnimateMaker* ) SK_OVERRIDE; + void dump(SkAnimateMaker* ) override; #endif - bool enable(SkAnimateMaker& ) SK_OVERRIDE; + bool enable(SkAnimateMaker& ) override; void enableCreate(SkAnimateMaker& ); void enableDynamic(SkAnimateMaker& ); void endSave(int index); Mode getMode() { return mode; } - bool getProperty(int index, SkScriptValue* value) const SK_OVERRIDE; + bool getProperty(int index, SkScriptValue* value) const override; SkADrawable* getScope() { return scope; } void getStep(SkScriptValue* ); SkADrawable* getTarget(SkAnimateBase* ); bool hasDelayedAnimator() const; - bool hasEnable() const SK_OVERRIDE; + bool hasEnable() const override; bool inactivate(SkAnimateMaker& maker); - void initialize() SK_OVERRIDE; + void initialize() override; bool interpolate(SkAnimateMaker& , SkMSec time); - void onEndElement(SkAnimateMaker& ) SK_OVERRIDE; - const SkMemberInfo* preferredChild(SkDisplayTypes type) SK_OVERRIDE; + void onEndElement(SkAnimateMaker& ) override; + const SkMemberInfo* preferredChild(SkDisplayTypes type) override; void refresh(SkAnimateMaker& ); void reset(); - bool resolveIDs(SkAnimateMaker& maker, SkDisplayable* original, SkApply* ) SK_OVERRIDE; + bool resolveIDs(SkAnimateMaker& maker, SkDisplayable* original, SkApply* ) override; bool resolveField(SkAnimateMaker& , SkDisplayable* parent, SkString* str); void save(int index); void setEmbedded() { fEmbedded = true; } - bool setProperty(int index, SkScriptValue& ) SK_OVERRIDE; - void setSteps(int _steps) SK_OVERRIDE; + bool setProperty(int index, SkScriptValue& ) override; + void setSteps(int _steps) override; // virtual void setTime(SkMSec time); #ifdef SK_DEBUG - void validate() SK_OVERRIDE; + void validate() override; #endif private: SkMSec begin; diff --git a/src/animator/SkDisplayBounds.h b/src/animator/SkDisplayBounds.h index 4c21871433..547a29e810 100644 --- a/src/animator/SkDisplayBounds.h +++ b/src/animator/SkDisplayBounds.h @@ -15,7 +15,7 @@ class SkDisplayBounds : public SkDrawRect { DECLARE_DISPLAY_MEMBER_INFO(Bounds); SkDisplayBounds(); - bool draw(SkAnimateMaker& ) SK_OVERRIDE; + bool draw(SkAnimateMaker& ) override; private: SkBool inval; typedef SkDrawRect INHERITED; diff --git a/src/animator/SkDisplayEvent.h b/src/animator/SkDisplayEvent.h index 4da49b989f..d223771a7d 100644 --- a/src/animator/SkDisplayEvent.h +++ b/src/animator/SkDisplayEvent.h @@ -34,17 +34,17 @@ class SkDisplayEvent : public SkDisplayable { }; SkDisplayEvent(); virtual ~SkDisplayEvent(); - bool addChild(SkAnimateMaker& , SkDisplayable* child) SK_OVERRIDE; - bool contains(SkDisplayable*) SK_OVERRIDE; - SkDisplayable* contains(const SkString& ) SK_OVERRIDE; + bool addChild(SkAnimateMaker& , SkDisplayable* child) override; + bool contains(SkDisplayable*) override; + SkDisplayable* contains(const SkString& ) override; #ifdef SK_DEBUG void dumpEvent(SkAnimateMaker* ); #endif bool enableEvent(SkAnimateMaker& ); - bool getProperty(int index, SkScriptValue* ) const SK_OVERRIDE; - void onEndElement(SkAnimateMaker& maker) SK_OVERRIDE; + bool getProperty(int index, SkScriptValue* ) const override; + void onEndElement(SkAnimateMaker& maker) override; void populateInput(SkAnimateMaker& , const SkEvent& fEvent); - bool setProperty(int index, SkScriptValue& ) SK_OVERRIDE; + bool setProperty(int index, SkScriptValue& ) override; protected: SkKey code; SkBool disable; diff --git a/src/animator/SkDisplayInclude.h b/src/animator/SkDisplayInclude.h index 1b6580a6f4..cc87dfa7cf 100644 --- a/src/animator/SkDisplayInclude.h +++ b/src/animator/SkDisplayInclude.h @@ -15,9 +15,9 @@ class SkInclude : public SkDisplayable { DECLARE_MEMBER_INFO(Include); - void onEndElement(SkAnimateMaker & ) SK_OVERRIDE; - bool enable(SkAnimateMaker & ) SK_OVERRIDE; - bool hasEnable() const SK_OVERRIDE; + void onEndElement(SkAnimateMaker & ) override; + bool enable(SkAnimateMaker & ) override; + bool hasEnable() const override; protected: SkString src; }; diff --git a/src/animator/SkDisplayInput.h b/src/animator/SkDisplayInput.h index 8eba70947b..b9a1bac91b 100644 --- a/src/animator/SkDisplayInput.h +++ b/src/animator/SkDisplayInput.h @@ -16,10 +16,10 @@ class SkInput : public SkDisplayable { DECLARE_MEMBER_INFO(Input); SkInput(); - SkDisplayable* contains(const SkString& ) SK_OVERRIDE; - bool getProperty(int index, SkScriptValue* value) const SK_OVERRIDE; - bool enable(SkAnimateMaker & ) SK_OVERRIDE; - bool hasEnable() const SK_OVERRIDE; + SkDisplayable* contains(const SkString& ) override; + bool getProperty(int index, SkScriptValue* value) const override; + bool enable(SkAnimateMaker & ) override; + bool hasEnable() const override; protected: SkString name; int32_t fInt; diff --git a/src/animator/SkDisplayMath.h b/src/animator/SkDisplayMath.h index 05c1fe46b7..4204e26bb5 100644 --- a/src/animator/SkDisplayMath.h +++ b/src/animator/SkDisplayMath.h @@ -18,9 +18,9 @@ class SkDisplayMath : public SkDisplayable { DECLARE_DISPLAY_MEMBER_INFO(Math); virtual void executeFunction(SkDisplayable* , int index, SkTDArray& parameters, SkDisplayTypes type, - SkScriptValue* ) SK_OVERRIDE; - const SkFunctionParamType* getFunctionsParameters() SK_OVERRIDE; - bool getProperty(int index, SkScriptValue* value) const SK_OVERRIDE; + SkScriptValue* ) override; + const SkFunctionParamType* getFunctionsParameters() override; + bool getProperty(int index, SkScriptValue* value) const override; private: mutable SkRandom fRandom; static const SkScalar gConstants[]; diff --git a/src/animator/SkDisplayMovie.h b/src/animator/SkDisplayMovie.h index c1f184d8fe..76e2d9ccc7 100644 --- a/src/animator/SkDisplayMovie.h +++ b/src/animator/SkDisplayMovie.h @@ -21,21 +21,21 @@ class SkDisplayMovie : public SkADrawable { SkDisplayMovie(); virtual ~SkDisplayMovie(); void buildMovie(); - SkDisplayable* deepCopy(SkAnimateMaker* ) SK_OVERRIDE; - void dirty() SK_OVERRIDE; + SkDisplayable* deepCopy(SkAnimateMaker* ) override; + void dirty() override; bool doEvent(const SkEvent& evt) { return fLoaded && fMovie.doEvent(evt); } - bool doEvent(SkDisplayEvent::Kind , SkEventState* state ) SK_OVERRIDE; - bool draw(SkAnimateMaker& ) SK_OVERRIDE; + bool doEvent(SkDisplayEvent::Kind , SkEventState* state ) override; + bool draw(SkAnimateMaker& ) override; #ifdef SK_DUMP_ENABLED - void dump(SkAnimateMaker* ) SK_OVERRIDE; - void dumpEvents() SK_OVERRIDE; + void dump(SkAnimateMaker* ) override; + void dumpEvents() override; #endif - bool enable(SkAnimateMaker& ) SK_OVERRIDE; + bool enable(SkAnimateMaker& ) override; const SkAnimator* getAnimator() const { return &fMovie; } - bool hasEnable() const SK_OVERRIDE; - void onEndElement(SkAnimateMaker& ) SK_OVERRIDE; + bool hasEnable() const override; + void onEndElement(SkAnimateMaker& ) override; protected: SkString src; SkAnimator fMovie; diff --git a/src/animator/SkDisplayNumber.h b/src/animator/SkDisplayNumber.h index 92f0fa3a03..b92c311439 100644 --- a/src/animator/SkDisplayNumber.h +++ b/src/animator/SkDisplayNumber.h @@ -15,7 +15,7 @@ class SkDisplayNumber : public SkDisplayable { DECLARE_DISPLAY_MEMBER_INFO(Number); - bool getProperty(int index, SkScriptValue* value) const SK_OVERRIDE; + bool getProperty(int index, SkScriptValue* value) const override; private: }; diff --git a/src/animator/SkDisplayPost.h b/src/animator/SkDisplayPost.h index c6c4b51660..80fdcfcdd8 100644 --- a/src/animator/SkDisplayPost.h +++ b/src/animator/SkDisplayPost.h @@ -27,17 +27,17 @@ class SkPost : public SkDisplayable { }; SkPost(); virtual ~SkPost(); - bool addChild(SkAnimateMaker& , SkDisplayable* child) SK_OVERRIDE; - bool childrenNeedDisposing() const SK_OVERRIDE; - void dirty() SK_OVERRIDE; + bool addChild(SkAnimateMaker& , SkDisplayable* child) override; + bool childrenNeedDisposing() const override; + void dirty() override; #ifdef SK_DUMP_ENABLED - void dump(SkAnimateMaker* ) SK_OVERRIDE; + void dump(SkAnimateMaker* ) override; #endif - bool enable(SkAnimateMaker& ) SK_OVERRIDE; - bool hasEnable() const SK_OVERRIDE; - void onEndElement(SkAnimateMaker& ) SK_OVERRIDE; - void setChildHasID() SK_OVERRIDE; - bool setProperty(int index, SkScriptValue& ) SK_OVERRIDE; + bool enable(SkAnimateMaker& ) override; + bool hasEnable() const override; + void onEndElement(SkAnimateMaker& ) override; + void setChildHasID() override; + bool setProperty(int index, SkScriptValue& ) override; protected: SkMSec delay; SkString sink; diff --git a/src/animator/SkDisplayRandom.h b/src/animator/SkDisplayRandom.h index 6a04f59b6e..2999156268 100644 --- a/src/animator/SkDisplayRandom.h +++ b/src/animator/SkDisplayRandom.h @@ -26,10 +26,10 @@ class SkDisplayRandom : public SkDisplayable { DECLARE_DISPLAY_MEMBER_INFO(Random); SkDisplayRandom(); #ifdef SK_DUMP_ENABLED - void dump(SkAnimateMaker* ) SK_OVERRIDE; + void dump(SkAnimateMaker* ) override; #endif - bool getProperty(int index, SkScriptValue* value) const SK_OVERRIDE; - bool setProperty(int index, SkScriptValue& ) SK_OVERRIDE; + bool getProperty(int index, SkScriptValue* value) const override; + bool setProperty(int index, SkScriptValue& ) override; private: SkScalar blend; SkScalar min; diff --git a/src/animator/SkDisplayTypes.h b/src/animator/SkDisplayTypes.h index a9432dadf1..d1c937f6a6 100644 --- a/src/animator/SkDisplayTypes.h +++ b/src/animator/SkDisplayTypes.h @@ -34,7 +34,7 @@ class SkDisplayBoolean : public SkDisplayDepend { DECLARE_DISPLAY_MEMBER_INFO(Boolean); SkDisplayBoolean(); #ifdef SK_DUMP_ENABLED - void dump(SkAnimateMaker* ) SK_OVERRIDE; + void dump(SkAnimateMaker* ) override; #endif SkBool value; friend class SkAnimatorScript; @@ -47,7 +47,7 @@ class SkDisplayInt : public SkDisplayDepend { DECLARE_DISPLAY_MEMBER_INFO(Int); SkDisplayInt(); #ifdef SK_DUMP_ENABLED - void dump(SkAnimateMaker* ) SK_OVERRIDE; + void dump(SkAnimateMaker* ) override; #endif private: int32_t value; @@ -61,7 +61,7 @@ class SkDisplayFloat : public SkDisplayDepend { DECLARE_DISPLAY_MEMBER_INFO(Float); SkDisplayFloat(); #ifdef SK_DUMP_ENABLED - void dump(SkAnimateMaker* ) SK_OVERRIDE; + void dump(SkAnimateMaker* ) override; #endif private: SkScalar value; @@ -77,9 +77,9 @@ class SkDisplayString : public SkDisplayDepend { SkDisplayString(SkString& ); virtual void executeFunction(SkDisplayable* , int index, SkTDArray& parameters, SkDisplayTypes type, - SkScriptValue* ) SK_OVERRIDE; - const SkFunctionParamType* getFunctionsParameters() SK_OVERRIDE; - bool getProperty(int index, SkScriptValue* ) const SK_OVERRIDE; + SkScriptValue* ) override; + const SkFunctionParamType* getFunctionsParameters() override; + bool getProperty(int index, SkScriptValue* ) const override; SkString value; private: static const SkFunctionParamType fFunctionParameters[]; @@ -91,7 +91,7 @@ class SkDisplayArray : public SkDisplayDepend { SkDisplayArray(SkTypedArray& ); SkDisplayArray(SkOpArray& ); // compiled script experiment virtual ~SkDisplayArray(); - bool getProperty(int index, SkScriptValue* ) const SK_OVERRIDE; + bool getProperty(int index, SkScriptValue* ) const override; private: SkTypedArray values; friend class SkAnimator; diff --git a/src/animator/SkDraw3D.h b/src/animator/SkDraw3D.h index 5f066ba65f..e30dc11220 100644 --- a/src/animator/SkDraw3D.h +++ b/src/animator/SkDraw3D.h @@ -27,7 +27,7 @@ class Sk3D_Camera : public SkADrawable { DECLARE_MEMBER_INFO(3D_Camera); Sk3D_Camera(); virtual ~Sk3D_Camera(); - bool draw(SkAnimateMaker& ) SK_OVERRIDE; + bool draw(SkAnimateMaker& ) override; private: SkScalar hackWidth; SkScalar hackHeight; @@ -40,8 +40,8 @@ class Sk3D_Patch : public SkDisplayable { private: virtual void executeFunction(SkDisplayable* , int index, SkTDArray& parameters, SkDisplayTypes type, - SkScriptValue* ) SK_OVERRIDE; - const SkFunctionParamType* getFunctionsParameters() SK_OVERRIDE; + SkScriptValue* ) override; + const SkFunctionParamType* getFunctionsParameters() override; SkPatch3D fPatch; static const SkFunctionParamType fFunctionParameters[]; friend class Sk3D_Camera; diff --git a/src/animator/SkDrawBitmap.h b/src/animator/SkDrawBitmap.h index a1b74b6502..270545d0ee 100644 --- a/src/animator/SkDrawBitmap.h +++ b/src/animator/SkDrawBitmap.h @@ -20,7 +20,7 @@ class SkBaseBitmap : public SkBoundable { DECLARE_MEMBER_INFO(BaseBitmap); SkBaseBitmap(); virtual ~SkBaseBitmap(); - bool draw(SkAnimateMaker& ) SK_OVERRIDE; + bool draw(SkAnimateMaker& ) override; protected: SkBitmap fBitmap; SkScalar x; @@ -36,10 +36,10 @@ class SkDrawBitmap : public SkBaseBitmap { SkDrawBitmap(); virtual ~SkDrawBitmap(); #ifdef SK_DUMP_ENABLED - void dump(SkAnimateMaker* ) SK_OVERRIDE; + void dump(SkAnimateMaker* ) override; #endif - void onEndElement(SkAnimateMaker& ) SK_OVERRIDE; - bool setProperty(int index, SkScriptValue& value) SK_OVERRIDE; + void onEndElement(SkAnimateMaker& ) override; + bool setProperty(int index, SkScriptValue& value) override; protected: int /*SkBitmap::Config*/ format; int32_t height; @@ -54,11 +54,11 @@ class SkImageBaseBitmap : public SkBaseBitmap { DECLARE_MEMBER_INFO(ImageBaseBitmap); SkImageBaseBitmap(); virtual ~SkImageBaseBitmap(); - SkDisplayable* deepCopy(SkAnimateMaker* ) SK_OVERRIDE; - void dirty() SK_OVERRIDE; - bool draw(SkAnimateMaker& ) SK_OVERRIDE; - bool getProperty(int index, SkScriptValue* value) const SK_OVERRIDE; - void onEndElement(SkAnimateMaker& maker) SK_OVERRIDE; + SkDisplayable* deepCopy(SkAnimateMaker* ) override; + void dirty() override; + bool draw(SkAnimateMaker& ) override; + bool getProperty(int index, SkScriptValue* value) const override; + void onEndElement(SkAnimateMaker& maker) override; private: void resolve() const { (const_cast(this))->resolve(); } void resolve(); diff --git a/src/animator/SkDrawBlur.h b/src/animator/SkDrawBlur.h index 56f29db295..d3a528c22f 100644 --- a/src/animator/SkDrawBlur.h +++ b/src/animator/SkDrawBlur.h @@ -14,7 +14,7 @@ class SkDrawBlur : public SkDrawMaskFilter { DECLARE_DRAW_MEMBER_INFO(Blur); SkDrawBlur(); - SkMaskFilter* getMaskFilter() SK_OVERRIDE; + SkMaskFilter* getMaskFilter() override; protected: SkScalar fSigma; int /*SkBlurStyle*/ fBlurStyle; diff --git a/src/animator/SkDrawClip.h b/src/animator/SkDrawClip.h index 54c8651fa8..6c64f93f22 100644 --- a/src/animator/SkDrawClip.h +++ b/src/animator/SkDrawClip.h @@ -20,7 +20,7 @@ class SkDrawRect; class SkDrawClip : public SkADrawable { DECLARE_DRAW_MEMBER_INFO(Clip); SkDrawClip(); - bool draw(SkAnimateMaker& ) SK_OVERRIDE; + bool draw(SkAnimateMaker& ) override; private: SkDrawRect* rect; SkDrawPath* path; diff --git a/src/animator/SkDrawColor.h b/src/animator/SkDrawColor.h index b5b4f2d5d6..14788e45ba 100644 --- a/src/animator/SkDrawColor.h +++ b/src/animator/SkDrawColor.h @@ -14,18 +14,18 @@ class SkDrawColor : public SkPaintPart { DECLARE_DRAW_MEMBER_INFO(Color); SkDrawColor(); - bool add() SK_OVERRIDE; - void dirty() SK_OVERRIDE; + bool add() override; + void dirty() override; #ifdef SK_DUMP_ENABLED - void dump(SkAnimateMaker* ) SK_OVERRIDE; + void dump(SkAnimateMaker* ) override; #endif SkColor getColor(); - SkDisplayable* deepCopy(SkAnimateMaker* ) SK_OVERRIDE; - SkDisplayable* getParent() const SK_OVERRIDE; - bool getProperty(int index, SkScriptValue* value) const SK_OVERRIDE; - void onEndElement(SkAnimateMaker& ) SK_OVERRIDE; - bool setParent(SkDisplayable* parent) SK_OVERRIDE; - bool setProperty(int index, SkScriptValue&) SK_OVERRIDE; + SkDisplayable* deepCopy(SkAnimateMaker* ) override; + SkDisplayable* getParent() const override; + bool getProperty(int index, SkScriptValue* value) const override; + void onEndElement(SkAnimateMaker& ) override; + bool setParent(SkDisplayable* parent) override; + bool setProperty(int index, SkScriptValue&) override; protected: SkColor color; SkScalar fHue; diff --git a/src/animator/SkDrawDash.h b/src/animator/SkDrawDash.h index fa020c2a6b..3083fe8124 100644 --- a/src/animator/SkDrawDash.h +++ b/src/animator/SkDrawDash.h @@ -15,7 +15,7 @@ class SkDash : public SkDrawPathEffect { DECLARE_MEMBER_INFO(Dash); SkDash(); virtual ~SkDash(); - SkPathEffect* getPathEffect() SK_OVERRIDE; + SkPathEffect* getPathEffect() override; private: SkTDScalarArray intervals; SkScalar phase; diff --git a/src/animator/SkDrawDiscrete.h b/src/animator/SkDrawDiscrete.h index ea44199f1e..fe13f268b2 100644 --- a/src/animator/SkDrawDiscrete.h +++ b/src/animator/SkDrawDiscrete.h @@ -13,7 +13,7 @@ class SkDiscrete : public SkDrawPathEffect { DECLARE_MEMBER_INFO(Discrete); SkDiscrete(); - SkPathEffect* getPathEffect() SK_OVERRIDE; + SkPathEffect* getPathEffect() override; private: SkScalar deviation; SkScalar segLength; diff --git a/src/animator/SkDrawEmboss.h b/src/animator/SkDrawEmboss.h index 6ffe207f7c..941be61e20 100644 --- a/src/animator/SkDrawEmboss.h +++ b/src/animator/SkDrawEmboss.h @@ -15,7 +15,7 @@ class SkDrawEmboss : public SkDrawMaskFilter { DECLARE_DRAW_MEMBER_INFO(Emboss); SkDrawEmboss(); - SkMaskFilter* getMaskFilter() SK_OVERRIDE; + SkMaskFilter* getMaskFilter() override; protected: SkTDScalarArray fDirection; SkScalar fSigma; diff --git a/src/animator/SkDrawExtraPathEffect.cpp b/src/animator/SkDrawExtraPathEffect.cpp index b13429e07f..68b5006ed3 100644 --- a/src/animator/SkDrawExtraPathEffect.cpp +++ b/src/animator/SkDrawExtraPathEffect.cpp @@ -20,8 +20,8 @@ class SkDrawShapePathEffect : public SkDrawPathEffect { DECLARE_PRIVATE_MEMBER_INFO(DrawShapePathEffect); SkDrawShapePathEffect(); virtual ~SkDrawShapePathEffect(); - bool addChild(SkAnimateMaker& , SkDisplayable* ) SK_OVERRIDE; - SkPathEffect* getPathEffect() SK_OVERRIDE; + bool addChild(SkAnimateMaker& , SkDisplayable* ) override; + SkPathEffect* getPathEffect() override; protected: SkADrawable* addPath; SkADrawable* addMatrix; @@ -35,7 +35,7 @@ class SkDrawShape1DPathEffect : public SkDrawShapePathEffect { DECLARE_EXTRAS_MEMBER_INFO(SkDrawShape1DPathEffect); SkDrawShape1DPathEffect(SkDisplayTypes ); virtual ~SkDrawShape1DPathEffect(); - void onEndElement(SkAnimateMaker& ) SK_OVERRIDE; + void onEndElement(SkAnimateMaker& ) override; private: SkString phase; SkString spacing; @@ -47,7 +47,7 @@ class SkDrawShape2DPathEffect : public SkDrawShapePathEffect { DECLARE_EXTRAS_MEMBER_INFO(SkDrawShape2DPathEffect); SkDrawShape2DPathEffect(SkDisplayTypes ); virtual ~SkDrawShape2DPathEffect(); - void onEndElement(SkAnimateMaker& ) SK_OVERRIDE; + void onEndElement(SkAnimateMaker& ) override; private: SkDrawMatrix* matrix; friend class SkShape2DPathEffect; @@ -58,9 +58,9 @@ class SkDrawComposePathEffect : public SkDrawPathEffect { DECLARE_EXTRAS_MEMBER_INFO(SkDrawComposePathEffect); SkDrawComposePathEffect(SkDisplayTypes ); virtual ~SkDrawComposePathEffect(); - bool addChild(SkAnimateMaker& , SkDisplayable* ) SK_OVERRIDE; - SkPathEffect* getPathEffect() SK_OVERRIDE; - bool isPaint() const SK_OVERRIDE; + bool addChild(SkAnimateMaker& , SkDisplayable* ) override; + SkPathEffect* getPathEffect() override; + bool isPaint() const override; private: SkDrawPathEffect* effect1; SkDrawPathEffect* effect2; @@ -70,7 +70,7 @@ class SkDrawCornerPathEffect : public SkDrawPathEffect { DECLARE_EXTRAS_MEMBER_INFO(SkDrawCornerPathEffect); SkDrawCornerPathEffect(SkDisplayTypes ); virtual ~SkDrawCornerPathEffect(); - SkPathEffect* getPathEffect() SK_OVERRIDE; + SkPathEffect* getPathEffect() override; private: SkScalar radius; }; @@ -90,10 +90,10 @@ public: } // For serialization. This will never be called. - Factory getFactory() const SK_OVERRIDE { sk_throw(); return NULL; } + Factory getFactory() const override { sk_throw(); return NULL; } protected: - SkScalar begin(SkScalar contourLength) const SK_OVERRIDE { + SkScalar begin(SkScalar contourLength) const override { SkScriptValue value; SkAnimatorScript engine(*fMaker, NULL, SkType_Float); engine.propertyCallBack(GetContourLength, &contourLength); @@ -102,7 +102,7 @@ protected: return value.fOperand.fScalar; } - SkScalar next(SkPath* dst, SkScalar distance, SkPathMeasure&) const SK_OVERRIDE { + SkScalar next(SkPath* dst, SkScalar distance, SkPathMeasure&) const override { fMaker->setExtraPropertyCallBack(fDraw->fType, GetDistance, &distance); SkDrawPath* drawPath = NULL; if (fDraw->addPath->isPath()) { @@ -140,7 +140,7 @@ protected: } #ifndef SK_IGNORE_TO_STRING - void toString(SkString* str) const SK_OVERRIDE { + void toString(SkString* str) const override { str->appendf("SkShape1DPathEffect: ("); // TODO: fill in str->appendf(")"); @@ -238,14 +238,14 @@ public: } // For serialization. This will never be called. - Factory getFactory() const SK_OVERRIDE { sk_throw(); return NULL; } + Factory getFactory() const override { sk_throw(); return NULL; } protected: - void begin(const SkIRect& uvBounds, SkPath*) const SK_OVERRIDE { + void begin(const SkIRect& uvBounds, SkPath*) const override { const_cast(this)->setUVBounds(uvBounds); } - void next(const SkPoint& loc, int u, int v, SkPath* dst) const SK_OVERRIDE { + void next(const SkPoint& loc, int u, int v, SkPath* dst) const override { const_cast(this)->addPath(loc, u, v, dst); } diff --git a/src/animator/SkDrawFull.h b/src/animator/SkDrawFull.h index 029fb33394..8a79c4dbae 100644 --- a/src/animator/SkDrawFull.h +++ b/src/animator/SkDrawFull.h @@ -14,7 +14,7 @@ class SkFull : public SkBoundable { DECLARE_EMPTY_MEMBER_INFO(Full); - bool draw(SkAnimateMaker& ) SK_OVERRIDE; + bool draw(SkAnimateMaker& ) override; private: typedef SkBoundable INHERITED; }; diff --git a/src/animator/SkDrawGradient.h b/src/animator/SkDrawGradient.h index d6dd14491c..87df37624c 100644 --- a/src/animator/SkDrawGradient.h +++ b/src/animator/SkDrawGradient.h @@ -18,11 +18,11 @@ class SkDrawGradient : public SkDrawShader { DECLARE_PRIVATE_MEMBER_INFO(DrawGradient); SkDrawGradient(); virtual ~SkDrawGradient(); - bool addChild(SkAnimateMaker& , SkDisplayable* child) SK_OVERRIDE; + bool addChild(SkAnimateMaker& , SkDisplayable* child) override; #ifdef SK_DUMP_ENABLED virtual void dumpRest(SkAnimateMaker*); #endif - void onEndElement(SkAnimateMaker& ) SK_OVERRIDE; + void onEndElement(SkAnimateMaker& ) override; protected: SkTDScalarArray offsets; SkString unitMapper; @@ -36,11 +36,11 @@ private: class SkDrawLinearGradient : public SkDrawGradient { DECLARE_MEMBER_INFO(DrawLinearGradient); SkDrawLinearGradient(); - void onEndElement(SkAnimateMaker& ) SK_OVERRIDE; + void onEndElement(SkAnimateMaker& ) override; #ifdef SK_DUMP_ENABLED - void dump(SkAnimateMaker*) SK_OVERRIDE; + void dump(SkAnimateMaker*) override; #endif - SkShader* getShader() SK_OVERRIDE; + SkShader* getShader() override; protected: SkTDScalarArray points; private: @@ -51,9 +51,9 @@ class SkDrawRadialGradient : public SkDrawGradient { DECLARE_MEMBER_INFO(DrawRadialGradient); SkDrawRadialGradient(); #ifdef SK_DUMP_ENABLED - void dump(SkAnimateMaker*) SK_OVERRIDE; + void dump(SkAnimateMaker*) override; #endif - SkShader* getShader() SK_OVERRIDE; + SkShader* getShader() override; protected: SkPoint center; SkScalar radius; diff --git a/src/animator/SkDrawGroup.h b/src/animator/SkDrawGroup.h index 5d33dfe596..83e6771d2d 100644 --- a/src/animator/SkDrawGroup.h +++ b/src/animator/SkDrawGroup.h @@ -19,35 +19,35 @@ public: DECLARE_MEMBER_INFO(Group); SkGroup(); virtual ~SkGroup(); - bool addChild(SkAnimateMaker& , SkDisplayable* child) SK_OVERRIDE; - bool contains(SkDisplayable* ) SK_OVERRIDE; + bool addChild(SkAnimateMaker& , SkDisplayable* child) override; + bool contains(SkDisplayable* ) override; SkGroup* copy(); SkBool copySet(int index); - SkDisplayable* deepCopy(SkAnimateMaker* ) SK_OVERRIDE; - bool doEvent(SkDisplayEvent::Kind , SkEventState* state ) SK_OVERRIDE; - bool draw(SkAnimateMaker& ) SK_OVERRIDE; + SkDisplayable* deepCopy(SkAnimateMaker* ) override; + bool doEvent(SkDisplayEvent::Kind , SkEventState* state ) override; + bool draw(SkAnimateMaker& ) override; #ifdef SK_DUMP_ENABLED - void dump(SkAnimateMaker* ) SK_OVERRIDE; + void dump(SkAnimateMaker* ) override; virtual void dumpDrawables(SkAnimateMaker* ); - void dumpEvents() SK_OVERRIDE; + void dumpEvents() override; #endif int findGroup(SkADrawable* drawable, SkTDDrawableArray** list, SkGroup** parent, SkGroup** found, SkTDDrawableArray** grandList); - bool enable(SkAnimateMaker& ) SK_OVERRIDE; + bool enable(SkAnimateMaker& ) override; SkTDDrawableArray* getChildren() { return &fChildren; } SkGroup* getOriginal() { return fOriginal; } - bool hasEnable() const SK_OVERRIDE; - void initialize() SK_OVERRIDE; + bool hasEnable() const override; + void initialize() override; SkBool isACopy() { return fOriginal != NULL; } void markCopyClear(int index); void markCopySet(int index); void markCopySize(int index); bool markedForDelete(int index) const { return (fCopies[index >> 5] & 1 << (index & 0x1f)) == 0; } void reset(); - bool resolveIDs(SkAnimateMaker& maker, SkDisplayable* original, SkApply* ) SK_OVERRIDE; - void setSteps(int steps) SK_OVERRIDE; + bool resolveIDs(SkAnimateMaker& maker, SkDisplayable* original, SkApply* ) override; + void setSteps(int steps) override; #ifdef SK_DEBUG - void validate() SK_OVERRIDE; + void validate() override; #endif protected: bool ifCondition(SkAnimateMaker& maker, SkADrawable* drawable, @@ -64,7 +64,7 @@ private: class SkSave: public SkGroup { DECLARE_MEMBER_INFO(Save); - bool draw(SkAnimateMaker& ) SK_OVERRIDE; + bool draw(SkAnimateMaker& ) override; private: typedef SkGroup INHERITED; }; diff --git a/src/animator/SkDrawLine.h b/src/animator/SkDrawLine.h index 7367aab643..996964a89a 100644 --- a/src/animator/SkDrawLine.h +++ b/src/animator/SkDrawLine.h @@ -16,7 +16,7 @@ class SkLine : public SkBoundable { DECLARE_MEMBER_INFO(Line); SkLine(); - bool draw(SkAnimateMaker& ) SK_OVERRIDE; + bool draw(SkAnimateMaker& ) override; private: SkScalar x1; SkScalar x2; diff --git a/src/animator/SkDrawMatrix.h b/src/animator/SkDrawMatrix.h index d5e19a59e9..df17a9b757 100644 --- a/src/animator/SkDrawMatrix.h +++ b/src/animator/SkDrawMatrix.h @@ -21,25 +21,25 @@ class SkDrawMatrix : public SkADrawable { DECLARE_DRAW_MEMBER_INFO(Matrix); SkDrawMatrix(); virtual ~SkDrawMatrix(); - bool addChild(SkAnimateMaker& , SkDisplayable* child) SK_OVERRIDE; - bool childrenNeedDisposing() const SK_OVERRIDE; - void dirty() SK_OVERRIDE; - bool draw(SkAnimateMaker& ) SK_OVERRIDE; + bool addChild(SkAnimateMaker& , SkDisplayable* child) override; + bool childrenNeedDisposing() const override; + void dirty() override; + bool draw(SkAnimateMaker& ) override; #ifdef SK_DUMP_ENABLED - void dump(SkAnimateMaker* ) SK_OVERRIDE; + void dump(SkAnimateMaker* ) override; #endif SkMatrix& getMatrix(); - bool getProperty(int index, SkScriptValue* value) const SK_OVERRIDE; - void initialize() SK_OVERRIDE; - void onEndElement(SkAnimateMaker& ) SK_OVERRIDE; - void setChildHasID() SK_OVERRIDE; - bool setProperty(int index, SkScriptValue& ) SK_OVERRIDE; + bool getProperty(int index, SkScriptValue* value) const override; + void initialize() override; + void onEndElement(SkAnimateMaker& ) override; + void setChildHasID() override; + bool setProperty(int index, SkScriptValue& ) override; void concat(SkMatrix& inMatrix) { fConcat.preConcat(inMatrix); } - SkDisplayable* deepCopy(SkAnimateMaker* ) SK_OVERRIDE; + SkDisplayable* deepCopy(SkAnimateMaker* ) override; void rotate(SkScalar degrees, SkPoint& center) { diff --git a/src/animator/SkDrawOval.h b/src/animator/SkDrawOval.h index 03b0270367..e4d4712223 100644 --- a/src/animator/SkDrawOval.h +++ b/src/animator/SkDrawOval.h @@ -14,7 +14,7 @@ class SkOval : public SkDrawRect { DECLARE_MEMBER_INFO(Oval); - bool draw(SkAnimateMaker& ) SK_OVERRIDE; + bool draw(SkAnimateMaker& ) override; private: typedef SkDrawRect INHERITED; }; diff --git a/src/animator/SkDrawPaint.h b/src/animator/SkDrawPaint.h index e2be340ef2..8c29fb3acb 100644 --- a/src/animator/SkDrawPaint.h +++ b/src/animator/SkDrawPaint.h @@ -27,17 +27,17 @@ class SkDrawPaint : public SkADrawable { SkDrawPaint(); virtual ~SkDrawPaint(); virtual bool add(SkAnimateMaker* , SkDisplayable* child); - SkDisplayable* deepCopy(SkAnimateMaker* ) SK_OVERRIDE; - bool draw(SkAnimateMaker& ) SK_OVERRIDE; + SkDisplayable* deepCopy(SkAnimateMaker* ) override; + bool draw(SkAnimateMaker& ) override; #ifdef SK_DUMP_ENABLED - void dump(SkAnimateMaker* ) SK_OVERRIDE; + void dump(SkAnimateMaker* ) override; #endif virtual void executeFunction(SkDisplayable* target, int index, SkTDArray& parameters, SkDisplayTypes type, - SkScriptValue* ) SK_OVERRIDE; - const SkFunctionParamType* getFunctionsParameters() SK_OVERRIDE; - bool getProperty(int index, SkScriptValue* value) const SK_OVERRIDE; - bool resolveIDs(SkAnimateMaker& maker, SkDisplayable* original, SkApply* apply) SK_OVERRIDE; + SkScriptValue* ) override; + const SkFunctionParamType* getFunctionsParameters() override; + bool getProperty(int index, SkScriptValue* value) const override; + bool resolveIDs(SkAnimateMaker& maker, SkDisplayable* original, SkApply* apply) override; protected: static const SkFunctionParamType fFunctionParameters[]; void setupPaint(SkPaint* paint) const; diff --git a/src/animator/SkDrawPath.h b/src/animator/SkDrawPath.h index d64195b0cb..81978fb7d0 100644 --- a/src/animator/SkDrawPath.h +++ b/src/animator/SkDrawPath.h @@ -19,22 +19,22 @@ class SkDrawPath : public SkBoundable { DECLARE_DRAW_MEMBER_INFO(Path); SkDrawPath(); virtual ~SkDrawPath(); - bool addChild(SkAnimateMaker& , SkDisplayable* child) SK_OVERRIDE; + bool addChild(SkAnimateMaker& , SkDisplayable* child) override; bool childHasID() { return SkToBool(fChildHasID); } - bool childrenNeedDisposing() const SK_OVERRIDE; - void dirty() SK_OVERRIDE; - bool draw(SkAnimateMaker& ) SK_OVERRIDE; - SkDisplayable* getParent() const SK_OVERRIDE; + bool childrenNeedDisposing() const override; + void dirty() override; + bool draw(SkAnimateMaker& ) override; + SkDisplayable* getParent() const override; #ifdef SK_DUMP_ENABLED - void dump(SkAnimateMaker* ) SK_OVERRIDE; + void dump(SkAnimateMaker* ) override; #endif SkPath& getPath(); - bool getProperty(int index, SkScriptValue* value) const SK_OVERRIDE; - bool setProperty(int index, SkScriptValue& value) SK_OVERRIDE; - void onEndElement(SkAnimateMaker& ) SK_OVERRIDE; - void setChildHasID() SK_OVERRIDE; - bool setParent(SkDisplayable* parent) SK_OVERRIDE; - bool isPath() const SK_OVERRIDE { return true; } + bool getProperty(int index, SkScriptValue* value) const override; + bool setProperty(int index, SkScriptValue& value) override; + void onEndElement(SkAnimateMaker& ) override; + void setChildHasID() override; + bool setParent(SkDisplayable* parent) override; + bool isPath() const override { return true; } public: SkPath fPath; protected: @@ -51,8 +51,8 @@ private: class SkPolyline : public SkDrawPath { DECLARE_MEMBER_INFO(Polyline); - bool addChild(SkAnimateMaker& , SkDisplayable*) SK_OVERRIDE; - void onEndElement(SkAnimateMaker& ) SK_OVERRIDE; + bool addChild(SkAnimateMaker& , SkDisplayable*) override; + void onEndElement(SkAnimateMaker& ) override; protected: SkTDScalarArray points; private: @@ -61,7 +61,7 @@ private: class SkPolygon : public SkPolyline { DECLARE_MEMBER_INFO(Polygon); - void onEndElement(SkAnimateMaker& ) SK_OVERRIDE; + void onEndElement(SkAnimateMaker& ) override; private: typedef SkPolyline INHERITED; }; diff --git a/src/animator/SkDrawPoint.h b/src/animator/SkDrawPoint.h index f2077f8fcf..03c8521bdf 100644 --- a/src/animator/SkDrawPoint.h +++ b/src/animator/SkDrawPoint.h @@ -24,7 +24,7 @@ private: class SkDrawPoint : public SkDisplayable { DECLARE_MEMBER_INFO(DrawPoint); SkDrawPoint(); - void getBounds(SkRect* ) SK_OVERRIDE; + void getBounds(SkRect* ) override; private: SkPoint fPoint; typedef SkDisplayable INHERITED; diff --git a/src/animator/SkDrawRectangle.h b/src/animator/SkDrawRectangle.h index 44ed7c477d..036d52ed62 100644 --- a/src/animator/SkDrawRectangle.h +++ b/src/animator/SkDrawRectangle.h @@ -19,15 +19,15 @@ class SkRectToRect; class SkDrawRect : public SkBoundable { DECLARE_DRAW_MEMBER_INFO(Rect); SkDrawRect(); - void dirty() SK_OVERRIDE; - bool draw(SkAnimateMaker& ) SK_OVERRIDE; + void dirty() override; + bool draw(SkAnimateMaker& ) override; #ifdef SK_DUMP_ENABLED - void dump(SkAnimateMaker* ) SK_OVERRIDE; + void dump(SkAnimateMaker* ) override; #endif - SkDisplayable* getParent() const SK_OVERRIDE; - bool getProperty(int index, SkScriptValue* value) const SK_OVERRIDE; - bool setParent(SkDisplayable* parent) SK_OVERRIDE; - bool setProperty(int index, SkScriptValue& ) SK_OVERRIDE; + SkDisplayable* getParent() const override; + bool getProperty(int index, SkScriptValue* value) const override; + bool setParent(SkDisplayable* parent) override; + bool setProperty(int index, SkScriptValue& ) override; protected: SkRect fRect; SkDisplayable* fParent; @@ -41,9 +41,9 @@ private: class SkRoundRect : public SkDrawRect { DECLARE_MEMBER_INFO(RoundRect); SkRoundRect(); - bool draw(SkAnimateMaker& ) SK_OVERRIDE; + bool draw(SkAnimateMaker& ) override; #ifdef SK_DUMP_ENABLED - void dump(SkAnimateMaker* ) SK_OVERRIDE; + void dump(SkAnimateMaker* ) override; #endif protected: SkScalar rx; diff --git a/src/animator/SkDrawSaveLayer.h b/src/animator/SkDrawSaveLayer.h index 1080e81c9c..cb9c9a908e 100644 --- a/src/animator/SkDrawSaveLayer.h +++ b/src/animator/SkDrawSaveLayer.h @@ -20,11 +20,11 @@ class SkSaveLayer : public SkGroup { DECLARE_MEMBER_INFO(SaveLayer); SkSaveLayer(); virtual ~SkSaveLayer(); - bool draw(SkAnimateMaker& ) SK_OVERRIDE; + bool draw(SkAnimateMaker& ) override; #ifdef SK_DUMP_ENABLED - void dump(SkAnimateMaker* ) SK_OVERRIDE; + void dump(SkAnimateMaker* ) override; #endif - void onEndElement(SkAnimateMaker& ) SK_OVERRIDE; + void onEndElement(SkAnimateMaker& ) override; protected: SkDrawPaint* paint; SkDrawRect* bounds; diff --git a/src/animator/SkDrawShader.h b/src/animator/SkDrawShader.h index 32c8fd56d8..f7ef29d7d3 100644 --- a/src/animator/SkDrawShader.h +++ b/src/animator/SkDrawShader.h @@ -16,8 +16,8 @@ class SkBaseBitmap; class SkDrawBitmapShader : public SkDrawShader { DECLARE_DRAW_MEMBER_INFO(BitmapShader); SkDrawBitmapShader(); - bool add() SK_OVERRIDE; - SkShader* getShader() SK_OVERRIDE; + bool add() override; + SkShader* getShader() override; protected: SkBool filterBitmap; SkBaseBitmap* image; diff --git a/src/animator/SkDrawText.h b/src/animator/SkDrawText.h index 26300072de..e7632d0cef 100644 --- a/src/animator/SkDrawText.h +++ b/src/animator/SkDrawText.h @@ -17,11 +17,11 @@ class SkText : public SkBoundable { DECLARE_MEMBER_INFO(Text); SkText(); virtual ~SkText(); - bool draw(SkAnimateMaker& ) SK_OVERRIDE; + bool draw(SkAnimateMaker& ) override; #ifdef SK_DUMP_ENABLED - void dump(SkAnimateMaker* ) SK_OVERRIDE; + void dump(SkAnimateMaker* ) override; #endif - bool getProperty(int index, SkScriptValue* value) const SK_OVERRIDE; + bool getProperty(int index, SkScriptValue* value) const override; const char* getText() { return text.c_str(); } size_t getSize() { return text.size(); } protected: diff --git a/src/animator/SkDrawTextBox.h b/src/animator/SkDrawTextBox.h index 4bb3bf268d..8f99c73d13 100644 --- a/src/animator/SkDrawTextBox.h +++ b/src/animator/SkDrawTextBox.h @@ -18,12 +18,12 @@ class SkDrawTextBox : public SkDrawRect { SkDrawTextBox(); // overrides - bool draw(SkAnimateMaker& ) SK_OVERRIDE; + bool draw(SkAnimateMaker& ) override; #ifdef SK_DUMP_ENABLED - void dump(SkAnimateMaker* ) SK_OVERRIDE; + void dump(SkAnimateMaker* ) override; #endif - bool getProperty(int index, SkScriptValue* value) const SK_OVERRIDE; - bool setProperty(int index, SkScriptValue& ) SK_OVERRIDE; + bool getProperty(int index, SkScriptValue* value) const override; + bool setProperty(int index, SkScriptValue& ) override; private: SkString fText; diff --git a/src/animator/SkDrawTo.h b/src/animator/SkDrawTo.h index 0c089d6b4c..29f6b6303d 100644 --- a/src/animator/SkDrawTo.h +++ b/src/animator/SkDrawTo.h @@ -19,9 +19,9 @@ class SkDrawTo : public SkGroup { DECLARE_MEMBER_INFO(DrawTo); SkDrawTo(); // virtual ~SkDrawTo(); - bool draw(SkAnimateMaker& ) SK_OVERRIDE; + bool draw(SkAnimateMaker& ) override; #ifdef SK_DUMP_ENABLED - void dump(SkAnimateMaker* ) SK_OVERRIDE; + void dump(SkAnimateMaker* ) override; #endif protected: SkBool drawOnce; diff --git a/src/animator/SkDrawTransparentShader.h b/src/animator/SkDrawTransparentShader.h index b6ab7c73c4..5b5b15660b 100644 --- a/src/animator/SkDrawTransparentShader.h +++ b/src/animator/SkDrawTransparentShader.h @@ -12,7 +12,7 @@ class SkDrawTransparentShader : public SkDrawShader { DECLARE_EMPTY_MEMBER_INFO(TransparentShader); - SkShader* getShader() SK_OVERRIDE; + SkShader* getShader() override; }; #endif // SkDrawTransparentShader_DEFINED diff --git a/src/animator/SkDump.h b/src/animator/SkDump.h index 86e9e08b7b..bedd5331e5 100644 --- a/src/animator/SkDump.h +++ b/src/animator/SkDump.h @@ -20,9 +20,9 @@ class SkDump : public SkDisplayable { DECLARE_MEMBER_INFO(Dump); #ifdef SK_DUMP_ENABLED SkDump(); - bool enable(SkAnimateMaker & ) SK_OVERRIDE; + bool enable(SkAnimateMaker & ) override; bool evaluate(SkAnimateMaker &); - bool hasEnable() const SK_OVERRIDE; + bool hasEnable() const override; static void GetEnumString(SkDisplayTypes , int index, SkString* result); SkBool displayList; SkBool eventList; diff --git a/src/animator/SkHitClear.h b/src/animator/SkHitClear.h index 3e09700921..042c181adc 100644 --- a/src/animator/SkHitClear.h +++ b/src/animator/SkHitClear.h @@ -16,8 +16,8 @@ class SkHitClear : public SkDisplayable { DECLARE_MEMBER_INFO(HitClear); - bool enable(SkAnimateMaker& ) SK_OVERRIDE; - bool hasEnable() const SK_OVERRIDE; + bool enable(SkAnimateMaker& ) override; + bool hasEnable() const override; private: SkTDDisplayableArray targets; }; diff --git a/src/animator/SkHitTest.h b/src/animator/SkHitTest.h index f79dab0ee4..bd1cbe221f 100644 --- a/src/animator/SkHitTest.h +++ b/src/animator/SkHitTest.h @@ -16,10 +16,10 @@ class SkHitTest : public SkADrawable { DECLARE_MEMBER_INFO(HitTest); SkHitTest(); - bool draw(SkAnimateMaker& ) SK_OVERRIDE; - bool enable(SkAnimateMaker& ) SK_OVERRIDE; - bool hasEnable() const SK_OVERRIDE; - const SkMemberInfo* preferredChild(SkDisplayTypes type) SK_OVERRIDE; + bool draw(SkAnimateMaker& ) override; + bool enable(SkAnimateMaker& ) override; + bool hasEnable() const override; + const SkMemberInfo* preferredChild(SkDisplayTypes type) override; private: SkTDDisplayableArray bullets; SkTDIntArray hits; diff --git a/src/animator/SkMatrixParts.h b/src/animator/SkMatrixParts.h index e6a8850601..3276d023d4 100644 --- a/src/animator/SkMatrixParts.h +++ b/src/animator/SkMatrixParts.h @@ -39,7 +39,7 @@ class SkRotate : public SkMatrixPart { DECLARE_MEMBER_INFO(Rotate); SkRotate(); protected: - bool add() SK_OVERRIDE; + bool add() override; SkScalar degrees; SkPoint center; }; @@ -48,7 +48,7 @@ class SkScale : public SkMatrixPart { DECLARE_MEMBER_INFO(Scale); SkScale(); protected: - bool add() SK_OVERRIDE; + bool add() override; SkScalar x; SkScalar y; SkPoint center; @@ -58,7 +58,7 @@ class SkSkew : public SkMatrixPart { DECLARE_MEMBER_INFO(Skew); SkSkew(); protected: - bool add() SK_OVERRIDE; + bool add() override; SkScalar x; SkScalar y; SkPoint center; @@ -68,7 +68,7 @@ class SkTranslate : public SkMatrixPart { DECLARE_MEMBER_INFO(Translate); SkTranslate(); protected: - bool add() SK_OVERRIDE; + bool add() override; SkScalar x; SkScalar y; }; @@ -78,7 +78,7 @@ class SkFromPath : public SkMatrixPart { SkFromPath(); virtual ~SkFromPath(); protected: - bool add() SK_OVERRIDE; + bool add() override; int32_t mode; SkScalar offset; SkDrawPath* path; @@ -90,11 +90,11 @@ class SkRectToRect : public SkMatrixPart { SkRectToRect(); virtual ~SkRectToRect(); #ifdef SK_DUMP_ENABLED - void dump(SkAnimateMaker* ) SK_OVERRIDE; + void dump(SkAnimateMaker* ) override; #endif - const SkMemberInfo* preferredChild(SkDisplayTypes type) SK_OVERRIDE; + const SkMemberInfo* preferredChild(SkDisplayTypes type) override; protected: - bool add() SK_OVERRIDE; + bool add() override; SkDrawRect* source; SkDrawRect* destination; }; @@ -104,12 +104,12 @@ class SkPolyToPoly : public SkMatrixPart { SkPolyToPoly(); virtual ~SkPolyToPoly(); #ifdef SK_DUMP_ENABLED - void dump(SkAnimateMaker* ) SK_OVERRIDE; + void dump(SkAnimateMaker* ) override; #endif - void onEndElement(SkAnimateMaker& ) SK_OVERRIDE; - const SkMemberInfo* preferredChild(SkDisplayTypes type) SK_OVERRIDE; + void onEndElement(SkAnimateMaker& ) override; + const SkMemberInfo* preferredChild(SkDisplayTypes type) override; protected: - bool add() SK_OVERRIDE; + bool add() override; SkPolygon* source; SkPolygon* destination; }; diff --git a/src/animator/SkMemberInfo.h b/src/animator/SkMemberInfo.h index c0d9e2087a..e07c32270d 100644 --- a/src/animator/SkMemberInfo.h +++ b/src/animator/SkMemberInfo.h @@ -150,49 +150,49 @@ struct SkMemberInfo { public: \ static const SkMemberInfo fInfo[]; \ static const int fInfoCount; \ - const SkMemberInfo* getMember(int index) SK_OVERRIDE; \ - const SkMemberInfo* getMember(const char name[]) SK_OVERRIDE; \ + const SkMemberInfo* getMember(int index) override; \ + const SkMemberInfo* getMember(const char name[]) override; \ typedef Sk##_type BASE_CLASS #define DECLARE_MEMBER_INFO(_type) \ public: \ static const SkMemberInfo fInfo[]; \ static const int fInfoCount; \ - const SkMemberInfo* getMember(int index) SK_OVERRIDE; \ - const SkMemberInfo* getMember(const char name[]) SK_OVERRIDE; \ - SkDisplayTypes getType() const SK_OVERRIDE { return SkType_##_type; } \ + const SkMemberInfo* getMember(int index) override; \ + const SkMemberInfo* getMember(const char name[]) override; \ + SkDisplayTypes getType() const override { return SkType_##_type; } \ typedef Sk##_type BASE_CLASS #define DECLARE_DRAW_MEMBER_INFO(_type) \ public: \ static const SkMemberInfo fInfo[]; \ static const int fInfoCount; \ - const SkMemberInfo* getMember(int index) SK_OVERRIDE; \ - const SkMemberInfo* getMember(const char name[]) SK_OVERRIDE; \ - SkDisplayTypes getType() const SK_OVERRIDE { return SkType_##_type; } \ + const SkMemberInfo* getMember(int index) override; \ + const SkMemberInfo* getMember(const char name[]) override; \ + SkDisplayTypes getType() const override { return SkType_##_type; } \ typedef SkDraw##_type BASE_CLASS #define DECLARE_DISPLAY_MEMBER_INFO(_type) \ public: \ static const SkMemberInfo fInfo[]; \ static const int fInfoCount; \ - const SkMemberInfo* getMember(int index) SK_OVERRIDE; \ - const SkMemberInfo* getMember(const char name[]) SK_OVERRIDE; \ - SkDisplayTypes getType() const SK_OVERRIDE { return SkType_##_type; } \ + const SkMemberInfo* getMember(int index) override; \ + const SkMemberInfo* getMember(const char name[]) override; \ + SkDisplayTypes getType() const override { return SkType_##_type; } \ typedef SkDisplay##_type BASE_CLASS #define DECLARE_EMPTY_MEMBER_INFO(_type) \ public: \ - SkDisplayTypes getType() const SK_OVERRIDE { return SkType_##_type; } + SkDisplayTypes getType() const override { return SkType_##_type; } #define DECLARE_EXTRAS_MEMBER_INFO(_type) \ public: \ static const SkMemberInfo fInfo[]; \ static const int fInfoCount; \ - const SkMemberInfo* getMember(int index) SK_OVERRIDE; \ - const SkMemberInfo* getMember(const char name[]) SK_OVERRIDE; \ + const SkMemberInfo* getMember(int index) override; \ + const SkMemberInfo* getMember(const char name[]) override; \ SkDisplayTypes fType; \ - SkDisplayTypes getType() const SK_OVERRIDE { return fType; } \ + SkDisplayTypes getType() const override { return fType; } \ typedef _type BASE_CLASS #define DECLARE_NO_VIRTUALS_MEMBER_INFO(_type) \ diff --git a/src/animator/SkPaintPart.h b/src/animator/SkPaintPart.h index a285a1cbef..2907d81615 100644 --- a/src/animator/SkPaintPart.h +++ b/src/animator/SkPaintPart.h @@ -35,14 +35,14 @@ class SkDrawMaskFilter : public SkPaintPart { DECLARE_EMPTY_MEMBER_INFO(MaskFilter); virtual SkMaskFilter* getMaskFilter(); protected: - bool add() SK_OVERRIDE; + bool add() override; }; class SkDrawPathEffect : public SkPaintPart { DECLARE_EMPTY_MEMBER_INFO(PathEffect); virtual SkPathEffect* getPathEffect(); protected: - bool add() SK_OVERRIDE; + bool add() override; }; class SkDrawShader : public SkPaintPart { @@ -50,7 +50,7 @@ class SkDrawShader : public SkPaintPart { SkDrawShader(); virtual SkShader* getShader(); protected: - bool add() SK_OVERRIDE; + bool add() override; SkMatrix* getMatrix(); // returns NULL if matrix is NULL SkDrawMatrix* matrix; int /*SkShader::TileMode*/ tileMode; @@ -60,12 +60,12 @@ class SkDrawTypeface : public SkPaintPart { DECLARE_DRAW_MEMBER_INFO(Typeface); SkDrawTypeface(); #ifdef SK_DUMP_ENABLED - void dump(SkAnimateMaker *) SK_OVERRIDE; + void dump(SkAnimateMaker *) override; #endif SkTypeface* getTypeface() { return SkTypeface::CreateFromName(fontName.c_str(), style); } protected: - bool add() SK_OVERRIDE; + bool add() override; SkString fontName; SkTypeface::Style style; }; diff --git a/src/animator/SkPathParts.h b/src/animator/SkPathParts.h index 6aad1baebd..afa7b662d7 100644 --- a/src/animator/SkPathParts.h +++ b/src/animator/SkPathParts.h @@ -34,7 +34,7 @@ protected: class SkMoveTo : public SkPathPart { DECLARE_MEMBER_INFO(MoveTo); SkMoveTo(); - bool add() SK_OVERRIDE; + bool add() override; protected: SkScalar x; SkScalar y; @@ -42,7 +42,7 @@ protected: class SkRMoveTo : public SkMoveTo { DECLARE_MEMBER_INFO(RMoveTo); - bool add() SK_OVERRIDE; + bool add() override; private: typedef SkMoveTo INHERITED; }; @@ -50,7 +50,7 @@ private: class SkLineTo : public SkPathPart { DECLARE_MEMBER_INFO(LineTo); SkLineTo(); - bool add() SK_OVERRIDE; + bool add() override; protected: SkScalar x; SkScalar y; @@ -58,7 +58,7 @@ protected: class SkRLineTo : public SkLineTo { DECLARE_MEMBER_INFO(RLineTo); - bool add() SK_OVERRIDE; + bool add() override; private: typedef SkLineTo INHERITED; }; @@ -66,7 +66,7 @@ private: class SkQuadTo : public SkPathPart { DECLARE_MEMBER_INFO(QuadTo); SkQuadTo(); - bool add() SK_OVERRIDE; + bool add() override; protected: SkScalar x1; SkScalar y1; @@ -76,7 +76,7 @@ protected: class SkRQuadTo : public SkQuadTo { DECLARE_MEMBER_INFO(RQuadTo); - bool add() SK_OVERRIDE; + bool add() override; private: typedef SkQuadTo INHERITED; }; @@ -84,7 +84,7 @@ private: class SkCubicTo : public SkPathPart { DECLARE_MEMBER_INFO(CubicTo); SkCubicTo(); - bool add() SK_OVERRIDE; + bool add() override; protected: SkScalar x1; SkScalar y1; @@ -96,14 +96,14 @@ protected: class SkRCubicTo : public SkCubicTo { DECLARE_MEMBER_INFO(RCubicTo); - bool add() SK_OVERRIDE; + bool add() override; private: typedef SkCubicTo INHERITED; }; class SkClose : public SkPathPart { DECLARE_EMPTY_MEMBER_INFO(Close); - bool add() SK_OVERRIDE; + bool add() override; }; class SkAddGeom : public SkPathPart { @@ -116,7 +116,7 @@ protected: class SkAddRect : public SkAddGeom { DECLARE_MEMBER_INFO(AddRect); SkAddRect(); - bool add() SK_OVERRIDE; + bool add() override; protected: SkRect fRect; private: @@ -125,7 +125,7 @@ private: class SkAddOval : public SkAddRect { DECLARE_MEMBER_INFO(AddOval); - bool add() SK_OVERRIDE; + bool add() override; private: typedef SkAddRect INHERITED; }; @@ -133,7 +133,7 @@ private: class SkAddCircle : public SkAddGeom { DECLARE_MEMBER_INFO(AddCircle); SkAddCircle(); - bool add() SK_OVERRIDE; + bool add() override; private: SkScalar radius; SkScalar x; @@ -144,7 +144,7 @@ private: class SkAddRoundRect : public SkAddRect { DECLARE_MEMBER_INFO(AddRoundRect); SkAddRoundRect(); - bool add() SK_OVERRIDE; + bool add() override; private: SkScalar rx; SkScalar ry; @@ -154,7 +154,7 @@ private: class SkAddPath : public SkPathPart { DECLARE_MEMBER_INFO(AddPath); SkAddPath(); - bool add() SK_OVERRIDE; + bool add() override; private: typedef SkPathPart INHERITED; SkDrawMatrix* matrix; diff --git a/src/animator/SkPostParts.h b/src/animator/SkPostParts.h index f48c33fd8a..fb2845be6e 100644 --- a/src/animator/SkPostParts.h +++ b/src/animator/SkPostParts.h @@ -18,10 +18,10 @@ class SkDataInput: public SkInput { DECLARE_MEMBER_INFO(DataInput); SkDataInput(); bool add(); - void dirty() SK_OVERRIDE; - SkDisplayable* getParent() const SK_OVERRIDE; - void onEndElement(SkAnimateMaker& ) SK_OVERRIDE; - bool setParent(SkDisplayable* ) SK_OVERRIDE; + void dirty() override; + SkDisplayable* getParent() const override; + void onEndElement(SkAnimateMaker& ) override; + bool setParent(SkDisplayable* ) override; protected: SkPost* fParent; typedef SkInput INHERITED; diff --git a/src/animator/SkSnapshot.h b/src/animator/SkSnapshot.h index e3b36d1898..a4eb175777 100644 --- a/src/animator/SkSnapshot.h +++ b/src/animator/SkSnapshot.h @@ -18,7 +18,7 @@ class SkSnapshot: public SkADrawable { DECLARE_MEMBER_INFO(Snapshot); SkSnapshot(); - bool draw(SkAnimateMaker& ) SK_OVERRIDE; + bool draw(SkAnimateMaker& ) override; private: SkString filename; SkScalar quality; diff --git a/src/animator/SkTextOnPath.h b/src/animator/SkTextOnPath.h index fb1f6f287c..36adfd5221 100644 --- a/src/animator/SkTextOnPath.h +++ b/src/animator/SkTextOnPath.h @@ -19,7 +19,7 @@ class SkText; class SkTextOnPath : public SkBoundable { DECLARE_MEMBER_INFO(TextOnPath); SkTextOnPath(); - bool draw(SkAnimateMaker& ) SK_OVERRIDE; + bool draw(SkAnimateMaker& ) override; private: SkScalar offset; SkDrawPath* path; diff --git a/src/animator/SkTextToPath.h b/src/animator/SkTextToPath.h index 2be67ad7b7..23b6bfe8b4 100644 --- a/src/animator/SkTextToPath.h +++ b/src/animator/SkTextToPath.h @@ -20,8 +20,8 @@ class SkText; class SkTextToPath : public SkADrawable { DECLARE_MEMBER_INFO(TextToPath); SkTextToPath(); - bool draw(SkAnimateMaker& ) SK_OVERRIDE; - void onEndElement(SkAnimateMaker& ) SK_OVERRIDE; + bool draw(SkAnimateMaker& ) override; + void onEndElement(SkAnimateMaker& ) override; private: SkDrawPaint* paint; SkDrawPath* path; diff --git a/src/animator/SkXMLAnimatorWriter.h b/src/animator/SkXMLAnimatorWriter.h index 1aedadae35..2f6721dce0 100644 --- a/src/animator/SkXMLAnimatorWriter.h +++ b/src/animator/SkXMLAnimatorWriter.h @@ -23,10 +23,10 @@ public: SkDEBUGCODE(static void UnitTest(class SkCanvas* canvas);) protected: - void onAddAttributeLen(const char name[], const char value[], size_t length) SK_OVERRIDE; - void onEndElement() SK_OVERRIDE; - void onStartElementLen(const char elem[], size_t length) SK_OVERRIDE; - void onAddText(const char text[], size_t length) SK_OVERRIDE; + void onAddAttributeLen(const char name[], const char value[], size_t length) override; + void onEndElement() override; + void onStartElementLen(const char elem[], size_t length) override; + void onAddText(const char text[], size_t length) override; private: SkAnimator* fAnimator; diff --git a/src/codec/SkCodec_libbmp.h b/src/codec/SkCodec_libbmp.h index 4dda117d5a..8ec2abd9d5 100644 --- a/src/codec/SkCodec_libbmp.h +++ b/src/codec/SkCodec_libbmp.h @@ -66,9 +66,9 @@ protected: */ virtual Result onGetPixels(const SkImageInfo& dstInfo, void* dst, size_t dstRowBytes, const Options&, SkPMColor*, - int*) SK_OVERRIDE; + int*) override; - SkEncodedFormat onGetEncodedFormat() const SK_OVERRIDE { return kBMP_SkEncodedFormat; } + SkEncodedFormat onGetEncodedFormat() const override { return kBMP_SkEncodedFormat; } private: diff --git a/src/codec/SkCodec_libico.h b/src/codec/SkCodec_libico.h index 778bcd2c54..a690cdd81d 100644 --- a/src/codec/SkCodec_libico.h +++ b/src/codec/SkCodec_libico.h @@ -33,16 +33,16 @@ protected: /* * Chooses the best dimensions given the desired scale */ - SkISize onGetScaledDimensions(float desiredScale) const SK_OVERRIDE; + SkISize onGetScaledDimensions(float desiredScale) const override; /* * Initiates the Ico decode */ Result onGetPixels(const SkImageInfo& dstInfo, void* dst, size_t dstRowBytes, const Options&, SkPMColor*, int*) - SK_OVERRIDE; + override; - SkEncodedFormat onGetEncodedFormat() const SK_OVERRIDE { + SkEncodedFormat onGetEncodedFormat() const override { return kICO_SkEncodedFormat; } diff --git a/src/codec/SkCodec_libpng.cpp b/src/codec/SkCodec_libpng.cpp index 60923356c1..8c0b624b8d 100644 --- a/src/codec/SkCodec_libpng.cpp +++ b/src/codec/SkCodec_libpng.cpp @@ -503,7 +503,7 @@ public: fSrcRow = static_cast(fStorage.get()); } - SkImageGenerator::Result onGetScanlines(void* dst, int count, size_t rowBytes) SK_OVERRIDE { + SkImageGenerator::Result onGetScanlines(void* dst, int count, size_t rowBytes) override { if (setjmp(png_jmpbuf(fCodec->fPng_ptr))) { SkDebugf("setjmp long jump!\n"); return SkImageGenerator::kInvalidInput; @@ -518,7 +518,7 @@ public: return SkImageGenerator::kSuccess; } - SkImageGenerator::Result onSkipScanlines(int count) SK_OVERRIDE { + SkImageGenerator::Result onSkipScanlines(int count) override { // FIXME: Could we use the return value of setjmp to specify the type of // error? if (setjmp(png_jmpbuf(fCodec->fPng_ptr))) { @@ -530,11 +530,11 @@ public: return SkImageGenerator::kSuccess; } - void onFinish() SK_OVERRIDE { + void onFinish() override { fCodec->finish(); } - bool onReallyHasAlpha() const SK_OVERRIDE { return fHasAlpha; } + bool onReallyHasAlpha() const override { return fHasAlpha; } private: SkPngCodec* fCodec; // Unowned. diff --git a/src/codec/SkCodec_libpng.h b/src/codec/SkCodec_libpng.h index fa7b39d82f..3afaa39bf4 100644 --- a/src/codec/SkCodec_libpng.h +++ b/src/codec/SkCodec_libpng.h @@ -26,10 +26,10 @@ public: static bool IsPng(SkStream*); protected: Result onGetPixels(const SkImageInfo&, void*, size_t, const Options&, SkPMColor*, int*) - SK_OVERRIDE; - SkEncodedFormat onGetEncodedFormat() const SK_OVERRIDE { return kPNG_SkEncodedFormat; } - SkScanlineDecoder* onGetScanlineDecoder(const SkImageInfo& dstInfo) SK_OVERRIDE; - bool onReallyHasAlpha() const SK_OVERRIDE { return fReallyHasAlpha; } + override; + SkEncodedFormat onGetEncodedFormat() const override { return kPNG_SkEncodedFormat; } + SkScanlineDecoder* onGetScanlineDecoder(const SkImageInfo& dstInfo) override; + bool onReallyHasAlpha() const override { return fReallyHasAlpha; } private: png_structp fPng_ptr; png_infop fInfo_ptr; diff --git a/src/core/SkAAClip.cpp b/src/core/SkAAClip.cpp index 45e6cc3ae6..e55451e3d9 100644 --- a/src/core/SkAAClip.cpp +++ b/src/core/SkAAClip.cpp @@ -1273,13 +1273,13 @@ public: Instead we'll rely on the runtime asserts to guarantee Y monotonicity; any failure cases that misses may have minor artifacts. */ - void blitV(int x, int y, int height, SkAlpha alpha) SK_OVERRIDE { + void blitV(int x, int y, int height, SkAlpha alpha) override { this->recordMinY(y); fBuilder->addColumn(x, y, alpha, height); fLastY = y + height - 1; } - void blitRect(int x, int y, int width, int height) SK_OVERRIDE { + void blitRect(int x, int y, int width, int height) override { this->recordMinY(y); this->checkForYGap(y); fBuilder->addRectRun(x, y, width, height); @@ -1287,28 +1287,28 @@ public: } virtual void blitAntiRect(int x, int y, int width, int height, - SkAlpha leftAlpha, SkAlpha rightAlpha) SK_OVERRIDE { + SkAlpha leftAlpha, SkAlpha rightAlpha) override { this->recordMinY(y); this->checkForYGap(y); fBuilder->addAntiRectRun(x, y, width, height, leftAlpha, rightAlpha); fLastY = y + height - 1; } - void blitMask(const SkMask&, const SkIRect& clip) SK_OVERRIDE + void blitMask(const SkMask&, const SkIRect& clip) override { unexpected(); } - const SkBitmap* justAnOpaqueColor(uint32_t*) SK_OVERRIDE { + const SkBitmap* justAnOpaqueColor(uint32_t*) override { return NULL; } - void blitH(int x, int y, int width) SK_OVERRIDE { + void blitH(int x, int y, int width) override { this->recordMinY(y); this->checkForYGap(y); fBuilder->addRun(x, y, 0xFF, width); } virtual void blitAntiH(int x, int y, const SkAlpha alpha[], - const int16_t runs[]) SK_OVERRIDE { + const int16_t runs[]) override { this->recordMinY(y); this->checkForYGap(y); for (;;) { diff --git a/src/core/SkAAClip.h b/src/core/SkAAClip.h index 67f45e4946..1daeb38f59 100644 --- a/src/core/SkAAClip.h +++ b/src/core/SkAAClip.h @@ -109,13 +109,13 @@ public: fAAClipBounds = aaclip->getBounds(); } - void blitH(int x, int y, int width) SK_OVERRIDE; + void blitH(int x, int y, int width) override; virtual void blitAntiH(int x, int y, const SkAlpha[], - const int16_t runs[]) SK_OVERRIDE; - void blitV(int x, int y, int height, SkAlpha alpha) SK_OVERRIDE; - void blitRect(int x, int y, int width, int height) SK_OVERRIDE; - void blitMask(const SkMask&, const SkIRect& clip) SK_OVERRIDE; - const SkBitmap* justAnOpaqueColor(uint32_t* value) SK_OVERRIDE; + const int16_t runs[]) override; + void blitV(int x, int y, int height, SkAlpha alpha) override; + void blitRect(int x, int y, int width, int height) override; + void blitMask(const SkMask&, const SkIRect& clip) override; + const SkBitmap* justAnOpaqueColor(uint32_t* value) override; private: SkBlitter* fBlitter; diff --git a/src/core/SkBitmapCache.cpp b/src/core/SkBitmapCache.cpp index f569db8e8a..aabf87ad5b 100644 --- a/src/core/SkBitmapCache.cpp +++ b/src/core/SkBitmapCache.cpp @@ -71,8 +71,8 @@ struct BitmapRec : public SkResourceCache::Rec { , fBitmap(result) {} - const Key& getKey() const SK_OVERRIDE { return fKey; } - size_t bytesUsed() const SK_OVERRIDE { return sizeof(fKey) + fBitmap.getSize(); } + const Key& getKey() const override { return fKey; } + size_t bytesUsed() const override { return sizeof(fKey) + fBitmap.getSize(); } static bool Finder(const SkResourceCache::Rec& baseRec, void* contextBitmap) { const BitmapRec& rec = static_cast(baseRec); @@ -171,8 +171,8 @@ struct MipMapRec : public SkResourceCache::Rec { fMipMap->detachFromCacheAndUnref(); } - const Key& getKey() const SK_OVERRIDE { return fKey; } - size_t bytesUsed() const SK_OVERRIDE { return sizeof(fKey) + fMipMap->size(); } + const Key& getKey() const override { return fKey; } + size_t bytesUsed() const override { return sizeof(fKey) + fMipMap->size(); } static bool Finder(const SkResourceCache::Rec& baseRec, void* contextMip) { const MipMapRec& rec = static_cast(baseRec); diff --git a/src/core/SkBitmapFilter.h b/src/core/SkBitmapFilter.h index 139e990a10..93b552efd7 100644 --- a/src/core/SkBitmapFilter.h +++ b/src/core/SkBitmapFilter.h @@ -79,7 +79,7 @@ class SkMitchellFilter: public SkBitmapFilter { : SkBitmapFilter(width), B(b), C(c) { } - float evaluate(float x) const SK_OVERRIDE { + float evaluate(float x) const override { x = fabsf(x); if (x > 2.f) { return 0; @@ -102,7 +102,7 @@ class SkGaussianFilter: public SkBitmapFilter { : SkBitmapFilter(width), alpha(a), expWidth(expf(-alpha * width * width)) { } - float evaluate(float x) const SK_OVERRIDE { + float evaluate(float x) const override { return SkTMax(0.f, float(expf(-alpha*x*x) - expWidth)); } protected: @@ -115,7 +115,7 @@ class SkTriangleFilter: public SkBitmapFilter { : SkBitmapFilter(width) { } - float evaluate(float x) const SK_OVERRIDE { + float evaluate(float x) const override { return SkTMax(0.f, fWidth - fabsf(x)); } protected: @@ -127,7 +127,7 @@ class SkBoxFilter: public SkBitmapFilter { : SkBitmapFilter(width) { } - float evaluate(float x) const SK_OVERRIDE { + float evaluate(float x) const override { return (x >= -fWidth && x < fWidth) ? 1.0f : 0.0f; } protected: @@ -138,7 +138,7 @@ public: SkHammingFilter(float width=1.f) : SkBitmapFilter(width) { } - float evaluate(float x) const SK_OVERRIDE { + float evaluate(float x) const override { if (x <= -fWidth || x >= fWidth) { return 0.0f; // Outside of the window. } @@ -158,7 +158,7 @@ class SkLanczosFilter: public SkBitmapFilter { : SkBitmapFilter(width) { } - float evaluate(float x) const SK_OVERRIDE { + float evaluate(float x) const override { if (x <= -fWidth || x >= fWidth) { return 0.0f; // Outside of the window. } diff --git a/src/core/SkBitmapHeap.h b/src/core/SkBitmapHeap.h index 95e272418a..fe171ffbbf 100644 --- a/src/core/SkBitmapHeap.h +++ b/src/core/SkBitmapHeap.h @@ -117,7 +117,7 @@ public: * * @return The bitmap located at that slot or NULL if external storage is being used. */ - SkBitmap* getBitmap(int32_t slot) const SK_OVERRIDE { + SkBitmap* getBitmap(int32_t slot) const override { SkASSERT(fExternalStorage == NULL); SkBitmapHeapEntry* entry = getEntry(slot); if (entry) { @@ -131,7 +131,7 @@ public: * * @return The bitmap located at that slot or NULL if external storage is being used. */ - void releaseRef(int32_t slot) SK_OVERRIDE { + void releaseRef(int32_t slot) override { SkASSERT(fExternalStorage == NULL); if (fOwnerCount != IGNORE_OWNERS) { SkBitmapHeapEntry* entry = getEntry(slot); diff --git a/src/core/SkBitmapProcShader.h b/src/core/SkBitmapProcShader.h index f73d56f2fb..bdb2d4de15 100644 --- a/src/core/SkBitmapProcShader.h +++ b/src/core/SkBitmapProcShader.h @@ -20,10 +20,10 @@ public: const SkMatrix* localMatrix = NULL); // overrides from SkShader - bool isOpaque() const SK_OVERRIDE; - BitmapType asABitmap(SkBitmap*, SkMatrix*, TileMode*) const SK_OVERRIDE; + bool isOpaque() const override; + BitmapType asABitmap(SkBitmap*, SkMatrix*, TileMode*) const override; - size_t contextSize() const SK_OVERRIDE; + size_t contextSize() const override; static bool CanDo(const SkBitmap&, TileMode tx, TileMode ty); @@ -32,7 +32,7 @@ public: bool asFragmentProcessor(GrContext*, const SkPaint&, const SkMatrix& viewM, const SkMatrix*, - GrColor*, GrFragmentProcessor**) const SK_OVERRIDE; + GrColor*, GrFragmentProcessor**) const override; class BitmapProcShaderContext : public SkShader::Context { public: @@ -41,11 +41,11 @@ public: BitmapProcShaderContext(const SkBitmapProcShader&, const ContextRec&, SkBitmapProcState*); virtual ~BitmapProcShaderContext(); - void shadeSpan(int x, int y, SkPMColor dstC[], int count) SK_OVERRIDE; - ShadeProc asAShadeProc(void** ctx) SK_OVERRIDE; - void shadeSpan16(int x, int y, uint16_t dstC[], int count) SK_OVERRIDE; + void shadeSpan(int x, int y, SkPMColor dstC[], int count) override; + ShadeProc asAShadeProc(void** ctx) override; + void shadeSpan16(int x, int y, uint16_t dstC[], int count) override; - uint32_t getFlags() const SK_OVERRIDE { return fFlags; } + uint32_t getFlags() const override { return fFlags; } private: SkBitmapProcState* fState; @@ -55,8 +55,8 @@ public: }; protected: - void flatten(SkWriteBuffer&) const SK_OVERRIDE; - Context* onCreateContext(const ContextRec&, void* storage) const SK_OVERRIDE; + void flatten(SkWriteBuffer&) const override; + Context* onCreateContext(const ContextRec&, void* storage) const override; SkBitmap fRawBitmap; // experimental for RLE encoding uint8_t fTileModeX, fTileModeY; diff --git a/src/core/SkBlitter.cpp b/src/core/SkBlitter.cpp index a5d2b0598b..d8553f16a2 100644 --- a/src/core/SkBlitter.cpp +++ b/src/core/SkBlitter.cpp @@ -580,7 +580,7 @@ public: SkSafeUnref(fProxy); } - size_t contextSize() const SK_OVERRIDE { + size_t contextSize() const override { size_t size = sizeof(Sk3DShaderContext); if (fProxy) { size += fProxy->contextSize(); @@ -588,7 +588,7 @@ public: return size; } - Context* onCreateContext(const ContextRec& rec, void* storage) const SK_OVERRIDE { + Context* onCreateContext(const ContextRec& rec, void* storage) const override { SkShader::Context* proxyContext = NULL; if (fProxy) { char* proxyContextStorage = (char*) storage + sizeof(Sk3DShaderContext); @@ -620,9 +620,9 @@ public: } } - void set3DMask(const SkMask* mask) SK_OVERRIDE { fMask = mask; } + void set3DMask(const SkMask* mask) override { fMask = mask; } - void shadeSpan(int x, int y, SkPMColor span[], int count) SK_OVERRIDE { + void shadeSpan(int x, int y, SkPMColor span[], int count) override { if (fProxyContext) { fProxyContext->shadeSpan(x, y, span, count); } @@ -697,7 +697,7 @@ public: }; #ifndef SK_IGNORE_TO_STRING - void toString(SkString* str) const SK_OVERRIDE { + void toString(SkString* str) const override { str->append("Sk3DShader: ("); if (fProxy) { @@ -714,7 +714,7 @@ public: SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(Sk3DShader) protected: - void flatten(SkWriteBuffer& buffer) const SK_OVERRIDE { + void flatten(SkWriteBuffer& buffer) const override { buffer.writeFlattenable(fProxy); } @@ -736,24 +736,24 @@ public: , fShaderContext(shaderContext) {} - void blitH(int x, int y, int width) SK_OVERRIDE { + void blitH(int x, int y, int width) override { fProxy->blitH(x, y, width); } virtual void blitAntiH(int x, int y, const SkAlpha antialias[], - const int16_t runs[]) SK_OVERRIDE { + const int16_t runs[]) override { fProxy->blitAntiH(x, y, antialias, runs); } - void blitV(int x, int y, int height, SkAlpha alpha) SK_OVERRIDE { + void blitV(int x, int y, int height, SkAlpha alpha) override { fProxy->blitV(x, y, height, alpha); } - void blitRect(int x, int y, int width, int height) SK_OVERRIDE { + void blitRect(int x, int y, int width, int height) override { fProxy->blitRect(x, y, width, height); } - void blitMask(const SkMask& mask, const SkIRect& clip) SK_OVERRIDE { + void blitMask(const SkMask& mask, const SkIRect& clip) override { if (mask.fFormat == SkMask::k3D_Format) { fShaderContext->set3DMask(&mask); @@ -991,7 +991,7 @@ public: // Override rec with the identity matrix, so it is guaranteed to be invertible. : INHERITED(shader, SkShader::ContextRec(*rec.fDevice, *rec.fPaint, SkMatrix::I())) {} - void shadeSpan(int x, int y, SkPMColor colors[], int count) SK_OVERRIDE { + void shadeSpan(int x, int y, SkPMColor colors[], int count) override { sk_bzero(colors, count * sizeof(SkPMColor)); } diff --git a/src/core/SkBlitter.h b/src/core/SkBlitter.h index b0745c8a27..9447bf1b51 100644 --- a/src/core/SkBlitter.h +++ b/src/core/SkBlitter.h @@ -119,14 +119,14 @@ private: */ class SkNullBlitter : public SkBlitter { public: - void blitH(int x, int y, int width) SK_OVERRIDE; + void blitH(int x, int y, int width) override; virtual void blitAntiH(int x, int y, const SkAlpha[], - const int16_t runs[]) SK_OVERRIDE; - void blitV(int x, int y, int height, SkAlpha alpha) SK_OVERRIDE; - void blitRect(int x, int y, int width, int height) SK_OVERRIDE; - void blitMask(const SkMask&, const SkIRect& clip) SK_OVERRIDE; - const SkBitmap* justAnOpaqueColor(uint32_t* value) SK_OVERRIDE; - bool isNullBlitter() const SK_OVERRIDE; + const int16_t runs[]) override; + void blitV(int x, int y, int height, SkAlpha alpha) override; + void blitRect(int x, int y, int width, int height) override; + void blitMask(const SkMask&, const SkIRect& clip) override; + const SkBitmap* justAnOpaqueColor(uint32_t* value) override; + bool isNullBlitter() const override; }; /** Wraps another (real) blitter, and ensures that the real blitter is only @@ -141,21 +141,21 @@ public: fClipRect = clipRect; } - void blitH(int x, int y, int width) SK_OVERRIDE; + void blitH(int x, int y, int width) override; virtual void blitAntiH(int x, int y, const SkAlpha[], - const int16_t runs[]) SK_OVERRIDE; - void blitV(int x, int y, int height, SkAlpha alpha) SK_OVERRIDE; - void blitRect(int x, int y, int width, int height) SK_OVERRIDE; + const int16_t runs[]) override; + void blitV(int x, int y, int height, SkAlpha alpha) override; + void blitRect(int x, int y, int width, int height) override; virtual void blitAntiRect(int x, int y, int width, int height, - SkAlpha leftAlpha, SkAlpha rightAlpha) SK_OVERRIDE; - void blitMask(const SkMask&, const SkIRect& clip) SK_OVERRIDE; - const SkBitmap* justAnOpaqueColor(uint32_t* value) SK_OVERRIDE; + SkAlpha leftAlpha, SkAlpha rightAlpha) override; + void blitMask(const SkMask&, const SkIRect& clip) override; + const SkBitmap* justAnOpaqueColor(uint32_t* value) override; - int requestRowsPreserved() const SK_OVERRIDE { + int requestRowsPreserved() const override { return fBlitter->requestRowsPreserved(); } - void* allocBlitMemory(size_t sz) SK_OVERRIDE { + void* allocBlitMemory(size_t sz) override { return fBlitter->allocBlitMemory(sz); } @@ -176,21 +176,21 @@ public: fRgn = clipRgn; } - void blitH(int x, int y, int width) SK_OVERRIDE; + void blitH(int x, int y, int width) override; virtual void blitAntiH(int x, int y, const SkAlpha[], - const int16_t runs[]) SK_OVERRIDE; - void blitV(int x, int y, int height, SkAlpha alpha) SK_OVERRIDE; - void blitRect(int x, int y, int width, int height) SK_OVERRIDE; + const int16_t runs[]) override; + void blitV(int x, int y, int height, SkAlpha alpha) override; + void blitRect(int x, int y, int width, int height) override; virtual void blitAntiRect(int x, int y, int width, int height, - SkAlpha leftAlpha, SkAlpha rightAlpha) SK_OVERRIDE; - void blitMask(const SkMask&, const SkIRect& clip) SK_OVERRIDE; - const SkBitmap* justAnOpaqueColor(uint32_t* value) SK_OVERRIDE; + SkAlpha leftAlpha, SkAlpha rightAlpha) override; + void blitMask(const SkMask&, const SkIRect& clip) override; + const SkBitmap* justAnOpaqueColor(uint32_t* value) override; - int requestRowsPreserved() const SK_OVERRIDE { + int requestRowsPreserved() const override { return fBlitter->requestRowsPreserved(); } - void* allocBlitMemory(size_t sz) SK_OVERRIDE { + void* allocBlitMemory(size_t sz) override { return fBlitter->allocBlitMemory(sz); } diff --git a/src/core/SkBlitter_RGB16.cpp b/src/core/SkBlitter_RGB16.cpp index 306c95b413..ed9e103b6d 100644 --- a/src/core/SkBlitter_RGB16.cpp +++ b/src/core/SkBlitter_RGB16.cpp @@ -59,14 +59,14 @@ void sk_dither_memset16(uint16_t dst[], uint16_t value, uint16_t other, class SkRGB16_Blitter : public SkRasterBlitter { public: SkRGB16_Blitter(const SkBitmap& device, const SkPaint& paint); - void blitH(int x, int y, int width) SK_OVERRIDE; + void blitH(int x, int y, int width) override; virtual void blitAntiH(int x, int y, const SkAlpha* antialias, - const int16_t* runs) SK_OVERRIDE; - void blitV(int x, int y, int height, SkAlpha alpha) SK_OVERRIDE; - void blitRect(int x, int y, int width, int height) SK_OVERRIDE; + const int16_t* runs) override; + void blitV(int x, int y, int height, SkAlpha alpha) override; + void blitRect(int x, int y, int width, int height) override; virtual void blitMask(const SkMask&, - const SkIRect&) SK_OVERRIDE; - const SkBitmap* justAnOpaqueColor(uint32_t*) SK_OVERRIDE; + const SkIRect&) override; + const SkBitmap* justAnOpaqueColor(uint32_t*) override; protected: SkPMColor fSrcColor32; @@ -88,13 +88,13 @@ protected: class SkRGB16_Opaque_Blitter : public SkRGB16_Blitter { public: SkRGB16_Opaque_Blitter(const SkBitmap& device, const SkPaint& paint); - void blitH(int x, int y, int width) SK_OVERRIDE; + void blitH(int x, int y, int width) override; virtual void blitAntiH(int x, int y, const SkAlpha* antialias, - const int16_t* runs) SK_OVERRIDE; - void blitV(int x, int y, int height, SkAlpha alpha) SK_OVERRIDE; - void blitRect(int x, int y, int width, int height) SK_OVERRIDE; + const int16_t* runs) override; + void blitV(int x, int y, int height, SkAlpha alpha) override; + void blitRect(int x, int y, int width, int height) override; virtual void blitMask(const SkMask&, - const SkIRect&) SK_OVERRIDE; + const SkIRect&) override; private: typedef SkRGB16_Blitter INHERITED; @@ -104,9 +104,9 @@ private: class SkRGB16_Black_Blitter : public SkRGB16_Opaque_Blitter { public: SkRGB16_Black_Blitter(const SkBitmap& device, const SkPaint& paint); - void blitMask(const SkMask&, const SkIRect&) SK_OVERRIDE; + void blitMask(const SkMask&, const SkIRect&) override; virtual void blitAntiH(int x, int y, const SkAlpha* antialias, - const int16_t* runs) SK_OVERRIDE; + const int16_t* runs) override; private: typedef SkRGB16_Opaque_Blitter INHERITED; @@ -118,10 +118,10 @@ public: SkRGB16_Shader_Blitter(const SkBitmap& device, const SkPaint& paint, SkShader::Context* shaderContext); virtual ~SkRGB16_Shader_Blitter(); - void blitH(int x, int y, int width) SK_OVERRIDE; + void blitH(int x, int y, int width) override; virtual void blitAntiH(int x, int y, const SkAlpha* antialias, - const int16_t* runs) SK_OVERRIDE; - void blitRect(int x, int y, int width, int height) SK_OVERRIDE; + const int16_t* runs) override; + void blitRect(int x, int y, int width, int height) override; protected: SkPMColor* fBuffer; @@ -140,10 +140,10 @@ class SkRGB16_Shader16_Blitter : public SkRGB16_Shader_Blitter { public: SkRGB16_Shader16_Blitter(const SkBitmap& device, const SkPaint& paint, SkShader::Context* shaderContext); - void blitH(int x, int y, int width) SK_OVERRIDE; + void blitH(int x, int y, int width) override; virtual void blitAntiH(int x, int y, const SkAlpha* antialias, - const int16_t* runs) SK_OVERRIDE; - void blitRect(int x, int y, int width, int height) SK_OVERRIDE; + const int16_t* runs) override; + void blitRect(int x, int y, int width, int height) override; private: typedef SkRGB16_Shader_Blitter INHERITED; @@ -154,9 +154,9 @@ public: SkRGB16_Shader_Xfermode_Blitter(const SkBitmap& device, const SkPaint& paint, SkShader::Context* shaderContext); virtual ~SkRGB16_Shader_Xfermode_Blitter(); - void blitH(int x, int y, int width) SK_OVERRIDE; + void blitH(int x, int y, int width) override; virtual void blitAntiH(int x, int y, const SkAlpha* antialias, - const int16_t* runs) SK_OVERRIDE; + const int16_t* runs) override; private: SkXfermode* fXfermode; diff --git a/src/core/SkBuffer.h b/src/core/SkBuffer.h index 96e225be3a..aaafb36399 100644 --- a/src/core/SkBuffer.h +++ b/src/core/SkBuffer.h @@ -105,7 +105,7 @@ public: null and the number of bytes to read does not overflow this object's data, copy those bytes into buffer. */ - bool read(void* buffer, size_t size) SK_OVERRIDE; + bool read(void* buffer, size_t size) override; /** Returns whether or not a read operation attempted to read past the end of the data. */ diff --git a/src/core/SkColorFilter.cpp b/src/core/SkColorFilter.cpp index 45950ad0b5..8007271a3f 100644 --- a/src/core/SkColorFilter.cpp +++ b/src/core/SkColorFilter.cpp @@ -42,18 +42,18 @@ SkColor SkColorFilter::filterColor(SkColor c) const { class SkComposeColorFilter : public SkColorFilter { public: - uint32_t getFlags() const SK_OVERRIDE { + uint32_t getFlags() const override { // Can only claim alphaunchanged and 16bit support if both our proxys do. return fOuter->getFlags() & fInner->getFlags(); } - void filterSpan(const SkPMColor shader[], int count, SkPMColor result[]) const SK_OVERRIDE { + void filterSpan(const SkPMColor shader[], int count, SkPMColor result[]) const override { fInner->filterSpan(shader, count, result); fOuter->filterSpan(result, count, result); } #ifndef SK_IGNORE_TO_STRING - void toString(SkString* str) const SK_OVERRIDE { + void toString(SkString* str) const override { SkString outerS, innerS; fOuter->toString(&outerS); fInner->toString(&innerS); @@ -63,7 +63,7 @@ public: #if SK_SUPPORT_GPU bool asFragmentProcessors(GrContext* context, - SkTDArray* array) const SK_OVERRIDE { + SkTDArray* array) const override { bool hasFrags = fInner->asFragmentProcessors(context, array); hasFrags |= fOuter->asFragmentProcessors(context, array); return hasFrags; @@ -73,7 +73,7 @@ public: SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkComposeColorFilter) protected: - void flatten(SkWriteBuffer& buffer) const SK_OVERRIDE { + void flatten(SkWriteBuffer& buffer) const override { buffer.writeFlattenable(fOuter); buffer.writeFlattenable(fInner); } @@ -88,7 +88,7 @@ private: SkASSERT(composedFilterCount <= SK_MAX_COMPOSE_COLORFILTER_COUNT); } - int privateComposedFilterCount() const SK_OVERRIDE { + int privateComposedFilterCount() const override { return fComposedFilterCount; } diff --git a/src/core/SkColorShader.h b/src/core/SkColorShader.h index 9fbd5e1e8e..918e19e27a 100644 --- a/src/core/SkColorShader.h +++ b/src/core/SkColorShader.h @@ -23,9 +23,9 @@ public: */ explicit SkColorShader(SkColor c); - bool isOpaque() const SK_OVERRIDE; + bool isOpaque() const override; - size_t contextSize() const SK_OVERRIDE { + size_t contextSize() const override { return sizeof(ColorShaderContext); } @@ -33,11 +33,11 @@ public: public: ColorShaderContext(const SkColorShader& shader, const ContextRec&); - uint32_t getFlags() const SK_OVERRIDE; - uint8_t getSpan16Alpha() const SK_OVERRIDE; - void shadeSpan(int x, int y, SkPMColor span[], int count) SK_OVERRIDE; - void shadeSpan16(int x, int y, uint16_t span[], int count) SK_OVERRIDE; - void shadeSpanAlpha(int x, int y, uint8_t alpha[], int count) SK_OVERRIDE; + uint32_t getFlags() const override; + uint8_t getSpan16Alpha() const override; + void shadeSpan(int x, int y, SkPMColor span[], int count) override; + void shadeSpan16(int x, int y, uint16_t span[], int count) override; + void shadeSpanAlpha(int x, int y, uint8_t alpha[], int count) override; private: SkPMColor fPMColor; @@ -50,22 +50,22 @@ public: // we return false for this, use asAGradient virtual BitmapType asABitmap(SkBitmap* outTexture, SkMatrix* outMatrix, - TileMode xy[2]) const SK_OVERRIDE; + TileMode xy[2]) const override; - GradientType asAGradient(GradientInfo* info) const SK_OVERRIDE; + GradientType asAGradient(GradientInfo* info) const override; virtual bool asFragmentProcessor(GrContext*, const SkPaint&, const SkMatrix& viewM, const SkMatrix*, GrColor*, - GrFragmentProcessor**) const SK_OVERRIDE; + GrFragmentProcessor**) const override; SK_TO_STRING_OVERRIDE() SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkColorShader) protected: SkColorShader(SkReadBuffer&); - void flatten(SkWriteBuffer&) const SK_OVERRIDE; - Context* onCreateContext(const ContextRec&, void* storage) const SK_OVERRIDE; - bool onAsLuminanceColor(SkColor* lum) const SK_OVERRIDE { + void flatten(SkWriteBuffer&) const override; + Context* onCreateContext(const ContextRec&, void* storage) const override; + bool onAsLuminanceColor(SkColor* lum) const override { *lum = fColor; return true; } diff --git a/src/core/SkCoreBlitters.h b/src/core/SkCoreBlitters.h index e6be38a583..f4a5d6f4db 100644 --- a/src/core/SkCoreBlitters.h +++ b/src/core/SkCoreBlitters.h @@ -41,9 +41,9 @@ public: * Will create the context at the same location as the old one (this is safe * because the shader itself is unchanged). */ - bool resetShaderContext(const SkShader::ContextRec&) SK_OVERRIDE; + bool resetShaderContext(const SkShader::ContextRec&) override; - SkShader::Context* getShaderContext() const SK_OVERRIDE { return fShaderContext; } + SkShader::Context* getShaderContext() const override { return fShaderContext; } protected: uint32_t fShaderFlags; @@ -62,12 +62,12 @@ private: class SkA8_Coverage_Blitter : public SkRasterBlitter { public: SkA8_Coverage_Blitter(const SkBitmap& device, const SkPaint& paint); - void blitH(int x, int y, int width) SK_OVERRIDE; - void blitAntiH(int x, int y, const SkAlpha antialias[], const int16_t runs[]) SK_OVERRIDE; - void blitV(int x, int y, int height, SkAlpha alpha) SK_OVERRIDE; - void blitRect(int x, int y, int width, int height) SK_OVERRIDE; - void blitMask(const SkMask&, const SkIRect&) SK_OVERRIDE; - const SkBitmap* justAnOpaqueColor(uint32_t*) SK_OVERRIDE; + void blitH(int x, int y, int width) override; + void blitAntiH(int x, int y, const SkAlpha antialias[], const int16_t runs[]) override; + void blitV(int x, int y, int height, SkAlpha alpha) override; + void blitRect(int x, int y, int width, int height) override; + void blitMask(const SkMask&, const SkIRect&) override; + const SkBitmap* justAnOpaqueColor(uint32_t*) override; }; class SkA8_Blitter : public SkRasterBlitter { @@ -160,11 +160,11 @@ public: SkARGB32_Shader_Blitter(const SkBitmap& device, const SkPaint& paint, SkShader::Context* shaderContext); virtual ~SkARGB32_Shader_Blitter(); - void blitH(int x, int y, int width) SK_OVERRIDE; - void blitV(int x, int y, int height, SkAlpha alpha) SK_OVERRIDE; - void blitRect(int x, int y, int width, int height) SK_OVERRIDE; - void blitAntiH(int x, int y, const SkAlpha[], const int16_t[]) SK_OVERRIDE; - void blitMask(const SkMask&, const SkIRect&) SK_OVERRIDE; + void blitH(int x, int y, int width) override; + void blitV(int x, int y, int height, SkAlpha alpha) override; + void blitRect(int x, int y, int width, int height) override; + void blitAntiH(int x, int y, const SkAlpha[], const int16_t[]) override; + void blitMask(const SkMask&, const SkIRect&) override; private: SkXfermode* fXfermode; diff --git a/src/core/SkDeviceImageFilterProxy.h b/src/core/SkDeviceImageFilterProxy.h index 909e60d2df..aa2fd1a5aa 100644 --- a/src/core/SkDeviceImageFilterProxy.h +++ b/src/core/SkDeviceImageFilterProxy.h @@ -19,22 +19,22 @@ public: , fProps(props.flags(), kUnknown_SkPixelGeometry) {} - SkBaseDevice* createDevice(int w, int h) SK_OVERRIDE { + SkBaseDevice* createDevice(int w, int h) override { SkBaseDevice::CreateInfo cinfo(SkImageInfo::MakeN32Premul(w, h), SkBaseDevice::kPossible_TileUsage, kUnknown_SkPixelGeometry); return fDevice->onCreateDevice(cinfo, NULL); } - bool canHandleImageFilter(const SkImageFilter* filter) SK_OVERRIDE { + bool canHandleImageFilter(const SkImageFilter* filter) override { return fDevice->canHandleImageFilter(filter); } virtual bool filterImage(const SkImageFilter* filter, const SkBitmap& src, const SkImageFilter::Context& ctx, - SkBitmap* result, SkIPoint* offset) SK_OVERRIDE { + SkBitmap* result, SkIPoint* offset) override { return fDevice->filterImage(filter, src, ctx, result, offset); } - const SkSurfaceProps* surfaceProps() const SK_OVERRIDE { + const SkSurfaceProps* surfaceProps() const override { return &fProps; } diff --git a/src/core/SkDraw.cpp b/src/core/SkDraw.cpp index 7744b99920..c4c1bc5ddd 100644 --- a/src/core/SkDraw.cpp +++ b/src/core/SkDraw.cpp @@ -1900,7 +1900,7 @@ class SkTriColorShader : public SkShader { public: SkTriColorShader() {} - size_t contextSize() const SK_OVERRIDE; + size_t contextSize() const override; class TriColorShaderContext : public SkShader::Context { public: @@ -1909,7 +1909,7 @@ public: bool setup(const SkPoint pts[], const SkColor colors[], int, int, int); - void shadeSpan(int x, int y, SkPMColor dstC[], int count) SK_OVERRIDE; + void shadeSpan(int x, int y, SkPMColor dstC[], int count) override; private: SkMatrix fDstToUnit; @@ -1921,10 +1921,10 @@ public: SK_TO_STRING_OVERRIDE() // For serialization. This will never be called. - Factory getFactory() const SK_OVERRIDE { sk_throw(); return NULL; } + Factory getFactory() const override { sk_throw(); return NULL; } protected: - Context* onCreateContext(const ContextRec& rec, void* storage) const SK_OVERRIDE { + Context* onCreateContext(const ContextRec& rec, void* storage) const override { return SkNEW_PLACEMENT_ARGS(storage, TriColorShaderContext, (*this, rec)); } diff --git a/src/core/SkEmptyShader.h b/src/core/SkEmptyShader.h index 0de85caf5b..8809d5f958 100644 --- a/src/core/SkEmptyShader.h +++ b/src/core/SkEmptyShader.h @@ -20,7 +20,7 @@ class SK_API SkEmptyShader : public SkShader { public: SkEmptyShader() {} - size_t contextSize() const SK_OVERRIDE { + size_t contextSize() const override { // Even though createContext returns NULL we have to return a value of at least // sizeof(SkShader::Context) to satisfy SkSmallAllocator. return sizeof(SkShader::Context); @@ -30,7 +30,7 @@ public: SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkEmptyShader) protected: - SkShader::Context* onCreateContext(const ContextRec&, void*) const SK_OVERRIDE { + SkShader::Context* onCreateContext(const ContextRec&, void*) const override { return NULL; } diff --git a/src/core/SkFilterShader.h b/src/core/SkFilterShader.h index 65291c8f39..ea5eaed34f 100644 --- a/src/core/SkFilterShader.h +++ b/src/core/SkFilterShader.h @@ -17,7 +17,7 @@ public: SkFilterShader(SkShader* shader, SkColorFilter* filter); virtual ~SkFilterShader(); - size_t contextSize() const SK_OVERRIDE; + size_t contextSize() const override; class FilterShaderContext : public SkShader::Context { public: @@ -25,11 +25,11 @@ public: FilterShaderContext(const SkFilterShader&, SkShader::Context*, const ContextRec&); virtual ~FilterShaderContext(); - uint32_t getFlags() const SK_OVERRIDE; + uint32_t getFlags() const override; - void shadeSpan(int x, int y, SkPMColor[], int count) SK_OVERRIDE; + void shadeSpan(int x, int y, SkPMColor[], int count) override; - void set3DMask(const SkMask* mask) SK_OVERRIDE { + void set3DMask(const SkMask* mask) override { // forward to our proxy fShaderContext->set3DMask(mask); } @@ -44,8 +44,8 @@ public: SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkFilterShader) protected: - void flatten(SkWriteBuffer&) const SK_OVERRIDE; - Context* onCreateContext(const ContextRec&, void* storage) const SK_OVERRIDE; + void flatten(SkWriteBuffer&) const override; + Context* onCreateContext(const ContextRec&, void* storage) const override; private: diff --git a/src/core/SkFlate.h b/src/core/SkFlate.h index e9c40ae9e0..35f18499ef 100644 --- a/src/core/SkFlate.h +++ b/src/core/SkFlate.h @@ -66,8 +66,8 @@ public: void finalize(); // The SkWStream interface: - bool write(const void*, size_t) SK_OVERRIDE; - size_t bytesWritten() const SK_OVERRIDE; + bool write(const void*, size_t) override; + size_t bytesWritten() const override; private: struct Impl; diff --git a/src/core/SkFontMgr.cpp b/src/core/SkFontMgr.cpp index 4e0f549896..a03e05e0e4 100644 --- a/src/core/SkFontMgr.cpp +++ b/src/core/SkFontMgr.cpp @@ -15,15 +15,15 @@ class SkTypeface; class SkEmptyFontStyleSet : public SkFontStyleSet { public: - int count() SK_OVERRIDE { return 0; } - void getStyle(int, SkFontStyle*, SkString*) SK_OVERRIDE { + int count() override { return 0; } + void getStyle(int, SkFontStyle*, SkString*) override { SkDEBUGFAIL("SkFontStyleSet::getStyle called on empty set"); } - SkTypeface* createTypeface(int index) SK_OVERRIDE { + SkTypeface* createTypeface(int index) override { SkDEBUGFAIL("SkFontStyleSet::createTypeface called on empty set"); return NULL; } - SkTypeface* matchStyle(const SkFontStyle&) SK_OVERRIDE { + SkTypeface* matchStyle(const SkFontStyle&) override { return NULL; } }; @@ -36,46 +36,46 @@ SkFontStyleSet* SkFontStyleSet::CreateEmpty() { class SkEmptyFontMgr : public SkFontMgr { protected: - int onCountFamilies() const SK_OVERRIDE { + int onCountFamilies() const override { return 0; } - void onGetFamilyName(int index, SkString* familyName) const SK_OVERRIDE { + void onGetFamilyName(int index, SkString* familyName) const override { SkDEBUGFAIL("onGetFamilyName called with bad index"); } - SkFontStyleSet* onCreateStyleSet(int index) const SK_OVERRIDE { + SkFontStyleSet* onCreateStyleSet(int index) const override { SkDEBUGFAIL("onCreateStyleSet called with bad index"); return NULL; } - SkFontStyleSet* onMatchFamily(const char[]) const SK_OVERRIDE { + SkFontStyleSet* onMatchFamily(const char[]) const override { return SkFontStyleSet::CreateEmpty(); } virtual SkTypeface* onMatchFamilyStyle(const char[], - const SkFontStyle&) const SK_OVERRIDE { + const SkFontStyle&) const override { return NULL; } virtual SkTypeface* onMatchFamilyStyleCharacter(const char familyName[], const SkFontStyle& style, const char* bcp47[], int bcp47Count, - SkUnichar character) const SK_OVERRIDE { + SkUnichar character) const override { return NULL; } virtual SkTypeface* onMatchFaceStyle(const SkTypeface*, - const SkFontStyle&) const SK_OVERRIDE { + const SkFontStyle&) const override { return NULL; } - SkTypeface* onCreateFromData(SkData*, int) const SK_OVERRIDE { + SkTypeface* onCreateFromData(SkData*, int) const override { return NULL; } - SkTypeface* onCreateFromStream(SkStreamAsset* stream, int) const SK_OVERRIDE { + SkTypeface* onCreateFromStream(SkStreamAsset* stream, int) const override { SkDELETE(stream); return NULL; } - SkTypeface* onCreateFromFile(const char[], int) const SK_OVERRIDE { + SkTypeface* onCreateFromFile(const char[], int) const override { return NULL; } - SkTypeface* onLegacyCreateTypeface(const char [], unsigned) const SK_OVERRIDE { + SkTypeface* onLegacyCreateTypeface(const char [], unsigned) const override { return NULL; } }; diff --git a/src/core/SkImageFilter.cpp b/src/core/SkImageFilter.cpp index fd98911ca5..d51d9c8cd9 100644 --- a/src/core/SkImageFilter.cpp +++ b/src/core/SkImageFilter.cpp @@ -440,7 +440,7 @@ public: } SK_DECLARE_INTERNAL_LLIST_INTERFACE(Value); }; - bool get(const Key& key, SkBitmap* result, SkIPoint* offset) const SK_OVERRIDE { + bool get(const Key& key, SkBitmap* result, SkIPoint* offset) const override { SkAutoMutexAcquire mutex(fMutex); if (Value* v = fLookup.find(key)) { *result = v->fBitmap; @@ -453,7 +453,7 @@ public: } return false; } - void set(const Key& key, const SkBitmap& result, const SkIPoint& offset) SK_OVERRIDE { + void set(const Key& key, const SkBitmap& result, const SkIPoint& offset) override { SkAutoMutexAcquire mutex(fMutex); if (Value* v = fLookup.find(key)) { removeInternal(v); diff --git a/src/core/SkLocalMatrixShader.h b/src/core/SkLocalMatrixShader.h index be78bee110..1a469948c6 100644 --- a/src/core/SkLocalMatrixShader.h +++ b/src/core/SkLocalMatrixShader.h @@ -19,16 +19,16 @@ public: , fProxyShader(SkRef(proxy)) {} - size_t contextSize() const SK_OVERRIDE { + size_t contextSize() const override { return fProxyShader->contextSize(); } virtual BitmapType asABitmap(SkBitmap* bitmap, SkMatrix* matrix, - TileMode* mode) const SK_OVERRIDE { + TileMode* mode) const override { return fProxyShader->asABitmap(bitmap, matrix, mode); } - GradientType asAGradient(GradientInfo* info) const SK_OVERRIDE { + GradientType asAGradient(GradientInfo* info) const override { return fProxyShader->asAGradient(info); } @@ -36,7 +36,7 @@ public: virtual bool asFragmentProcessor(GrContext* context, const SkPaint& paint, const SkMatrix& viewM, const SkMatrix* localMatrix, - GrColor* grColor, GrFragmentProcessor** fp) const SK_OVERRIDE { + GrColor* grColor, GrFragmentProcessor** fp) const override { SkMatrix tmp = this->getLocalMatrix(); if (localMatrix) { tmp.preConcat(*localMatrix); @@ -48,14 +48,14 @@ public: virtual bool asFragmentProcessor(GrContext*, const SkPaint&, const SkMatrix&, const SkMatrix*, GrColor*, - GrFragmentProcessor**) const SK_OVERRIDE { + GrFragmentProcessor**) const override { SkDEBUGFAIL("Should not call in GPU-less build"); return false; } #endif - SkShader* refAsALocalMatrixShader(SkMatrix* localMatrix) const SK_OVERRIDE { + SkShader* refAsALocalMatrixShader(SkMatrix* localMatrix) const override { if (localMatrix) { *localMatrix = this->getLocalMatrix(); } @@ -66,8 +66,8 @@ public: SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkLocalMatrixShader) protected: - void flatten(SkWriteBuffer&) const SK_OVERRIDE; - Context* onCreateContext(const ContextRec&, void*) const SK_OVERRIDE; + void flatten(SkWriteBuffer&) const override; + Context* onCreateContext(const ContextRec&, void*) const override; private: SkAutoTUnref fProxyShader; diff --git a/src/core/SkMaskCache.cpp b/src/core/SkMaskCache.cpp index b0399b114b..31a789fd38 100644 --- a/src/core/SkMaskCache.cpp +++ b/src/core/SkMaskCache.cpp @@ -51,8 +51,8 @@ struct RRectBlurRec : public SkResourceCache::Rec { RRectBlurKey fKey; MaskValue fValue; - const Key& getKey() const SK_OVERRIDE { return fKey; } - size_t bytesUsed() const SK_OVERRIDE { return sizeof(*this) + fValue.fData->size(); } + const Key& getKey() const override { return fKey; } + size_t bytesUsed() const override { return sizeof(*this) + fValue.fData->size(); } static bool Visitor(const SkResourceCache::Rec& baseRec, void* contextData) { const RRectBlurRec& rec = static_cast(baseRec); @@ -142,8 +142,8 @@ struct RectsBlurRec : public SkResourceCache::Rec { RectsBlurKey fKey; MaskValue fValue; - const Key& getKey() const SK_OVERRIDE { return fKey; } - size_t bytesUsed() const SK_OVERRIDE { return sizeof(*this) + fValue.fData->size(); } + const Key& getKey() const override { return fKey; } + size_t bytesUsed() const override { return sizeof(*this) + fValue.fData->size(); } static bool Visitor(const SkResourceCache::Rec& baseRec, void* contextData) { const RectsBlurRec& rec = static_cast(baseRec); diff --git a/src/core/SkMaskGamma.cpp b/src/core/SkMaskGamma.cpp index abc729baae..bbe72c4e35 100644 --- a/src/core/SkMaskGamma.cpp +++ b/src/core/SkMaskGamma.cpp @@ -12,27 +12,27 @@ #include "SkMaskGamma.h" class SkLinearColorSpaceLuminance : public SkColorSpaceLuminance { - SkScalar toLuma(SkScalar SkDEBUGCODE(gamma), SkScalar luminance) const SK_OVERRIDE { + SkScalar toLuma(SkScalar SkDEBUGCODE(gamma), SkScalar luminance) const override { SkASSERT(SK_Scalar1 == gamma); return luminance; } - SkScalar fromLuma(SkScalar SkDEBUGCODE(gamma), SkScalar luma) const SK_OVERRIDE { + SkScalar fromLuma(SkScalar SkDEBUGCODE(gamma), SkScalar luma) const override { SkASSERT(SK_Scalar1 == gamma); return luma; } }; class SkGammaColorSpaceLuminance : public SkColorSpaceLuminance { - SkScalar toLuma(SkScalar gamma, SkScalar luminance) const SK_OVERRIDE { + SkScalar toLuma(SkScalar gamma, SkScalar luminance) const override { return SkScalarPow(luminance, gamma); } - SkScalar fromLuma(SkScalar gamma, SkScalar luma) const SK_OVERRIDE { + SkScalar fromLuma(SkScalar gamma, SkScalar luma) const override { return SkScalarPow(luma, SkScalarInvert(gamma)); } }; class SkSRGBColorSpaceLuminance : public SkColorSpaceLuminance { - SkScalar toLuma(SkScalar SkDEBUGCODE(gamma), SkScalar luminance) const SK_OVERRIDE { + SkScalar toLuma(SkScalar SkDEBUGCODE(gamma), SkScalar luminance) const override { SkASSERT(0 == gamma); //The magic numbers are derived from the sRGB specification. //See http://www.color.org/chardata/rgb/srgb.xalter . @@ -42,7 +42,7 @@ class SkSRGBColorSpaceLuminance : public SkColorSpaceLuminance { return SkScalarPow((luminance + 0.055f) / 1.055f, 2.4f); } - SkScalar fromLuma(SkScalar SkDEBUGCODE(gamma), SkScalar luma) const SK_OVERRIDE { + SkScalar fromLuma(SkScalar SkDEBUGCODE(gamma), SkScalar luma) const override { SkASSERT(0 == gamma); //The magic numbers are derived from the sRGB specification. //See http://www.color.org/chardata/rgb/srgb.xalter . diff --git a/src/core/SkMatrixImageFilter.h b/src/core/SkMatrixImageFilter.h index 2c11aa63a3..012a36057d 100644 --- a/src/core/SkMatrixImageFilter.h +++ b/src/core/SkMatrixImageFilter.h @@ -40,7 +40,7 @@ public: #endif virtual ~SkMatrixImageFilter(); - void computeFastBounds(const SkRect&, SkRect*) const SK_OVERRIDE; + void computeFastBounds(const SkRect&, SkRect*) const override; SK_TO_STRING_OVERRIDE() SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkMatrixImageFilter) @@ -49,12 +49,12 @@ protected: SkMatrixImageFilter(const SkMatrix& transform, SkFilterQuality, SkImageFilter* input); - void flatten(SkWriteBuffer&) const SK_OVERRIDE; + void flatten(SkWriteBuffer&) const override; virtual bool onFilterImage(Proxy*, const SkBitmap& src, const Context&, - SkBitmap* result, SkIPoint* loc) const SK_OVERRIDE; + SkBitmap* result, SkIPoint* loc) const override; virtual bool onFilterBounds(const SkIRect& src, const SkMatrix&, - SkIRect* dst) const SK_OVERRIDE; + SkIRect* dst) const override; private: SkMatrix fTransform; diff --git a/src/core/SkMipMap.h b/src/core/SkMipMap.h index d4039687c0..e22c0a2181 100644 --- a/src/core/SkMipMap.h +++ b/src/core/SkMipMap.h @@ -30,7 +30,7 @@ public: bool extractLevel(SkScalar scale, Level*) const; protected: - void onDataChange(void* oldData, void* newData) SK_OVERRIDE { + void onDataChange(void* oldData, void* newData) override { fLevels = (Level*)newData; // could be NULL } diff --git a/src/core/SkPictureRecord.h b/src/core/SkPictureRecord.h index 3ce0007a3c..5e2d5a10e4 100644 --- a/src/core/SkPictureRecord.h +++ b/src/core/SkPictureRecord.h @@ -29,9 +29,9 @@ public: SkPictureRecord(const SkISize& dimensions, uint32_t recordFlags); virtual ~SkPictureRecord(); - void beginCommentGroup(const char* description) SK_OVERRIDE; - void addComment(const char* kywd, const char* value) SK_OVERRIDE; - void endCommentGroup() SK_OVERRIDE; + void beginCommentGroup(const char* description) override; + void addComment(const char* kywd, const char* value) override; + void endCommentGroup() override; const SkTDArray& getPictureRefs() const { return fPictureRefs; @@ -146,65 +146,65 @@ protected: SkASSERT(fWriter.bytesWritten() == initialOffset + size); } - SkSurface* onNewSurface(const SkImageInfo&, const SkSurfaceProps&) SK_OVERRIDE; - const void* onPeekPixels(SkImageInfo*, size_t*) SK_OVERRIDE { + SkSurface* onNewSurface(const SkImageInfo&, const SkSurfaceProps&) override; + const void* onPeekPixels(SkImageInfo*, size_t*) override { return NULL; } - void willSave() SK_OVERRIDE; - SaveLayerStrategy willSaveLayer(const SkRect*, const SkPaint*, SaveFlags) SK_OVERRIDE; - void willRestore() SK_OVERRIDE; + void willSave() override; + SaveLayerStrategy willSaveLayer(const SkRect*, const SkPaint*, SaveFlags) override; + void willRestore() override; - void didConcat(const SkMatrix&) SK_OVERRIDE; - void didSetMatrix(const SkMatrix&) SK_OVERRIDE; + void didConcat(const SkMatrix&) override; + void didSetMatrix(const SkMatrix&) override; - void onDrawDRRect(const SkRRect&, const SkRRect&, const SkPaint&) SK_OVERRIDE; + void onDrawDRRect(const SkRRect&, const SkRRect&, const SkPaint&) override; virtual void onDrawText(const void* text, size_t byteLength, SkScalar x, SkScalar y, - const SkPaint&) SK_OVERRIDE; + const SkPaint&) override; virtual void onDrawPosText(const void* text, size_t byteLength, const SkPoint pos[], - const SkPaint&) SK_OVERRIDE; + const SkPaint&) override; virtual void onDrawPosTextH(const void* text, size_t byteLength, const SkScalar xpos[], - SkScalar constY, const SkPaint&) SK_OVERRIDE; + SkScalar constY, const SkPaint&) override; virtual void onDrawTextOnPath(const void* text, size_t byteLength, const SkPath& path, - const SkMatrix* matrix, const SkPaint&) SK_OVERRIDE; + const SkMatrix* matrix, const SkPaint&) override; virtual void onDrawTextBlob(const SkTextBlob* blob, SkScalar x, SkScalar y, - const SkPaint& paint) SK_OVERRIDE; + const SkPaint& paint) override; virtual void onDrawPatch(const SkPoint cubics[12], const SkColor colors[4], const SkPoint texCoords[4], SkXfermode* xmode, - const SkPaint& paint) SK_OVERRIDE; - - void onDrawPaint(const SkPaint&) SK_OVERRIDE; - void onDrawPoints(PointMode, size_t count, const SkPoint pts[], const SkPaint&) SK_OVERRIDE; - void onDrawRect(const SkRect&, const SkPaint&) SK_OVERRIDE; - void onDrawOval(const SkRect&, const SkPaint&) SK_OVERRIDE; - void onDrawRRect(const SkRRect&, const SkPaint&) SK_OVERRIDE; - void onDrawPath(const SkPath&, const SkPaint&) SK_OVERRIDE; - void onDrawBitmap(const SkBitmap&, SkScalar left, SkScalar top, const SkPaint*) SK_OVERRIDE; + const SkPaint& paint) override; + + void onDrawPaint(const SkPaint&) override; + void onDrawPoints(PointMode, size_t count, const SkPoint pts[], const SkPaint&) override; + void onDrawRect(const SkRect&, const SkPaint&) override; + void onDrawOval(const SkRect&, const SkPaint&) override; + void onDrawRRect(const SkRRect&, const SkPaint&) override; + void onDrawPath(const SkPath&, const SkPaint&) override; + void onDrawBitmap(const SkBitmap&, SkScalar left, SkScalar top, const SkPaint*) override; void onDrawBitmapRect(const SkBitmap&, const SkRect* src, const SkRect& dst, const SkPaint*, - DrawBitmapRectFlags flags) SK_OVERRIDE; + DrawBitmapRectFlags flags) override; #if 0 // rely on conversion to bitmap (for now) - void onDrawImage(const SkImage*, SkScalar left, SkScalar top, const SkPaint*) SK_OVERRIDE; + void onDrawImage(const SkImage*, SkScalar left, SkScalar top, const SkPaint*) override; void onDrawImageRect(const SkImage*, const SkRect* src, const SkRect& dst, - const SkPaint*) SK_OVERRIDE; + const SkPaint*) override; #endif void onDrawBitmapNine(const SkBitmap&, const SkIRect& center, const SkRect& dst, - const SkPaint*) SK_OVERRIDE; - void onDrawSprite(const SkBitmap&, int left, int top, const SkPaint*) SK_OVERRIDE; + const SkPaint*) override; + void onDrawSprite(const SkBitmap&, int left, int top, const SkPaint*) override; void onDrawVertices(VertexMode vmode, int vertexCount, const SkPoint vertices[], const SkPoint texs[], const SkColor colors[], SkXfermode* xmode, const uint16_t indices[], int indexCount, - const SkPaint&) SK_OVERRIDE; + const SkPaint&) override; - void onClipRect(const SkRect&, SkRegion::Op, ClipEdgeStyle) SK_OVERRIDE; - void onClipRRect(const SkRRect&, SkRegion::Op, ClipEdgeStyle) SK_OVERRIDE; - void onClipPath(const SkPath&, SkRegion::Op, ClipEdgeStyle) SK_OVERRIDE; - void onClipRegion(const SkRegion&, SkRegion::Op) SK_OVERRIDE; + void onClipRect(const SkRect&, SkRegion::Op, ClipEdgeStyle) override; + void onClipRRect(const SkRRect&, SkRegion::Op, ClipEdgeStyle) override; + void onClipPath(const SkPath&, SkRegion::Op, ClipEdgeStyle) override; + void onClipRegion(const SkRegion&, SkRegion::Op) override; - void onDrawPicture(const SkPicture*, const SkMatrix*, const SkPaint*) SK_OVERRIDE; + void onDrawPicture(const SkPicture*, const SkMatrix*, const SkPaint*) override; int addPathToHeap(const SkPath& path); // does not write to ops stream diff --git a/src/core/SkPictureRecorder.cpp b/src/core/SkPictureRecorder.cpp index 1972ad3341..850be27530 100644 --- a/src/core/SkPictureRecorder.cpp +++ b/src/core/SkPictureRecorder.cpp @@ -115,9 +115,9 @@ public: {} protected: - SkRect onGetBounds() SK_OVERRIDE { return fBounds; } + SkRect onGetBounds() override { return fBounds; } - void onDraw(SkCanvas* canvas) SK_OVERRIDE { + void onDraw(SkCanvas* canvas) override { SkDrawable* const* drawables = NULL; int drawableCount = 0; if (fDrawableList) { @@ -127,7 +127,7 @@ protected: SkRecordDraw(*fRecord, canvas, NULL, drawables, drawableCount, fBBH, NULL/*callback*/); } - SkPicture* onNewPictureSnapshot() SK_OVERRIDE { + SkPicture* onNewPictureSnapshot() override { SkPicture::SnapshotArray* pictList = NULL; if (fDrawableList) { // TODO: should we plumb-down the BBHFactory and recordFlags from our host diff --git a/src/core/SkPictureShader.cpp b/src/core/SkPictureShader.cpp index 3734791ce4..cd2301b91b 100644 --- a/src/core/SkPictureShader.cpp +++ b/src/core/SkPictureShader.cpp @@ -70,8 +70,8 @@ struct BitmapShaderRec : public SkResourceCache::Rec { SkAutoTUnref fShader; size_t fBitmapBytes; - const Key& getKey() const SK_OVERRIDE { return fKey; } - size_t bytesUsed() const SK_OVERRIDE { + const Key& getKey() const override { return fKey; } + size_t bytesUsed() const override { return sizeof(fKey) + sizeof(SkShader) + fBitmapBytes; } diff --git a/src/core/SkPictureShader.h b/src/core/SkPictureShader.h index 8df9f539b8..c40b01b828 100644 --- a/src/core/SkPictureShader.h +++ b/src/core/SkPictureShader.h @@ -25,18 +25,18 @@ public: const SkRect*); virtual ~SkPictureShader(); - size_t contextSize() const SK_OVERRIDE; + size_t contextSize() const override; SK_TO_STRING_OVERRIDE() SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkPictureShader) bool asFragmentProcessor(GrContext*, const SkPaint&, const SkMatrix& viewM, const SkMatrix*, - GrColor*, GrFragmentProcessor**) const SK_OVERRIDE; + GrColor*, GrFragmentProcessor**) const override; protected: SkPictureShader(SkReadBuffer&); - void flatten(SkWriteBuffer&) const SK_OVERRIDE; - Context* onCreateContext(const ContextRec&, void* storage) const SK_OVERRIDE; + void flatten(SkWriteBuffer&) const override; + Context* onCreateContext(const ContextRec&, void* storage) const override; private: SkPictureShader(const SkPicture*, TileMode, TileMode, const SkMatrix*, const SkRect*); @@ -54,11 +54,11 @@ private: virtual ~PictureShaderContext(); - uint32_t getFlags() const SK_OVERRIDE; + uint32_t getFlags() const override; - ShadeProc asAShadeProc(void** ctx) SK_OVERRIDE; - void shadeSpan(int x, int y, SkPMColor dstC[], int count) SK_OVERRIDE; - void shadeSpan16(int x, int y, uint16_t dstC[], int count) SK_OVERRIDE; + ShadeProc asAShadeProc(void** ctx) override; + void shadeSpan(int x, int y, SkPMColor dstC[], int count) override; + void shadeSpan16(int x, int y, uint16_t dstC[], int count) override; private: PictureShaderContext(const SkPictureShader&, const ContextRec&, SkShader* bitmapShader); diff --git a/src/core/SkRTree.h b/src/core/SkRTree.h index 9a118d4897..9db6d33797 100644 --- a/src/core/SkRTree.h +++ b/src/core/SkRTree.h @@ -41,9 +41,9 @@ public: explicit SkRTree(SkScalar aspectRatio = 1); virtual ~SkRTree() {} - void insert(const SkRect[], int N) SK_OVERRIDE; - void search(const SkRect& query, SkTDArray* results) const SK_OVERRIDE; - size_t bytesUsed() const SK_OVERRIDE; + void insert(const SkRect[], int N) override; + void search(const SkRect& query, SkTDArray* results) const override; + size_t bytesUsed() const override; // Methods and constants below here are only public for tests. @@ -53,7 +53,7 @@ public: int getCount() const { return fCount; } // Get the root bound. - SkRect getRootBound() const SK_OVERRIDE; + SkRect getRootBound() const override; // These values were empirically determined to produce reasonable performance in most cases. static const int kMinChildren = 6, diff --git a/src/core/SkRecorder.h b/src/core/SkRecorder.h index 130dce9ebc..834a2b65e4 100644 --- a/src/core/SkRecorder.h +++ b/src/core/SkRecorder.h @@ -45,76 +45,76 @@ public: // Make SkRecorder forget entirely about its SkRecord*; all calls to SkRecorder will fail. void forgetRecord(); - void willSave() SK_OVERRIDE; - SaveLayerStrategy willSaveLayer(const SkRect*, const SkPaint*, SkCanvas::SaveFlags) SK_OVERRIDE; - void willRestore() SK_OVERRIDE {} - void didRestore() SK_OVERRIDE; + void willSave() override; + SaveLayerStrategy willSaveLayer(const SkRect*, const SkPaint*, SkCanvas::SaveFlags) override; + void willRestore() override {} + void didRestore() override; - void didConcat(const SkMatrix&) SK_OVERRIDE; - void didSetMatrix(const SkMatrix&) SK_OVERRIDE; + void didConcat(const SkMatrix&) override; + void didSetMatrix(const SkMatrix&) override; - void onDrawDRRect(const SkRRect&, const SkRRect&, const SkPaint&) SK_OVERRIDE; - void onDrawDrawable(SkDrawable*) SK_OVERRIDE; + void onDrawDRRect(const SkRRect&, const SkRRect&, const SkPaint&) override; + void onDrawDrawable(SkDrawable*) override; void onDrawText(const void* text, size_t byteLength, SkScalar x, SkScalar y, - const SkPaint& paint) SK_OVERRIDE; + const SkPaint& paint) override; void onDrawPosText(const void* text, size_t byteLength, const SkPoint pos[], - const SkPaint& paint) SK_OVERRIDE; + const SkPaint& paint) override; void onDrawPosTextH(const void* text, size_t byteLength, const SkScalar xpos[], SkScalar constY, - const SkPaint& paint) SK_OVERRIDE; + const SkPaint& paint) override; void onDrawTextOnPath(const void* text, size_t byteLength, const SkPath& path, const SkMatrix* matrix, - const SkPaint& paint) SK_OVERRIDE; + const SkPaint& paint) override; void onDrawTextBlob(const SkTextBlob* blob, SkScalar x, SkScalar y, - const SkPaint& paint) SK_OVERRIDE; + const SkPaint& paint) override; void onDrawPatch(const SkPoint cubics[12], const SkColor colors[4], const SkPoint texCoords[4], SkXfermode* xmode, - const SkPaint& paint) SK_OVERRIDE; - - void onDrawPaint(const SkPaint&) SK_OVERRIDE; - void onDrawPoints(PointMode, size_t count, const SkPoint pts[], const SkPaint&) SK_OVERRIDE; - void onDrawRect(const SkRect&, const SkPaint&) SK_OVERRIDE; - void onDrawOval(const SkRect&, const SkPaint&) SK_OVERRIDE; - void onDrawRRect(const SkRRect&, const SkPaint&) SK_OVERRIDE; - void onDrawPath(const SkPath&, const SkPaint&) SK_OVERRIDE; - void onDrawBitmap(const SkBitmap&, SkScalar left, SkScalar top, const SkPaint*) SK_OVERRIDE; + const SkPaint& paint) override; + + void onDrawPaint(const SkPaint&) override; + void onDrawPoints(PointMode, size_t count, const SkPoint pts[], const SkPaint&) override; + void onDrawRect(const SkRect&, const SkPaint&) override; + void onDrawOval(const SkRect&, const SkPaint&) override; + void onDrawRRect(const SkRRect&, const SkPaint&) override; + void onDrawPath(const SkPath&, const SkPaint&) override; + void onDrawBitmap(const SkBitmap&, SkScalar left, SkScalar top, const SkPaint*) override; void onDrawBitmapRect(const SkBitmap&, const SkRect* src, const SkRect& dst, const SkPaint*, - DrawBitmapRectFlags flags) SK_OVERRIDE; - void onDrawImage(const SkImage*, SkScalar left, SkScalar top, const SkPaint*) SK_OVERRIDE; + DrawBitmapRectFlags flags) override; + void onDrawImage(const SkImage*, SkScalar left, SkScalar top, const SkPaint*) override; void onDrawImageRect(const SkImage*, const SkRect* src, const SkRect& dst, - const SkPaint*) SK_OVERRIDE; + const SkPaint*) override; void onDrawBitmapNine(const SkBitmap&, const SkIRect& center, const SkRect& dst, - const SkPaint*) SK_OVERRIDE; - void onDrawSprite(const SkBitmap&, int left, int top, const SkPaint*) SK_OVERRIDE; + const SkPaint*) override; + void onDrawSprite(const SkBitmap&, int left, int top, const SkPaint*) override; void onDrawVertices(VertexMode vmode, int vertexCount, const SkPoint vertices[], const SkPoint texs[], const SkColor colors[], SkXfermode* xmode, const uint16_t indices[], int indexCount, - const SkPaint&) SK_OVERRIDE; + const SkPaint&) override; - void onClipRect(const SkRect& rect, SkRegion::Op op, ClipEdgeStyle edgeStyle) SK_OVERRIDE; - void onClipRRect(const SkRRect& rrect, SkRegion::Op op, ClipEdgeStyle edgeStyle) SK_OVERRIDE; - void onClipPath(const SkPath& path, SkRegion::Op op, ClipEdgeStyle edgeStyle) SK_OVERRIDE; - void onClipRegion(const SkRegion& deviceRgn, SkRegion::Op op) SK_OVERRIDE; + void onClipRect(const SkRect& rect, SkRegion::Op op, ClipEdgeStyle edgeStyle) override; + void onClipRRect(const SkRRect& rrect, SkRegion::Op op, ClipEdgeStyle edgeStyle) override; + void onClipPath(const SkPath& path, SkRegion::Op op, ClipEdgeStyle edgeStyle) override; + void onClipRegion(const SkRegion& deviceRgn, SkRegion::Op op) override; - void onDrawPicture(const SkPicture*, const SkMatrix*, const SkPaint*) SK_OVERRIDE; + void onDrawPicture(const SkPicture*, const SkMatrix*, const SkPaint*) override; - void beginCommentGroup(const char*) SK_OVERRIDE; - void addComment(const char*, const char*) SK_OVERRIDE; - void endCommentGroup() SK_OVERRIDE; + void beginCommentGroup(const char*) override; + void addComment(const char*, const char*) override; + void endCommentGroup() override; - SkSurface* onNewSurface(const SkImageInfo&, const SkSurfaceProps&) SK_OVERRIDE { return NULL; } + SkSurface* onNewSurface(const SkImageInfo&, const SkSurfaceProps&) override { return NULL; } private: template diff --git a/src/core/SkRegion_path.cpp b/src/core/SkRegion_path.cpp index 5b665d4706..ad01cacfba 100644 --- a/src/core/SkRegion_path.cpp +++ b/src/core/SkRegion_path.cpp @@ -43,7 +43,7 @@ public: void copyToRect(SkIRect*) const; void copyToRgn(SkRegion::RunType runs[]) const; - void blitH(int x, int y, int width) SK_OVERRIDE; + void blitH(int x, int y, int width) override; #ifdef SK_DEBUG void dump() const { diff --git a/src/core/SkResourceCache.cpp b/src/core/SkResourceCache.cpp index 43e752b38d..0fdb54b191 100644 --- a/src/core/SkResourceCache.cpp +++ b/src/core/SkResourceCache.cpp @@ -80,9 +80,9 @@ public: ~SkOneShotDiscardablePixelRef(); protected: - bool onNewLockPixels(LockRec*) SK_OVERRIDE; - void onUnlockPixels() SK_OVERRIDE; - size_t getAllocatedSizeInBytes() const SK_OVERRIDE; + bool onNewLockPixels(LockRec*) override; + void onUnlockPixels() override; + size_t getAllocatedSizeInBytes() const override; private: SkDiscardableMemory* fDM; @@ -150,7 +150,7 @@ public: fFactory = factory; } - bool allocPixelRef(SkBitmap*, SkColorTable*) SK_OVERRIDE; + bool allocPixelRef(SkBitmap*, SkColorTable*) override; private: SkResourceCache::DiscardableFactory fFactory; diff --git a/src/core/SkScalerContext.cpp b/src/core/SkScalerContext.cpp index e3b5d80b3d..7747cae0df 100644 --- a/src/core/SkScalerContext.cpp +++ b/src/core/SkScalerContext.cpp @@ -843,21 +843,21 @@ public: : SkScalerContext(face, desc) {} protected: - unsigned generateGlyphCount() SK_OVERRIDE { + unsigned generateGlyphCount() override { return 0; } - uint16_t generateCharToGlyph(SkUnichar uni) SK_OVERRIDE { + uint16_t generateCharToGlyph(SkUnichar uni) override { return 0; } - void generateAdvance(SkGlyph* glyph) SK_OVERRIDE { + void generateAdvance(SkGlyph* glyph) override { glyph->zeroMetrics(); } - void generateMetrics(SkGlyph* glyph) SK_OVERRIDE { + void generateMetrics(SkGlyph* glyph) override { glyph->zeroMetrics(); } - void generateImage(const SkGlyph& glyph) SK_OVERRIDE {} - void generatePath(const SkGlyph& glyph, SkPath* path) SK_OVERRIDE {} - void generateFontMetrics(SkPaint::FontMetrics* metrics) SK_OVERRIDE { + void generateImage(const SkGlyph& glyph) override {} + void generatePath(const SkGlyph& glyph, SkPath* path) override {} + void generateFontMetrics(SkPaint::FontMetrics* metrics) override { if (metrics) { sk_bzero(metrics, sizeof(*metrics)); } diff --git a/src/core/SkScan_AntiPath.cpp b/src/core/SkScan_AntiPath.cpp index ed11f6469a..3f95a6866c 100644 --- a/src/core/SkScan_AntiPath.cpp +++ b/src/core/SkScan_AntiPath.cpp @@ -44,11 +44,11 @@ public: /// Must be explicitly defined on subclasses. virtual void blitAntiH(int x, int y, const SkAlpha antialias[], - const int16_t runs[]) SK_OVERRIDE { + const int16_t runs[]) override { SkDEBUGFAIL("How did I get here?"); } /// May not be called on BaseSuperBlitter because it blits out of order. - void blitV(int x, int y, int height, SkAlpha alpha) SK_OVERRIDE { + void blitV(int x, int y, int height, SkAlpha alpha) override { SkDEBUGFAIL("How did I get here?"); } @@ -115,10 +115,10 @@ public: /// Blits a row of pixels, with location and width specified /// in supersampled coordinates. - void blitH(int x, int y, int width) SK_OVERRIDE; + void blitH(int x, int y, int width) override; /// Blits a rectangle of pixels, with location and size specified /// in supersampled coordinates. - void blitRect(int x, int y, int width, int height) SK_OVERRIDE; + void blitRect(int x, int y, int width, int height) override; private: // The next three variables are used to track a circular buffer that @@ -400,7 +400,7 @@ public: fRealBlitter->blitMask(fMask, fClipRect); } - void blitH(int x, int y, int width) SK_OVERRIDE; + void blitH(int x, int y, int width) override; static bool CanHandleRect(const SkIRect& bounds) { #ifdef FORCE_RLE diff --git a/src/core/SkScan_Antihair.cpp b/src/core/SkScan_Antihair.cpp index a3305e2dc8..97bb6d2198 100644 --- a/src/core/SkScan_Antihair.cpp +++ b/src/core/SkScan_Antihair.cpp @@ -106,7 +106,7 @@ private: class HLine_SkAntiHairBlitter : public SkAntiHairBlitter { public: - SkFixed drawCap(int x, SkFixed fy, SkFixed slope, int mod64) SK_OVERRIDE { + SkFixed drawCap(int x, SkFixed fy, SkFixed slope, int mod64) override { fy += SK_Fixed1/2; int y = fy >> 16; @@ -128,7 +128,7 @@ public: } virtual SkFixed drawLine(int x, int stopx, SkFixed fy, - SkFixed slope) SK_OVERRIDE { + SkFixed slope) override { SkASSERT(x < stopx); int count = stopx - x; fy += SK_Fixed1/2; @@ -153,7 +153,7 @@ public: class Horish_SkAntiHairBlitter : public SkAntiHairBlitter { public: - SkFixed drawCap(int x, SkFixed fy, SkFixed dy, int mod64) SK_OVERRIDE { + SkFixed drawCap(int x, SkFixed fy, SkFixed dy, int mod64) override { int16_t runs[2]; uint8_t aa[1]; @@ -186,7 +186,7 @@ public: return fy - SK_Fixed1/2; } - SkFixed drawLine(int x, int stopx, SkFixed fy, SkFixed dy) SK_OVERRIDE { + SkFixed drawLine(int x, int stopx, SkFixed fy, SkFixed dy) override { SkASSERT(x < stopx); int16_t runs[2]; @@ -224,7 +224,7 @@ public: class VLine_SkAntiHairBlitter : public SkAntiHairBlitter { public: - SkFixed drawCap(int y, SkFixed fx, SkFixed dx, int mod64) SK_OVERRIDE { + SkFixed drawCap(int y, SkFixed fx, SkFixed dx, int mod64) override { SkASSERT(0 == dx); fx += SK_Fixed1/2; @@ -243,7 +243,7 @@ public: return fx - SK_Fixed1/2; } - SkFixed drawLine(int y, int stopy, SkFixed fx, SkFixed dx) SK_OVERRIDE { + SkFixed drawLine(int y, int stopy, SkFixed fx, SkFixed dx) override { SkASSERT(y < stopy); SkASSERT(0 == dx); fx += SK_Fixed1/2; @@ -265,7 +265,7 @@ public: class Vertish_SkAntiHairBlitter : public SkAntiHairBlitter { public: - SkFixed drawCap(int y, SkFixed fx, SkFixed dx, int mod64) SK_OVERRIDE { + SkFixed drawCap(int y, SkFixed fx, SkFixed dx, int mod64) override { int16_t runs[3]; uint8_t aa[2]; @@ -289,7 +289,7 @@ public: return fx - SK_Fixed1/2; } - SkFixed drawLine(int y, int stopy, SkFixed fx, SkFixed dx) SK_OVERRIDE { + SkFixed drawLine(int y, int stopy, SkFixed fx, SkFixed dx) override { SkASSERT(y < stopy); int16_t runs[3]; uint8_t aa[2]; diff --git a/src/core/SkScan_Path.cpp b/src/core/SkScan_Path.cpp index d51cb5619a..9b4b9fd897 100644 --- a/src/core/SkScan_Path.cpp +++ b/src/core/SkScan_Path.cpp @@ -323,7 +323,7 @@ public: } // overrides - void blitH(int x, int y, int width) SK_OVERRIDE { + void blitH(int x, int y, int width) override { int invWidth = x - fPrevX; if (invWidth > 0) { fBlitter->blitH(fPrevX, y, invWidth); @@ -332,19 +332,19 @@ public: } // we do not expect to get called with these entrypoints - void blitAntiH(int, int, const SkAlpha[], const int16_t runs[]) SK_OVERRIDE { + void blitAntiH(int, int, const SkAlpha[], const int16_t runs[]) override { SkDEBUGFAIL("blitAntiH unexpected"); } - void blitV(int x, int y, int height, SkAlpha alpha) SK_OVERRIDE { + void blitV(int x, int y, int height, SkAlpha alpha) override { SkDEBUGFAIL("blitV unexpected"); } - void blitRect(int x, int y, int width, int height) SK_OVERRIDE { + void blitRect(int x, int y, int width, int height) override { SkDEBUGFAIL("blitRect unexpected"); } - void blitMask(const SkMask&, const SkIRect& clip) SK_OVERRIDE { + void blitMask(const SkMask&, const SkIRect& clip) override { SkDEBUGFAIL("blitMask unexpected"); } - const SkBitmap* justAnOpaqueColor(uint32_t* value) SK_OVERRIDE { + const SkBitmap* justAnOpaqueColor(uint32_t* value) override { SkDEBUGFAIL("justAnOpaqueColor unexpected"); return NULL; } diff --git a/src/core/SkSpriteBlitter_ARGB32.cpp b/src/core/SkSpriteBlitter_ARGB32.cpp index 0993a4c7ee..c3f63fee9a 100644 --- a/src/core/SkSpriteBlitter_ARGB32.cpp +++ b/src/core/SkSpriteBlitter_ARGB32.cpp @@ -34,7 +34,7 @@ public: fAlpha = alpha; } - void blitRect(int x, int y, int width, int height) SK_OVERRIDE { + void blitRect(int x, int y, int width, int height) override { SkASSERT(width > 0 && height > 0); uint32_t* SK_RESTRICT dst = fDevice->getAddr32(x, y); const uint32_t* SK_RESTRICT src = fSource->getAddr32(x - fLeft, @@ -92,7 +92,7 @@ public: } virtual void setup(const SkBitmap& device, int left, int top, - const SkPaint& paint) SK_OVERRIDE { + const SkPaint& paint) override { this->INHERITED::setup(device, left, top, paint); int width = device.width(); @@ -122,7 +122,7 @@ public: Sprite_D32_S32A_XferFilter(const SkBitmap& source, const SkPaint& paint) : Sprite_D32_XferFilter(source, paint) {} - void blitRect(int x, int y, int width, int height) SK_OVERRIDE { + void blitRect(int x, int y, int width, int height) override { SkASSERT(width > 0 && height > 0); uint32_t* SK_RESTRICT dst = fDevice->getAddr32(x, y); const uint32_t* SK_RESTRICT src = fSource->getAddr32(x - fLeft, @@ -169,7 +169,7 @@ public: Sprite_D32_S4444_XferFilter(const SkBitmap& source, const SkPaint& paint) : Sprite_D32_XferFilter(source, paint) {} - void blitRect(int x, int y, int width, int height) SK_OVERRIDE { + void blitRect(int x, int y, int width, int height) override { SkASSERT(width > 0 && height > 0); SkPMColor* SK_RESTRICT dst = fDevice->getAddr32(x, y); const SkPMColor16* SK_RESTRICT src = fSource->getAddr16(x - fLeft, @@ -216,7 +216,7 @@ class Sprite_D32_S4444_Opaque : public SkSpriteBlitter { public: Sprite_D32_S4444_Opaque(const SkBitmap& source) : SkSpriteBlitter(source) {} - void blitRect(int x, int y, int width, int height) SK_OVERRIDE { + void blitRect(int x, int y, int width, int height) override { SkASSERT(width > 0 && height > 0); SkPMColor* SK_RESTRICT dst = fDevice->getAddr32(x, y); const SkPMColor16* SK_RESTRICT src = fSource->getAddr16(x - fLeft, @@ -245,7 +245,7 @@ class Sprite_D32_S4444 : public SkSpriteBlitter { public: Sprite_D32_S4444(const SkBitmap& source) : SkSpriteBlitter(source) {} - void blitRect(int x, int y, int width, int height) SK_OVERRIDE { + void blitRect(int x, int y, int width, int height) override { SkASSERT(width > 0 && height > 0); SkPMColor* SK_RESTRICT dst = fDevice->getAddr32(x, y); const SkPMColor16* SK_RESTRICT src = fSource->getAddr16(x - fLeft, diff --git a/src/core/SkSpriteBlitter_RGB16.cpp b/src/core/SkSpriteBlitter_RGB16.cpp index 77073365e3..ca0eb50311 100644 --- a/src/core/SkSpriteBlitter_RGB16.cpp +++ b/src/core/SkSpriteBlitter_RGB16.cpp @@ -54,7 +54,7 @@ public: : SkSpriteBlitter(source) {} // overrides - void blitRect(int x, int y, int width, int height) SK_OVERRIDE { + void blitRect(int x, int y, int width, int height) override { uint16_t* SK_RESTRICT dst = fDevice->getAddr16(x, y); const uint16_t* SK_RESTRICT src = fSource->getAddr16(x - fLeft, y - fTop); @@ -264,7 +264,7 @@ public: // overrides virtual void setup(const SkBitmap& device, int left, int top, - const SkPaint& paint) SK_OVERRIDE { + const SkPaint& paint) override { this->INHERITED::setup(device, left, top, paint); unsigned flags = 0; @@ -281,7 +281,7 @@ public: fProc = SkBlitRow::Factory16(flags); } - void blitRect(int x, int y, int width, int height) SK_OVERRIDE { + void blitRect(int x, int y, int width, int height) override { uint16_t* SK_RESTRICT dst = fDevice->getAddr16(x, y); const SkPMColor* SK_RESTRICT src = fSource->getAddr32(x - fLeft, y - fTop); diff --git a/src/core/SkStream.cpp b/src/core/SkStream.cpp index 65e1bee1a0..426f5569e8 100644 --- a/src/core/SkStream.cpp +++ b/src/core/SkStream.cpp @@ -680,7 +680,7 @@ public: : fBlockMemory(SkRef(headRef)), fCurrent(fBlockMemory->fHead) , fSize(size) , fOffset(0), fCurrentOffset(0) { } - size_t read(void* buffer, size_t rawCount) SK_OVERRIDE { + size_t read(void* buffer, size_t rawCount) override { size_t count = rawCount; if (fOffset + count > fSize) { count = fSize - fOffset; @@ -706,26 +706,26 @@ public: return 0; } - bool isAtEnd() const SK_OVERRIDE { + bool isAtEnd() const override { return fOffset == fSize; } - bool rewind() SK_OVERRIDE { + bool rewind() override { fCurrent = fBlockMemory->fHead; fOffset = 0; fCurrentOffset = 0; return true; } - SkBlockMemoryStream* duplicate() const SK_OVERRIDE { + SkBlockMemoryStream* duplicate() const override { return SkNEW_ARGS(SkBlockMemoryStream, (fBlockMemory.get(), fSize)); } - size_t getPosition() const SK_OVERRIDE { + size_t getPosition() const override { return fOffset; } - bool seek(size_t position) SK_OVERRIDE { + bool seek(size_t position) override { // If possible, skip forward. if (position >= fOffset) { size_t skipAmount = position - fOffset; @@ -742,11 +742,11 @@ public: return this->rewind() && this->skip(position) == position; } - bool move(long offset) SK_OVERRIDE { + bool move(long offset) override { return seek(fOffset + offset); } - SkBlockMemoryStream* fork() const SK_OVERRIDE { + SkBlockMemoryStream* fork() const override { SkAutoTDelete that(this->duplicate()); that->fCurrent = this->fCurrent; that->fOffset = this->fOffset; @@ -754,11 +754,11 @@ public: return that.detach(); } - size_t getLength() const SK_OVERRIDE { + size_t getLength() const override { return fSize; } - const void* getMemoryBase() SK_OVERRIDE { + const void* getMemoryBase() override { if (NULL == fBlockMemory->fHead->fNext) { return fBlockMemory->fHead->start(); } diff --git a/src/core/SkTypeface.cpp b/src/core/SkTypeface.cpp index ad928bb53e..7f79c45050 100644 --- a/src/core/SkTypeface.cpp +++ b/src/core/SkTypeface.cpp @@ -29,36 +29,36 @@ public: protected: SkEmptyTypeface() : SkTypeface(SkFontStyle(), 0, true) { } - SkStreamAsset* onOpenStream(int* ttcIndex) const SK_OVERRIDE { return NULL; } - SkScalerContext* onCreateScalerContext(const SkDescriptor*) const SK_OVERRIDE { + SkStreamAsset* onOpenStream(int* ttcIndex) const override { return NULL; } + SkScalerContext* onCreateScalerContext(const SkDescriptor*) const override { return NULL; } - void onFilterRec(SkScalerContextRec*) const SK_OVERRIDE { } + void onFilterRec(SkScalerContextRec*) const override { } virtual SkAdvancedTypefaceMetrics* onGetAdvancedTypefaceMetrics( SkAdvancedTypefaceMetrics::PerGlyphInfo, - const uint32_t*, uint32_t) const SK_OVERRIDE { return NULL; } - void onGetFontDescriptor(SkFontDescriptor*, bool*) const SK_OVERRIDE { } + const uint32_t*, uint32_t) const override { return NULL; } + void onGetFontDescriptor(SkFontDescriptor*, bool*) const override { } virtual int onCharsToGlyphs(const void* chars, Encoding encoding, - uint16_t glyphs[], int glyphCount) const SK_OVERRIDE { + uint16_t glyphs[], int glyphCount) const override { if (glyphs && glyphCount > 0) { sk_bzero(glyphs, glyphCount * sizeof(glyphs[0])); } return 0; } - int onCountGlyphs() const SK_OVERRIDE { return 0; }; - int onGetUPEM() const SK_OVERRIDE { return 0; }; + int onCountGlyphs() const override { return 0; }; + int onGetUPEM() const override { return 0; }; class EmptyLocalizedStrings : public SkTypeface::LocalizedStrings { public: - bool next(SkTypeface::LocalizedString*) SK_OVERRIDE { return false; } + bool next(SkTypeface::LocalizedString*) override { return false; } }; - void onGetFamilyName(SkString* familyName) const SK_OVERRIDE { + void onGetFamilyName(SkString* familyName) const override { familyName->reset(); } - SkTypeface::LocalizedStrings* onCreateFamilyNameIterator() const SK_OVERRIDE { + SkTypeface::LocalizedStrings* onCreateFamilyNameIterator() const override { return SkNEW(EmptyLocalizedStrings); }; - int onGetTableTags(SkFontTableTag tags[]) const SK_OVERRIDE { return 0; } - size_t onGetTableData(SkFontTableTag, size_t, size_t, void*) const SK_OVERRIDE { + int onGetTableTags(SkFontTableTag tags[]) const override { return 0; } + size_t onGetTableData(SkFontTableTag, size_t, size_t, void*) const override { return 0; } }; diff --git a/src/core/SkValidatingReadBuffer.h b/src/core/SkValidatingReadBuffer.h index 916bed4d75..bcdcba5de4 100644 --- a/src/core/SkValidatingReadBuffer.h +++ b/src/core/SkValidatingReadBuffer.h @@ -23,48 +23,48 @@ public: SkValidatingReadBuffer(const void* data, size_t size); virtual ~SkValidatingReadBuffer(); - const void* skip(size_t size) SK_OVERRIDE; + const void* skip(size_t size) override; // primitives - bool readBool() SK_OVERRIDE; - SkColor readColor() SK_OVERRIDE; - SkFixed readFixed() SK_OVERRIDE; - int32_t readInt() SK_OVERRIDE; - SkScalar readScalar() SK_OVERRIDE; - uint32_t readUInt() SK_OVERRIDE; - int32_t read32() SK_OVERRIDE; + bool readBool() override; + SkColor readColor() override; + SkFixed readFixed() override; + int32_t readInt() override; + SkScalar readScalar() override; + uint32_t readUInt() override; + int32_t read32() override; // strings -- the caller is responsible for freeing the string contents - void readString(SkString* string) SK_OVERRIDE; - void* readEncodedString(size_t* length, SkPaint::TextEncoding encoding) SK_OVERRIDE; + void readString(SkString* string) override; + void* readEncodedString(size_t* length, SkPaint::TextEncoding encoding) override; // common data structures - SkFlattenable* readFlattenable(SkFlattenable::Type type) SK_OVERRIDE; - void skipFlattenable() SK_OVERRIDE; - void readPoint(SkPoint* point) SK_OVERRIDE; - void readMatrix(SkMatrix* matrix) SK_OVERRIDE; - void readIRect(SkIRect* rect) SK_OVERRIDE; - void readRect(SkRect* rect) SK_OVERRIDE; - void readRegion(SkRegion* region) SK_OVERRIDE; - void readPath(SkPath* path) SK_OVERRIDE; + SkFlattenable* readFlattenable(SkFlattenable::Type type) override; + void skipFlattenable() override; + void readPoint(SkPoint* point) override; + void readMatrix(SkMatrix* matrix) override; + void readIRect(SkIRect* rect) override; + void readRect(SkRect* rect) override; + void readRegion(SkRegion* region) override; + void readPath(SkPath* path) override; // binary data and arrays - bool readByteArray(void* value, size_t size) SK_OVERRIDE; - bool readColorArray(SkColor* colors, size_t size) SK_OVERRIDE; - bool readIntArray(int32_t* values, size_t size) SK_OVERRIDE; - bool readPointArray(SkPoint* points, size_t size) SK_OVERRIDE; - bool readScalarArray(SkScalar* values, size_t size) SK_OVERRIDE; + bool readByteArray(void* value, size_t size) override; + bool readColorArray(SkColor* colors, size_t size) override; + bool readIntArray(int32_t* values, size_t size) override; + bool readPointArray(SkPoint* points, size_t size) override; + bool readScalarArray(SkScalar* values, size_t size) override; // helpers to get info about arrays and binary data - uint32_t getArrayCount() SK_OVERRIDE; + uint32_t getArrayCount() override; // TODO: Implement this (securely) when needed - SkTypeface* readTypeface() SK_OVERRIDE; + SkTypeface* readTypeface() override; - bool validate(bool isValid) SK_OVERRIDE; - bool isValid() const SK_OVERRIDE; + bool validate(bool isValid) override; + bool isValid() const override; - bool validateAvailable(size_t size) SK_OVERRIDE; + bool validateAvailable(size_t size) override; private: bool readArray(void* value, size_t size, size_t elementSize); diff --git a/src/core/SkXfermode.cpp b/src/core/SkXfermode.cpp index 08f760d205..7165e99161 100644 --- a/src/core/SkXfermode.cpp +++ b/src/core/SkXfermode.cpp @@ -1020,8 +1020,8 @@ public: return SkNEW_ARGS(SkClearXfermode, (rec)); } - void xfer32(SkPMColor*, const SkPMColor*, int, const SkAlpha*) const SK_OVERRIDE; - void xferA8(SkAlpha*, const SkPMColor*, int, const SkAlpha*) const SK_OVERRIDE; + void xfer32(SkPMColor*, const SkPMColor*, int, const SkAlpha*) const override; + void xferA8(SkAlpha*, const SkPMColor*, int, const SkAlpha*) const override; SK_TO_STRING_OVERRIDE() @@ -1082,8 +1082,8 @@ public: return SkNEW_ARGS(SkSrcXfermode, (rec)); } - void xfer32(SkPMColor*, const SkPMColor*, int, const SkAlpha*) const SK_OVERRIDE; - void xferA8(SkAlpha*, const SkPMColor*, int, const SkAlpha*) const SK_OVERRIDE; + void xfer32(SkPMColor*, const SkPMColor*, int, const SkAlpha*) const override; + void xferA8(SkAlpha*, const SkPMColor*, int, const SkAlpha*) const override; SK_TO_STRING_OVERRIDE() @@ -1148,7 +1148,7 @@ public: return SkNEW_ARGS(SkDstInXfermode, (rec)); } - void xfer32(SkPMColor*, const SkPMColor*, int, const SkAlpha*) const SK_OVERRIDE; + void xfer32(SkPMColor*, const SkPMColor*, int, const SkAlpha*) const override; SK_TO_STRING_OVERRIDE() @@ -1192,7 +1192,7 @@ public: return SkNEW_ARGS(SkDstOutXfermode, (rec)); } - void xfer32(SkPMColor*, const SkPMColor*, int, const SkAlpha*) const SK_OVERRIDE; + void xfer32(SkPMColor*, const SkPMColor*, int, const SkAlpha*) const override; SK_TO_STRING_OVERRIDE() diff --git a/src/core/SkXfermode_proccoeff.h b/src/core/SkXfermode_proccoeff.h index 8bd081157d..6a3a24409b 100644 --- a/src/core/SkXfermode_proccoeff.h +++ b/src/core/SkXfermode_proccoeff.h @@ -24,30 +24,30 @@ public: } virtual void xfer32(SkPMColor dst[], const SkPMColor src[], int count, - const SkAlpha aa[]) const SK_OVERRIDE; + const SkAlpha aa[]) const override; virtual void xfer16(uint16_t dst[], const SkPMColor src[], int count, - const SkAlpha aa[]) const SK_OVERRIDE; + const SkAlpha aa[]) const override; virtual void xferA8(SkAlpha dst[], const SkPMColor src[], int count, - const SkAlpha aa[]) const SK_OVERRIDE; + const SkAlpha aa[]) const override; - bool asMode(Mode* mode) const SK_OVERRIDE; + bool asMode(Mode* mode) const override; - bool supportsCoverageAsAlpha() const SK_OVERRIDE; + bool supportsCoverageAsAlpha() const override; - bool isOpaque(SkXfermode::SrcColorOpacity opacityType) const SK_OVERRIDE; + bool isOpaque(SkXfermode::SrcColorOpacity opacityType) const override; #if SK_SUPPORT_GPU virtual bool asFragmentProcessor(GrFragmentProcessor**, - GrTexture* background) const SK_OVERRIDE; + GrTexture* background) const override; - virtual bool asXPFactory(GrXPFactory**) const SK_OVERRIDE; + virtual bool asXPFactory(GrXPFactory**) const override; #endif SK_TO_STRING_OVERRIDE() SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkProcCoeffXfermode) protected: - void flatten(SkWriteBuffer& buffer) const SK_OVERRIDE; + void flatten(SkWriteBuffer& buffer) const override; Mode getMode() const { return fMode; } diff --git a/src/core/SkYUVPlanesCache.cpp b/src/core/SkYUVPlanesCache.cpp index 5ef89b6c19..79136db795 100644 --- a/src/core/SkYUVPlanesCache.cpp +++ b/src/core/SkYUVPlanesCache.cpp @@ -46,8 +46,8 @@ struct YUVPlanesRec : public SkResourceCache::Rec { YUVPlanesKey fKey; YUVValue fValue; - const Key& getKey() const SK_OVERRIDE { return fKey; } - size_t bytesUsed() const SK_OVERRIDE { return sizeof(*this) + fValue.fData->size(); } + const Key& getKey() const override { return fKey; } + size_t bytesUsed() const override { return sizeof(*this) + fValue.fData->size(); } static bool Visitor(const SkResourceCache::Rec& baseRec, void* contextData) { const YUVPlanesRec& rec = static_cast(baseRec); diff --git a/src/doc/SkDocument_PDF.cpp b/src/doc/SkDocument_PDF.cpp index fcbba38306..ae01c82141 100644 --- a/src/doc/SkDocument_PDF.cpp +++ b/src/doc/SkDocument_PDF.cpp @@ -309,7 +309,7 @@ public: protected: virtual SkCanvas* onBeginPage(SkScalar width, SkScalar height, - const SkRect& trimBox) SK_OVERRIDE { + const SkRect& trimBox) override { SkASSERT(!fCanvas.get()); SkISize pageSize = SkISize::Make( @@ -323,13 +323,13 @@ protected: return fCanvas.get(); } - void onEndPage() SK_OVERRIDE { + void onEndPage() override { SkASSERT(fCanvas.get()); fCanvas->flush(); fCanvas.reset(NULL); } - bool onClose(SkWStream* stream) SK_OVERRIDE { + bool onClose(SkWStream* stream) override { SkASSERT(!fCanvas.get()); bool success = emit_pdf_document(fPageDevices, stream); @@ -338,7 +338,7 @@ protected: return success; } - void onAbort() SK_OVERRIDE { + void onAbort() override { fPageDevices.unrefAll(); fCanon.reset(); } diff --git a/src/doc/SkDocument_XPS.cpp b/src/doc/SkDocument_XPS.cpp index db14a708bd..e0a714768a 100644 --- a/src/doc/SkDocument_XPS.cpp +++ b/src/doc/SkDocument_XPS.cpp @@ -30,7 +30,7 @@ public: protected: virtual SkCanvas* onBeginPage(SkScalar width, SkScalar height, - const SkRect& trimBox) SK_OVERRIDE { + const SkRect& trimBox) override { fDevice.beginSheet(fUnitsPerMeter, fPixelsPerMeter, SkSize::Make(width, height)); fCanvas.reset(SkNEW_ARGS(SkCanvas, (&fDevice))); @@ -39,19 +39,19 @@ protected: return fCanvas.get(); } - void onEndPage() SK_OVERRIDE { + void onEndPage() override { SkASSERT(fCanvas.get()); fCanvas->flush(); fCanvas.reset(NULL); fDevice.endSheet(); } - bool onClose(SkWStream*) SK_OVERRIDE { + bool onClose(SkWStream*) override { SkASSERT(!fCanvas.get()); return fDevice.endPortfolio(); } - void onAbort() SK_OVERRIDE {} + void onAbort() override {} private: SkXPSDevice fDevice; diff --git a/src/effects/SkAlphaThresholdFilter.cpp b/src/effects/SkAlphaThresholdFilter.cpp index 09dc7427e5..abc4d3327c 100644 --- a/src/effects/SkAlphaThresholdFilter.cpp +++ b/src/effects/SkAlphaThresholdFilter.cpp @@ -20,13 +20,13 @@ public: SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkAlphaThresholdFilterImpl) protected: - void flatten(SkWriteBuffer&) const SK_OVERRIDE; + void flatten(SkWriteBuffer&) const override; virtual bool onFilterImage(Proxy*, const SkBitmap& src, const Context&, - SkBitmap* result, SkIPoint* offset) const SK_OVERRIDE; + SkBitmap* result, SkIPoint* offset) const override; #if SK_SUPPORT_GPU virtual bool asFragmentProcessor(GrFragmentProcessor**, GrTexture*, const SkMatrix&, - const SkIRect& bounds) const SK_OVERRIDE; + const SkIRect& bounds) const override; #endif private: @@ -71,14 +71,14 @@ public: virtual ~AlphaThresholdEffect() {}; - const char* name() const SK_OVERRIDE { return "Alpha Threshold"; } + const char* name() const override { return "Alpha Threshold"; } float innerThreshold() const { return fInnerThreshold; } float outerThreshold() const { return fOuterThreshold; } - void getGLProcessorKey(const GrGLCaps&, GrProcessorKeyBuilder*) const SK_OVERRIDE; + void getGLProcessorKey(const GrGLCaps&, GrProcessorKeyBuilder*) const override; - GrGLFragmentProcessor* createGLInstance() const SK_OVERRIDE; + GrGLFragmentProcessor* createGLInstance() const override; private: AlphaThresholdEffect(GrTexture* texture, @@ -102,9 +102,9 @@ private: this->addTextureAccess(&fMaskTextureAccess); } - bool onIsEqual(const GrFragmentProcessor&) const SK_OVERRIDE; + bool onIsEqual(const GrFragmentProcessor&) const override; - void onComputeInvariantOutput(GrInvariantOutput* inout) const SK_OVERRIDE; + void onComputeInvariantOutput(GrInvariantOutput* inout) const override; GR_DECLARE_FRAGMENT_PROCESSOR_TEST; @@ -127,9 +127,9 @@ public: const char* outputColor, const char* inputColor, const TransformedCoordsArray&, - const TextureSamplerArray&) SK_OVERRIDE; + const TextureSamplerArray&) override; - void setData(const GrGLProgramDataManager&, const GrProcessor&) SK_OVERRIDE; + void setData(const GrGLProgramDataManager&, const GrProcessor&) override; private: diff --git a/src/effects/SkArithmeticMode.cpp b/src/effects/SkArithmeticMode.cpp index ae18c2770e..4914c696ee 100644 --- a/src/effects/SkArithmeticMode.cpp +++ b/src/effects/SkArithmeticMode.cpp @@ -25,15 +25,15 @@ public: } virtual void xfer32(SkPMColor dst[], const SkPMColor src[], int count, - const SkAlpha aa[]) const SK_OVERRIDE; + const SkAlpha aa[]) const override; SK_TO_STRING_OVERRIDE() SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkArithmeticMode_scalar) #if SK_SUPPORT_GPU - bool asFragmentProcessor(GrFragmentProcessor**, GrTexture* background) const SK_OVERRIDE; + bool asFragmentProcessor(GrFragmentProcessor**, GrTexture* background) const override; - bool asXPFactory(GrXPFactory**) const SK_OVERRIDE; + bool asXPFactory(GrXPFactory**) const override; #endif private: @@ -45,7 +45,7 @@ private: fEnforcePMColor = enforcePMColor; } - void flatten(SkWriteBuffer& buffer) const SK_OVERRIDE { + void flatten(SkWriteBuffer& buffer) const override { buffer.writeScalar(fK[0]); buffer.writeScalar(fK[1]); buffer.writeScalar(fK[2]); diff --git a/src/effects/SkArithmeticMode_gpu.cpp b/src/effects/SkArithmeticMode_gpu.cpp index e068c9dc37..cd5f09a4e3 100644 --- a/src/effects/SkArithmeticMode_gpu.cpp +++ b/src/effects/SkArithmeticMode_gpu.cpp @@ -58,14 +58,14 @@ public: : fEnforcePMColor(true) { } - ~GLArithmeticFP() SK_OVERRIDE {} + ~GLArithmeticFP() override {} void emitCode(GrGLFPBuilder* builder, const GrFragmentProcessor& fp, const char* outputColor, const char* inputColor, const TransformedCoordsArray& coords, - const TextureSamplerArray& samplers) SK_OVERRIDE { + const TextureSamplerArray& samplers) override { GrGLFPFragmentBuilder* fsBuilder = builder->getFragmentShaderBuilder(); fsBuilder->codeAppend("vec4 bgColor = "); fsBuilder->appendTextureLookup(samplers[0], coords[0].c_str(), coords[0].getType()); @@ -80,7 +80,7 @@ public: add_arithmetic_code(fsBuilder, inputColor, dstColor, outputColor, kUni, fEnforcePMColor); } - void setData(const GrGLProgramDataManager& pdman, const GrProcessor& proc) SK_OVERRIDE { + void setData(const GrGLProgramDataManager& pdman, const GrProcessor& proc) override { const GrArithmeticFP& arith = proc.cast(); pdman.set4f(fKUni, arith.k1(), arith.k2(), arith.k3(), arith.k4()); fEnforcePMColor = arith.enforcePMColor(); @@ -167,21 +167,21 @@ public: willReadDstColor)); } - ~ArithmeticXP() SK_OVERRIDE {}; + ~ArithmeticXP() override {}; - const char* name() const SK_OVERRIDE { return "Arithmetic"; } + const char* name() const override { return "Arithmetic"; } - GrGLXferProcessor* createGLInstance() const SK_OVERRIDE; + GrGLXferProcessor* createGLInstance() const override; - bool hasSecondaryOutput() const SK_OVERRIDE { return false; } + bool hasSecondaryOutput() const override { return false; } GrXferProcessor::OptFlags getOptimizations(const GrProcOptInfo& colorPOI, const GrProcOptInfo& coveragePOI, bool doesStencilWrite, GrColor* overrideColor, - const GrDrawTargetCaps& caps) SK_OVERRIDE; + const GrDrawTargetCaps& caps) override; - void getBlendInfo(GrXferProcessor::BlendInfo* blendInfo) const SK_OVERRIDE { + void getBlendInfo(GrXferProcessor::BlendInfo* blendInfo) const override { blendInfo->fSrcBlend = kOne_GrBlendCoeff; blendInfo->fDstBlend = kZero_GrBlendCoeff; blendInfo->fBlendConstant = 0; @@ -197,9 +197,9 @@ private: ArithmeticXP(float k1, float k2, float k3, float k4, bool enforcePMColor, const GrDeviceCoordTexture* dstCopy, bool willReadDstColor); - void onGetGLProcessorKey(const GrGLCaps& caps, GrProcessorKeyBuilder* b) const SK_OVERRIDE; + void onGetGLProcessorKey(const GrGLCaps& caps, GrProcessorKeyBuilder* b) const override; - bool onIsEqual(const GrXferProcessor& xpBase) const SK_OVERRIDE { + bool onIsEqual(const GrXferProcessor& xpBase) const override { const ArithmeticXP& xp = xpBase.cast(); if (fK1 != xp.fK1 || fK2 != xp.fK2 || @@ -225,7 +225,7 @@ public: : fEnforcePMColor(true) { } - ~GLArithmeticXP() SK_OVERRIDE {} + ~GLArithmeticXP() override {} static void GenKey(const GrProcessor& processor, const GrGLCaps& caps, GrProcessorKeyBuilder* b) { @@ -235,7 +235,7 @@ public: } private: - void onEmitCode(const EmitArgs& args) SK_OVERRIDE { + void onEmitCode(const EmitArgs& args) override { GrGLFPFragmentBuilder* fsBuilder = args.fPB->getFragmentShaderBuilder(); const char* dstColor = fsBuilder->dstColor(); @@ -254,7 +254,7 @@ private: } void onSetData(const GrGLProgramDataManager& pdman, - const GrXferProcessor& processor) SK_OVERRIDE { + const GrXferProcessor& processor) override { const ArithmeticXP& arith = processor.cast(); pdman.set4f(fKUni, arith.k1(), arith.k2(), arith.k3(), arith.k4()); fEnforcePMColor = arith.enforcePMColor(); diff --git a/src/effects/SkArithmeticMode_gpu.h b/src/effects/SkArithmeticMode_gpu.h index 8fb58a1796..f4d12d4f5a 100644 --- a/src/effects/SkArithmeticMode_gpu.h +++ b/src/effects/SkArithmeticMode_gpu.h @@ -36,13 +36,13 @@ public: return SkNEW_ARGS(GrArithmeticFP, (k1, k2, k3, k4, enforcePMColor, background)); } - ~GrArithmeticFP() SK_OVERRIDE {}; + ~GrArithmeticFP() override {}; - const char* name() const SK_OVERRIDE { return "Arithmetic"; } + const char* name() const override { return "Arithmetic"; } - void getGLProcessorKey(const GrGLCaps& caps, GrProcessorKeyBuilder* b) const SK_OVERRIDE; + void getGLProcessorKey(const GrGLCaps& caps, GrProcessorKeyBuilder* b) const override; - GrGLFragmentProcessor* createGLInstance() const SK_OVERRIDE; + GrGLFragmentProcessor* createGLInstance() const override; float k1() const { return fK1; } float k2() const { return fK2; } @@ -51,9 +51,9 @@ public: bool enforcePMColor() const { return fEnforcePMColor; } private: - bool onIsEqual(const GrFragmentProcessor&) const SK_OVERRIDE; + bool onIsEqual(const GrFragmentProcessor&) const override; - void onComputeInvariantOutput(GrInvariantOutput* inout) const SK_OVERRIDE; + void onComputeInvariantOutput(GrInvariantOutput* inout) const override; GrArithmeticFP(float k1, float k2, float k3, float k4, bool enforcePMColor, GrTexture* background); @@ -77,16 +77,16 @@ public: return SkNEW_ARGS(GrArithmeticXPFactory, (k1, k2, k3, k4, enforcePMColor)); } - bool supportsRGBCoverage(GrColor knownColor, uint32_t knownColorFlags) const SK_OVERRIDE { + bool supportsRGBCoverage(GrColor knownColor, uint32_t knownColorFlags) const override { return true; } - bool canTweakAlphaForCoverage() const SK_OVERRIDE { + bool canTweakAlphaForCoverage() const override { return false; } void getInvariantOutput(const GrProcOptInfo& colorPOI, const GrProcOptInfo& coveragePOI, - GrXPFactory::InvariantOutput*) const SK_OVERRIDE; + GrXPFactory::InvariantOutput*) const override; private: GrArithmeticXPFactory(float k1, float k2, float k3, float k4, bool enforcePMColor); @@ -94,15 +94,15 @@ private: GrXferProcessor* onCreateXferProcessor(const GrDrawTargetCaps& caps, const GrProcOptInfo& colorPOI, const GrProcOptInfo& coveragePOI, - const GrDeviceCoordTexture* dstCopy) const SK_OVERRIDE; + const GrDeviceCoordTexture* dstCopy) const override; bool willReadDstColor(const GrDrawTargetCaps& caps, const GrProcOptInfo& colorPOI, - const GrProcOptInfo& coveragePOI) const SK_OVERRIDE { + const GrProcOptInfo& coveragePOI) const override { return true; } - bool onIsEqual(const GrXPFactory& xpfBase) const SK_OVERRIDE { + bool onIsEqual(const GrXPFactory& xpfBase) const override { const GrArithmeticXPFactory& xpf = xpfBase.cast(); if (fK1 != xpf.fK1 || fK2 != xpf.fK2 || diff --git a/src/effects/SkBlurMaskFilter.cpp b/src/effects/SkBlurMaskFilter.cpp index e363f7b4c7..62d8f736ff 100644 --- a/src/effects/SkBlurMaskFilter.cpp +++ b/src/effects/SkBlurMaskFilter.cpp @@ -38,39 +38,39 @@ public: SkBlurMaskFilterImpl(SkScalar sigma, SkBlurStyle, uint32_t flags); // overrides from SkMaskFilter - SkMask::Format getFormat() const SK_OVERRIDE; + SkMask::Format getFormat() const override; virtual bool filterMask(SkMask* dst, const SkMask& src, const SkMatrix&, - SkIPoint* margin) const SK_OVERRIDE; + SkIPoint* margin) const override; #if SK_SUPPORT_GPU virtual bool canFilterMaskGPU(const SkRect& devBounds, const SkIRect& clipBounds, const SkMatrix& ctm, - SkRect* maskRect) const SK_OVERRIDE; + SkRect* maskRect) const override; virtual bool directFilterMaskGPU(GrContext* context, GrRenderTarget* rt, GrPaint* grp, const GrClip&, const SkMatrix& viewMatrix, const SkStrokeRec& strokeRec, - const SkPath& path) const SK_OVERRIDE; + const SkPath& path) const override; virtual bool directFilterRRectMaskGPU(GrContext* context, GrRenderTarget* rt, GrPaint* grp, const GrClip&, const SkMatrix& viewMatrix, const SkStrokeRec& strokeRec, - const SkRRect& rrect) const SK_OVERRIDE; + const SkRRect& rrect) const override; virtual bool filterMaskGPU(GrTexture* src, const SkMatrix& ctm, const SkRect& maskRect, GrTexture** result, - bool canOverwriteSrc) const SK_OVERRIDE; + bool canOverwriteSrc) const override; #endif - void computeFastBounds(const SkRect&, SkRect*) const SK_OVERRIDE; - bool asABlur(BlurRec*) const SK_OVERRIDE; + void computeFastBounds(const SkRect&, SkRect*) const override; + bool asABlur(BlurRec*) const override; SK_TO_STRING_OVERRIDE() SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkBlurMaskFilterImpl) @@ -78,11 +78,11 @@ public: protected: virtual FilterReturn filterRectsToNine(const SkRect[], int count, const SkMatrix&, const SkIRect& clipBounds, - NinePatch*) const SK_OVERRIDE; + NinePatch*) const override; virtual FilterReturn filterRRectToNine(const SkRRect&, const SkMatrix&, const SkIRect& clipBounds, - NinePatch*) const SK_OVERRIDE; + NinePatch*) const override; bool filterRectMask(SkMask* dstM, const SkRect& r, const SkMatrix& matrix, SkIPoint* margin, SkMask::CreateMode createMode) const; @@ -105,7 +105,7 @@ private: } SkBlurMaskFilterImpl(SkReadBuffer&); - void flatten(SkWriteBuffer&) const SK_OVERRIDE; + void flatten(SkWriteBuffer&) const override; SkScalar computeXformedSigma(const SkMatrix& ctm) const { bool ignoreTransform = SkToBool(fBlurFlags & SkBlurMaskFilter::kIgnoreTransform_BlurFlag); @@ -607,12 +607,12 @@ class GrRectBlurEffect : public GrFragmentProcessor { public: virtual ~GrRectBlurEffect(); - const char* name() const SK_OVERRIDE { return "RectBlur"; } + const char* name() const override { return "RectBlur"; } virtual void getGLProcessorKey(const GrGLCaps& caps, - GrProcessorKeyBuilder* b) const SK_OVERRIDE; + GrProcessorKeyBuilder* b) const override; - GrGLFragmentProcessor* createGLInstance() const SK_OVERRIDE; + GrGLFragmentProcessor* createGLInstance() const override; /** * Create a simple filter effect with custom bicubic coefficients. @@ -641,9 +641,9 @@ public: private: GrRectBlurEffect(const SkRect& rect, float sigma, GrTexture *blur_profile); - bool onIsEqual(const GrFragmentProcessor&) const SK_OVERRIDE; + bool onIsEqual(const GrFragmentProcessor&) const override; - void onComputeInvariantOutput(GrInvariantOutput* inout) const SK_OVERRIDE; + void onComputeInvariantOutput(GrInvariantOutput* inout) const override; static bool CreateBlurProfileTexture(GrContext *context, float sigma, GrTexture **blurProfileTexture); @@ -665,9 +665,9 @@ public: const char* outputColor, const char* inputColor, const TransformedCoordsArray&, - const TextureSamplerArray&) SK_OVERRIDE; + const TextureSamplerArray&) override; - void setData(const GrGLProgramDataManager&, const GrProcessor&) SK_OVERRIDE; + void setData(const GrGLProgramDataManager&, const GrProcessor&) override; private: typedef GrGLProgramDataManager::UniformHandle UniformHandle; @@ -876,22 +876,22 @@ public: static GrFragmentProcessor* Create(GrContext* context, float sigma, const SkRRect&); virtual ~GrRRectBlurEffect() {}; - const char* name() const SK_OVERRIDE { return "GrRRectBlur"; } + const char* name() const override { return "GrRRectBlur"; } const SkRRect& getRRect() const { return fRRect; } float getSigma() const { return fSigma; } virtual void getGLProcessorKey(const GrGLCaps& caps, - GrProcessorKeyBuilder* b) const SK_OVERRIDE; + GrProcessorKeyBuilder* b) const override; - GrGLFragmentProcessor* createGLInstance() const SK_OVERRIDE; + GrGLFragmentProcessor* createGLInstance() const override; private: GrRRectBlurEffect(float sigma, const SkRRect&, GrTexture* profileTexture); - bool onIsEqual(const GrFragmentProcessor& other) const SK_OVERRIDE; + bool onIsEqual(const GrFragmentProcessor& other) const override; - void onComputeInvariantOutput(GrInvariantOutput* inout) const SK_OVERRIDE; + void onComputeInvariantOutput(GrInvariantOutput* inout) const override; SkRRect fRRect; float fSigma; @@ -1020,9 +1020,9 @@ public: const char* outputColor, const char* inputColor, const TransformedCoordsArray&, - const TextureSamplerArray&) SK_OVERRIDE; + const TextureSamplerArray&) override; - void setData(const GrGLProgramDataManager&, const GrProcessor&) SK_OVERRIDE; + void setData(const GrGLProgramDataManager&, const GrProcessor&) override; private: GrGLProgramDataManager::UniformHandle fProxyRectUniform; diff --git a/src/effects/SkColorCubeFilter.cpp b/src/effects/SkColorCubeFilter.cpp index e2aade75e5..989c4a6754 100644 --- a/src/effects/SkColorCubeFilter.cpp +++ b/src/effects/SkColorCubeFilter.cpp @@ -192,16 +192,16 @@ public: virtual ~GrColorCubeEffect(); - const char* name() const SK_OVERRIDE { return "ColorCube"; } + const char* name() const override { return "ColorCube"; } virtual void getGLProcessorKey(const GrGLCaps& caps, - GrProcessorKeyBuilder* b) const SK_OVERRIDE; + GrProcessorKeyBuilder* b) const override; - GrGLFragmentProcessor* createGLInstance() const SK_OVERRIDE; + GrGLFragmentProcessor* createGLInstance() const override; int colorCubeSize() const { return fColorCubeAccess.getTexture()->width(); } - void onComputeInvariantOutput(GrInvariantOutput*) const SK_OVERRIDE; + void onComputeInvariantOutput(GrInvariantOutput*) const override; class GLProcessor : public GrGLFragmentProcessor { public: @@ -213,11 +213,11 @@ public: const char* outputColor, const char* inputColor, const TransformedCoordsArray&, - const TextureSamplerArray&) SK_OVERRIDE; + const TextureSamplerArray&) override; static inline void GenKey(const GrProcessor&, const GrGLCaps&, GrProcessorKeyBuilder*); - void setData(const GrGLProgramDataManager&, const GrProcessor&) SK_OVERRIDE; + void setData(const GrGLProgramDataManager&, const GrProcessor&) override; private: GrGLProgramDataManager::UniformHandle fColorCubeSizeUni; @@ -227,7 +227,7 @@ public: }; private: - bool onIsEqual(const GrFragmentProcessor&) const SK_OVERRIDE { return true; } + bool onIsEqual(const GrFragmentProcessor&) const override { return true; } GrColorCubeEffect(GrTexture* colorCube); diff --git a/src/effects/SkColorFilters.cpp b/src/effects/SkColorFilters.cpp index 8c021e452b..87a5a20821 100644 --- a/src/effects/SkColorFilters.cpp +++ b/src/effects/SkColorFilters.cpp @@ -148,15 +148,15 @@ public: } virtual void getGLProcessorKey(const GrGLCaps& caps, - GrProcessorKeyBuilder* b) const SK_OVERRIDE { + GrProcessorKeyBuilder* b) const override { GLProcessor::GenKey(*this, caps, b); } - GrGLFragmentProcessor* createGLInstance() const SK_OVERRIDE { + GrGLFragmentProcessor* createGLInstance() const override { return SkNEW_ARGS(GLProcessor, (*this)); } - const char* name() const SK_OVERRIDE { return "ModeColorFilterEffect"; } + const char* name() const override { return "ModeColorFilterEffect"; } SkXfermode::Mode mode() const { return fMode; } GrColor color() const { return fColor; } @@ -171,7 +171,7 @@ public: const char* outputColor, const char* inputColor, const TransformedCoordsArray&, - const TextureSamplerArray&) SK_OVERRIDE { + const TextureSamplerArray&) override { SkXfermode::Mode mode = fp.cast().mode(); SkASSERT(SkXfermode::kDst_Mode != mode); @@ -200,7 +200,7 @@ public: } virtual void setData(const GrGLProgramDataManager& pdman, - const GrProcessor& fp) SK_OVERRIDE { + const GrProcessor& fp) override { if (fFilterColorUni.isValid()) { const ModeColorFilterEffect& colorModeFilter = fp.cast(); GrGLfloat c[4]; @@ -224,12 +224,12 @@ private: this->initClassID(); } - bool onIsEqual(const GrFragmentProcessor& other) const SK_OVERRIDE { + bool onIsEqual(const GrFragmentProcessor& other) const override { const ModeColorFilterEffect& s = other.cast(); return fMode == s.fMode && fColor == s.fColor; } - void onComputeInvariantOutput(GrInvariantOutput* inout) const SK_OVERRIDE; + void onComputeInvariantOutput(GrInvariantOutput* inout) const override; SkXfermode::Mode fMode; GrColor fColor; @@ -384,7 +384,7 @@ class Src_SkModeColorFilter : public SkModeColorFilter { public: Src_SkModeColorFilter(SkColor color) : INHERITED(color, SkXfermode::kSrc_Mode) {} - void filterSpan(const SkPMColor shader[], int count, SkPMColor result[]) const SK_OVERRIDE { + void filterSpan(const SkPMColor shader[], int count, SkPMColor result[]) const override { sk_memset32(result, this->getPMColor(), count); } @@ -399,7 +399,7 @@ public: fColor32Proc = SkBlitRow::ColorProcFactory(); } - void filterSpan(const SkPMColor shader[], int count, SkPMColor result[]) const SK_OVERRIDE { + void filterSpan(const SkPMColor shader[], int count, SkPMColor result[]) const override { fColor32Proc(result, shader, count, this->getPMColor()); } diff --git a/src/effects/SkColorMatrixFilter.cpp b/src/effects/SkColorMatrixFilter.cpp index 319617016c..a406eda564 100644 --- a/src/effects/SkColorMatrixFilter.cpp +++ b/src/effects/SkColorMatrixFilter.cpp @@ -404,14 +404,14 @@ public: return SkNEW_ARGS(ColorMatrixEffect, (matrix)); } - const char* name() const SK_OVERRIDE { return "Color Matrix"; } + const char* name() const override { return "Color Matrix"; } virtual void getGLProcessorKey(const GrGLCaps& caps, - GrProcessorKeyBuilder* b) const SK_OVERRIDE { + GrProcessorKeyBuilder* b) const override { GLProcessor::GenKey(*this, caps, b); } - GrGLFragmentProcessor* createGLInstance() const SK_OVERRIDE { + GrGLFragmentProcessor* createGLInstance() const override { return SkNEW_ARGS(GLProcessor, (*this)); } @@ -430,7 +430,7 @@ public: const char* outputColor, const char* inputColor, const TransformedCoordsArray&, - const TextureSamplerArray&) SK_OVERRIDE { + const TextureSamplerArray&) override { fMatrixHandle = builder->addUniform(GrGLProgramBuilder::kFragment_Visibility, kMat44f_GrSLType, kDefault_GrSLPrecision, "ColorMatrix"); @@ -456,7 +456,7 @@ public: } virtual void setData(const GrGLProgramDataManager& uniManager, - const GrProcessor& proc) SK_OVERRIDE { + const GrProcessor& proc) override { const ColorMatrixEffect& cme = proc.cast(); const float* m = cme.fMatrix.fMat; // The GL matrix is transposed from SkColorMatrix. @@ -486,12 +486,12 @@ private: this->initClassID(); } - bool onIsEqual(const GrFragmentProcessor& s) const SK_OVERRIDE { + bool onIsEqual(const GrFragmentProcessor& s) const override { const ColorMatrixEffect& cme = s.cast(); return cme.fMatrix == fMatrix; } - void onComputeInvariantOutput(GrInvariantOutput* inout) const SK_OVERRIDE { + void onComputeInvariantOutput(GrInvariantOutput* inout) const override { // We only bother to check whether the alpha channel will be constant. If SkColorMatrix had // type flags it might be worth checking the other components. diff --git a/src/effects/SkDisplacementMapEffect.cpp b/src/effects/SkDisplacementMapEffect.cpp index e280817e38..0a045f2192 100644 --- a/src/effects/SkDisplacementMapEffect.cpp +++ b/src/effects/SkDisplacementMapEffect.cpp @@ -309,11 +309,11 @@ public: const char* outputColor, const char* inputColor, const TransformedCoordsArray&, - const TextureSamplerArray&) SK_OVERRIDE; + const TextureSamplerArray&) override; static inline void GenKey(const GrProcessor&, const GrGLCaps&, GrProcessorKeyBuilder*); - void setData(const GrGLProgramDataManager&, const GrProcessor&) SK_OVERRIDE; + void setData(const GrGLProgramDataManager&, const GrProcessor&) override; private: SkDisplacementMapEffect::ChannelSelectorType fXChannelSelector; @@ -342,11 +342,11 @@ public: virtual ~GrDisplacementMapEffect(); virtual void getGLProcessorKey(const GrGLCaps& caps, - GrProcessorKeyBuilder* b) const SK_OVERRIDE { + GrProcessorKeyBuilder* b) const override { GrGLDisplacementMapEffect::GenKey(*this, caps, b); } - GrGLFragmentProcessor* createGLInstance() const SK_OVERRIDE { + GrGLFragmentProcessor* createGLInstance() const override { return SkNEW_ARGS(GrGLDisplacementMapEffect, (*this)); } @@ -356,12 +356,12 @@ public: { return fYChannelSelector; } const SkVector& scale() const { return fScale; } - const char* name() const SK_OVERRIDE { return "DisplacementMap"; } + const char* name() const override { return "DisplacementMap"; } private: - bool onIsEqual(const GrFragmentProcessor&) const SK_OVERRIDE; + bool onIsEqual(const GrFragmentProcessor&) const override; - void onComputeInvariantOutput(GrInvariantOutput* inout) const SK_OVERRIDE; + void onComputeInvariantOutput(GrInvariantOutput* inout) const override; GrDisplacementMapEffect(SkDisplacementMapEffect::ChannelSelectorType xChannelSelector, SkDisplacementMapEffect::ChannelSelectorType yChannelSelector, diff --git a/src/effects/SkLightingImageFilter.cpp b/src/effects/SkLightingImageFilter.cpp index 115776707d..72dcf64c58 100644 --- a/src/effects/SkLightingImageFilter.cpp +++ b/src/effects/SkLightingImageFilter.cpp @@ -289,12 +289,12 @@ public: protected: SkDiffuseLightingImageFilter(SkLight* light, SkScalar surfaceScale, SkScalar kd, SkImageFilter* input, const CropRect* cropRect); - void flatten(SkWriteBuffer& buffer) const SK_OVERRIDE; + void flatten(SkWriteBuffer& buffer) const override; virtual bool onFilterImage(Proxy*, const SkBitmap& src, const Context&, - SkBitmap* result, SkIPoint* offset) const SK_OVERRIDE; + SkBitmap* result, SkIPoint* offset) const override; #if SK_SUPPORT_GPU virtual bool asFragmentProcessor(GrFragmentProcessor**, GrTexture*, const SkMatrix&, - const SkIRect& bounds) const SK_OVERRIDE; + const SkIRect& bounds) const override; #endif private: @@ -317,12 +317,12 @@ public: protected: SkSpecularLightingImageFilter(SkLight* light, SkScalar surfaceScale, SkScalar ks, SkScalar shininess, SkImageFilter* input, const CropRect*); - void flatten(SkWriteBuffer& buffer) const SK_OVERRIDE; + void flatten(SkWriteBuffer& buffer) const override; virtual bool onFilterImage(Proxy*, const SkBitmap& src, const Context&, - SkBitmap* result, SkIPoint* offset) const SK_OVERRIDE; + SkBitmap* result, SkIPoint* offset) const override; #if SK_SUPPORT_GPU virtual bool asFragmentProcessor(GrFragmentProcessor**, GrTexture*, const SkMatrix&, - const SkIRect& bounds) const SK_OVERRIDE; + const SkIRect& bounds) const override; #endif private: @@ -344,9 +344,9 @@ public: const SkMatrix& filterMatrix() const { return fFilterMatrix; } protected: - bool onIsEqual(const GrFragmentProcessor&) const SK_OVERRIDE; + bool onIsEqual(const GrFragmentProcessor&) const override; - void onComputeInvariantOutput(GrInvariantOutput* inout) const SK_OVERRIDE { + void onComputeInvariantOutput(GrInvariantOutput* inout) const override { // lighting shaders are complicated. We just throw up our hands. inout->mulByUnknownFourComponents(); } @@ -372,16 +372,16 @@ public: kd)); } - const char* name() const SK_OVERRIDE { return "DiffuseLighting"; } + const char* name() const override { return "DiffuseLighting"; } - void getGLProcessorKey(const GrGLCaps&, GrProcessorKeyBuilder*) const SK_OVERRIDE; + void getGLProcessorKey(const GrGLCaps&, GrProcessorKeyBuilder*) const override; - GrGLFragmentProcessor* createGLInstance() const SK_OVERRIDE; + GrGLFragmentProcessor* createGLInstance() const override; SkScalar kd() const { return fKD; } private: - bool onIsEqual(const GrFragmentProcessor&) const SK_OVERRIDE; + bool onIsEqual(const GrFragmentProcessor&) const override; GrDiffuseLightingEffect(GrTexture* texture, const SkLight* light, @@ -410,17 +410,17 @@ public: shininess)); } - const char* name() const SK_OVERRIDE { return "SpecularLighting"; } + const char* name() const override { return "SpecularLighting"; } - void getGLProcessorKey(const GrGLCaps&, GrProcessorKeyBuilder*) const SK_OVERRIDE; + void getGLProcessorKey(const GrGLCaps&, GrProcessorKeyBuilder*) const override; - GrGLFragmentProcessor* createGLInstance() const SK_OVERRIDE; + GrGLFragmentProcessor* createGLInstance() const override; SkScalar ks() const { return fKS; } SkScalar shininess() const { return fShininess; } private: - bool onIsEqual(const GrFragmentProcessor&) const SK_OVERRIDE; + bool onIsEqual(const GrFragmentProcessor&) const override; GrSpecularLightingEffect(GrTexture* texture, const SkLight* light, @@ -482,8 +482,8 @@ class GrGLDistantLight : public GrGLLight { public: virtual ~GrGLDistantLight() {} virtual void setData(const GrGLProgramDataManager&, - const SkLight* light) const SK_OVERRIDE; - void emitSurfaceToLight(GrGLFPBuilder*, const char* z) SK_OVERRIDE; + const SkLight* light) const override; + void emitSurfaceToLight(GrGLFPBuilder*, const char* z) override; private: typedef GrGLLight INHERITED; @@ -496,8 +496,8 @@ class GrGLPointLight : public GrGLLight { public: virtual ~GrGLPointLight() {} virtual void setData(const GrGLProgramDataManager&, - const SkLight* light) const SK_OVERRIDE; - void emitSurfaceToLight(GrGLFPBuilder*, const char* z) SK_OVERRIDE; + const SkLight* light) const override; + void emitSurfaceToLight(GrGLFPBuilder*, const char* z) override; private: typedef GrGLLight INHERITED; @@ -510,9 +510,9 @@ class GrGLSpotLight : public GrGLLight { public: virtual ~GrGLSpotLight() {} virtual void setData(const GrGLProgramDataManager&, - const SkLight* light) const SK_OVERRIDE; - void emitSurfaceToLight(GrGLFPBuilder*, const char* z) SK_OVERRIDE; - void emitLightColor(GrGLFPBuilder*, const char *surfaceToLight) SK_OVERRIDE; + const SkLight* light) const override; + void emitSurfaceToLight(GrGLFPBuilder*, const char* z) override; + void emitLightColor(GrGLFPBuilder*, const char *surfaceToLight) override; private: typedef GrGLLight INHERITED; @@ -589,9 +589,9 @@ public: return fDirection; }; SkPoint3 lightColor(const SkPoint3&) const { return color(); } - LightType type() const SK_OVERRIDE { return kDistant_LightType; } + LightType type() const override { return kDistant_LightType; } const SkPoint3& direction() const { return fDirection; } - GrGLLight* createGLLight() const SK_OVERRIDE { + GrGLLight* createGLLight() const override { #if SK_SUPPORT_GPU return SkNEW(GrGLDistantLight); #else @@ -599,9 +599,9 @@ public: return NULL; #endif } - bool requiresFragmentPosition() const SK_OVERRIDE { return false; } + bool requiresFragmentPosition() const override { return false; } - bool isEqual(const SkLight& other) const SK_OVERRIDE { + bool isEqual(const SkLight& other) const override { if (other.type() != kDistant_LightType) { return false; } @@ -619,10 +619,10 @@ protected: SkDistantLight(const SkPoint3& direction, const SkPoint3& color) : INHERITED(color), fDirection(direction) { } - SkLight* transform(const SkMatrix& matrix) const SK_OVERRIDE { + SkLight* transform(const SkMatrix& matrix) const override { return new SkDistantLight(direction(), color()); } - void onFlattenLight(SkWriteBuffer& buffer) const SK_OVERRIDE { + void onFlattenLight(SkWriteBuffer& buffer) const override { writePoint3(fDirection, buffer); } @@ -646,9 +646,9 @@ public: return direction; }; SkPoint3 lightColor(const SkPoint3&) const { return color(); } - LightType type() const SK_OVERRIDE { return kPoint_LightType; } + LightType type() const override { return kPoint_LightType; } const SkPoint3& location() const { return fLocation; } - GrGLLight* createGLLight() const SK_OVERRIDE { + GrGLLight* createGLLight() const override { #if SK_SUPPORT_GPU return SkNEW(GrGLPointLight); #else @@ -656,8 +656,8 @@ public: return NULL; #endif } - bool requiresFragmentPosition() const SK_OVERRIDE { return true; } - bool isEqual(const SkLight& other) const SK_OVERRIDE { + bool requiresFragmentPosition() const override { return true; } + bool isEqual(const SkLight& other) const override { if (other.type() != kPoint_LightType) { return false; } @@ -665,7 +665,7 @@ public: return INHERITED::isEqual(other) && fLocation == o.fLocation; } - SkLight* transform(const SkMatrix& matrix) const SK_OVERRIDE { + SkLight* transform(const SkMatrix& matrix) const override { SkPoint location2 = SkPoint::Make(fLocation.fX, fLocation.fY); matrix.mapPoints(&location2, 1); // Use X scale and Y scale on Z and average the result @@ -682,7 +682,7 @@ public: protected: SkPointLight(const SkPoint3& location, const SkPoint3& color) : INHERITED(color), fLocation(location) {} - void onFlattenLight(SkWriteBuffer& buffer) const SK_OVERRIDE { + void onFlattenLight(SkWriteBuffer& buffer) const override { writePoint3(fLocation, buffer); } @@ -709,7 +709,7 @@ public: fConeScale = SkScalarInvert(antiAliasThreshold); } - SkLight* transform(const SkMatrix& matrix) const SK_OVERRIDE { + SkLight* transform(const SkMatrix& matrix) const override { SkPoint location2 = SkPoint::Make(fLocation.fX, fLocation.fY); matrix.mapPoints(&location2, 1); // Use X scale and Y scale on Z and average the result @@ -745,7 +745,7 @@ public: } return color() * scale; } - GrGLLight* createGLLight() const SK_OVERRIDE { + GrGLLight* createGLLight() const override { #if SK_SUPPORT_GPU return SkNEW(GrGLSpotLight); #else @@ -753,8 +753,8 @@ public: return NULL; #endif } - bool requiresFragmentPosition() const SK_OVERRIDE { return true; } - LightType type() const SK_OVERRIDE { return kSpot_LightType; } + bool requiresFragmentPosition() const override { return true; } + LightType type() const override { return kSpot_LightType; } const SkPoint3& location() const { return fLocation; } const SkPoint3& target() const { return fTarget; } SkScalar specularExponent() const { return fSpecularExponent; } @@ -788,7 +788,7 @@ protected: fS(s) { } - void onFlattenLight(SkWriteBuffer& buffer) const SK_OVERRIDE { + void onFlattenLight(SkWriteBuffer& buffer) const override { writePoint3(fLocation, buffer); writePoint3(fTarget, buffer); buffer.writeScalar(fSpecularExponent); @@ -798,7 +798,7 @@ protected: writePoint3(fS, buffer); } - bool isEqual(const SkLight& other) const SK_OVERRIDE { + bool isEqual(const SkLight& other) const override { if (other.type() != kSpot_LightType) { return false; } @@ -1214,14 +1214,14 @@ public: const char* outputColor, const char* inputColor, const TransformedCoordsArray&, - const TextureSamplerArray&) SK_OVERRIDE; + const TextureSamplerArray&) override; static inline void GenKey(const GrProcessor&, const GrGLCaps&, GrProcessorKeyBuilder* b); /** * Subclasses of GrGLLightingEffect must call INHERITED::setData(); */ - void setData(const GrGLProgramDataManager&, const GrProcessor&) SK_OVERRIDE; + void setData(const GrGLProgramDataManager&, const GrProcessor&) override; protected: virtual void emitLightFunc(GrGLFPBuilder*, SkString* funcName) = 0; @@ -1239,8 +1239,8 @@ private: class GrGLDiffuseLightingEffect : public GrGLLightingEffect { public: GrGLDiffuseLightingEffect(const GrProcessor&); - void emitLightFunc(GrGLFPBuilder*, SkString* funcName) SK_OVERRIDE; - void setData(const GrGLProgramDataManager&, const GrProcessor&) SK_OVERRIDE; + void emitLightFunc(GrGLFPBuilder*, SkString* funcName) override; + void setData(const GrGLProgramDataManager&, const GrProcessor&) override; private: typedef GrGLLightingEffect INHERITED; @@ -1253,8 +1253,8 @@ private: class GrGLSpecularLightingEffect : public GrGLLightingEffect { public: GrGLSpecularLightingEffect(const GrProcessor&); - void emitLightFunc(GrGLFPBuilder*, SkString* funcName) SK_OVERRIDE; - void setData(const GrGLProgramDataManager&, const GrProcessor&) SK_OVERRIDE; + void emitLightFunc(GrGLFPBuilder*, SkString* funcName) override; + void setData(const GrGLProgramDataManager&, const GrProcessor&) override; private: typedef GrGLLightingEffect INHERITED; diff --git a/src/effects/SkLumaColorFilter.cpp b/src/effects/SkLumaColorFilter.cpp index b7860e0a0b..e0c08eaf0b 100644 --- a/src/effects/SkLumaColorFilter.cpp +++ b/src/effects/SkLumaColorFilter.cpp @@ -63,14 +63,14 @@ public: return SkRef(gLumaEffect); } - const char* name() const SK_OVERRIDE { return "Luminance-to-Alpha"; } + const char* name() const override { return "Luminance-to-Alpha"; } virtual void getGLProcessorKey(const GrGLCaps& caps, - GrProcessorKeyBuilder* b) const SK_OVERRIDE { + GrProcessorKeyBuilder* b) const override { GLProcessor::GenKey(*this, caps, b); } - GrGLFragmentProcessor* createGLInstance() const SK_OVERRIDE { + GrGLFragmentProcessor* createGLInstance() const override { return SkNEW_ARGS(GLProcessor, (*this)); } @@ -85,7 +85,7 @@ public: const char* outputColor, const char* inputColor, const TransformedCoordsArray&, - const TextureSamplerArray&) SK_OVERRIDE { + const TextureSamplerArray&) override { if (NULL == inputColor) { inputColor = "vec4(1)"; } @@ -110,9 +110,9 @@ private: this->initClassID(); } - bool onIsEqual(const GrFragmentProcessor&) const SK_OVERRIDE { return true; } + bool onIsEqual(const GrFragmentProcessor&) const override { return true; } - void onComputeInvariantOutput(GrInvariantOutput* inout) const SK_OVERRIDE { + void onComputeInvariantOutput(GrInvariantOutput* inout) const override { // The output is always black. The alpha value for the color passed in is arbitrary. inout->setToOther(kRGB_GrColorComponentFlags, GrColorPackRGBA(0, 0, 0, 0), GrInvariantOutput::kWill_ReadInput); diff --git a/src/effects/SkMagnifierImageFilter.cpp b/src/effects/SkMagnifierImageFilter.cpp index eaac30cac3..622713d796 100644 --- a/src/effects/SkMagnifierImageFilter.cpp +++ b/src/effects/SkMagnifierImageFilter.cpp @@ -42,11 +42,11 @@ public: virtual ~GrMagnifierEffect() {}; - const char* name() const SK_OVERRIDE { return "Magnifier"; } + const char* name() const override { return "Magnifier"; } - void getGLProcessorKey(const GrGLCaps&, GrProcessorKeyBuilder*) const SK_OVERRIDE; + void getGLProcessorKey(const GrGLCaps&, GrProcessorKeyBuilder*) const override; - GrGLFragmentProcessor* createGLInstance() const SK_OVERRIDE; + GrGLFragmentProcessor* createGLInstance() const override; float x_offset() const { return fXOffset; } float y_offset() const { return fYOffset; } @@ -73,9 +73,9 @@ private: this->initClassID(); } - bool onIsEqual(const GrFragmentProcessor&) const SK_OVERRIDE; + bool onIsEqual(const GrFragmentProcessor&) const override; - void onComputeInvariantOutput(GrInvariantOutput* inout) const SK_OVERRIDE; + void onComputeInvariantOutput(GrInvariantOutput* inout) const override; GR_DECLARE_FRAGMENT_PROCESSOR_TEST; @@ -101,9 +101,9 @@ public: const char* outputColor, const char* inputColor, const TransformedCoordsArray&, - const TextureSamplerArray&) SK_OVERRIDE; + const TextureSamplerArray&) override; - void setData(const GrGLProgramDataManager&, const GrProcessor&) SK_OVERRIDE; + void setData(const GrGLProgramDataManager&, const GrProcessor&) override; private: UniformHandle fOffsetVar; diff --git a/src/effects/SkMorphologyImageFilter.cpp b/src/effects/SkMorphologyImageFilter.cpp index 32d525a42a..18794c47b7 100644 --- a/src/effects/SkMorphologyImageFilter.cpp +++ b/src/effects/SkMorphologyImageFilter.cpp @@ -313,11 +313,11 @@ public: bool useRange() const { return fUseRange; } const float* range() const { return fRange; } - const char* name() const SK_OVERRIDE { return "Morphology"; } + const char* name() const override { return "Morphology"; } - void getGLProcessorKey(const GrGLCaps&, GrProcessorKeyBuilder*) const SK_OVERRIDE; + void getGLProcessorKey(const GrGLCaps&, GrProcessorKeyBuilder*) const override; - GrGLFragmentProcessor* createGLInstance() const SK_OVERRIDE; + GrGLFragmentProcessor* createGLInstance() const override; protected: @@ -326,9 +326,9 @@ protected: float fRange[2]; private: - bool onIsEqual(const GrFragmentProcessor&) const SK_OVERRIDE; + bool onIsEqual(const GrFragmentProcessor&) const override; - void onComputeInvariantOutput(GrInvariantOutput* inout) const SK_OVERRIDE; + void onComputeInvariantOutput(GrInvariantOutput* inout) const override; GrMorphologyEffect(GrTexture*, Direction, int radius, MorphologyType); GrMorphologyEffect(GrTexture*, Direction, int radius, MorphologyType, float bounds[2]); @@ -349,11 +349,11 @@ public: const char* outputColor, const char* inputColor, const TransformedCoordsArray&, - const TextureSamplerArray&) SK_OVERRIDE; + const TextureSamplerArray&) override; static inline void GenKey(const GrProcessor&, const GrGLCaps&, GrProcessorKeyBuilder* b); - void setData(const GrGLProgramDataManager&, const GrProcessor&) SK_OVERRIDE; + void setData(const GrGLProgramDataManager&, const GrProcessor&) override; private: int width() const { return GrMorphologyEffect::WidthFromRadius(fRadius); } diff --git a/src/effects/SkPerlinNoiseShader.cpp b/src/effects/SkPerlinNoiseShader.cpp index fa46cbd44a..c95ce2ff10 100644 --- a/src/effects/SkPerlinNoiseShader.cpp +++ b/src/effects/SkPerlinNoiseShader.cpp @@ -494,9 +494,9 @@ public: const char* outputColor, const char* inputColor, const TransformedCoordsArray&, - const TextureSamplerArray&) SK_OVERRIDE; + const TextureSamplerArray&) override; - void setData(const GrGLProgramDataManager&, const GrProcessor&) SK_OVERRIDE; + void setData(const GrGLProgramDataManager&, const GrProcessor&) override; static inline void GenKey(const GrProcessor&, const GrGLCaps&, GrProcessorKeyBuilder* b); @@ -530,14 +530,14 @@ public: SkDELETE(fPaintingData); } - const char* name() const SK_OVERRIDE { return "PerlinNoise"; } + const char* name() const override { return "PerlinNoise"; } virtual void getGLProcessorKey(const GrGLCaps& caps, - GrProcessorKeyBuilder* b) const SK_OVERRIDE { + GrProcessorKeyBuilder* b) const override { GrGLPerlinNoise::GenKey(*this, caps, b); } - GrGLFragmentProcessor* createGLInstance() const SK_OVERRIDE { + GrGLFragmentProcessor* createGLInstance() const override { return SkNEW_ARGS(GrGLPerlinNoise, (*this)); } @@ -551,7 +551,7 @@ public: uint8_t alpha() const { return fAlpha; } private: - bool onIsEqual(const GrFragmentProcessor& sBase) const SK_OVERRIDE { + bool onIsEqual(const GrFragmentProcessor& sBase) const override { const GrPerlinNoiseEffect& s = sBase.cast(); return fType == s.fType && fPaintingData->fBaseFrequency == s.fPaintingData->fBaseFrequency && @@ -561,7 +561,7 @@ private: fPaintingData->fStitchDataInit == s.fPaintingData->fStitchDataInit; } - void onComputeInvariantOutput(GrInvariantOutput* inout) const SK_OVERRIDE { + void onComputeInvariantOutput(GrInvariantOutput* inout) const override { inout->setToUnknown(GrInvariantOutput::kWillNot_ReadInput); } diff --git a/src/effects/SkTableColorFilter.cpp b/src/effects/SkTableColorFilter.cpp index 073bc18805..a319f0809b 100644 --- a/src/effects/SkTableColorFilter.cpp +++ b/src/effects/SkTableColorFilter.cpp @@ -40,14 +40,14 @@ public: SkDELETE(fBitmap); } - bool asComponentTable(SkBitmap* table) const SK_OVERRIDE; - SkColorFilter* newComposed(const SkColorFilter* inner) const SK_OVERRIDE; + bool asComponentTable(SkBitmap* table) const override; + SkColorFilter* newComposed(const SkColorFilter* inner) const override; #if SK_SUPPORT_GPU - bool asFragmentProcessors(GrContext*, SkTDArray*) const SK_OVERRIDE; + bool asFragmentProcessors(GrContext*, SkTDArray*) const override; #endif - void filterSpan(const SkPMColor src[], int count, SkPMColor dst[]) const SK_OVERRIDE; + void filterSpan(const SkPMColor src[], int count, SkPMColor dst[]) const override; SK_TO_STRING_OVERRIDE() @@ -61,7 +61,7 @@ public: }; protected: - void flatten(SkWriteBuffer&) const SK_OVERRIDE; + void flatten(SkWriteBuffer&) const override; private: mutable const SkBitmap* fBitmap; // lazily allocated @@ -338,19 +338,19 @@ public: virtual ~ColorTableEffect(); - const char* name() const SK_OVERRIDE { return "ColorTable"; } + const char* name() const override { return "ColorTable"; } - void getGLProcessorKey(const GrGLCaps&, GrProcessorKeyBuilder*) const SK_OVERRIDE; + void getGLProcessorKey(const GrGLCaps&, GrProcessorKeyBuilder*) const override; - GrGLFragmentProcessor* createGLInstance() const SK_OVERRIDE; + GrGLFragmentProcessor* createGLInstance() const override; const GrTextureStripAtlas* atlas() const { return fAtlas; } int atlasRow() const { return fRow; } private: - bool onIsEqual(const GrFragmentProcessor&) const SK_OVERRIDE; + bool onIsEqual(const GrFragmentProcessor&) const override; - void onComputeInvariantOutput(GrInvariantOutput* inout) const SK_OVERRIDE; + void onComputeInvariantOutput(GrInvariantOutput* inout) const override; ColorTableEffect(GrTexture* texture, GrTextureStripAtlas* atlas, int row, unsigned flags); @@ -376,9 +376,9 @@ public: const char* outputColor, const char* inputColor, const TransformedCoordsArray&, - const TextureSamplerArray&) SK_OVERRIDE; + const TextureSamplerArray&) override; - void setData(const GrGLProgramDataManager&, const GrProcessor&) SK_OVERRIDE; + void setData(const GrGLProgramDataManager&, const GrProcessor&) override; static void GenKey(const GrProcessor&, const GrGLCaps&, GrProcessorKeyBuilder* b) {} diff --git a/src/effects/gradients/SkGradientShaderPriv.h b/src/effects/gradients/SkGradientShaderPriv.h index 99ad70c54a..dff6983518 100644 --- a/src/effects/gradients/SkGradientShaderPriv.h +++ b/src/effects/gradients/SkGradientShaderPriv.h @@ -166,7 +166,7 @@ public: public: GradientShaderBaseContext(const SkGradientShaderBase& shader, const ContextRec&); - uint32_t getFlags() const SK_OVERRIDE { return fFlags; } + uint32_t getFlags() const override { return fFlags; } protected: SkMatrix fDstToIndex; @@ -180,7 +180,7 @@ public: typedef SkShader::Context INHERITED; }; - bool isOpaque() const SK_OVERRIDE; + bool isOpaque() const override; void getGradientTableBitmap(SkBitmap*) const; @@ -220,7 +220,7 @@ public: protected: SkGradientShaderBase(SkReadBuffer& ); - void flatten(SkWriteBuffer&) const SK_OVERRIDE; + void flatten(SkWriteBuffer&) const override; SK_TO_STRING_OVERRIDE() const SkMatrix fPtsToUnit; @@ -237,7 +237,7 @@ protected: void commonAsAGradient(GradientInfo*, bool flipGrad = false) const; - bool onAsLuminanceColor(SkColor*) const SK_OVERRIDE; + bool onAsLuminanceColor(SkColor*) const override; /* * Takes in pointers to gradient color and Rec info as colorSrc and recSrc respectively. @@ -368,9 +368,9 @@ protected: SkScalar** stops, SkShader::TileMode* tm); - bool onIsEqual(const GrFragmentProcessor&) const SK_OVERRIDE; + bool onIsEqual(const GrFragmentProcessor&) const override; - void onComputeInvariantOutput(GrInvariantOutput* inout) const SK_OVERRIDE; + void onComputeInvariantOutput(GrInvariantOutput* inout) const override; const GrCoordTransform& getCoordTransform() const { return fCoordTransform; } @@ -399,7 +399,7 @@ public: GrGLGradientEffect(); virtual ~GrGLGradientEffect(); - void setData(const GrGLProgramDataManager&, const GrProcessor&) SK_OVERRIDE; + void setData(const GrGLProgramDataManager&, const GrProcessor&) override; protected: /** diff --git a/src/effects/gradients/SkLinearGradient.cpp b/src/effects/gradients/SkLinearGradient.cpp index c7d845a188..2c8e183137 100644 --- a/src/effects/gradients/SkLinearGradient.cpp +++ b/src/effects/gradients/SkLinearGradient.cpp @@ -472,7 +472,7 @@ public: const char* outputColor, const char* inputColor, const TransformedCoordsArray&, - const TextureSamplerArray&) SK_OVERRIDE; + const TextureSamplerArray&) override; static void GenKey(const GrProcessor& processor, const GrGLCaps&, GrProcessorKeyBuilder* b) { b->add32(GenBaseGradientKey(processor)); @@ -497,14 +497,14 @@ public: virtual ~GrLinearGradient() { } - const char* name() const SK_OVERRIDE { return "Linear Gradient"; } + const char* name() const override { return "Linear Gradient"; } virtual void getGLProcessorKey(const GrGLCaps& caps, - GrProcessorKeyBuilder* b) const SK_OVERRIDE { + GrProcessorKeyBuilder* b) const override { GrGLLinearGradient::GenKey(*this, caps, b); } - GrGLFragmentProcessor* createGLInstance() const SK_OVERRIDE { + GrGLFragmentProcessor* createGLInstance() const override { return SkNEW_ARGS(GrGLLinearGradient, (*this)); } diff --git a/src/effects/gradients/SkLinearGradient.h b/src/effects/gradients/SkLinearGradient.h index e63a1b8a2e..3f4f36f552 100644 --- a/src/effects/gradients/SkLinearGradient.h +++ b/src/effects/gradients/SkLinearGradient.h @@ -14,33 +14,33 @@ class SkLinearGradient : public SkGradientShaderBase { public: SkLinearGradient(const SkPoint pts[2], const Descriptor&); - size_t contextSize() const SK_OVERRIDE; + size_t contextSize() const override; class LinearGradientContext : public SkGradientShaderBase::GradientShaderBaseContext { public: LinearGradientContext(const SkLinearGradient&, const ContextRec&); ~LinearGradientContext() {} - void shadeSpan(int x, int y, SkPMColor dstC[], int count) SK_OVERRIDE; - void shadeSpan16(int x, int y, uint16_t dstC[], int count) SK_OVERRIDE; + void shadeSpan(int x, int y, SkPMColor dstC[], int count) override; + void shadeSpan16(int x, int y, uint16_t dstC[], int count) override; private: typedef SkGradientShaderBase::GradientShaderBaseContext INHERITED; }; - BitmapType asABitmap(SkBitmap*, SkMatrix*, TileMode*) const SK_OVERRIDE; - GradientType asAGradient(GradientInfo* info) const SK_OVERRIDE; + BitmapType asABitmap(SkBitmap*, SkMatrix*, TileMode*) const override; + GradientType asAGradient(GradientInfo* info) const override; virtual bool asFragmentProcessor(GrContext*, const SkPaint&, const SkMatrix& viewM, const SkMatrix*, - GrColor*, GrFragmentProcessor**) const SK_OVERRIDE; + GrColor*, GrFragmentProcessor**) const override; SK_TO_STRING_OVERRIDE() SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkLinearGradient) protected: SkLinearGradient(SkReadBuffer& buffer); - void flatten(SkWriteBuffer& buffer) const SK_OVERRIDE; - Context* onCreateContext(const ContextRec&, void* storage) const SK_OVERRIDE; + void flatten(SkWriteBuffer& buffer) const override; + Context* onCreateContext(const ContextRec&, void* storage) const override; private: friend class SkGradientShader; diff --git a/src/effects/gradients/SkRadialGradient.cpp b/src/effects/gradients/SkRadialGradient.cpp index 5ea2e72a9d..b25a8750a2 100644 --- a/src/effects/gradients/SkRadialGradient.cpp +++ b/src/effects/gradients/SkRadialGradient.cpp @@ -473,7 +473,7 @@ public: const char* outputColor, const char* inputColor, const TransformedCoordsArray&, - const TextureSamplerArray&) SK_OVERRIDE; + const TextureSamplerArray&) override; static void GenKey(const GrProcessor& processor, const GrGLCaps&, GrProcessorKeyBuilder* b) { b->add32(GenBaseGradientKey(processor)); @@ -498,14 +498,14 @@ public: virtual ~GrRadialGradient() { } - const char* name() const SK_OVERRIDE { return "Radial Gradient"; } + const char* name() const override { return "Radial Gradient"; } virtual void getGLProcessorKey(const GrGLCaps& caps, - GrProcessorKeyBuilder* b) const SK_OVERRIDE { + GrProcessorKeyBuilder* b) const override { GrGLRadialGradient::GenKey(*this, caps, b); } - GrGLFragmentProcessor* createGLInstance() const SK_OVERRIDE { + GrGLFragmentProcessor* createGLInstance() const override { return SkNEW_ARGS(GrGLRadialGradient, (*this)); } diff --git a/src/effects/gradients/SkRadialGradient.h b/src/effects/gradients/SkRadialGradient.h index a690bb5321..f80a8e8c53 100644 --- a/src/effects/gradients/SkRadialGradient.h +++ b/src/effects/gradients/SkRadialGradient.h @@ -15,14 +15,14 @@ class SkRadialGradient : public SkGradientShaderBase { public: SkRadialGradient(const SkPoint& center, SkScalar radius, const Descriptor&); - size_t contextSize() const SK_OVERRIDE; + size_t contextSize() const override; class RadialGradientContext : public SkGradientShaderBase::GradientShaderBaseContext { public: RadialGradientContext(const SkRadialGradient&, const ContextRec&); - void shadeSpan(int x, int y, SkPMColor dstC[], int count) SK_OVERRIDE; - void shadeSpan16(int x, int y, uint16_t dstC[], int count) SK_OVERRIDE; + void shadeSpan(int x, int y, SkPMColor dstC[], int count) override; + void shadeSpan16(int x, int y, uint16_t dstC[], int count) override; private: typedef SkGradientShaderBase::GradientShaderBaseContext INHERITED; @@ -30,19 +30,19 @@ public: virtual BitmapType asABitmap(SkBitmap* bitmap, SkMatrix* matrix, - TileMode* xy) const SK_OVERRIDE; - GradientType asAGradient(GradientInfo* info) const SK_OVERRIDE; + TileMode* xy) const override; + GradientType asAGradient(GradientInfo* info) const override; virtual bool asFragmentProcessor(GrContext*, const SkPaint&, const SkMatrix& viewM, const SkMatrix*, GrColor*, - GrFragmentProcessor**) const SK_OVERRIDE; + GrFragmentProcessor**) const override; SK_TO_STRING_OVERRIDE() SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkRadialGradient) protected: SkRadialGradient(SkReadBuffer& buffer); - void flatten(SkWriteBuffer& buffer) const SK_OVERRIDE; - Context* onCreateContext(const ContextRec&, void* storage) const SK_OVERRIDE; + void flatten(SkWriteBuffer& buffer) const override; + Context* onCreateContext(const ContextRec&, void* storage) const override; private: friend class SkGradientShader; diff --git a/src/effects/gradients/SkSweepGradient.cpp b/src/effects/gradients/SkSweepGradient.cpp index f8ee458346..dd78cd4d37 100644 --- a/src/effects/gradients/SkSweepGradient.cpp +++ b/src/effects/gradients/SkSweepGradient.cpp @@ -195,7 +195,7 @@ public: const char* outputColor, const char* inputColor, const TransformedCoordsArray&, - const TextureSamplerArray&) SK_OVERRIDE; + const TextureSamplerArray&) override; static void GenKey(const GrProcessor& processor, const GrGLCaps&, GrProcessorKeyBuilder* b) { b->add32(GenBaseGradientKey(processor)); @@ -217,14 +217,14 @@ public: } virtual ~GrSweepGradient() { } - const char* name() const SK_OVERRIDE { return "Sweep Gradient"; } + const char* name() const override { return "Sweep Gradient"; } virtual void getGLProcessorKey(const GrGLCaps& caps, - GrProcessorKeyBuilder* b) const SK_OVERRIDE { + GrProcessorKeyBuilder* b) const override { GrGLSweepGradient::GenKey(*this, caps, b); } - GrGLFragmentProcessor* createGLInstance() const SK_OVERRIDE { + GrGLFragmentProcessor* createGLInstance() const override { return SkNEW_ARGS(GrGLSweepGradient, (*this)); } diff --git a/src/effects/gradients/SkSweepGradient.h b/src/effects/gradients/SkSweepGradient.h index b72a08d834..7e08d97b61 100644 --- a/src/effects/gradients/SkSweepGradient.h +++ b/src/effects/gradients/SkSweepGradient.h @@ -15,14 +15,14 @@ class SkSweepGradient : public SkGradientShaderBase { public: SkSweepGradient(SkScalar cx, SkScalar cy, const Descriptor&); - size_t contextSize() const SK_OVERRIDE; + size_t contextSize() const override; class SweepGradientContext : public SkGradientShaderBase::GradientShaderBaseContext { public: SweepGradientContext(const SkSweepGradient& shader, const ContextRec&); - void shadeSpan(int x, int y, SkPMColor dstC[], int count) SK_OVERRIDE; - void shadeSpan16(int x, int y, uint16_t dstC[], int count) SK_OVERRIDE; + void shadeSpan(int x, int y, SkPMColor dstC[], int count) override; + void shadeSpan16(int x, int y, uint16_t dstC[], int count) override; private: typedef SkGradientShaderBase::GradientShaderBaseContext INHERITED; @@ -30,20 +30,20 @@ public: virtual BitmapType asABitmap(SkBitmap* bitmap, SkMatrix* matrix, - TileMode* xy) const SK_OVERRIDE; + TileMode* xy) const override; - GradientType asAGradient(GradientInfo* info) const SK_OVERRIDE; + GradientType asAGradient(GradientInfo* info) const override; virtual bool asFragmentProcessor(GrContext*, const SkPaint&, const SkMatrix& viewM, const SkMatrix*, GrColor*, - GrFragmentProcessor**) const SK_OVERRIDE; + GrFragmentProcessor**) const override; SK_TO_STRING_OVERRIDE() SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkSweepGradient) protected: - void flatten(SkWriteBuffer& buffer) const SK_OVERRIDE; - Context* onCreateContext(const ContextRec&, void* storage) const SK_OVERRIDE; + void flatten(SkWriteBuffer& buffer) const override; + Context* onCreateContext(const ContextRec&, void* storage) const override; private: const SkPoint fCenter; diff --git a/src/effects/gradients/SkTwoPointConicalGradient.h b/src/effects/gradients/SkTwoPointConicalGradient.h index ff12236aae..0a3cd90201 100644 --- a/src/effects/gradients/SkTwoPointConicalGradient.h +++ b/src/effects/gradients/SkTwoPointConicalGradient.h @@ -45,14 +45,14 @@ public: bool flippedGrad, const Descriptor&); - size_t contextSize() const SK_OVERRIDE; + size_t contextSize() const override; class TwoPointConicalGradientContext : public SkGradientShaderBase::GradientShaderBaseContext { public: TwoPointConicalGradientContext(const SkTwoPointConicalGradient&, const ContextRec&); ~TwoPointConicalGradientContext() {} - void shadeSpan(int x, int y, SkPMColor dstC[], int count) SK_OVERRIDE; + void shadeSpan(int x, int y, SkPMColor dstC[], int count) override; private: typedef SkGradientShaderBase::GradientShaderBaseContext INHERITED; @@ -60,11 +60,11 @@ public: virtual BitmapType asABitmap(SkBitmap* bitmap, SkMatrix* matrix, - TileMode* xy) const SK_OVERRIDE; - SkShader::GradientType asAGradient(GradientInfo* info) const SK_OVERRIDE; + TileMode* xy) const override; + SkShader::GradientType asAGradient(GradientInfo* info) const override; virtual bool asFragmentProcessor(GrContext*, const SkPaint&, const SkMatrix&, const SkMatrix*, - GrColor*, GrFragmentProcessor**) const SK_OVERRIDE; - bool isOpaque() const SK_OVERRIDE; + GrColor*, GrFragmentProcessor**) const override; + bool isOpaque() const override; SkScalar getCenterX1() const { return SkPoint::Distance(fCenter1, fCenter2); } SkScalar getStartRadius() const { return fRadius1; } @@ -79,8 +79,8 @@ public: protected: SkTwoPointConicalGradient(SkReadBuffer& buffer); - void flatten(SkWriteBuffer& buffer) const SK_OVERRIDE; - Context* onCreateContext(const ContextRec&, void* storage) const SK_OVERRIDE; + void flatten(SkWriteBuffer& buffer) const override; + Context* onCreateContext(const ContextRec&, void* storage) const override; private: SkPoint fCenter1; diff --git a/src/effects/gradients/SkTwoPointConicalGradient_gpu.cpp b/src/effects/gradients/SkTwoPointConicalGradient_gpu.cpp index c9f2d2f50a..a31bfd4905 100644 --- a/src/effects/gradients/SkTwoPointConicalGradient_gpu.cpp +++ b/src/effects/gradients/SkTwoPointConicalGradient_gpu.cpp @@ -66,13 +66,13 @@ public: virtual ~Edge2PtConicalEffect() {} - const char* name() const SK_OVERRIDE { + const char* name() const override { return "Two-Point Conical Gradient Edge Touching"; } - void getGLProcessorKey(const GrGLCaps&, GrProcessorKeyBuilder*) const SK_OVERRIDE; + void getGLProcessorKey(const GrGLCaps&, GrProcessorKeyBuilder*) const override; - GrGLFragmentProcessor* createGLInstance() const SK_OVERRIDE; + GrGLFragmentProcessor* createGLInstance() const override; // The radial gradient parameters can collapse to a linear (instead of quadratic) equation. SkScalar center() const { return fCenterX1; } @@ -80,7 +80,7 @@ public: SkScalar radius() const { return fRadius0; } private: - bool onIsEqual(const GrFragmentProcessor& sBase) const SK_OVERRIDE { + bool onIsEqual(const GrFragmentProcessor& sBase) const override { const Edge2PtConicalEffect& s = sBase.cast(); return (INHERITED::onIsEqual(sBase) && this->fCenterX1 == s.fCenterX1 && @@ -146,8 +146,8 @@ public: const char* outputColor, const char* inputColor, const TransformedCoordsArray&, - const TextureSamplerArray&) SK_OVERRIDE; - void setData(const GrGLProgramDataManager&, const GrProcessor&) SK_OVERRIDE; + const TextureSamplerArray&) override; + void setData(const GrGLProgramDataManager&, const GrProcessor&) override; static void GenKey(const GrProcessor&, const GrGLCaps& caps, GrProcessorKeyBuilder* b); @@ -388,19 +388,19 @@ public: virtual ~FocalOutside2PtConicalEffect() { } - const char* name() const SK_OVERRIDE { + const char* name() const override { return "Two-Point Conical Gradient Focal Outside"; } - void getGLProcessorKey(const GrGLCaps&, GrProcessorKeyBuilder*) const SK_OVERRIDE; + void getGLProcessorKey(const GrGLCaps&, GrProcessorKeyBuilder*) const override; - GrGLFragmentProcessor* createGLInstance() const SK_OVERRIDE; + GrGLFragmentProcessor* createGLInstance() const override; bool isFlipped() const { return fIsFlipped; } SkScalar focal() const { return fFocalX; } private: - bool onIsEqual(const GrFragmentProcessor& sBase) const SK_OVERRIDE { + bool onIsEqual(const GrFragmentProcessor& sBase) const override { const FocalOutside2PtConicalEffect& s = sBase.cast(); return (INHERITED::onIsEqual(sBase) && this->fFocalX == s.fFocalX && @@ -434,8 +434,8 @@ public: const char* outputColor, const char* inputColor, const TransformedCoordsArray&, - const TextureSamplerArray&) SK_OVERRIDE; - void setData(const GrGLProgramDataManager&, const GrProcessor&) SK_OVERRIDE; + const TextureSamplerArray&) override; + void setData(const GrGLProgramDataManager&, const GrProcessor&) override; static void GenKey(const GrProcessor&, const GrGLCaps& caps, GrProcessorKeyBuilder* b); @@ -610,20 +610,20 @@ public: virtual ~FocalInside2PtConicalEffect() {} - const char* name() const SK_OVERRIDE { + const char* name() const override { return "Two-Point Conical Gradient Focal Inside"; } - void getGLProcessorKey(const GrGLCaps&, GrProcessorKeyBuilder*) const SK_OVERRIDE; + void getGLProcessorKey(const GrGLCaps&, GrProcessorKeyBuilder*) const override; - GrGLFragmentProcessor* createGLInstance() const SK_OVERRIDE; + GrGLFragmentProcessor* createGLInstance() const override; SkScalar focal() const { return fFocalX; } typedef GLFocalInside2PtConicalEffect GLProcessor; private: - bool onIsEqual(const GrFragmentProcessor& sBase) const SK_OVERRIDE { + bool onIsEqual(const GrFragmentProcessor& sBase) const override { const FocalInside2PtConicalEffect& s = sBase.cast(); return (INHERITED::onIsEqual(sBase) && this->fFocalX == s.fFocalX); @@ -655,8 +655,8 @@ public: const char* outputColor, const char* inputColor, const TransformedCoordsArray&, - const TextureSamplerArray&) SK_OVERRIDE; - void setData(const GrGLProgramDataManager&, const GrProcessor&) SK_OVERRIDE; + const TextureSamplerArray&) override; + void setData(const GrGLProgramDataManager&, const GrProcessor&) override; static void GenKey(const GrProcessor&, const GrGLCaps& caps, GrProcessorKeyBuilder* b); @@ -857,12 +857,12 @@ public: virtual ~CircleInside2PtConicalEffect() {} - const char* name() const SK_OVERRIDE { return "Two-Point Conical Gradient Inside"; } + const char* name() const override { return "Two-Point Conical Gradient Inside"; } virtual void getGLProcessorKey(const GrGLCaps& caps, - GrProcessorKeyBuilder* b) const SK_OVERRIDE; + GrProcessorKeyBuilder* b) const override; - GrGLFragmentProcessor* createGLInstance() const SK_OVERRIDE; + GrGLFragmentProcessor* createGLInstance() const override; SkScalar centerX() const { return fInfo.fCenterEnd.fX; } SkScalar centerY() const { return fInfo.fCenterEnd.fY; } @@ -871,7 +871,7 @@ public: SkScalar C() const { return fInfo.fC; } private: - bool onIsEqual(const GrFragmentProcessor& sBase) const SK_OVERRIDE { + bool onIsEqual(const GrFragmentProcessor& sBase) const override { const CircleInside2PtConicalEffect& s = sBase.cast(); return (INHERITED::onIsEqual(sBase) && this->fInfo.fCenterEnd == s.fInfo.fCenterEnd && @@ -906,8 +906,8 @@ public: const char* outputColor, const char* inputColor, const TransformedCoordsArray&, - const TextureSamplerArray&) SK_OVERRIDE; - void setData(const GrGLProgramDataManager&, const GrProcessor&) SK_OVERRIDE; + const TextureSamplerArray&) override; + void setData(const GrGLProgramDataManager&, const GrProcessor&) override; static void GenKey(const GrProcessor&, const GrGLCaps& caps, GrProcessorKeyBuilder* b); @@ -1081,11 +1081,11 @@ public: virtual ~CircleOutside2PtConicalEffect() {} - const char* name() const SK_OVERRIDE { return "Two-Point Conical Gradient Outside"; } + const char* name() const override { return "Two-Point Conical Gradient Outside"; } - void getGLProcessorKey(const GrGLCaps&, GrProcessorKeyBuilder*) const SK_OVERRIDE; + void getGLProcessorKey(const GrGLCaps&, GrProcessorKeyBuilder*) const override; - GrGLFragmentProcessor* createGLInstance() const SK_OVERRIDE; + GrGLFragmentProcessor* createGLInstance() const override; SkScalar centerX() const { return fInfo.fCenterEnd.fX; } SkScalar centerY() const { return fInfo.fCenterEnd.fY; } @@ -1096,7 +1096,7 @@ public: bool isFlipped() const { return fIsFlipped; } private: - bool onIsEqual(const GrFragmentProcessor& sBase) const SK_OVERRIDE { + bool onIsEqual(const GrFragmentProcessor& sBase) const override { const CircleOutside2PtConicalEffect& s = sBase.cast(); return (INHERITED::onIsEqual(sBase) && this->fInfo.fCenterEnd == s.fInfo.fCenterEnd && @@ -1143,8 +1143,8 @@ public: const char* outputColor, const char* inputColor, const TransformedCoordsArray&, - const TextureSamplerArray&) SK_OVERRIDE; - void setData(const GrGLProgramDataManager&, const GrProcessor&) SK_OVERRIDE; + const TextureSamplerArray&) override; + void setData(const GrGLProgramDataManager&, const GrProcessor&) override; static void GenKey(const GrProcessor&, const GrGLCaps& caps, GrProcessorKeyBuilder* b); diff --git a/src/effects/gradients/SkTwoPointRadialGradient.cpp b/src/effects/gradients/SkTwoPointRadialGradient.cpp index e0ea35e860..434fcff865 100644 --- a/src/effects/gradients/SkTwoPointRadialGradient.cpp +++ b/src/effects/gradients/SkTwoPointRadialGradient.cpp @@ -405,8 +405,8 @@ public: const char* outputColor, const char* inputColor, const TransformedCoordsArray&, - const TextureSamplerArray&) SK_OVERRIDE; - void setData(const GrGLProgramDataManager&, const GrProcessor&) SK_OVERRIDE; + const TextureSamplerArray&) override; + void setData(const GrGLProgramDataManager&, const GrProcessor&) override; static void GenKey(const GrProcessor&, const GrGLCaps& caps, GrProcessorKeyBuilder* b); @@ -447,14 +447,14 @@ public: virtual ~GrRadial2Gradient() { } - const char* name() const SK_OVERRIDE { return "Two-Point Radial Gradient"; } + const char* name() const override { return "Two-Point Radial Gradient"; } virtual void getGLProcessorKey(const GrGLCaps& caps, - GrProcessorKeyBuilder* b) const SK_OVERRIDE { + GrProcessorKeyBuilder* b) const override { GrGLRadial2Gradient::GenKey(*this, caps, b); } - GrGLFragmentProcessor* createGLInstance() const SK_OVERRIDE { + GrGLFragmentProcessor* createGLInstance() const override { return SkNEW_ARGS(GrGLRadial2Gradient, (*this)); } @@ -465,7 +465,7 @@ public: bool isPosRoot() const { return SkToBool(fPosRoot); } private: - bool onIsEqual(const GrFragmentProcessor& sBase) const SK_OVERRIDE { + bool onIsEqual(const GrFragmentProcessor& sBase) const override { const GrRadial2Gradient& s = sBase.cast(); return (INHERITED::onIsEqual(sBase) && this->fCenterX1 == s.fCenterX1 && diff --git a/src/effects/gradients/SkTwoPointRadialGradient.h b/src/effects/gradients/SkTwoPointRadialGradient.h index ece3858ee2..7da85d6d88 100644 --- a/src/effects/gradients/SkTwoPointRadialGradient.h +++ b/src/effects/gradients/SkTwoPointRadialGradient.h @@ -19,19 +19,19 @@ public: virtual BitmapType asABitmap(SkBitmap* bitmap, SkMatrix* matrix, - TileMode* xy) const SK_OVERRIDE; - GradientType asAGradient(GradientInfo* info) const SK_OVERRIDE; + TileMode* xy) const override; + GradientType asAGradient(GradientInfo* info) const override; virtual bool asFragmentProcessor(GrContext* context, const SkPaint&, const SkMatrix& viewM, const SkMatrix*, GrColor*, - GrFragmentProcessor**) const SK_OVERRIDE; + GrFragmentProcessor**) const override; - size_t contextSize() const SK_OVERRIDE; + size_t contextSize() const override; class TwoPointRadialGradientContext : public SkGradientShaderBase::GradientShaderBaseContext { public: TwoPointRadialGradientContext(const SkTwoPointRadialGradient&, const ContextRec&); - void shadeSpan(int x, int y, SkPMColor dstC[], int count) SK_OVERRIDE; + void shadeSpan(int x, int y, SkPMColor dstC[], int count) override; private: typedef SkGradientShaderBase::GradientShaderBaseContext INHERITED; @@ -46,8 +46,8 @@ public: protected: SkTwoPointRadialGradient(SkReadBuffer& buffer); - void flatten(SkWriteBuffer& buffer) const SK_OVERRIDE; - Context* onCreateContext(const ContextRec&, void* storage) const SK_OVERRIDE; + void flatten(SkWriteBuffer& buffer) const override; + Context* onCreateContext(const ContextRec&, void* storage) const override; private: const SkPoint fCenter1; diff --git a/src/fonts/SkFontMgr_fontconfig.cpp b/src/fonts/SkFontMgr_fontconfig.cpp index 9f436812a8..4b86a6ed78 100644 --- a/src/fonts/SkFontMgr_fontconfig.cpp +++ b/src/fonts/SkFontMgr_fontconfig.cpp @@ -142,10 +142,10 @@ public: SkFontStyleSet_FC(FcPattern** matches, int count); virtual ~SkFontStyleSet_FC(); - int count() SK_OVERRIDE { return fRecCount; } - void getStyle(int index, SkFontStyle*, SkString* style) SK_OVERRIDE; - SkTypeface* createTypeface(int index) SK_OVERRIDE; - SkTypeface* matchStyle(const SkFontStyle& pattern) SK_OVERRIDE; + int count() override { return fRecCount; } + void getStyle(int index, SkFontStyle*, SkString* style) override; + SkTypeface* createTypeface(int index) override; + SkTypeface* matchStyle(const SkFontStyle& pattern) override; private: struct Rec { @@ -226,19 +226,19 @@ public: } protected: - int onCountFamilies() const SK_OVERRIDE { + int onCountFamilies() const override { return fFamilyNames->count(); } - void onGetFamilyName(int index, SkString* familyName) const SK_OVERRIDE { + void onGetFamilyName(int index, SkString* familyName) const override { familyName->set(fFamilyNames->atStr(index)); } - SkFontStyleSet* onCreateStyleSet(int index) const SK_OVERRIDE { + SkFontStyleSet* onCreateStyleSet(int index) const override { return this->onMatchFamily(fFamilyNames->atStr(index)); } - SkFontStyleSet* onMatchFamily(const char familyName[]) const SK_OVERRIDE { + SkFontStyleSet* onMatchFamily(const char familyName[]) const override { FCLocker lock; FcPattern* pattern = FcPatternCreate(); @@ -284,18 +284,18 @@ protected: } virtual SkTypeface* onMatchFamilyStyle(const char familyName[], - const SkFontStyle&) const SK_OVERRIDE { return NULL; } + const SkFontStyle&) const override { return NULL; } virtual SkTypeface* onMatchFamilyStyleCharacter(const char familyName[], const SkFontStyle&, const char* bcp47[], int bcp47Count, - SkUnichar character) const SK_OVERRIDE { + SkUnichar character) const override { return NULL; } virtual SkTypeface* onMatchFaceStyle(const SkTypeface*, - const SkFontStyle&) const SK_OVERRIDE { return NULL; } + const SkFontStyle&) const override { return NULL; } - SkTypeface* onCreateFromData(SkData*, int ttcIndex) const SK_OVERRIDE { return NULL; } + SkTypeface* onCreateFromData(SkData*, int ttcIndex) const override { return NULL; } - SkTypeface* onCreateFromStream(SkStreamAsset* bareStream, int ttcIndex) const SK_OVERRIDE { + SkTypeface* onCreateFromStream(SkStreamAsset* bareStream, int ttcIndex) const override { SkAutoTDelete stream(bareStream); const size_t length = stream->getLength(); if (!length) { @@ -316,13 +316,13 @@ protected: return face; } - SkTypeface* onCreateFromFile(const char path[], int ttcIndex) const SK_OVERRIDE { + SkTypeface* onCreateFromFile(const char path[], int ttcIndex) const override { SkAutoTDelete stream(SkStream::NewFromFile(path)); return stream.get() ? this->createFromStream(stream.detach(), ttcIndex) : NULL; } virtual SkTypeface* onLegacyCreateTypeface(const char familyName[], - unsigned styleBits) const SK_OVERRIDE { + unsigned styleBits) const override { FCLocker lock; return FontConfigTypeface::LegacyCreateTypeface(familyName, (SkTypeface::Style)styleBits); } diff --git a/src/fonts/SkFontMgr_indirect.cpp b/src/fonts/SkFontMgr_indirect.cpp index 5615a78c21..172d5412a6 100644 --- a/src/fonts/SkFontMgr_indirect.cpp +++ b/src/fonts/SkFontMgr_indirect.cpp @@ -25,9 +25,9 @@ public: : fOwner(SkRef(owner)), fFamilyIndex(familyIndex), fData(data) { } - int count() SK_OVERRIDE { return fData->count(); } + int count() override { return fData->count(); } - void getStyle(int index, SkFontStyle* fs, SkString* style) SK_OVERRIDE { + void getStyle(int index, SkFontStyle* fs, SkString* style) override { if (fs) { *fs = fData->at(index).fFontStyle; } @@ -37,11 +37,11 @@ public: } } - SkTypeface* createTypeface(int index) SK_OVERRIDE { + SkTypeface* createTypeface(int index) override { return fOwner->createTypefaceFromFontId(fData->at(index)); } - SkTypeface* matchStyle(const SkFontStyle& pattern) SK_OVERRIDE { + SkTypeface* matchStyle(const SkFontStyle& pattern) override { if (fFamilyIndex >= 0) { SkFontIdentity id = fOwner->fProxy->matchIndexStyle(fFamilyIndex, pattern); return fOwner->createTypefaceFromFontId(id); diff --git a/src/fonts/SkGScalerContext.cpp b/src/fonts/SkGScalerContext.cpp index cd5db5f9f8..17eee82a13 100644 --- a/src/fonts/SkGScalerContext.cpp +++ b/src/fonts/SkGScalerContext.cpp @@ -16,13 +16,13 @@ public: virtual ~SkGScalerContext(); protected: - unsigned generateGlyphCount() SK_OVERRIDE; - uint16_t generateCharToGlyph(SkUnichar) SK_OVERRIDE; - void generateAdvance(SkGlyph*) SK_OVERRIDE; - void generateMetrics(SkGlyph*) SK_OVERRIDE; - void generateImage(const SkGlyph&) SK_OVERRIDE; - void generatePath(const SkGlyph&, SkPath*) SK_OVERRIDE; - void generateFontMetrics(SkPaint::FontMetrics*) SK_OVERRIDE; + unsigned generateGlyphCount() override; + uint16_t generateCharToGlyph(SkUnichar) override; + void generateAdvance(SkGlyph*) override; + void generateMetrics(SkGlyph*) override; + void generateImage(const SkGlyph&) override; + void generatePath(const SkGlyph&, SkPath*) override; + void generateFontMetrics(SkPaint::FontMetrics*) override; private: SkGTypeface* fFace; diff --git a/src/fonts/SkGScalerContext.h b/src/fonts/SkGScalerContext.h index 05dc483007..ee6eac5d7a 100644 --- a/src/fonts/SkGScalerContext.h +++ b/src/fonts/SkGScalerContext.h @@ -20,26 +20,26 @@ public: const SkPaint& paint() const { return fPaint; } protected: - SkScalerContext* onCreateScalerContext(const SkDescriptor*) const SK_OVERRIDE; - void onFilterRec(SkScalerContextRec*) const SK_OVERRIDE; + SkScalerContext* onCreateScalerContext(const SkDescriptor*) const override; + void onFilterRec(SkScalerContextRec*) const override; virtual SkAdvancedTypefaceMetrics* onGetAdvancedTypefaceMetrics( SkAdvancedTypefaceMetrics::PerGlyphInfo, const uint32_t* glyphIDs, - uint32_t glyphIDsCount) const SK_OVERRIDE; - SkStreamAsset* onOpenStream(int* ttcIndex) const SK_OVERRIDE; - void onGetFontDescriptor(SkFontDescriptor*, bool* isLocal) const SK_OVERRIDE; + uint32_t glyphIDsCount) const override; + SkStreamAsset* onOpenStream(int* ttcIndex) const override; + void onGetFontDescriptor(SkFontDescriptor*, bool* isLocal) const override; virtual int onCharsToGlyphs(const void* chars, Encoding encoding, - uint16_t glyphs[], int glyphCount) const SK_OVERRIDE; - int onCountGlyphs() const SK_OVERRIDE; - int onGetUPEM() const SK_OVERRIDE; + uint16_t glyphs[], int glyphCount) const override; + int onCountGlyphs() const override; + int onGetUPEM() const override; - void onGetFamilyName(SkString* familyName) const SK_OVERRIDE; - SkTypeface::LocalizedStrings* onCreateFamilyNameIterator() const SK_OVERRIDE; + void onGetFamilyName(SkString* familyName) const override; + SkTypeface::LocalizedStrings* onCreateFamilyNameIterator() const override; - int onGetTableTags(SkFontTableTag tags[]) const SK_OVERRIDE; + int onGetTableTags(SkFontTableTag tags[]) const override; virtual size_t onGetTableData(SkFontTableTag, size_t offset, - size_t length, void* data) const SK_OVERRIDE; + size_t length, void* data) const override; private: SkTypeface* fProxy; diff --git a/src/fonts/SkTestScalerContext.cpp b/src/fonts/SkTestScalerContext.cpp index 769f4ea66f..f48efe8a01 100644 --- a/src/fonts/SkTestScalerContext.cpp +++ b/src/fonts/SkTestScalerContext.cpp @@ -201,17 +201,17 @@ public: } protected: - unsigned generateGlyphCount() SK_OVERRIDE { + unsigned generateGlyphCount() override { return fFace->onCountGlyphs(); } - uint16_t generateCharToGlyph(SkUnichar uni) SK_OVERRIDE { + uint16_t generateCharToGlyph(SkUnichar uni) override { uint16_t glyph; (void) fFace->onCharsToGlyphs((const void *) &uni, SkTypeface::kUTF16_Encoding, &glyph, 1); return glyph; } - void generateAdvance(SkGlyph* glyph) SK_OVERRIDE { + void generateAdvance(SkGlyph* glyph) override { fFace->getAdvance(glyph); const SkVector advance = fMatrix.mapXY(SkFixedToScalar(glyph->fAdvanceX), @@ -220,7 +220,7 @@ protected: glyph->fAdvanceY = SkScalarToFixed(advance.fY); } - void generateMetrics(SkGlyph* glyph) SK_OVERRIDE { + void generateMetrics(SkGlyph* glyph) override { fFace->getMetrics(glyph); const SkVector advance = fMatrix.mapXY(SkFixedToScalar(glyph->fAdvanceX), @@ -246,7 +246,7 @@ protected: glyph->fMaskFormat = SkMask::kARGB32_Format; } - void generateImage(const SkGlyph& glyph) SK_OVERRIDE { + void generateImage(const SkGlyph& glyph) override { SkPath path; fFace->getPath(glyph, &path); @@ -264,12 +264,12 @@ protected: canvas.drawPath(path, paint); } - void generatePath(const SkGlyph& glyph, SkPath* path) SK_OVERRIDE { + void generatePath(const SkGlyph& glyph, SkPath* path) override { fFace->getPath(glyph, path); path->transform(fMatrix); } - void generateFontMetrics(SkPaint::FontMetrics* metrics) SK_OVERRIDE { + void generateFontMetrics(SkPaint::FontMetrics* metrics) override { fFace->getFontMetrics(metrics); if (metrics) { SkScalar scale = fMatrix.getScaleY(); diff --git a/src/fonts/SkTestScalerContext.h b/src/fonts/SkTestScalerContext.h index 49e9b779a5..28ab02d4fd 100644 --- a/src/fonts/SkTestScalerContext.h +++ b/src/fonts/SkTestScalerContext.h @@ -66,41 +66,41 @@ public: void getMetrics(SkGlyph* glyph); void getPath(const SkGlyph& glyph, SkPath* path); protected: - SkScalerContext* onCreateScalerContext(const SkDescriptor* desc) const SK_OVERRIDE; - void onFilterRec(SkScalerContextRec* rec) const SK_OVERRIDE; + SkScalerContext* onCreateScalerContext(const SkDescriptor* desc) const override; + void onFilterRec(SkScalerContextRec* rec) const override; virtual SkAdvancedTypefaceMetrics* onGetAdvancedTypefaceMetrics( SkAdvancedTypefaceMetrics::PerGlyphInfo , const uint32_t* glyphIDs, - uint32_t glyphIDsCount) const SK_OVERRIDE; + uint32_t glyphIDsCount) const override; - SkStreamAsset* onOpenStream(int* ttcIndex) const SK_OVERRIDE { + SkStreamAsset* onOpenStream(int* ttcIndex) const override { SkASSERT(0); // don't expect to get here return NULL; } - void onGetFontDescriptor(SkFontDescriptor* desc, bool* isLocal) const SK_OVERRIDE; + void onGetFontDescriptor(SkFontDescriptor* desc, bool* isLocal) const override; virtual int onCharsToGlyphs(const void* chars, Encoding encoding, - uint16_t glyphs[], int glyphCount) const SK_OVERRIDE; + uint16_t glyphs[], int glyphCount) const override; - int onCountGlyphs() const SK_OVERRIDE { + int onCountGlyphs() const override { return (int) fTestFont->fCharCodesCount; } - int onGetUPEM() const SK_OVERRIDE { + int onGetUPEM() const override { SkASSERT(0); // don't expect to get here return 1; } - void onGetFamilyName(SkString* familyName) const SK_OVERRIDE; - SkTypeface::LocalizedStrings* onCreateFamilyNameIterator() const SK_OVERRIDE; + void onGetFamilyName(SkString* familyName) const override; + SkTypeface::LocalizedStrings* onCreateFamilyNameIterator() const override; - int onGetTableTags(SkFontTableTag tags[]) const SK_OVERRIDE { + int onGetTableTags(SkFontTableTag tags[]) const override { return 0; } virtual size_t onGetTableData(SkFontTableTag tag, size_t offset, - size_t length, void* data) const SK_OVERRIDE { + size_t length, void* data) const override { return 0; } private: diff --git a/src/gpu/GrAAConvexPathRenderer.cpp b/src/gpu/GrAAConvexPathRenderer.cpp index 317f9a0f8d..1813803d8a 100644 --- a/src/gpu/GrAAConvexPathRenderer.cpp +++ b/src/gpu/GrAAConvexPathRenderer.cpp @@ -513,7 +513,7 @@ public: virtual ~QuadEdgeEffect() {} - const char* name() const SK_OVERRIDE { return "QuadEdge"; } + const char* name() const override { return "QuadEdge"; } const Attribute* inPosition() const { return fInPosition; } const Attribute* inQuadEdge() const { return fInQuadEdge; } @@ -524,7 +524,7 @@ public: const GrBatchTracker&) : fColor(GrColor_ILLEGAL) {} - void onEmitCode(EmitArgs& args, GrGPArgs* gpArgs) SK_OVERRIDE { + void onEmitCode(EmitArgs& args, GrGPArgs* gpArgs) override { const QuadEdgeEffect& qe = args.fGP.cast(); GrGLGPBuilder* pb = args.fPB; GrGLVertexBuilder* vsBuilder = pb->getVertexShaderBuilder(); @@ -587,7 +587,7 @@ public: virtual void setData(const GrGLProgramDataManager& pdman, const GrPrimitiveProcessor& gp, - const GrBatchTracker& bt) SK_OVERRIDE { + const GrBatchTracker& bt) override { this->setUniformViewMatrix(pdman, gp.viewMatrix()); const BatchTracker& local = bt.cast(); @@ -608,16 +608,16 @@ public: virtual void getGLProcessorKey(const GrBatchTracker& bt, const GrGLCaps& caps, - GrProcessorKeyBuilder* b) const SK_OVERRIDE { + GrProcessorKeyBuilder* b) const override { GLProcessor::GenKey(*this, bt, caps, b); } virtual GrGLPrimitiveProcessor* createGLInstance(const GrBatchTracker& bt, - const GrGLCaps&) const SK_OVERRIDE { + const GrGLCaps&) const override { return SkNEW_ARGS(GLProcessor, (*this, bt)); } - void initBatchTracker(GrBatchTracker* bt, const GrPipelineInfo& init) const SK_OVERRIDE { + void initBatchTracker(GrBatchTracker* bt, const GrPipelineInfo& init) const override { BatchTracker* local = bt->cast(); local->fInputColorType = GetColorInputType(&local->fColor, this->color(), init, false); local->fUsesLocalCoords = init.fUsesLocalCoords; @@ -625,7 +625,7 @@ public: bool onCanMakeEqual(const GrBatchTracker& m, const GrGeometryProcessor& that, - const GrBatchTracker& t) const SK_OVERRIDE { + const GrBatchTracker& t) const override { const BatchTracker& mine = m.cast(); const BatchTracker& theirs = t.cast(); return CanCombineLocalMatrices(*this, mine.fUsesLocalCoords, @@ -642,11 +642,11 @@ private: fInQuadEdge = &this->addVertexAttrib(Attribute("inQuadEdge", kVec4f_GrVertexAttribType)); } - bool onIsEqual(const GrGeometryProcessor& other) const SK_OVERRIDE { + bool onIsEqual(const GrGeometryProcessor& other) const override { return true; } - void onGetInvariantOutputCoverage(GrInitInvariantOutput* out) const SK_OVERRIDE { + void onGetInvariantOutputCoverage(GrInitInvariantOutput* out) const override { out->setUnknownSingleComponent(); } @@ -700,17 +700,17 @@ public: return SkNEW_ARGS(AAConvexPathBatch, (geometry)); } - const char* name() const SK_OVERRIDE { return "AAConvexBatch"; } + const char* name() const override { return "AAConvexBatch"; } - void getInvariantOutputColor(GrInitInvariantOutput* out) const SK_OVERRIDE { + void getInvariantOutputColor(GrInitInvariantOutput* out) const override { // When this is called on a batch, there is only one geometry bundle out->setKnownFourComponents(fGeoData[0].fColor); } - void getInvariantOutputCoverage(GrInitInvariantOutput* out) const SK_OVERRIDE { + void getInvariantOutputCoverage(GrInitInvariantOutput* out) const override { out->setUnknownSingleComponent(); } - void initBatchTracker(const GrPipelineInfo& init) SK_OVERRIDE { + void initBatchTracker(const GrPipelineInfo& init) override { // Handle any color overrides if (init.fColorIgnored) { fGeoData[0].fColor = GrColor_ILLEGAL; @@ -725,7 +725,7 @@ public: fBatch.fCoverageIgnored = init.fCoverageIgnored; } - void generateGeometry(GrBatchTarget* batchTarget, const GrPipeline* pipeline) SK_OVERRIDE { + void generateGeometry(GrBatchTarget* batchTarget, const GrPipeline* pipeline) override { int instanceCount = fGeoData.count(); SkMatrix invert; @@ -833,7 +833,7 @@ private: fGeoData.push_back(geometry); } - bool onCombineIfPossible(GrBatch* t) SK_OVERRIDE { + bool onCombineIfPossible(GrBatch* t) override { AAConvexPathBatch* that = t->cast(); if (this->color() != that->color()) { diff --git a/src/gpu/GrAAConvexPathRenderer.h b/src/gpu/GrAAConvexPathRenderer.h index bb2d3f0a1e..816ccd697c 100644 --- a/src/gpu/GrAAConvexPathRenderer.h +++ b/src/gpu/GrAAConvexPathRenderer.h @@ -20,7 +20,7 @@ public: const SkMatrix& viewMatrix, const SkPath&, const SkStrokeRec&, - bool antiAlias) const SK_OVERRIDE; + bool antiAlias) const override; protected: virtual bool onDrawPath(GrDrawTarget*, @@ -29,7 +29,7 @@ protected: const SkMatrix& viewMatrix, const SkPath&, const SkStrokeRec&, - bool antiAlias) SK_OVERRIDE; + bool antiAlias) override; }; #endif diff --git a/src/gpu/GrAADistanceFieldPathRenderer.cpp b/src/gpu/GrAADistanceFieldPathRenderer.cpp index b9ca1ec26b..8b119f0b23 100755 --- a/src/gpu/GrAADistanceFieldPathRenderer.cpp +++ b/src/gpu/GrAADistanceFieldPathRenderer.cpp @@ -143,17 +143,17 @@ public: atlas, pathCache, pathList)); } - const char* name() const SK_OVERRIDE { return "AADistanceFieldPathBatch"; } + const char* name() const override { return "AADistanceFieldPathBatch"; } - void getInvariantOutputColor(GrInitInvariantOutput* out) const SK_OVERRIDE { + void getInvariantOutputColor(GrInitInvariantOutput* out) const override { out->setKnownFourComponents(fBatch.fColor); } - void getInvariantOutputCoverage(GrInitInvariantOutput* out) const SK_OVERRIDE { + void getInvariantOutputCoverage(GrInitInvariantOutput* out) const override { out->setUnknownSingleComponent(); } - void initBatchTracker(const GrPipelineInfo& init) SK_OVERRIDE { + void initBatchTracker(const GrPipelineInfo& init) override { // Handle any color overrides if (init.fColorIgnored) { fBatch.fColor = GrColor_ILLEGAL; @@ -167,7 +167,7 @@ public: fBatch.fCoverageIgnored = init.fCoverageIgnored; } - void generateGeometry(GrBatchTarget* batchTarget, const GrPipeline* pipeline) SK_OVERRIDE { + void generateGeometry(GrBatchTarget* batchTarget, const GrPipeline* pipeline) override { int instanceCount = fGeoData.count(); SkMatrix invert; @@ -537,7 +537,7 @@ private: const SkMatrix& viewMatrix() const { return fBatch.fViewMatrix; } bool usesLocalCoords() const { return fBatch.fUsesLocalCoords; } - bool onCombineIfPossible(GrBatch* t) SK_OVERRIDE { + bool onCombineIfPossible(GrBatch* t) override { AADistanceFieldPathBatch* that = t->cast(); // TODO we could actually probably do a bunch of this work on the CPU, ie map viewMatrix, diff --git a/src/gpu/GrAADistanceFieldPathRenderer.h b/src/gpu/GrAADistanceFieldPathRenderer.h index 6d7c38d6c3..ad296f0aa3 100755 --- a/src/gpu/GrAADistanceFieldPathRenderer.h +++ b/src/gpu/GrAADistanceFieldPathRenderer.h @@ -28,13 +28,13 @@ public: const SkMatrix& viewMatrix, const SkPath&, const SkStrokeRec&, - bool antiAlias) const SK_OVERRIDE; + bool antiAlias) const override; protected: virtual StencilSupport onGetStencilSupport(const GrDrawTarget*, const GrPipelineBuilder*, const SkPath&, - const SkStrokeRec&) const SK_OVERRIDE; + const SkStrokeRec&) const override; virtual bool onDrawPath(GrDrawTarget*, GrPipelineBuilder*, @@ -42,7 +42,7 @@ protected: const SkMatrix& viewMatrix, const SkPath&, const SkStrokeRec&, - bool antiAlias) SK_OVERRIDE; + bool antiAlias) override; private: struct PathData { diff --git a/src/gpu/GrAAHairLinePathRenderer.cpp b/src/gpu/GrAAHairLinePathRenderer.cpp index 26cf607021..1cbd93b9f8 100644 --- a/src/gpu/GrAAHairLinePathRenderer.cpp +++ b/src/gpu/GrAAHairLinePathRenderer.cpp @@ -709,17 +709,17 @@ public: return SkNEW_ARGS(AAHairlineBatch, (geometry, linesIndexBuffer, quadsIndexBuffer)); } - const char* name() const SK_OVERRIDE { return "AAHairlineBatch"; } + const char* name() const override { return "AAHairlineBatch"; } - void getInvariantOutputColor(GrInitInvariantOutput* out) const SK_OVERRIDE { + void getInvariantOutputColor(GrInitInvariantOutput* out) const override { // When this is called on a batch, there is only one geometry bundle out->setKnownFourComponents(fGeoData[0].fColor); } - void getInvariantOutputCoverage(GrInitInvariantOutput* out) const SK_OVERRIDE { + void getInvariantOutputCoverage(GrInitInvariantOutput* out) const override { out->setUnknownSingleComponent(); } - void initBatchTracker(const GrPipelineInfo& init) SK_OVERRIDE { + void initBatchTracker(const GrPipelineInfo& init) override { // Handle any color overrides if (init.fColorIgnored) { fGeoData[0].fColor = GrColor_ILLEGAL; @@ -736,7 +736,7 @@ public: SkDEBUGCODE(fBatch.fDevBounds = fGeoData[0].fDevBounds;) } - void generateGeometry(GrBatchTarget* batchTarget, const GrPipeline* pipeline) SK_OVERRIDE; + void generateGeometry(GrBatchTarget* batchTarget, const GrPipeline* pipeline) override; SkSTArray<1, Geometry, true>* geoData() { return &fGeoData; } @@ -754,7 +754,7 @@ private: fGeoData.push_back(geometry); } - bool onCombineIfPossible(GrBatch* t) SK_OVERRIDE { + bool onCombineIfPossible(GrBatch* t) override { AAHairlineBatch* that = t->cast(); if (this->viewMatrix().hasPerspective() != that->viewMatrix().hasPerspective()) { diff --git a/src/gpu/GrAAHairLinePathRenderer.h b/src/gpu/GrAAHairLinePathRenderer.h index ea1d8edd65..4a24b8dc82 100644 --- a/src/gpu/GrAAHairLinePathRenderer.h +++ b/src/gpu/GrAAHairLinePathRenderer.h @@ -22,7 +22,7 @@ public: const SkMatrix& viewMatrix, const SkPath&, const SkStrokeRec&, - bool antiAlias) const SK_OVERRIDE; + bool antiAlias) const override; typedef SkTArray PtArray; typedef SkTArray IntArray; @@ -35,7 +35,7 @@ protected: const SkMatrix& viewMatrix, const SkPath&, const SkStrokeRec&, - bool antiAlias) SK_OVERRIDE; + bool antiAlias) override; private: GrAAHairLinePathRenderer(const GrContext* context, diff --git a/src/gpu/GrAARectRenderer.cpp b/src/gpu/GrAARectRenderer.cpp index 6affc927ac..83c1d91ec8 100644 --- a/src/gpu/GrAARectRenderer.cpp +++ b/src/gpu/GrAARectRenderer.cpp @@ -66,18 +66,18 @@ public: return SkNEW_ARGS(AAFillRectBatch, (geometry, indexBuffer)); } - const char* name() const SK_OVERRIDE { return "AAFillRectBatch"; } + const char* name() const override { return "AAFillRectBatch"; } - void getInvariantOutputColor(GrInitInvariantOutput* out) const SK_OVERRIDE { + void getInvariantOutputColor(GrInitInvariantOutput* out) const override { // When this is called on a batch, there is only one geometry bundle out->setKnownFourComponents(fGeoData[0].fColor); } - void getInvariantOutputCoverage(GrInitInvariantOutput* out) const SK_OVERRIDE { + void getInvariantOutputCoverage(GrInitInvariantOutput* out) const override { out->setUnknownSingleComponent(); } - void initBatchTracker(const GrPipelineInfo& init) SK_OVERRIDE { + void initBatchTracker(const GrPipelineInfo& init) override { // Handle any color overrides if (init.fColorIgnored) { fGeoData[0].fColor = GrColor_ILLEGAL; @@ -93,7 +93,7 @@ public: fBatch.fCanTweakAlphaForCoverage = init.fCanTweakAlphaForCoverage; } - void generateGeometry(GrBatchTarget* batchTarget, const GrPipeline* pipeline) SK_OVERRIDE { + void generateGeometry(GrBatchTarget* batchTarget, const GrPipeline* pipeline) override { bool canTweakAlphaForCoverage = this->canTweakAlphaForCoverage(); SkMatrix localMatrix; @@ -190,7 +190,7 @@ private: bool colorIgnored() const { return fBatch.fColorIgnored; } const SkMatrix& viewMatrix() const { return fGeoData[0].fViewMatrix; } - bool onCombineIfPossible(GrBatch* t) SK_OVERRIDE { + bool onCombineIfPossible(GrBatch* t) override { AAFillRectBatch* that = t->cast(); SkASSERT(this->usesLocalCoords() == that->usesLocalCoords()); @@ -558,18 +558,18 @@ public: return SkNEW_ARGS(AAStrokeRectBatch, (geometry, viewMatrix, indexBuffer)); } - const char* name() const SK_OVERRIDE { return "AAStrokeRect"; } + const char* name() const override { return "AAStrokeRect"; } - void getInvariantOutputColor(GrInitInvariantOutput* out) const SK_OVERRIDE { + void getInvariantOutputColor(GrInitInvariantOutput* out) const override { // When this is called on a batch, there is only one geometry bundle out->setKnownFourComponents(fGeoData[0].fColor); } - void getInvariantOutputCoverage(GrInitInvariantOutput* out) const SK_OVERRIDE { + void getInvariantOutputCoverage(GrInitInvariantOutput* out) const override { out->setUnknownSingleComponent(); } - void initBatchTracker(const GrPipelineInfo& init) SK_OVERRIDE { + void initBatchTracker(const GrPipelineInfo& init) override { // Handle any color overrides if (init.fColorIgnored) { fGeoData[0].fColor = GrColor_ILLEGAL; @@ -586,7 +586,7 @@ public: fBatch.fCanTweakAlphaForCoverage = init.fCanTweakAlphaForCoverage; } - void generateGeometry(GrBatchTarget* batchTarget, const GrPipeline* pipeline) SK_OVERRIDE { + void generateGeometry(GrBatchTarget* batchTarget, const GrPipeline* pipeline) override { bool canTweakAlphaForCoverage = this->canTweakAlphaForCoverage(); // Local matrix is ignored if we don't have local coords. If we have localcoords we only @@ -695,7 +695,7 @@ private: const SkMatrix& viewMatrix() const { return fBatch.fViewMatrix; } bool miterStroke() const { return fBatch.fMiterStroke; } - bool onCombineIfPossible(GrBatch* t) SK_OVERRIDE { + bool onCombineIfPossible(GrBatch* t) override { AAStrokeRectBatch* that = t->cast(); // TODO batch across miterstroke changes diff --git a/src/gpu/GrBatchAtlas.cpp b/src/gpu/GrBatchAtlas.cpp index 4b242820e3..566cd5d922 100644 --- a/src/gpu/GrBatchAtlas.cpp +++ b/src/gpu/GrBatchAtlas.cpp @@ -210,7 +210,7 @@ public: SkASSERT(plot); } - void upload(GrBatchTarget::TextureUploader uploader) SK_OVERRIDE { + void upload(GrBatchTarget::TextureUploader uploader) override { fPlot->uploadToTexture(uploader); } diff --git a/src/gpu/GrBitmapTextContext.h b/src/gpu/GrBitmapTextContext.h index 2c5c0e43cb..f843fc76c2 100644 --- a/src/gpu/GrBitmapTextContext.h +++ b/src/gpu/GrBitmapTextContext.h @@ -40,16 +40,16 @@ private: GrBitmapTextContext(GrContext*, SkGpuDevice*, const SkDeviceProperties&); bool canDraw(const GrRenderTarget*, const GrClip&, const GrPaint&, - const SkPaint&, const SkMatrix& viewMatrix) SK_OVERRIDE; + const SkPaint&, const SkMatrix& viewMatrix) override; void onDrawText(GrRenderTarget*, const GrClip&, const GrPaint&, const SkPaint&, const SkMatrix& viewMatrix, const char text[], size_t byteLength, - SkScalar x, SkScalar y, const SkIRect& regionClipBounds) SK_OVERRIDE; + SkScalar x, SkScalar y, const SkIRect& regionClipBounds) override; void onDrawPosText(GrRenderTarget*, const GrClip&, const GrPaint&, const SkPaint&, const SkMatrix& viewMatrix, const char text[], size_t byteLength, const SkScalar pos[], int scalarsPerPosition, - const SkPoint& offset, const SkIRect& regionClipBounds) SK_OVERRIDE; + const SkPoint& offset, const SkIRect& regionClipBounds) override; void init(GrRenderTarget*, const GrClip&, const GrPaint&, const SkPaint&, const SkIRect& regionClipBounds); diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp index 35b34e392d..4c7f3eabe0 100755 --- a/src/gpu/GrContext.cpp +++ b/src/gpu/GrContext.cpp @@ -505,18 +505,18 @@ public: return SkNEW_ARGS(StrokeRectBatch, (geometry)); } - const char* name() const SK_OVERRIDE { return "StrokeRectBatch"; } + const char* name() const override { return "StrokeRectBatch"; } - void getInvariantOutputColor(GrInitInvariantOutput* out) const SK_OVERRIDE { + void getInvariantOutputColor(GrInitInvariantOutput* out) const override { // When this is called on a batch, there is only one geometry bundle out->setKnownFourComponents(fGeoData[0].fColor); } - void getInvariantOutputCoverage(GrInitInvariantOutput* out) const SK_OVERRIDE { + void getInvariantOutputCoverage(GrInitInvariantOutput* out) const override { out->setKnownSingleComponent(0xff); } - void initBatchTracker(const GrPipelineInfo& init) SK_OVERRIDE { + void initBatchTracker(const GrPipelineInfo& init) override { // Handle any color overrides if (init.fColorIgnored) { fGeoData[0].fColor = GrColor_ILLEGAL; @@ -531,7 +531,7 @@ public: fBatch.fCoverageIgnored = init.fCoverageIgnored; } - void generateGeometry(GrBatchTarget* batchTarget, const GrPipeline* pipeline) SK_OVERRIDE { + void generateGeometry(GrBatchTarget* batchTarget, const GrPipeline* pipeline) override { SkAutoTUnref gp( GrDefaultGeoProcFactory::Create(GrDefaultGeoProcFactory::kPosition_GPType, this->color(), @@ -646,7 +646,7 @@ private: const SkMatrix& viewMatrix() const { return fGeoData[0].fViewMatrix; } bool hairline() const { return fBatch.fHairline; } - bool onCombineIfPossible(GrBatch* t) SK_OVERRIDE { + bool onCombineIfPossible(GrBatch* t) override { // StrokeRectBatch* that = t->cast(); // NonAA stroke rects cannot batch right now @@ -844,9 +844,9 @@ public: localCoords)); } - const char* name() const SK_OVERRIDE { return "DrawVerticesBatch"; } + const char* name() const override { return "DrawVerticesBatch"; } - void getInvariantOutputColor(GrInitInvariantOutput* out) const SK_OVERRIDE { + void getInvariantOutputColor(GrInitInvariantOutput* out) const override { // When this is called on a batch, there is only one geometry bundle if (this->hasColors()) { out->setUnknownFourComponents(); @@ -855,11 +855,11 @@ public: } } - void getInvariantOutputCoverage(GrInitInvariantOutput* out) const SK_OVERRIDE { + void getInvariantOutputCoverage(GrInitInvariantOutput* out) const override { out->setKnownSingleComponent(0xff); } - void initBatchTracker(const GrPipelineInfo& init) SK_OVERRIDE { + void initBatchTracker(const GrPipelineInfo& init) override { // Handle any color overrides if (init.fColorIgnored) { fGeoData[0].fColor = GrColor_ILLEGAL; @@ -874,7 +874,7 @@ public: fBatch.fCoverageIgnored = init.fCoverageIgnored; } - void generateGeometry(GrBatchTarget* batchTarget, const GrPipeline* pipeline) SK_OVERRIDE { + void generateGeometry(GrBatchTarget* batchTarget, const GrPipeline* pipeline) override { int colorOffset = -1, texOffset = -1; SkAutoTUnref gp( set_vertex_attributes(this->hasLocalCoords(), this->hasColors(), &colorOffset, @@ -1024,7 +1024,7 @@ private: int vertexCount() const { return fBatch.fVertexCount; } int indexCount() const { return fBatch.fIndexCount; } - bool onCombineIfPossible(GrBatch* t) SK_OVERRIDE { + bool onCombineIfPossible(GrBatch* t) override { DrawVerticesBatch* that = t->cast(); if (!this->batchablePrimitiveType() || this->primitiveType() != that->primitiveType()) { diff --git a/src/gpu/GrDefaultGeoProcFactory.cpp b/src/gpu/GrDefaultGeoProcFactory.cpp index ebd685b9c5..ea52462788 100644 --- a/src/gpu/GrDefaultGeoProcFactory.cpp +++ b/src/gpu/GrDefaultGeoProcFactory.cpp @@ -34,7 +34,7 @@ public: coverage)); } - const char* name() const SK_OVERRIDE { return "DefaultGeometryProcessor"; } + const char* name() const override { return "DefaultGeometryProcessor"; } const Attribute* inPosition() const { return fInPosition; } const Attribute* inColor() const { return fInColor; } @@ -42,7 +42,7 @@ public: const Attribute* inCoverage() const { return fInCoverage; } uint8_t coverage() const { return fCoverage; } - void initBatchTracker(GrBatchTracker* bt, const GrPipelineInfo& init) const SK_OVERRIDE { + void initBatchTracker(GrBatchTracker* bt, const GrPipelineInfo& init) const override { BatchTracker* local = bt->cast(); local->fInputColorType = GetColorInputType(&local->fColor, this->color(), init, SkToBool(fInColor)); @@ -66,7 +66,7 @@ public: bool onCanMakeEqual(const GrBatchTracker& m, const GrGeometryProcessor& that, - const GrBatchTracker& t) const SK_OVERRIDE { + const GrBatchTracker& t) const override { const BatchTracker& mine = m.cast(); const BatchTracker& theirs = t.cast(); return CanCombineLocalMatrices(*this, mine.fUsesLocalCoords, @@ -82,7 +82,7 @@ public: GLProcessor(const GrGeometryProcessor& gp, const GrBatchTracker&) : fColor(GrColor_ILLEGAL), fCoverage(0xff) {} - void onEmitCode(EmitArgs& args, GrGPArgs* gpArgs) SK_OVERRIDE { + void onEmitCode(EmitArgs& args, GrGPArgs* gpArgs) override { const DefaultGeoProc& gp = args.fGP.cast(); GrGLGPBuilder* pb = args.fPB; GrGLVertexBuilder* vsBuilder = pb->getVertexShaderBuilder(); @@ -142,7 +142,7 @@ public: virtual void setData(const GrGLProgramDataManager& pdman, const GrPrimitiveProcessor& gp, - const GrBatchTracker& bt) SK_OVERRIDE { + const GrBatchTracker& bt) override { this->setUniformViewMatrix(pdman, gp.viewMatrix()); const BatchTracker& local = bt.cast(); @@ -169,12 +169,12 @@ public: virtual void getGLProcessorKey(const GrBatchTracker& bt, const GrGLCaps& caps, - GrProcessorKeyBuilder* b) const SK_OVERRIDE { + GrProcessorKeyBuilder* b) const override { GLProcessor::GenKey(*this, bt, caps, b); } virtual GrGLPrimitiveProcessor* createGLInstance(const GrBatchTracker& bt, - const GrGLCaps&) const SK_OVERRIDE { + const GrGLCaps&) const override { return SkNEW_ARGS(GLProcessor, (*this, bt)); } @@ -212,12 +212,12 @@ private: } } - bool onIsEqual(const GrGeometryProcessor& other) const SK_OVERRIDE { + bool onIsEqual(const GrGeometryProcessor& other) const override { const DefaultGeoProc& gp = other.cast(); return gp.fFlags == this->fFlags; } - void onGetInvariantOutputCoverage(GrInitInvariantOutput* out) const SK_OVERRIDE { + void onGetInvariantOutputCoverage(GrInitInvariantOutput* out) const override { if (fInCoverage) { out->setUnknownSingleComponent(); } else { diff --git a/src/gpu/GrDefaultPathRenderer.cpp b/src/gpu/GrDefaultPathRenderer.cpp index 9619e2ad44..531b5e5f4a 100644 --- a/src/gpu/GrDefaultPathRenderer.cpp +++ b/src/gpu/GrDefaultPathRenderer.cpp @@ -224,17 +224,17 @@ public: return SkNEW_ARGS(DefaultPathBatch, (geometry, coverage, viewMatrix, isHairline)); } - const char* name() const SK_OVERRIDE { return "DefaultPathBatch"; } + const char* name() const override { return "DefaultPathBatch"; } - void getInvariantOutputColor(GrInitInvariantOutput* out) const SK_OVERRIDE { + void getInvariantOutputColor(GrInitInvariantOutput* out) const override { // When this is called on a batch, there is only one geometry bundle out->setKnownFourComponents(fGeoData[0].fColor); } - void getInvariantOutputCoverage(GrInitInvariantOutput* out) const SK_OVERRIDE { + void getInvariantOutputCoverage(GrInitInvariantOutput* out) const override { out->setKnownSingleComponent(this->coverage()); } - void initBatchTracker(const GrPipelineInfo& init) SK_OVERRIDE { + void initBatchTracker(const GrPipelineInfo& init) override { // Handle any color overrides if (init.fColorIgnored) { fGeoData[0].fColor = GrColor_ILLEGAL; @@ -249,7 +249,7 @@ public: fBatch.fCoverageIgnored = init.fCoverageIgnored; } - void generateGeometry(GrBatchTarget* batchTarget, const GrPipeline* pipeline) SK_OVERRIDE { + void generateGeometry(GrBatchTarget* batchTarget, const GrPipeline* pipeline) override { SkAutoTUnref gp( GrDefaultGeoProcFactory::Create(GrDefaultGeoProcFactory::kPosition_GPType, this->color(), @@ -400,7 +400,7 @@ private: fGeoData.push_back(geometry); } - bool onCombineIfPossible(GrBatch* t) SK_OVERRIDE { + bool onCombineIfPossible(GrBatch* t) override { DefaultPathBatch* that = t->cast(); if (this->color() != that->color()) { diff --git a/src/gpu/GrDefaultPathRenderer.h b/src/gpu/GrDefaultPathRenderer.h index 11105cf63a..ab2a66b1d6 100644 --- a/src/gpu/GrDefaultPathRenderer.h +++ b/src/gpu/GrDefaultPathRenderer.h @@ -24,14 +24,14 @@ public: const SkMatrix& viewMatrix, const SkPath&, const SkStrokeRec&, - bool antiAlias) const SK_OVERRIDE; + bool antiAlias) const override; private: virtual StencilSupport onGetStencilSupport(const GrDrawTarget*, const GrPipelineBuilder*, const SkPath&, - const SkStrokeRec&) const SK_OVERRIDE; + const SkStrokeRec&) const override; virtual bool onDrawPath(GrDrawTarget*, GrPipelineBuilder*, @@ -39,13 +39,13 @@ private: const SkMatrix& viewMatrix, const SkPath&, const SkStrokeRec&, - bool antiAlias) SK_OVERRIDE; + bool antiAlias) override; virtual void onStencilPath(GrDrawTarget*, GrPipelineBuilder*, const SkMatrix& viewMatrix, const SkPath&, - const SkStrokeRec&) SK_OVERRIDE; + const SkStrokeRec&) override; bool internalDrawPath(GrDrawTarget*, GrPipelineBuilder*, diff --git a/src/gpu/GrDistanceFieldTextContext.h b/src/gpu/GrDistanceFieldTextContext.h index 5dea62c80f..b76be3d1ec 100644 --- a/src/gpu/GrDistanceFieldTextContext.h +++ b/src/gpu/GrDistanceFieldTextContext.h @@ -52,17 +52,17 @@ private: GrDistanceFieldTextContext(GrContext*, SkGpuDevice*, const SkDeviceProperties&, bool enable); bool canDraw(const GrRenderTarget*, const GrClip&, const GrPaint&, - const SkPaint&, const SkMatrix& viewMatrix) SK_OVERRIDE; + const SkPaint&, const SkMatrix& viewMatrix) override; void onDrawText(GrRenderTarget*, const GrClip&, const GrPaint&, const SkPaint&, const SkMatrix& viewMatrix, const char text[], size_t byteLength, - SkScalar x, SkScalar y, const SkIRect& regionClipBounds) SK_OVERRIDE; + SkScalar x, SkScalar y, const SkIRect& regionClipBounds) override; void onDrawPosText(GrRenderTarget*, const GrClip&, const GrPaint&, const SkPaint&, const SkMatrix& viewMatrix, const char text[], size_t byteLength, const SkScalar pos[], int scalarsPerPosition, - const SkPoint& offset, const SkIRect& regionClipBounds) SK_OVERRIDE; + const SkPoint& offset, const SkIRect& regionClipBounds) override; void init(GrRenderTarget*, const GrClip&, const GrPaint&, const SkPaint&, const SkIRect& regionClipBounds); diff --git a/src/gpu/GrDrawTarget.h b/src/gpu/GrDrawTarget.h index 471acea14f..8a12a31ea9 100644 --- a/src/gpu/GrDrawTarget.h +++ b/src/gpu/GrDrawTarget.h @@ -838,7 +838,7 @@ public: * Release any resources that are cached but not currently in use. This * is intended to give an application some recourse when resources are low. */ - void purgeResources() SK_OVERRIDE { + void purgeResources() override { // The clip mask manager can rebuild all its clip masks so just // get rid of them all. fClipMaskManager.purgeResources(); @@ -848,13 +848,13 @@ protected: GrClipMaskManager fClipMaskManager; private: - GrClipMaskManager* clipMaskManager() SK_OVERRIDE { return &fClipMaskManager; } + GrClipMaskManager* clipMaskManager() override { return &fClipMaskManager; } virtual bool setupClip(GrPipelineBuilder*, GrPipelineBuilder::AutoRestoreFragmentProcessors*, GrPipelineBuilder::AutoRestoreStencil*, GrScissorState* scissorState, - const SkRect* devBounds) SK_OVERRIDE; + const SkRect* devBounds) override; typedef GrDrawTarget INHERITED; }; diff --git a/src/gpu/GrFlushToGpuDrawTarget.h b/src/gpu/GrFlushToGpuDrawTarget.h index 4c72f93572..fa0ff4aa9c 100644 --- a/src/gpu/GrFlushToGpuDrawTarget.h +++ b/src/gpu/GrFlushToGpuDrawTarget.h @@ -24,7 +24,7 @@ class GrFlushToGpuDrawTarget : public GrClipTarget { public: GrFlushToGpuDrawTarget(GrGpu*, GrVertexBufferAllocPool*,GrIndexBufferAllocPool*); - ~GrFlushToGpuDrawTarget() SK_OVERRIDE; + ~GrFlushToGpuDrawTarget() override; /** * Empties the draw buffer of any queued up draws. This must not be called while inside an @@ -40,7 +40,7 @@ public: */ void flush(); - bool geometryHints(size_t vertexStride, int* vertexCount, int* indexCount) const SK_OVERRIDE; + bool geometryHints(size_t vertexStride, int* vertexCount, int* indexCount) const override; protected: GrGpu* getGpu() { return fGpu; } @@ -71,25 +71,25 @@ protected: void willReserveVertexAndIndexSpace(int vertexCount, size_t vertexStride, - int indexCount) SK_OVERRIDE; + int indexCount) override; private: virtual void onReset() = 0; virtual void onFlush() = 0; - void setDrawBuffers(DrawInfo*, size_t stride) SK_OVERRIDE; - bool onReserveVertexSpace(size_t vertexSize, int vertexCount, void** vertices) SK_OVERRIDE; - bool onReserveIndexSpace(int indexCount, void** indices) SK_OVERRIDE; - void releaseReservedVertexSpace() SK_OVERRIDE; - void releaseReservedIndexSpace() SK_OVERRIDE; - void geometrySourceWillPush() SK_OVERRIDE; - void geometrySourceWillPop(const GeometrySrcState& restoredState) SK_OVERRIDE; + void setDrawBuffers(DrawInfo*, size_t stride) override; + bool onReserveVertexSpace(size_t vertexSize, int vertexCount, void** vertices) override; + bool onReserveIndexSpace(int indexCount, void** indices) override; + void releaseReservedVertexSpace() override; + void releaseReservedIndexSpace() override; + void geometrySourceWillPush() override; + void geometrySourceWillPop(const GeometrySrcState& restoredState) override; bool onCanCopySurface(const GrSurface* dst, const GrSurface* src, const SkIRect& srcRect, - const SkIPoint& dstPoint) SK_OVERRIDE; - bool onInitCopySurfaceDstDesc(const GrSurface* src, GrSurfaceDesc* desc) SK_OVERRIDE; + const SkIPoint& dstPoint) override; + bool onInitCopySurfaceDstDesc(const GrSurface* src, GrSurfaceDesc* desc) override; GeoPoolStateStack fGeoPoolStateStack; SkAutoTUnref fGpu; diff --git a/src/gpu/GrGeometryProcessor.h b/src/gpu/GrGeometryProcessor.h index 7f8d041af8..f0e0b0c008 100644 --- a/src/gpu/GrGeometryProcessor.h +++ b/src/gpu/GrGeometryProcessor.h @@ -44,7 +44,7 @@ public: */ bool canMakeEqual(const GrBatchTracker& mine, const GrPrimitiveProcessor& that, - const GrBatchTracker& theirs) const SK_OVERRIDE { + const GrBatchTracker& theirs) const override { if (this->classID() != that.classID() || !this->hasSameTextureAccesses(that)) { return false; } @@ -76,8 +76,8 @@ public: // TODO this is a total hack until the gp can do deferred geometry bool hasVertexColor() const { return fHasVertexColor; } - void getInvariantOutputColor(GrInitInvariantOutput* out) const SK_OVERRIDE; - void getInvariantOutputCoverage(GrInitInvariantOutput* out) const SK_OVERRIDE; + void getInvariantOutputColor(GrInitInvariantOutput* out) const override; + void getInvariantOutputCoverage(GrInitInvariantOutput* out) const override; protected: /* @@ -142,7 +142,7 @@ private: // TODO delete this when we have more advanced equality testing via bundles and the BT virtual bool onIsEqual(const GrGeometryProcessor&) const = 0; - bool hasExplicitLocalCoords() const SK_OVERRIDE { return fHasLocalCoords; } + bool hasExplicitLocalCoords() const override { return fHasLocalCoords; } GrColor fColor; bool fOpaqueVertexColors; diff --git a/src/gpu/GrGpu.h b/src/gpu/GrGpu.h index 95bbc6e750..82f4931d6c 100644 --- a/src/gpu/GrGpu.h +++ b/src/gpu/GrGpu.h @@ -36,7 +36,7 @@ public: //////////////////////////////////////////////////////////////////////////// GrGpu(GrContext* context); - ~GrGpu() SK_OVERRIDE; + ~GrGpu() override; GrContext* getContext() { return fContext; } const GrContext* getContext() const { return fContext; } diff --git a/src/gpu/GrInOrderDrawBuffer.cpp b/src/gpu/GrInOrderDrawBuffer.cpp index 4d8fa5e1d9..8289f006d4 100644 --- a/src/gpu/GrInOrderDrawBuffer.cpp +++ b/src/gpu/GrInOrderDrawBuffer.cpp @@ -70,18 +70,18 @@ public: return SkNEW_ARGS(RectBatch, (geometry)); } - const char* name() const SK_OVERRIDE { return "RectBatch"; } + const char* name() const override { return "RectBatch"; } - void getInvariantOutputColor(GrInitInvariantOutput* out) const SK_OVERRIDE { + void getInvariantOutputColor(GrInitInvariantOutput* out) const override { // When this is called on a batch, there is only one geometry bundle out->setKnownFourComponents(fGeoData[0].fColor); } - void getInvariantOutputCoverage(GrInitInvariantOutput* out) const SK_OVERRIDE { + void getInvariantOutputCoverage(GrInitInvariantOutput* out) const override { out->setKnownSingleComponent(0xff); } - void initBatchTracker(const GrPipelineInfo& init) SK_OVERRIDE { + void initBatchTracker(const GrPipelineInfo& init) override { // Handle any color overrides if (init.fColorIgnored) { fGeoData[0].fColor = GrColor_ILLEGAL; @@ -96,7 +96,7 @@ public: fBatch.fCoverageIgnored = init.fCoverageIgnored; } - void generateGeometry(GrBatchTarget* batchTarget, const GrPipeline* pipeline) SK_OVERRIDE { + void generateGeometry(GrBatchTarget* batchTarget, const GrPipeline* pipeline) override { // Go to device coords to allow batching across matrix changes SkMatrix invert = SkMatrix::I(); @@ -222,7 +222,7 @@ private: bool hasLocalRect() const { return fGeoData[0].fHasLocalRect; } bool hasLocalMatrix() const { return fGeoData[0].fHasLocalMatrix; } - bool onCombineIfPossible(GrBatch* t) SK_OVERRIDE { + bool onCombineIfPossible(GrBatch* t) override { RectBatch* that = t->cast(); if (this->hasLocalRect() != that->hasLocalRect()) { diff --git a/src/gpu/GrInOrderDrawBuffer.h b/src/gpu/GrInOrderDrawBuffer.h index 464fdcb379..ac1b79cd55 100644 --- a/src/gpu/GrInOrderDrawBuffer.h +++ b/src/gpu/GrInOrderDrawBuffer.h @@ -38,21 +38,21 @@ public: GrVertexBufferAllocPool* vertexPool, GrIndexBufferAllocPool* indexPool); - ~GrInOrderDrawBuffer() SK_OVERRIDE; + ~GrInOrderDrawBuffer() override; // tracking for draws - DrawToken getCurrentDrawToken() SK_OVERRIDE { return DrawToken(this, fDrawID); } + DrawToken getCurrentDrawToken() override { return DrawToken(this, fDrawID); } void clearStencilClip(const SkIRect& rect, bool insideClip, - GrRenderTarget* renderTarget) SK_OVERRIDE; + GrRenderTarget* renderTarget) override; - void discard(GrRenderTarget*) SK_OVERRIDE; + void discard(GrRenderTarget*) override; protected: void willReserveVertexAndIndexSpace(int vertexCount, size_t vertexStride, - int indexCount) SK_OVERRIDE; + int indexCount) override; void appendIndicesAndTransforms(const void* indexValues, PathIndexType indexType, const float* transformValues, PathTransformType transformType, @@ -92,28 +92,28 @@ protected: private: friend class GrTargetCommands; - void onReset() SK_OVERRIDE; - void onFlush() SK_OVERRIDE; + void onReset() override; + void onFlush() override; // overrides from GrDrawTarget - void onDraw(const GrGeometryProcessor*, const DrawInfo&, const PipelineInfo&) SK_OVERRIDE; - void onDrawBatch(GrBatch*, const PipelineInfo&) SK_OVERRIDE; + void onDraw(const GrGeometryProcessor*, const DrawInfo&, const PipelineInfo&) override; + void onDrawBatch(GrBatch*, const PipelineInfo&) override; void onDrawRect(GrPipelineBuilder*, GrColor, const SkMatrix& viewMatrix, const SkRect& rect, const SkRect* localRect, - const SkMatrix* localMatrix) SK_OVERRIDE; + const SkMatrix* localMatrix) override; void onStencilPath(const GrPipelineBuilder&, const GrPathProcessor*, const GrPath*, const GrScissorState&, - const GrStencilSettings&) SK_OVERRIDE; + const GrStencilSettings&) override; void onDrawPath(const GrPathProcessor*, const GrPath*, const GrStencilSettings&, - const PipelineInfo&) SK_OVERRIDE; + const PipelineInfo&) override; void onDrawPaths(const GrPathProcessor*, const GrPathRange*, const void* indices, @@ -122,15 +122,15 @@ private: PathTransformType, int count, const GrStencilSettings&, - const PipelineInfo&) SK_OVERRIDE; + const PipelineInfo&) override; void onClear(const SkIRect* rect, GrColor color, bool canIgnoreRect, - GrRenderTarget* renderTarget) SK_OVERRIDE; + GrRenderTarget* renderTarget) override; bool onCopySurface(GrSurface* dst, GrSurface* src, const SkIRect& srcRect, - const SkIPoint& dstPoint) SK_OVERRIDE; + const SkIPoint& dstPoint) override; // Attempts to concat instances from info onto the previous draw. info must represent an // instanced draw. The caller must have already recorded a new draw state and clip if necessary. @@ -144,7 +144,7 @@ private: SkASSERT(index < fGpuCmdMarkers.count()); return fGpuCmdMarkers[index].toString(); } - bool isIssued(uint32_t drawID) SK_OVERRIDE { return drawID != fDrawID; } + bool isIssued(uint32_t drawID) override { return drawID != fDrawID; } // TODO: Use a single allocator for commands and records enum { diff --git a/src/gpu/GrOvalRenderer.cpp b/src/gpu/GrOvalRenderer.cpp index 20ae77cb52..f33944fa7b 100644 --- a/src/gpu/GrOvalRenderer.cpp +++ b/src/gpu/GrOvalRenderer.cpp @@ -78,7 +78,7 @@ public: const Attribute* inCircleEdge() const { return fInCircleEdge; } virtual ~CircleEdgeEffect() {} - const char* name() const SK_OVERRIDE { return "CircleEdge"; } + const char* name() const override { return "CircleEdge"; } inline bool isStroked() const { return fStroke; } @@ -88,7 +88,7 @@ public: const GrBatchTracker&) : fColor(GrColor_ILLEGAL) {} - void onEmitCode(EmitArgs& args, GrGPArgs* gpArgs) SK_OVERRIDE{ + void onEmitCode(EmitArgs& args, GrGPArgs* gpArgs) override{ const CircleEdgeEffect& ce = args.fGP.cast(); GrGLGPBuilder* pb = args.fPB; const BatchTracker& local = args.fBT.cast(); @@ -138,7 +138,7 @@ public: virtual void setData(const GrGLProgramDataManager& pdman, const GrPrimitiveProcessor& gp, - const GrBatchTracker& bt) SK_OVERRIDE { + const GrBatchTracker& bt) override { this->setUniformViewMatrix(pdman, gp.viewMatrix()); const BatchTracker& local = bt.cast(); @@ -158,16 +158,16 @@ public: virtual void getGLProcessorKey(const GrBatchTracker& bt, const GrGLCaps& caps, - GrProcessorKeyBuilder* b) const SK_OVERRIDE { + GrProcessorKeyBuilder* b) const override { GLProcessor::GenKey(*this, bt, caps, b); } virtual GrGLPrimitiveProcessor* createGLInstance(const GrBatchTracker& bt, - const GrGLCaps&) const SK_OVERRIDE { + const GrGLCaps&) const override { return SkNEW_ARGS(GLProcessor, (*this, bt)); } - void initBatchTracker(GrBatchTracker* bt, const GrPipelineInfo& init) const SK_OVERRIDE { + void initBatchTracker(GrBatchTracker* bt, const GrPipelineInfo& init) const override { BatchTracker* local = bt->cast(); local->fInputColorType = GetColorInputType(&local->fColor, this->color(), init, false); local->fUsesLocalCoords = init.fUsesLocalCoords; @@ -175,7 +175,7 @@ public: bool onCanMakeEqual(const GrBatchTracker& m, const GrGeometryProcessor& that, - const GrBatchTracker& t) const SK_OVERRIDE { + const GrBatchTracker& t) const override { const BatchTracker& mine = m.cast(); const BatchTracker& theirs = t.cast(); return CanCombineLocalMatrices(*this, mine.fUsesLocalCoords, @@ -194,12 +194,12 @@ private: fStroke = stroke; } - bool onIsEqual(const GrGeometryProcessor& other) const SK_OVERRIDE { + bool onIsEqual(const GrGeometryProcessor& other) const override { const CircleEdgeEffect& cee = other.cast(); return cee.fStroke == fStroke; } - void onGetInvariantOutputCoverage(GrInitInvariantOutput* out) const SK_OVERRIDE { + void onGetInvariantOutputCoverage(GrInitInvariantOutput* out) const override { out->setUnknownSingleComponent(); } @@ -247,7 +247,7 @@ public: virtual ~EllipseEdgeEffect() {} - const char* name() const SK_OVERRIDE { return "EllipseEdge"; } + const char* name() const override { return "EllipseEdge"; } const Attribute* inPosition() const { return fInPosition; } const Attribute* inEllipseOffset() const { return fInEllipseOffset; } @@ -261,7 +261,7 @@ public: const GrBatchTracker&) : fColor(GrColor_ILLEGAL) {} - void onEmitCode(EmitArgs& args, GrGPArgs* gpArgs) SK_OVERRIDE{ + void onEmitCode(EmitArgs& args, GrGPArgs* gpArgs) override{ const EllipseEdgeEffect& ee = args.fGP.cast(); GrGLGPBuilder* pb = args.fPB; const BatchTracker& local = args.fBT.cast(); @@ -332,7 +332,7 @@ public: virtual void setData(const GrGLProgramDataManager& pdman, const GrPrimitiveProcessor& gp, - const GrBatchTracker& bt) SK_OVERRIDE { + const GrBatchTracker& bt) override { this->setUniformViewMatrix(pdman, gp.viewMatrix()); const BatchTracker& local = bt.cast(); @@ -353,16 +353,16 @@ public: virtual void getGLProcessorKey(const GrBatchTracker& bt, const GrGLCaps& caps, - GrProcessorKeyBuilder* b) const SK_OVERRIDE { + GrProcessorKeyBuilder* b) const override { GLProcessor::GenKey(*this, bt, caps, b); } virtual GrGLPrimitiveProcessor* createGLInstance(const GrBatchTracker& bt, - const GrGLCaps&) const SK_OVERRIDE { + const GrGLCaps&) const override { return SkNEW_ARGS(GLProcessor, (*this, bt)); } - void initBatchTracker(GrBatchTracker* bt, const GrPipelineInfo& init) const SK_OVERRIDE { + void initBatchTracker(GrBatchTracker* bt, const GrPipelineInfo& init) const override { BatchTracker* local = bt->cast(); local->fInputColorType = GetColorInputType(&local->fColor, this->color(), init, false); local->fUsesLocalCoords = init.fUsesLocalCoords; @@ -370,7 +370,7 @@ public: bool onCanMakeEqual(const GrBatchTracker& m, const GrGeometryProcessor& that, - const GrBatchTracker& t) const SK_OVERRIDE { + const GrBatchTracker& t) const override { const BatchTracker& mine = m.cast(); const BatchTracker& theirs = t.cast(); return CanCombineLocalMatrices(*this, mine.fUsesLocalCoords, @@ -391,12 +391,12 @@ private: fStroke = stroke; } - bool onIsEqual(const GrGeometryProcessor& other) const SK_OVERRIDE { + bool onIsEqual(const GrGeometryProcessor& other) const override { const EllipseEdgeEffect& eee = other.cast(); return eee.fStroke == fStroke; } - void onGetInvariantOutputCoverage(GrInitInvariantOutput* out) const SK_OVERRIDE { + void onGetInvariantOutputCoverage(GrInitInvariantOutput* out) const override { out->setUnknownSingleComponent(); } @@ -448,7 +448,7 @@ public: virtual ~DIEllipseEdgeEffect() {} - const char* name() const SK_OVERRIDE { return "DIEllipseEdge"; } + const char* name() const override { return "DIEllipseEdge"; } const Attribute* inPosition() const { return fInPosition; } const Attribute* inEllipseOffsets0() const { return fInEllipseOffsets0; } @@ -462,7 +462,7 @@ public: const GrBatchTracker&) : fColor(GrColor_ILLEGAL) {} - void onEmitCode(EmitArgs& args, GrGPArgs* gpArgs) SK_OVERRIDE{ + void onEmitCode(EmitArgs& args, GrGPArgs* gpArgs) override{ const DIEllipseEdgeEffect& ee = args.fGP.cast(); GrGLGPBuilder* pb = args.fPB; const BatchTracker& local = args.fBT.cast(); @@ -547,7 +547,7 @@ public: virtual void setData(const GrGLProgramDataManager& pdman, const GrPrimitiveProcessor& gp, - const GrBatchTracker& bt) SK_OVERRIDE { + const GrBatchTracker& bt) override { this->setUniformViewMatrix(pdman, gp.viewMatrix()); const BatchTracker& local = bt.cast(); @@ -568,16 +568,16 @@ public: virtual void getGLProcessorKey(const GrBatchTracker& bt, const GrGLCaps& caps, - GrProcessorKeyBuilder* b) const SK_OVERRIDE { + GrProcessorKeyBuilder* b) const override { GLProcessor::GenKey(*this, bt, caps, b); } virtual GrGLPrimitiveProcessor* createGLInstance(const GrBatchTracker& bt, - const GrGLCaps&) const SK_OVERRIDE { + const GrGLCaps&) const override { return SkNEW_ARGS(GLProcessor, (*this, bt)); } - void initBatchTracker(GrBatchTracker* bt, const GrPipelineInfo& init) const SK_OVERRIDE { + void initBatchTracker(GrBatchTracker* bt, const GrPipelineInfo& init) const override { BatchTracker* local = bt->cast(); local->fInputColorType = GetColorInputType(&local->fColor, this->color(), init, false); local->fUsesLocalCoords = init.fUsesLocalCoords; @@ -585,7 +585,7 @@ public: bool onCanMakeEqual(const GrBatchTracker& m, const GrGeometryProcessor& that, - const GrBatchTracker& t) const SK_OVERRIDE { + const GrBatchTracker& t) const override { const BatchTracker& mine = m.cast(); const BatchTracker& theirs = t.cast(); return CanCombineLocalMatrices(*this, mine.fUsesLocalCoords, @@ -606,12 +606,12 @@ private: fMode = mode; } - bool onIsEqual(const GrGeometryProcessor& other) const SK_OVERRIDE { + bool onIsEqual(const GrGeometryProcessor& other) const override { const DIEllipseEdgeEffect& eee = other.cast(); return eee.fMode == fMode; } - void onGetInvariantOutputCoverage(GrInitInvariantOutput* out) const SK_OVERRIDE { + void onGetInvariantOutputCoverage(GrInitInvariantOutput* out) const override { out->setUnknownSingleComponent(); } @@ -699,18 +699,18 @@ public: return SkNEW_ARGS(CircleBatch, (geometry)); } - const char* name() const SK_OVERRIDE { return "CircleBatch"; } + const char* name() const override { return "CircleBatch"; } - void getInvariantOutputColor(GrInitInvariantOutput* out) const SK_OVERRIDE { + void getInvariantOutputColor(GrInitInvariantOutput* out) const override { // When this is called on a batch, there is only one geometry bundle out->setKnownFourComponents(fGeoData[0].fColor); } - void getInvariantOutputCoverage(GrInitInvariantOutput* out) const SK_OVERRIDE { + void getInvariantOutputCoverage(GrInitInvariantOutput* out) const override { out->setUnknownSingleComponent(); } - void initBatchTracker(const GrPipelineInfo& init) SK_OVERRIDE { + void initBatchTracker(const GrPipelineInfo& init) override { // Handle any color overrides if (init.fColorIgnored) { fGeoData[0].fColor = GrColor_ILLEGAL; @@ -726,7 +726,7 @@ public: fBatch.fCoverageIgnored = init.fCoverageIgnored; } - void generateGeometry(GrBatchTarget* batchTarget, const GrPipeline* pipeline) SK_OVERRIDE { + void generateGeometry(GrBatchTarget* batchTarget, const GrPipeline* pipeline) override { SkMatrix invert; if (!this->viewMatrix().invert(&invert)) { return; @@ -836,7 +836,7 @@ private: fGeoData.push_back(geometry); } - bool onCombineIfPossible(GrBatch* t) SK_OVERRIDE { + bool onCombineIfPossible(GrBatch* t) override { CircleBatch* that = t->cast(); // TODO use vertex color to avoid breaking batches @@ -955,17 +955,17 @@ public: return SkNEW_ARGS(EllipseBatch, (geometry)); } - const char* name() const SK_OVERRIDE { return "EllipseBatch"; } + const char* name() const override { return "EllipseBatch"; } - void getInvariantOutputColor(GrInitInvariantOutput* out) const SK_OVERRIDE { + void getInvariantOutputColor(GrInitInvariantOutput* out) const override { // When this is called on a batch, there is only one geometry bundle out->setKnownFourComponents(fGeoData[0].fColor); } - void getInvariantOutputCoverage(GrInitInvariantOutput* out) const SK_OVERRIDE { + void getInvariantOutputCoverage(GrInitInvariantOutput* out) const override { out->setUnknownSingleComponent(); } - void initBatchTracker(const GrPipelineInfo& init) SK_OVERRIDE { + void initBatchTracker(const GrPipelineInfo& init) override { // Handle any color overrides if (init.fColorIgnored) { fGeoData[0].fColor = GrColor_ILLEGAL; @@ -981,7 +981,7 @@ public: fBatch.fCoverageIgnored = init.fCoverageIgnored; } - void generateGeometry(GrBatchTarget* batchTarget, const GrPipeline* pipeline) SK_OVERRIDE { + void generateGeometry(GrBatchTarget* batchTarget, const GrPipeline* pipeline) override { SkMatrix invert; if (!this->viewMatrix().invert(&invert)) { return; @@ -1096,7 +1096,7 @@ private: fGeoData.push_back(geometry); } - bool onCombineIfPossible(GrBatch* t) SK_OVERRIDE { + bool onCombineIfPossible(GrBatch* t) override { EllipseBatch* that = t->cast(); // TODO use vertex color to avoid breaking batches @@ -1256,17 +1256,17 @@ public: return SkNEW_ARGS(DIEllipseBatch, (geometry)); } - const char* name() const SK_OVERRIDE { return "DIEllipseBatch"; } + const char* name() const override { return "DIEllipseBatch"; } - void getInvariantOutputColor(GrInitInvariantOutput* out) const SK_OVERRIDE { + void getInvariantOutputColor(GrInitInvariantOutput* out) const override { // When this is called on a batch, there is only one geometry bundle out->setKnownFourComponents(fGeoData[0].fColor); } - void getInvariantOutputCoverage(GrInitInvariantOutput* out) const SK_OVERRIDE { + void getInvariantOutputCoverage(GrInitInvariantOutput* out) const override { out->setUnknownSingleComponent(); } - void initBatchTracker(const GrPipelineInfo& init) SK_OVERRIDE { + void initBatchTracker(const GrPipelineInfo& init) override { // Handle any color overrides if (init.fColorIgnored) { fGeoData[0].fColor = GrColor_ILLEGAL; @@ -1282,7 +1282,7 @@ public: fBatch.fCoverageIgnored = init.fCoverageIgnored; } - void generateGeometry(GrBatchTarget* batchTarget, const GrPipeline* pipeline) SK_OVERRIDE { + void generateGeometry(GrBatchTarget* batchTarget, const GrPipeline* pipeline) override { // Setup geometry processor SkAutoTUnref gp(DIEllipseEdgeEffect::Create(this->color(), this->viewMatrix(), @@ -1388,7 +1388,7 @@ private: fGeoData.push_back(geometry); } - bool onCombineIfPossible(GrBatch* t) SK_OVERRIDE { + bool onCombineIfPossible(GrBatch* t) override { DIEllipseBatch* that = t->cast(); // TODO use vertex color to avoid breaking batches @@ -1643,17 +1643,17 @@ public: return SkNEW_ARGS(RRectCircleRendererBatch, (geometry, indexBuffer)); } - const char* name() const SK_OVERRIDE { return "RRectCircleBatch"; } + const char* name() const override { return "RRectCircleBatch"; } - void getInvariantOutputColor(GrInitInvariantOutput* out) const SK_OVERRIDE { + void getInvariantOutputColor(GrInitInvariantOutput* out) const override { // When this is called on a batch, there is only one geometry bundle out->setKnownFourComponents(fGeoData[0].fColor); } - void getInvariantOutputCoverage(GrInitInvariantOutput* out) const SK_OVERRIDE { + void getInvariantOutputCoverage(GrInitInvariantOutput* out) const override { out->setUnknownSingleComponent(); } - void initBatchTracker(const GrPipelineInfo& init) SK_OVERRIDE { + void initBatchTracker(const GrPipelineInfo& init) override { // Handle any color overrides if (init.fColorIgnored) { fGeoData[0].fColor = GrColor_ILLEGAL; @@ -1669,7 +1669,7 @@ public: fBatch.fCoverageIgnored = init.fCoverageIgnored; } - void generateGeometry(GrBatchTarget* batchTarget, const GrPipeline* pipeline) SK_OVERRIDE { + void generateGeometry(GrBatchTarget* batchTarget, const GrPipeline* pipeline) override { // reset to device coordinates SkMatrix invert; if (!this->viewMatrix().invert(&invert)) { @@ -1796,7 +1796,7 @@ private: fGeoData.push_back(geometry); } - bool onCombineIfPossible(GrBatch* t) SK_OVERRIDE { + bool onCombineIfPossible(GrBatch* t) override { RRectCircleRendererBatch* that = t->cast(); // TODO use vertex color to avoid breaking batches @@ -1852,17 +1852,17 @@ public: return SkNEW_ARGS(RRectEllipseRendererBatch, (geometry, indexBuffer)); } - const char* name() const SK_OVERRIDE { return "RRectEllipseRendererBatch"; } + const char* name() const override { return "RRectEllipseRendererBatch"; } - void getInvariantOutputColor(GrInitInvariantOutput* out) const SK_OVERRIDE { + void getInvariantOutputColor(GrInitInvariantOutput* out) const override { // When this is called on a batch, there is only one geometry bundle out->setKnownFourComponents(fGeoData[0].fColor); } - void getInvariantOutputCoverage(GrInitInvariantOutput* out) const SK_OVERRIDE { + void getInvariantOutputCoverage(GrInitInvariantOutput* out) const override { out->setUnknownSingleComponent(); } - void initBatchTracker(const GrPipelineInfo& init) SK_OVERRIDE { + void initBatchTracker(const GrPipelineInfo& init) override { // Handle any color overrides if (init.fColorIgnored) { fGeoData[0].fColor = GrColor_ILLEGAL; @@ -1878,7 +1878,7 @@ public: fBatch.fCoverageIgnored = init.fCoverageIgnored; } - void generateGeometry(GrBatchTarget* batchTarget, const GrPipeline* pipeline) SK_OVERRIDE { + void generateGeometry(GrBatchTarget* batchTarget, const GrPipeline* pipeline) override { // reset to device coordinates SkMatrix invert; if (!this->viewMatrix().invert(&invert)) { @@ -2015,7 +2015,7 @@ private: fGeoData.push_back(geometry); } - bool onCombineIfPossible(GrBatch* t) SK_OVERRIDE { + bool onCombineIfPossible(GrBatch* t) override { RRectEllipseRendererBatch* that = t->cast(); // TODO use vertex color to avoid breaking batches diff --git a/src/gpu/GrPathProcessor.h b/src/gpu/GrPathProcessor.h index 03d3907459..b6b6f6e5a8 100644 --- a/src/gpu/GrPathProcessor.h +++ b/src/gpu/GrPathProcessor.h @@ -29,33 +29,33 @@ public: return SkNEW_ARGS(GrPathProcessor, (color, viewMatrix, localMatrix)); } - void initBatchTracker(GrBatchTracker*, const GrPipelineInfo&) const SK_OVERRIDE; + void initBatchTracker(GrBatchTracker*, const GrPipelineInfo&) const override; bool canMakeEqual(const GrBatchTracker& mine, const GrPrimitiveProcessor& that, - const GrBatchTracker& theirs) const SK_OVERRIDE; + const GrBatchTracker& theirs) const override; - const char* name() const SK_OVERRIDE { return "PathProcessor"; } + const char* name() const override { return "PathProcessor"; } GrColor color() const { return fColor; } - void getInvariantOutputColor(GrInitInvariantOutput* out) const SK_OVERRIDE; - void getInvariantOutputCoverage(GrInitInvariantOutput* out) const SK_OVERRIDE; + void getInvariantOutputColor(GrInitInvariantOutput* out) const override; + void getInvariantOutputCoverage(GrInitInvariantOutput* out) const override; - bool willUseGeoShader() const SK_OVERRIDE { return false; } + bool willUseGeoShader() const override { return false; } virtual void getGLProcessorKey(const GrBatchTracker& bt, const GrGLCaps& caps, - GrProcessorKeyBuilder* b) const SK_OVERRIDE; + GrProcessorKeyBuilder* b) const override; virtual GrGLPrimitiveProcessor* createGLInstance(const GrBatchTracker& bt, - const GrGLCaps& caps) const SK_OVERRIDE; + const GrGLCaps& caps) const override; protected: GrPathProcessor(GrColor color, const SkMatrix& viewMatrix, const SkMatrix& localMatrix); private: - bool hasExplicitLocalCoords() const SK_OVERRIDE { return false; } + bool hasExplicitLocalCoords() const override { return false; } GrColor fColor; diff --git a/src/gpu/GrPathRendering.cpp b/src/gpu/GrPathRendering.cpp index 456f6d84c0..fba55d5e1e 100644 --- a/src/gpu/GrPathRendering.cpp +++ b/src/gpu/GrPathRendering.cpp @@ -24,11 +24,11 @@ public: SkDescriptor::Free(fDesc); } - int getNumPaths() SK_OVERRIDE { + int getNumPaths() override { return fScalerContext->getGlyphCount(); } - void generatePath(int glyphID, SkPath* out) SK_OVERRIDE { + void generatePath(int glyphID, SkPath* out) override { SkGlyph skGlyph; skGlyph.initWithGlyphID(glyphID); fScalerContext->getMetrics(&skGlyph); @@ -37,7 +37,7 @@ public: out->transform(fFlipMatrix); // Load glyphs with the inverted y-direction. } - bool isEqualTo(const SkDescriptor& desc) const SK_OVERRIDE { + bool isEqualTo(const SkDescriptor& desc) const override { return fDesc->equals(desc); } diff --git a/src/gpu/GrRectanizer_pow2.h b/src/gpu/GrRectanizer_pow2.h index 59ef86406e..451589db0a 100644 --- a/src/gpu/GrRectanizer_pow2.h +++ b/src/gpu/GrRectanizer_pow2.h @@ -24,15 +24,15 @@ public: virtual ~GrRectanizerPow2() { } - void reset() SK_OVERRIDE { + void reset() override { fNextStripY = 0; fAreaSoFar = 0; sk_bzero(fRows, sizeof(fRows)); } - bool addRect(int w, int h, SkIPoint16* loc) SK_OVERRIDE; + bool addRect(int w, int h, SkIPoint16* loc) override; - float percentFull() const SK_OVERRIDE { + float percentFull() const override { return fAreaSoFar / ((float)this->width() * this->height()); } diff --git a/src/gpu/GrRectanizer_skyline.h b/src/gpu/GrRectanizer_skyline.h index c9f9255580..a06bba00fb 100644 --- a/src/gpu/GrRectanizer_skyline.h +++ b/src/gpu/GrRectanizer_skyline.h @@ -21,7 +21,7 @@ public: virtual ~GrRectanizerSkyline() { } - void reset() SK_OVERRIDE{ + void reset() override{ fAreaSoFar = 0; fSkyline.reset(); SkylineSegment* seg = fSkyline.append(1); @@ -30,9 +30,9 @@ public: seg->fWidth = this->width(); } - bool addRect(int w, int h, SkIPoint16* loc) SK_OVERRIDE; + bool addRect(int w, int h, SkIPoint16* loc) override; - float percentFull() const SK_OVERRIDE { + float percentFull() const override { return fAreaSoFar / ((float)this->width() * this->height()); } diff --git a/src/gpu/GrSoftwarePathRenderer.h b/src/gpu/GrSoftwarePathRenderer.h index ed897cceaf..e7a5a28749 100644 --- a/src/gpu/GrSoftwarePathRenderer.h +++ b/src/gpu/GrSoftwarePathRenderer.h @@ -28,12 +28,12 @@ public: const SkMatrix& viewMatrix, const SkPath&, const SkStrokeRec&, - bool antiAlias) const SK_OVERRIDE; + bool antiAlias) const override; protected: virtual StencilSupport onGetStencilSupport(const GrDrawTarget*, const GrPipelineBuilder*, const SkPath&, - const SkStrokeRec&) const SK_OVERRIDE; + const SkStrokeRec&) const override; virtual bool onDrawPath(GrDrawTarget*, GrPipelineBuilder*, @@ -41,7 +41,7 @@ protected: const SkMatrix& viewMatrix, const SkPath&, const SkStrokeRec&, - bool antiAlias) SK_OVERRIDE; + bool antiAlias) override; private: GrContext* fContext; diff --git a/src/gpu/GrStencilAndCoverPathRenderer.h b/src/gpu/GrStencilAndCoverPathRenderer.h index cb4012f3d1..a28b6aa8ab 100644 --- a/src/gpu/GrStencilAndCoverPathRenderer.h +++ b/src/gpu/GrStencilAndCoverPathRenderer.h @@ -30,13 +30,13 @@ public: const SkMatrix& viewMatrix, const SkPath&, const SkStrokeRec&, - bool antiAlias) const SK_OVERRIDE; + bool antiAlias) const override; protected: virtual StencilSupport onGetStencilSupport(const GrDrawTarget*, const GrPipelineBuilder*, const SkPath&, - const SkStrokeRec&) const SK_OVERRIDE; + const SkStrokeRec&) const override; virtual bool onDrawPath(GrDrawTarget*, GrPipelineBuilder*, @@ -44,13 +44,13 @@ protected: const SkMatrix& viewMatrix, const SkPath&, const SkStrokeRec&, - bool antiAlias) SK_OVERRIDE; + bool antiAlias) override; virtual void onStencilPath(GrDrawTarget*, GrPipelineBuilder*, const SkMatrix& viewMatrix, const SkPath&, - const SkStrokeRec&) SK_OVERRIDE; + const SkStrokeRec&) override; private: GrStencilAndCoverPathRenderer(GrGpu*); diff --git a/src/gpu/GrStencilAndCoverTextContext.h b/src/gpu/GrStencilAndCoverTextContext.h index 37498b7e07..d3d2470f26 100644 --- a/src/gpu/GrStencilAndCoverTextContext.h +++ b/src/gpu/GrStencilAndCoverTextContext.h @@ -71,17 +71,17 @@ private: GrStencilAndCoverTextContext(GrContext*, SkGpuDevice*, const SkDeviceProperties&); bool canDraw(const GrRenderTarget*, const GrClip&, const GrPaint&, - const SkPaint&, const SkMatrix& viewMatrix) SK_OVERRIDE; + const SkPaint&, const SkMatrix& viewMatrix) override; void onDrawText(GrRenderTarget*, const GrClip&, const GrPaint&, const SkPaint&, const SkMatrix& viewMatrix, const char text[], size_t byteLength, - SkScalar x, SkScalar y, const SkIRect& regionClipBounds) SK_OVERRIDE; + SkScalar x, SkScalar y, const SkIRect& regionClipBounds) override; void onDrawPosText(GrRenderTarget*, const GrClip&, const GrPaint&, const SkPaint&, const SkMatrix& viewMatrix, const char text[], size_t byteLength, const SkScalar pos[], int scalarsPerPosition, - const SkPoint& offset, const SkIRect& regionClipBounds) SK_OVERRIDE; + const SkPoint& offset, const SkIRect& regionClipBounds) override; void init(GrRenderTarget*, const GrClip&, const GrPaint&, const SkPaint&, size_t textByteLength, RenderMode, const SkMatrix& viewMatrix, diff --git a/src/gpu/GrTargetCommands.h b/src/gpu/GrTargetCommands.h index 51acee0c46..4b3dd574e3 100644 --- a/src/gpu/GrTargetCommands.h +++ b/src/gpu/GrTargetCommands.h @@ -146,7 +146,7 @@ private: struct Draw : public Cmd { Draw(const GrDrawTarget::DrawInfo& info) : Cmd(kDraw_CmdType), fInfo(info) {} - void execute(GrGpu*, const SetState*) SK_OVERRIDE; + void execute(GrGpu*, const SetState*) override; GrDrawTarget::DrawInfo fInfo; }; @@ -159,7 +159,7 @@ private: const GrPath* path() const { return fPath.get(); } - void execute(GrGpu*, const SetState*) SK_OVERRIDE; + void execute(GrGpu*, const SetState*) override; SkMatrix fViewMatrix; bool fUseHWAA; @@ -175,7 +175,7 @@ private: const GrPath* path() const { return fPath.get(); } - void execute(GrGpu*, const SetState*) SK_OVERRIDE; + void execute(GrGpu*, const SetState*) override; GrStencilSettings fStencilSettings; @@ -188,7 +188,7 @@ private: const GrPathRange* pathRange() const { return fPathRange.get(); } - void execute(GrGpu*, const SetState*) SK_OVERRIDE; + void execute(GrGpu*, const SetState*) override; char* fIndices; GrDrawTarget::PathIndexType fIndexType; @@ -207,7 +207,7 @@ private: GrRenderTarget* renderTarget() const { return fRenderTarget.get(); } - void execute(GrGpu*, const SetState*) SK_OVERRIDE; + void execute(GrGpu*, const SetState*) override; SkIRect fRect; GrColor fColor; @@ -223,7 +223,7 @@ private: GrRenderTarget* renderTarget() const { return fRenderTarget.get(); } - void execute(GrGpu*, const SetState*) SK_OVERRIDE; + void execute(GrGpu*, const SetState*) override; SkIRect fRect; bool fInsideClip; @@ -242,7 +242,7 @@ private: GrSurface* dst() const { return fDst.get(); } GrSurface* src() const { return fSrc.get(); } - void execute(GrGpu*, const SetState*) SK_OVERRIDE; + void execute(GrGpu*, const SetState*) override; SkIPoint fDstPoint; SkIRect fSrcRect; @@ -269,7 +269,7 @@ private: return reinterpret_cast(fPipeline.get()); } - void execute(GrGpu*, const SetState*) SK_OVERRIDE; + void execute(GrGpu*, const SetState*) override; typedef GrPendingProgramElement ProgramPrimitiveProcessor; ProgramPrimitiveProcessor fPrimitiveProcessor; @@ -286,7 +286,7 @@ private: SkASSERT(!batch->isUsed()); } - void execute(GrGpu*, const SetState*) SK_OVERRIDE; + void execute(GrGpu*, const SetState*) override; // TODO it wouldn't be too hard to let batches allocate in the cmd buffer SkAutoTUnref fBatch; diff --git a/src/gpu/GrTessellatingPathRenderer.cpp b/src/gpu/GrTessellatingPathRenderer.cpp index 1170e1cc99..3d4a81cf0c 100644 --- a/src/gpu/GrTessellatingPathRenderer.cpp +++ b/src/gpu/GrTessellatingPathRenderer.cpp @@ -1448,17 +1448,17 @@ public: return SkNEW_ARGS(TessellatingPathBatch, (color, path, viewMatrix, clipBounds)); } - const char* name() const SK_OVERRIDE { return "TessellatingPathBatch"; } + const char* name() const override { return "TessellatingPathBatch"; } - void getInvariantOutputColor(GrInitInvariantOutput* out) const SK_OVERRIDE { + void getInvariantOutputColor(GrInitInvariantOutput* out) const override { out->setKnownFourComponents(fColor); } - void getInvariantOutputCoverage(GrInitInvariantOutput* out) const SK_OVERRIDE { + void getInvariantOutputCoverage(GrInitInvariantOutput* out) const override { out->setUnknownSingleComponent(); } - void initBatchTracker(const GrPipelineInfo& init) SK_OVERRIDE { + void initBatchTracker(const GrPipelineInfo& init) override { // Handle any color overrides if (init.fColorIgnored) { fColor = GrColor_ILLEGAL; @@ -1468,7 +1468,7 @@ public: fPipelineInfo = init; } - void generateGeometry(GrBatchTarget* batchTarget, const GrPipeline* pipeline) SK_OVERRIDE { + void generateGeometry(GrBatchTarget* batchTarget, const GrPipeline* pipeline) override { SkScalar tol = GrPathUtils::scaleToleranceToSrc(SK_Scalar1, fViewMatrix, fPath.getBounds()); int contourCnt; int maxPts = GrPathUtils::worstCasePointCount(fPath, &contourCnt, tol); @@ -1543,7 +1543,7 @@ public: return; } - bool onCombineIfPossible(GrBatch*) SK_OVERRIDE { + bool onCombineIfPossible(GrBatch*) override { return false; } diff --git a/src/gpu/GrTessellatingPathRenderer.h b/src/gpu/GrTessellatingPathRenderer.h index 3262c9a6e2..977260821f 100644 --- a/src/gpu/GrTessellatingPathRenderer.h +++ b/src/gpu/GrTessellatingPathRenderer.h @@ -23,13 +23,13 @@ public: const SkMatrix&, const SkPath&, const SkStrokeRec&, - bool antiAlias) const SK_OVERRIDE; + bool antiAlias) const override; protected: StencilSupport onGetStencilSupport(const GrDrawTarget*, const GrPipelineBuilder*, const SkPath&, - const SkStrokeRec&) const SK_OVERRIDE; + const SkStrokeRec&) const override; bool onDrawPath(GrDrawTarget*, GrPipelineBuilder*, @@ -37,7 +37,7 @@ protected: const SkMatrix& viewMatrix, const SkPath&, const SkStrokeRec&, - bool antiAlias) SK_OVERRIDE; + bool antiAlias) override; typedef GrPathRenderer INHERITED; }; diff --git a/src/gpu/GrTest.cpp b/src/gpu/GrTest.cpp index cefd015e92..aca7133215 100644 --- a/src/gpu/GrTest.cpp +++ b/src/gpu/GrTest.cpp @@ -142,8 +142,8 @@ class GrPipeline; class MockGpu : public GrGpu { public: MockGpu(GrContext* context) : INHERITED(context) { fCaps.reset(SkNEW(GrDrawTargetCaps)); } - ~MockGpu() SK_OVERRIDE {} - bool canWriteTexturePixels(const GrTexture*, GrPixelConfig srcConfig) const SK_OVERRIDE { + ~MockGpu() override {} + bool canWriteTexturePixels(const GrTexture*, GrPixelConfig srcConfig) const override { return true; } @@ -151,60 +151,60 @@ public: int left, int top, int width, int height, GrPixelConfig config, - size_t rowBytes) const SK_OVERRIDE { return false; } + size_t rowBytes) const override { return false; } void buildProgramDesc(GrProgramDesc*,const GrPrimitiveProcessor&, const GrPipeline&, - const GrBatchTracker&) const SK_OVERRIDE {} + const GrBatchTracker&) const override {} - void discard(GrRenderTarget*) SK_OVERRIDE {} + void discard(GrRenderTarget*) override {} bool canCopySurface(const GrSurface* dst, const GrSurface* src, const SkIRect& srcRect, - const SkIPoint& dstPoint) SK_OVERRIDE { return false; }; + const SkIPoint& dstPoint) override { return false; }; bool copySurface(GrSurface* dst, GrSurface* src, const SkIRect& srcRect, - const SkIPoint& dstPoint) SK_OVERRIDE { return false; }; + const SkIPoint& dstPoint) override { return false; }; - bool initCopySurfaceDstDesc(const GrSurface* src, GrSurfaceDesc* desc) SK_OVERRIDE { + bool initCopySurfaceDstDesc(const GrSurface* src, GrSurfaceDesc* desc) override { return false; } private: - void onResetContext(uint32_t resetBits) SK_OVERRIDE {} + void onResetContext(uint32_t resetBits) override {} GrTexture* onCreateTexture(const GrSurfaceDesc& desc, bool budgeted, const void* srcData, - size_t rowBytes) SK_OVERRIDE { + size_t rowBytes) override { return NULL; } GrTexture* onCreateCompressedTexture(const GrSurfaceDesc& desc, bool budgeted, - const void* srcData) SK_OVERRIDE { + const void* srcData) override { return NULL; } - GrTexture* onWrapBackendTexture(const GrBackendTextureDesc&) SK_OVERRIDE { return NULL; } + GrTexture* onWrapBackendTexture(const GrBackendTextureDesc&) override { return NULL; } - GrRenderTarget* onWrapBackendRenderTarget(const GrBackendRenderTargetDesc&) SK_OVERRIDE { + GrRenderTarget* onWrapBackendRenderTarget(const GrBackendRenderTargetDesc&) override { return NULL; } - GrVertexBuffer* onCreateVertexBuffer(size_t size, bool dynamic) SK_OVERRIDE { return NULL; } + GrVertexBuffer* onCreateVertexBuffer(size_t size, bool dynamic) override { return NULL; } - GrIndexBuffer* onCreateIndexBuffer(size_t size, bool dynamic) SK_OVERRIDE { return NULL; } + GrIndexBuffer* onCreateIndexBuffer(size_t size, bool dynamic) override { return NULL; } void onClear(GrRenderTarget*, const SkIRect* rect, GrColor color, - bool canIgnoreRect) SK_OVERRIDE {} + bool canIgnoreRect) override {} - void onClearStencilClip(GrRenderTarget*, const SkIRect& rect, bool insideClip) SK_OVERRIDE {} + void onClearStencilClip(GrRenderTarget*, const SkIRect& rect, bool insideClip) override {} - void onDraw(const DrawArgs&, const GrDrawTarget::DrawInfo&) SK_OVERRIDE {} + void onDraw(const DrawArgs&, const GrDrawTarget::DrawInfo&) override {} - void onStencilPath(const GrPath* path, const StencilPathState& state) SK_OVERRIDE {} + void onStencilPath(const GrPath* path, const StencilPathState& state) override {} - void onDrawPath(const DrawArgs&, const GrPath*, const GrStencilSettings&) SK_OVERRIDE {} + void onDrawPath(const DrawArgs&, const GrPath*, const GrStencilSettings&) override {} void onDrawPaths(const DrawArgs&, const GrPathRange*, @@ -213,38 +213,38 @@ private: const float transformValues[], GrDrawTarget::PathTransformType, int count, - const GrStencilSettings&) SK_OVERRIDE {} + const GrStencilSettings&) override {} bool onReadPixels(GrRenderTarget* target, int left, int top, int width, int height, GrPixelConfig, void* buffer, - size_t rowBytes) SK_OVERRIDE { + size_t rowBytes) override { return false; } bool onWriteTexturePixels(GrTexture* texture, int left, int top, int width, int height, GrPixelConfig config, const void* buffer, - size_t rowBytes) SK_OVERRIDE { + size_t rowBytes) override { return false; } - void onResolveRenderTarget(GrRenderTarget* target) SK_OVERRIDE { return; } + void onResolveRenderTarget(GrRenderTarget* target) override { return; } - bool createStencilBufferForRenderTarget(GrRenderTarget*, int width, int height) SK_OVERRIDE { + bool createStencilBufferForRenderTarget(GrRenderTarget*, int width, int height) override { return false; } - bool attachStencilBufferToRenderTarget(GrStencilBuffer*, GrRenderTarget*) SK_OVERRIDE { + bool attachStencilBufferToRenderTarget(GrStencilBuffer*, GrRenderTarget*) override { return false; } - void clearStencil(GrRenderTarget* target) SK_OVERRIDE {} + void clearStencil(GrRenderTarget* target) override {} - void didAddGpuTraceMarker() SK_OVERRIDE {} + void didAddGpuTraceMarker() override {} - void didRemoveGpuTraceMarker() SK_OVERRIDE {} + void didRemoveGpuTraceMarker() override {} typedef GrGpu INHERITED; }; diff --git a/src/gpu/GrTestBatch.h b/src/gpu/GrTestBatch.h index 677abafaca..716912dc76 100644 --- a/src/gpu/GrTestBatch.h +++ b/src/gpu/GrTestBatch.h @@ -20,9 +20,9 @@ public: GrColor fColor; }; - virtual const char* name() const SK_OVERRIDE = 0; + virtual const char* name() const override = 0; - void getInvariantOutputColor(GrInitInvariantOutput* out) const SK_OVERRIDE { + void getInvariantOutputColor(GrInitInvariantOutput* out) const override { // When this is called on a batch, there is only one geometry bundle if (fGeometryProcessor->hasVertexColor()) { out->setUnknownFourComponents(); @@ -31,11 +31,11 @@ public: } } - void getInvariantOutputCoverage(GrInitInvariantOutput* out) const SK_OVERRIDE { + void getInvariantOutputCoverage(GrInitInvariantOutput* out) const override { out->setUnknownSingleComponent(); } - void initBatchTracker(const GrPipelineInfo& init) SK_OVERRIDE { + void initBatchTracker(const GrPipelineInfo& init) override { // Handle any color overrides if (init.fColorIgnored) { this->geoData(0)->fColor = GrColor_ILLEGAL; @@ -50,7 +50,7 @@ public: fBatch.fCoverageIgnored = init.fCoverageIgnored; } - void generateGeometry(GrBatchTarget* batchTarget, const GrPipeline* pipeline) SK_OVERRIDE { + void generateGeometry(GrBatchTarget* batchTarget, const GrPipeline* pipeline) override { batchTarget->initDraw(fGeometryProcessor, pipeline); // TODO this is hacky, but the only way we have to initialize the GP is to use the @@ -76,7 +76,7 @@ protected: private: virtual Geometry* geoData(int index) = 0; - bool onCombineIfPossible(GrBatch* t) SK_OVERRIDE { + bool onCombineIfPossible(GrBatch* t) override { return false; } diff --git a/src/gpu/SkGpuDevice.h b/src/gpu/SkGpuDevice.h index c712ca9b4c..ad0c2d63f0 100644 --- a/src/gpu/SkGpuDevice.h +++ b/src/gpu/SkGpuDevice.h @@ -64,75 +64,75 @@ public: void replaceRenderTarget(bool shouldRetainContent); - GrRenderTarget* accessRenderTarget() SK_OVERRIDE; + GrRenderTarget* accessRenderTarget() override; - SkImageInfo imageInfo() const SK_OVERRIDE { + SkImageInfo imageInfo() const override { return fRenderTarget ? fRenderTarget->surfacePriv().info() : SkImageInfo::MakeUnknown(); } const SkSurfaceProps& surfaceProps() const { return fSurfaceProps; } - void drawPaint(const SkDraw&, const SkPaint& paint) SK_OVERRIDE; + void drawPaint(const SkDraw&, const SkPaint& paint) override; virtual void drawPoints(const SkDraw&, SkCanvas::PointMode mode, size_t count, - const SkPoint[], const SkPaint& paint) SK_OVERRIDE; + const SkPoint[], const SkPaint& paint) override; virtual void drawRect(const SkDraw&, const SkRect& r, - const SkPaint& paint) SK_OVERRIDE; + const SkPaint& paint) override; virtual void drawRRect(const SkDraw&, const SkRRect& r, - const SkPaint& paint) SK_OVERRIDE; + const SkPaint& paint) override; virtual void drawDRRect(const SkDraw& draw, const SkRRect& outer, - const SkRRect& inner, const SkPaint& paint) SK_OVERRIDE; + const SkRRect& inner, const SkPaint& paint) override; virtual void drawOval(const SkDraw&, const SkRect& oval, - const SkPaint& paint) SK_OVERRIDE; + const SkPaint& paint) override; virtual void drawPath(const SkDraw&, const SkPath& path, const SkPaint& paint, const SkMatrix* prePathMatrix, - bool pathIsMutable) SK_OVERRIDE; + bool pathIsMutable) override; virtual void drawBitmap(const SkDraw&, const SkBitmap& bitmap, - const SkMatrix&, const SkPaint&) SK_OVERRIDE; + const SkMatrix&, const SkPaint&) override; virtual void drawBitmapRect(const SkDraw&, const SkBitmap&, const SkRect* srcOrNull, const SkRect& dst, const SkPaint& paint, - SkCanvas::DrawBitmapRectFlags flags) SK_OVERRIDE; + SkCanvas::DrawBitmapRectFlags flags) override; virtual void drawSprite(const SkDraw&, const SkBitmap& bitmap, - int x, int y, const SkPaint& paint) SK_OVERRIDE; + int x, int y, const SkPaint& paint) override; virtual void drawText(const SkDraw&, const void* text, size_t len, - SkScalar x, SkScalar y, const SkPaint&) SK_OVERRIDE; + SkScalar x, SkScalar y, const SkPaint&) override; virtual void drawPosText(const SkDraw&, const void* text, size_t len, const SkScalar pos[], int scalarsPerPos, - const SkPoint& offset, const SkPaint&) SK_OVERRIDE; + const SkPoint& offset, const SkPaint&) override; virtual void drawTextBlob(const SkDraw&, const SkTextBlob*, SkScalar x, SkScalar y, - const SkPaint& paint, SkDrawFilter* drawFilter) SK_OVERRIDE; + const SkPaint& paint, SkDrawFilter* drawFilter) override; virtual void drawVertices(const SkDraw&, SkCanvas::VertexMode, int vertexCount, const SkPoint verts[], const SkPoint texs[], const SkColor colors[], SkXfermode* xmode, const uint16_t indices[], int indexCount, - const SkPaint&) SK_OVERRIDE; + const SkPaint&) override; virtual void drawDevice(const SkDraw&, SkBaseDevice*, int x, int y, - const SkPaint&) SK_OVERRIDE; + const SkPaint&) override; - void flush() SK_OVERRIDE; + void flush() override; - void onAttachToCanvas(SkCanvas* canvas) SK_OVERRIDE; - void onDetachFromCanvas() SK_OVERRIDE; + void onAttachToCanvas(SkCanvas* canvas) override; + void onDetachFromCanvas() override; - const SkBitmap& onAccessBitmap() SK_OVERRIDE; + const SkBitmap& onAccessBitmap() override; - bool canHandleImageFilter(const SkImageFilter*) SK_OVERRIDE; + bool canHandleImageFilter(const SkImageFilter*) override; virtual bool filterImage(const SkImageFilter*, const SkBitmap&, const SkImageFilter::Context&, - SkBitmap*, SkIPoint*) SK_OVERRIDE; + SkBitmap*, SkIPoint*) override; bool filterTexture(GrContext*, GrTexture*, const SkImageFilter*, const SkImageFilter::Context&, SkBitmap* result, SkIPoint* offset); protected: - bool onReadPixels(const SkImageInfo&, void*, size_t, int, int) SK_OVERRIDE; - bool onWritePixels(const SkImageInfo&, const void*, size_t, int, int) SK_OVERRIDE; - bool onShouldDisableLCD(const SkPaint&) const SK_OVERRIDE; + bool onReadPixels(const SkImageInfo&, void*, size_t, int, int) override; + bool onWritePixels(const SkImageInfo&, const void*, size_t, int, int) override; + bool onShouldDisableLCD(const SkPaint&) const override; /** PRIVATE / EXPERIMENTAL -- do not call */ virtual bool EXPERIMENTAL_drawPicture(SkCanvas* canvas, const SkPicture* picture, - const SkMatrix*, const SkPaint*) SK_OVERRIDE; + const SkMatrix*, const SkPaint*) override; private: GrContext* fContext; @@ -149,13 +149,13 @@ private: SkGpuDevice(GrRenderTarget*, const SkSurfaceProps*, unsigned flags); - SkBaseDevice* onCreateDevice(const CreateInfo&, const SkPaint*) SK_OVERRIDE; + SkBaseDevice* onCreateDevice(const CreateInfo&, const SkPaint*) override; - SkSurface* newSurface(const SkImageInfo&, const SkSurfaceProps&) SK_OVERRIDE; + SkSurface* newSurface(const SkImageInfo&, const SkSurfaceProps&) override; - SkImageFilter::Cache* getImageFilterCache() SK_OVERRIDE; + SkImageFilter::Cache* getImageFilterCache() override; - bool forceConservativeRasterClip() const SK_OVERRIDE { return true; } + bool forceConservativeRasterClip() const override { return true; } // sets the render target and clip on context void prepareDraw(const SkDraw&); diff --git a/src/gpu/SkGr.cpp b/src/gpu/SkGr.cpp index 32c9158334..b44276cd4e 100644 --- a/src/gpu/SkGr.cpp +++ b/src/gpu/SkGr.cpp @@ -163,7 +163,7 @@ public: private: GrUniqueKeyInvalidatedMessage fMsg; - void onChange() SK_OVERRIDE { + void onChange() override { SkMessageBus::Post(fMsg); } }; diff --git a/src/gpu/effects/GrBezierEffect.cpp b/src/gpu/effects/GrBezierEffect.cpp index 158fd5d896..90b91b0bd2 100644 --- a/src/gpu/effects/GrBezierEffect.cpp +++ b/src/gpu/effects/GrBezierEffect.cpp @@ -24,7 +24,7 @@ public: GrGLConicEffect(const GrGeometryProcessor&, const GrBatchTracker&); - void onEmitCode(EmitArgs&, GrGPArgs*) SK_OVERRIDE; + void onEmitCode(EmitArgs&, GrGPArgs*) override; static inline void GenKey(const GrGeometryProcessor&, const GrBatchTracker&, @@ -33,7 +33,7 @@ public: virtual void setData(const GrGLProgramDataManager& pdman, const GrPrimitiveProcessor& primProc, - const GrBatchTracker& bt) SK_OVERRIDE { + const GrBatchTracker& bt) override { this->setUniformViewMatrix(pdman, primProc.viewMatrix()); const ConicBatchTracker& local = bt.cast(); @@ -259,7 +259,7 @@ public: GrGLQuadEffect(const GrGeometryProcessor&, const GrBatchTracker&); - void onEmitCode(EmitArgs&, GrGPArgs*) SK_OVERRIDE; + void onEmitCode(EmitArgs&, GrGPArgs*) override; static inline void GenKey(const GrGeometryProcessor&, const GrBatchTracker&, @@ -268,7 +268,7 @@ public: virtual void setData(const GrGLProgramDataManager& pdman, const GrPrimitiveProcessor& primProc, - const GrBatchTracker& bt) SK_OVERRIDE { + const GrBatchTracker& bt) override { this->setUniformViewMatrix(pdman, primProc.viewMatrix()); const QuadBatchTracker& local = bt.cast(); @@ -480,7 +480,7 @@ public: GrGLCubicEffect(const GrGeometryProcessor&, const GrBatchTracker&); - void onEmitCode(EmitArgs&, GrGPArgs*) SK_OVERRIDE; + void onEmitCode(EmitArgs&, GrGPArgs*) override; static inline void GenKey(const GrGeometryProcessor&, const GrBatchTracker&, @@ -489,7 +489,7 @@ public: virtual void setData(const GrGLProgramDataManager& pdman, const GrPrimitiveProcessor& primProc, - const GrBatchTracker& bt) SK_OVERRIDE { + const GrBatchTracker& bt) override { this->setUniformViewMatrix(pdman, primProc.viewMatrix()); const CubicBatchTracker& local = bt.cast(); diff --git a/src/gpu/effects/GrBezierEffect.h b/src/gpu/effects/GrBezierEffect.h index b0039e955f..3390924243 100644 --- a/src/gpu/effects/GrBezierEffect.h +++ b/src/gpu/effects/GrBezierEffect.h @@ -90,7 +90,7 @@ public: virtual ~GrConicEffect(); - const char* name() const SK_OVERRIDE { return "Conic"; } + const char* name() const override { return "Conic"; } inline const Attribute* inPosition() const { return fInPosition; } inline const Attribute* inConicCoeffs() const { return fInConicCoeffs; } @@ -100,23 +100,23 @@ public: virtual void getGLProcessorKey(const GrBatchTracker& bt, const GrGLCaps& caps, - GrProcessorKeyBuilder* b) const SK_OVERRIDE; + GrProcessorKeyBuilder* b) const override; virtual GrGLPrimitiveProcessor* createGLInstance(const GrBatchTracker& bt, - const GrGLCaps&) const SK_OVERRIDE; + const GrGLCaps&) const override; - void initBatchTracker(GrBatchTracker*, const GrPipelineInfo&) const SK_OVERRIDE; + void initBatchTracker(GrBatchTracker*, const GrPipelineInfo&) const override; bool onCanMakeEqual(const GrBatchTracker&, const GrGeometryProcessor&, - const GrBatchTracker&) const SK_OVERRIDE; + const GrBatchTracker&) const override; private: GrConicEffect(GrColor, const SkMatrix& viewMatrix, uint8_t coverage, GrPrimitiveEdgeType, const SkMatrix& localMatrix); - bool onIsEqual(const GrGeometryProcessor& other) const SK_OVERRIDE; + bool onIsEqual(const GrGeometryProcessor& other) const override; - void onGetInvariantOutputCoverage(GrInitInvariantOutput* out) const SK_OVERRIDE { + void onGetInvariantOutputCoverage(GrInitInvariantOutput* out) const override { out->setUnknownSingleComponent(); } @@ -175,7 +175,7 @@ public: virtual ~GrQuadEffect(); - const char* name() const SK_OVERRIDE { return "Quad"; } + const char* name() const override { return "Quad"; } inline const Attribute* inPosition() const { return fInPosition; } inline const Attribute* inHairQuadEdge() const { return fInHairQuadEdge; } @@ -185,23 +185,23 @@ public: virtual void getGLProcessorKey(const GrBatchTracker& bt, const GrGLCaps& caps, - GrProcessorKeyBuilder* b) const SK_OVERRIDE; + GrProcessorKeyBuilder* b) const override; virtual GrGLPrimitiveProcessor* createGLInstance(const GrBatchTracker& bt, - const GrGLCaps&) const SK_OVERRIDE; + const GrGLCaps&) const override; - void initBatchTracker(GrBatchTracker*, const GrPipelineInfo&) const SK_OVERRIDE; + void initBatchTracker(GrBatchTracker*, const GrPipelineInfo&) const override; bool onCanMakeEqual(const GrBatchTracker&, const GrGeometryProcessor&, - const GrBatchTracker&) const SK_OVERRIDE; + const GrBatchTracker&) const override; private: GrQuadEffect(GrColor, const SkMatrix& viewMatrix, uint8_t coverage, GrPrimitiveEdgeType, const SkMatrix& localMatrix); - bool onIsEqual(const GrGeometryProcessor& other) const SK_OVERRIDE; + bool onIsEqual(const GrGeometryProcessor& other) const override; - void onGetInvariantOutputCoverage(GrInitInvariantOutput* out) const SK_OVERRIDE { + void onGetInvariantOutputCoverage(GrInitInvariantOutput* out) const override { out->setUnknownSingleComponent(); } @@ -256,7 +256,7 @@ public: virtual ~GrCubicEffect(); - const char* name() const SK_OVERRIDE { return "Cubic"; } + const char* name() const override { return "Cubic"; } inline const Attribute* inPosition() const { return fInPosition; } inline const Attribute* inCubicCoeffs() const { return fInCubicCoeffs; } @@ -266,22 +266,22 @@ public: virtual void getGLProcessorKey(const GrBatchTracker& bt, const GrGLCaps& caps, - GrProcessorKeyBuilder* b) const SK_OVERRIDE; + GrProcessorKeyBuilder* b) const override; virtual GrGLPrimitiveProcessor* createGLInstance(const GrBatchTracker& bt, - const GrGLCaps&) const SK_OVERRIDE; + const GrGLCaps&) const override; - void initBatchTracker(GrBatchTracker*, const GrPipelineInfo&) const SK_OVERRIDE; + void initBatchTracker(GrBatchTracker*, const GrPipelineInfo&) const override; bool onCanMakeEqual(const GrBatchTracker&, const GrGeometryProcessor&, - const GrBatchTracker&) const SK_OVERRIDE; + const GrBatchTracker&) const override; private: GrCubicEffect(GrColor, const SkMatrix& viewMatrix, GrPrimitiveEdgeType); - bool onIsEqual(const GrGeometryProcessor& other) const SK_OVERRIDE; + bool onIsEqual(const GrGeometryProcessor& other) const override; - void onGetInvariantOutputCoverage(GrInitInvariantOutput* out) const SK_OVERRIDE { + void onGetInvariantOutputCoverage(GrInitInvariantOutput* out) const override { out->setUnknownSingleComponent(); } diff --git a/src/gpu/effects/GrBicubicEffect.cpp b/src/gpu/effects/GrBicubicEffect.cpp index 7d2dbf4a09..06d228e02a 100644 --- a/src/gpu/effects/GrBicubicEffect.cpp +++ b/src/gpu/effects/GrBicubicEffect.cpp @@ -28,9 +28,9 @@ public: const char* outputColor, const char* inputColor, const TransformedCoordsArray&, - const TextureSamplerArray&) SK_OVERRIDE; + const TextureSamplerArray&) override; - void setData(const GrGLProgramDataManager&, const GrProcessor&) SK_OVERRIDE; + void setData(const GrGLProgramDataManager&, const GrProcessor&) override; static inline void GenKey(const GrProcessor& effect, const GrGLCaps&, GrProcessorKeyBuilder* b) { diff --git a/src/gpu/effects/GrBicubicEffect.h b/src/gpu/effects/GrBicubicEffect.h index 89e43c121b..ddbdd23437 100644 --- a/src/gpu/effects/GrBicubicEffect.h +++ b/src/gpu/effects/GrBicubicEffect.h @@ -25,11 +25,11 @@ public: const float* coefficients() const { return fCoefficients; } - const char* name() const SK_OVERRIDE { return "Bicubic"; } + const char* name() const override { return "Bicubic"; } - void getGLProcessorKey(const GrGLCaps&, GrProcessorKeyBuilder*) const SK_OVERRIDE; + void getGLProcessorKey(const GrGLCaps&, GrProcessorKeyBuilder*) const override; - GrGLFragmentProcessor* createGLInstance() const SK_OVERRIDE; + GrGLFragmentProcessor* createGLInstance() const override; const GrTextureDomain& domain() const { return fDomain; } @@ -91,9 +91,9 @@ private: const SkMatrix &matrix, const SkShader::TileMode tileModes[2]); GrBicubicEffect(GrTexture*, const SkScalar coefficients[16], const SkMatrix &matrix, const SkRect& domain); - bool onIsEqual(const GrFragmentProcessor&) const SK_OVERRIDE; + bool onIsEqual(const GrFragmentProcessor&) const override; - void onComputeInvariantOutput(GrInvariantOutput* inout) const SK_OVERRIDE; + void onComputeInvariantOutput(GrInvariantOutput* inout) const override; float fCoefficients[16]; GrTextureDomain fDomain; diff --git a/src/gpu/effects/GrBitmapTextGeoProc.cpp b/src/gpu/effects/GrBitmapTextGeoProc.cpp index 2c187a9dcf..25904f753f 100644 --- a/src/gpu/effects/GrBitmapTextGeoProc.cpp +++ b/src/gpu/effects/GrBitmapTextGeoProc.cpp @@ -26,7 +26,7 @@ public: GrGLBitmapTextGeoProc(const GrGeometryProcessor&, const GrBatchTracker&) : fColor(GrColor_ILLEGAL) {} - void onEmitCode(EmitArgs& args, GrGPArgs* gpArgs) SK_OVERRIDE{ + void onEmitCode(EmitArgs& args, GrGPArgs* gpArgs) override{ const GrBitmapTextGeoProc& cte = args.fGP.cast(); const BitmapTextBatchTracker& local = args.fBT.cast(); @@ -78,7 +78,7 @@ public: virtual void setData(const GrGLProgramDataManager& pdman, const GrPrimitiveProcessor& gp, - const GrBatchTracker& bt) SK_OVERRIDE { + const GrBatchTracker& bt) override { this->setUniformViewMatrix(pdman, gp.viewMatrix()); const BitmapTextBatchTracker& local = bt.cast(); diff --git a/src/gpu/effects/GrBitmapTextGeoProc.h b/src/gpu/effects/GrBitmapTextGeoProc.h index b5a4145367..05f740fb57 100644 --- a/src/gpu/effects/GrBitmapTextGeoProc.h +++ b/src/gpu/effects/GrBitmapTextGeoProc.h @@ -30,7 +30,7 @@ public: virtual ~GrBitmapTextGeoProc() {} - const char* name() const SK_OVERRIDE { return "Texture"; } + const char* name() const override { return "Texture"; } const Attribute* inPosition() const { return fInPosition; } const Attribute* inColor() const { return fInColor; } @@ -39,25 +39,25 @@ public: virtual void getGLProcessorKey(const GrBatchTracker& bt, const GrGLCaps& caps, - GrProcessorKeyBuilder* b) const SK_OVERRIDE; + GrProcessorKeyBuilder* b) const override; virtual GrGLPrimitiveProcessor* createGLInstance(const GrBatchTracker& bt, - const GrGLCaps& caps) const SK_OVERRIDE; + const GrGLCaps& caps) const override; - void initBatchTracker(GrBatchTracker*, const GrPipelineInfo&) const SK_OVERRIDE; + void initBatchTracker(GrBatchTracker*, const GrPipelineInfo&) const override; bool onCanMakeEqual(const GrBatchTracker&, const GrGeometryProcessor&, - const GrBatchTracker&) const SK_OVERRIDE; + const GrBatchTracker&) const override; private: GrBitmapTextGeoProc(GrColor, GrTexture* texture, const GrTextureParams& params, GrMaskFormat format, bool opaqueVertexColors, const SkMatrix& localMatrix); - bool onIsEqual(const GrGeometryProcessor& other) const SK_OVERRIDE; + bool onIsEqual(const GrGeometryProcessor& other) const override; - void onGetInvariantOutputColor(GrInitInvariantOutput*) const SK_OVERRIDE; + void onGetInvariantOutputColor(GrInitInvariantOutput*) const override; - void onGetInvariantOutputCoverage(GrInitInvariantOutput*) const SK_OVERRIDE; + void onGetInvariantOutputCoverage(GrInitInvariantOutput*) const override; GrTextureAccess fTextureAccess; const Attribute* fInPosition; diff --git a/src/gpu/effects/GrConfigConversionEffect.cpp b/src/gpu/effects/GrConfigConversionEffect.cpp index fedc4707bc..27f8abf108 100644 --- a/src/gpu/effects/GrConfigConversionEffect.cpp +++ b/src/gpu/effects/GrConfigConversionEffect.cpp @@ -27,7 +27,7 @@ public: const char* outputColor, const char* inputColor, const TransformedCoordsArray& coords, - const TextureSamplerArray& samplers) SK_OVERRIDE { + const TextureSamplerArray& samplers) override { // Using highp for GLES here in order to avoid some precision issues on specific GPUs. GrGLShaderVar tmpVar("tmpColor", kVec4f_GrSLType, 0, kHigh_GrSLPrecision); SkString tmpDecl; diff --git a/src/gpu/effects/GrConfigConversionEffect.h b/src/gpu/effects/GrConfigConversionEffect.h index 5760bb4c16..9be71f8277 100644 --- a/src/gpu/effects/GrConfigConversionEffect.h +++ b/src/gpu/effects/GrConfigConversionEffect.h @@ -37,11 +37,11 @@ public: static const GrFragmentProcessor* Create(GrTexture*, bool swapRedAndBlue, PMConversion, const SkMatrix&); - const char* name() const SK_OVERRIDE { return "Config Conversion"; } + const char* name() const override { return "Config Conversion"; } - void getGLProcessorKey(const GrGLCaps&, GrProcessorKeyBuilder*) const SK_OVERRIDE; + void getGLProcessorKey(const GrGLCaps&, GrProcessorKeyBuilder*) const override; - GrGLFragmentProcessor* createGLInstance() const SK_OVERRIDE; + GrGLFragmentProcessor* createGLInstance() const override; bool swapsRedAndBlue() const { return fSwapRedAndBlue; } PMConversion pmConversion() const { return fPMConversion; } @@ -61,9 +61,9 @@ private: PMConversion pmConversion, const SkMatrix& matrix); - bool onIsEqual(const GrFragmentProcessor&) const SK_OVERRIDE; + bool onIsEqual(const GrFragmentProcessor&) const override; - void onComputeInvariantOutput(GrInvariantOutput* inout) const SK_OVERRIDE; + void onComputeInvariantOutput(GrInvariantOutput* inout) const override; bool fSwapRedAndBlue; PMConversion fPMConversion; diff --git a/src/gpu/effects/GrConvexPolyEffect.cpp b/src/gpu/effects/GrConvexPolyEffect.cpp index 7035094fa6..a231df495d 100644 --- a/src/gpu/effects/GrConvexPolyEffect.cpp +++ b/src/gpu/effects/GrConvexPolyEffect.cpp @@ -23,11 +23,11 @@ public: GrPrimitiveEdgeType getEdgeType() const { return fEdgeType; } - const char* name() const SK_OVERRIDE { return "AARect"; } + const char* name() const override { return "AARect"; } - void getGLProcessorKey(const GrGLCaps&, GrProcessorKeyBuilder*) const SK_OVERRIDE; + void getGLProcessorKey(const GrGLCaps&, GrProcessorKeyBuilder*) const override; - GrGLFragmentProcessor* createGLInstance() const SK_OVERRIDE; + GrGLFragmentProcessor* createGLInstance() const override; private: AARectEffect(GrPrimitiveEdgeType edgeType, const SkRect& rect) @@ -36,12 +36,12 @@ private: this->setWillReadFragmentPosition(); } - bool onIsEqual(const GrFragmentProcessor& other) const SK_OVERRIDE { + bool onIsEqual(const GrFragmentProcessor& other) const override { const AARectEffect& aare = other.cast(); return fRect == aare.fRect; } - void onComputeInvariantOutput(GrInvariantOutput* inout) const SK_OVERRIDE { + void onComputeInvariantOutput(GrInvariantOutput* inout) const override { if (fRect.isEmpty()) { // An empty rect will have no coverage anywhere. inout->mulByKnownSingleComponent(0); @@ -90,11 +90,11 @@ public: const char* outputColor, const char* inputColor, const TransformedCoordsArray&, - const TextureSamplerArray&) SK_OVERRIDE; + const TextureSamplerArray&) override; static inline void GenKey(const GrProcessor&, const GrGLCaps&, GrProcessorKeyBuilder*); - void setData(const GrGLProgramDataManager&, const GrProcessor&) SK_OVERRIDE; + void setData(const GrGLProgramDataManager&, const GrProcessor&) override; private: GrGLProgramDataManager::UniformHandle fRectUniform; @@ -185,11 +185,11 @@ public: const char* outputColor, const char* inputColor, const TransformedCoordsArray&, - const TextureSamplerArray&) SK_OVERRIDE; + const TextureSamplerArray&) override; static inline void GenKey(const GrProcessor&, const GrGLCaps&, GrProcessorKeyBuilder*); - void setData(const GrGLProgramDataManager&, const GrProcessor&) SK_OVERRIDE; + void setData(const GrGLProgramDataManager&, const GrProcessor&) override; private: GrGLProgramDataManager::UniformHandle fEdgeUniform; diff --git a/src/gpu/effects/GrConvexPolyEffect.h b/src/gpu/effects/GrConvexPolyEffect.h index e0eee5d369..f47cc37afa 100644 --- a/src/gpu/effects/GrConvexPolyEffect.h +++ b/src/gpu/effects/GrConvexPolyEffect.h @@ -61,7 +61,7 @@ public: virtual ~GrConvexPolyEffect(); - const char* name() const SK_OVERRIDE { return "ConvexPoly"; } + const char* name() const override { return "ConvexPoly"; } GrPrimitiveEdgeType getEdgeType() const { return fEdgeType; } @@ -69,16 +69,16 @@ public: const SkScalar* getEdges() const { return fEdges; } - void getGLProcessorKey(const GrGLCaps&, GrProcessorKeyBuilder*) const SK_OVERRIDE; + void getGLProcessorKey(const GrGLCaps&, GrProcessorKeyBuilder*) const override; - GrGLFragmentProcessor* createGLInstance() const SK_OVERRIDE; + GrGLFragmentProcessor* createGLInstance() const override; private: GrConvexPolyEffect(GrPrimitiveEdgeType edgeType, int n, const SkScalar edges[]); - bool onIsEqual(const GrFragmentProcessor& other) const SK_OVERRIDE; + bool onIsEqual(const GrFragmentProcessor& other) const override; - void onComputeInvariantOutput(GrInvariantOutput* inout) const SK_OVERRIDE; + void onComputeInvariantOutput(GrInvariantOutput* inout) const override; GrPrimitiveEdgeType fEdgeType; int fEdgeCount; diff --git a/src/gpu/effects/GrConvolutionEffect.cpp b/src/gpu/effects/GrConvolutionEffect.cpp index ef892dcd0b..401cac3a3c 100644 --- a/src/gpu/effects/GrConvolutionEffect.cpp +++ b/src/gpu/effects/GrConvolutionEffect.cpp @@ -23,9 +23,9 @@ public: const char* outputColor, const char* inputColor, const TransformedCoordsArray&, - const TextureSamplerArray&) SK_OVERRIDE; + const TextureSamplerArray&) override; - void setData(const GrGLProgramDataManager& pdman, const GrProcessor&) SK_OVERRIDE; + void setData(const GrGLProgramDataManager& pdman, const GrProcessor&) override; static inline void GenKey(const GrProcessor&, const GrGLCaps&, GrProcessorKeyBuilder*); diff --git a/src/gpu/effects/GrConvolutionEffect.h b/src/gpu/effects/GrConvolutionEffect.h index 4ea436c227..fa6329aa50 100644 --- a/src/gpu/effects/GrConvolutionEffect.h +++ b/src/gpu/effects/GrConvolutionEffect.h @@ -57,11 +57,11 @@ public: const float* bounds() const { return fBounds; } bool useBounds() const { return fUseBounds; } - const char* name() const SK_OVERRIDE { return "Convolution"; } + const char* name() const override { return "Convolution"; } - void getGLProcessorKey(const GrGLCaps&, GrProcessorKeyBuilder*) const SK_OVERRIDE; + void getGLProcessorKey(const GrGLCaps&, GrProcessorKeyBuilder*) const override; - GrGLFragmentProcessor* createGLInstance() const SK_OVERRIDE; + GrGLFragmentProcessor* createGLInstance() const override; enum { // This was decided based on the min allowed value for the max texture @@ -94,9 +94,9 @@ private: bool useBounds, float bounds[2]); - bool onIsEqual(const GrFragmentProcessor&) const SK_OVERRIDE; + bool onIsEqual(const GrFragmentProcessor&) const override; - void onComputeInvariantOutput(GrInvariantOutput* inout) const SK_OVERRIDE { + void onComputeInvariantOutput(GrInvariantOutput* inout) const override { // If the texture was opaque we could know that the output color if we knew the sum of the // kernel values. inout->mulByUnknownFourComponents(); diff --git a/src/gpu/effects/GrCoverageSetOpXP.cpp b/src/gpu/effects/GrCoverageSetOpXP.cpp index 6f49a1d504..a5e9b2fc74 100644 --- a/src/gpu/effects/GrCoverageSetOpXP.cpp +++ b/src/gpu/effects/GrCoverageSetOpXP.cpp @@ -21,30 +21,30 @@ public: return SkNEW_ARGS(CoverageSetOpXP, (regionOp, invertCoverage)); } - ~CoverageSetOpXP() SK_OVERRIDE; + ~CoverageSetOpXP() override; - const char* name() const SK_OVERRIDE { return "Coverage Set Op"; } + const char* name() const override { return "Coverage Set Op"; } - GrGLXferProcessor* createGLInstance() const SK_OVERRIDE; + GrGLXferProcessor* createGLInstance() const override; - bool hasSecondaryOutput() const SK_OVERRIDE { return false; } + bool hasSecondaryOutput() const override { return false; } GrXferProcessor::OptFlags getOptimizations(const GrProcOptInfo& colorPOI, const GrProcOptInfo& coveragePOI, bool doesStencilWrite, GrColor* color, - const GrDrawTargetCaps& caps) SK_OVERRIDE; + const GrDrawTargetCaps& caps) override; - void getBlendInfo(GrXferProcessor::BlendInfo* blendInfo) const SK_OVERRIDE; + void getBlendInfo(GrXferProcessor::BlendInfo* blendInfo) const override; bool invertCoverage() const { return fInvertCoverage; } private: CoverageSetOpXP(SkRegion::Op regionOp, bool fInvertCoverage); - void onGetGLProcessorKey(const GrGLCaps& caps, GrProcessorKeyBuilder* b) const SK_OVERRIDE; + void onGetGLProcessorKey(const GrGLCaps& caps, GrProcessorKeyBuilder* b) const override; - bool onIsEqual(const GrXferProcessor& xpBase) const SK_OVERRIDE { + bool onIsEqual(const GrXferProcessor& xpBase) const override { const CoverageSetOpXP& xp = xpBase.cast(); return (fRegionOp == xp.fRegionOp && fInvertCoverage == xp.fInvertCoverage); @@ -62,7 +62,7 @@ class GLCoverageSetOpXP : public GrGLXferProcessor { public: GLCoverageSetOpXP(const GrProcessor&) {} - ~GLCoverageSetOpXP() SK_OVERRIDE {} + ~GLCoverageSetOpXP() override {} static void GenKey(const GrProcessor& processor, const GrGLCaps& caps, GrProcessorKeyBuilder* b) { @@ -72,7 +72,7 @@ public: }; private: - void onEmitCode(const EmitArgs& args) SK_OVERRIDE { + void onEmitCode(const EmitArgs& args) override { const CoverageSetOpXP& xp = args.fXP.cast(); GrGLFPFragmentBuilder* fsBuilder = args.fPB->getFragmentShaderBuilder(); @@ -83,7 +83,7 @@ private: } } - void onSetData(const GrGLProgramDataManager&, const GrXferProcessor&) SK_OVERRIDE {}; + void onSetData(const GrGLProgramDataManager&, const GrXferProcessor&) override {}; typedef GrGLXferProcessor INHERITED; }; diff --git a/src/gpu/effects/GrCustomXfermode.cpp b/src/gpu/effects/GrCustomXfermode.cpp index e4d65e41e4..1ab807e116 100644 --- a/src/gpu/effects/GrCustomXfermode.cpp +++ b/src/gpu/effects/GrCustomXfermode.cpp @@ -407,14 +407,14 @@ GrFragmentProcessor* GrCustomXfermode::CreateFP(SkXfermode::Mode mode, GrTexture class GLCustomXferFP : public GrGLFragmentProcessor { public: GLCustomXferFP(const GrFragmentProcessor&) {} - ~GLCustomXferFP() SK_OVERRIDE {}; + ~GLCustomXferFP() override {}; void emitCode(GrGLFPBuilder* builder, const GrFragmentProcessor& fp, const char* outputColor, const char* inputColor, const TransformedCoordsArray& coords, - const TextureSamplerArray& samplers) SK_OVERRIDE { + const TextureSamplerArray& samplers) override { SkXfermode::Mode mode = fp.cast().mode(); GrGLFPFragmentBuilder* fsBuilder = builder->getFragmentShaderBuilder(); const char* dstColor = "bgColor"; @@ -425,7 +425,7 @@ public: emit_custom_xfermode_code(mode, fsBuilder, outputColor, inputColor, dstColor); } - void setData(const GrGLProgramDataManager&, const GrProcessor&) SK_OVERRIDE {} + void setData(const GrGLProgramDataManager&, const GrProcessor&) override {} static void GenKey(const GrFragmentProcessor& proc, const GrGLCaps&, GrProcessorKeyBuilder* b) { // The background may come from the dst or from a texture. @@ -495,21 +495,21 @@ public: } } - ~CustomXP() SK_OVERRIDE {}; + ~CustomXP() override {}; - const char* name() const SK_OVERRIDE { return "Custom Xfermode"; } + const char* name() const override { return "Custom Xfermode"; } - GrGLXferProcessor* createGLInstance() const SK_OVERRIDE; + GrGLXferProcessor* createGLInstance() const override; - bool hasSecondaryOutput() const SK_OVERRIDE { return false; } + bool hasSecondaryOutput() const override { return false; } GrXferProcessor::OptFlags getOptimizations(const GrProcOptInfo& colorPOI, const GrProcOptInfo& coveragePOI, bool doesStencilWrite, GrColor* overrideColor, - const GrDrawTargetCaps& caps) SK_OVERRIDE; + const GrDrawTargetCaps& caps) override; - void getBlendInfo(GrXferProcessor::BlendInfo* blendInfo) const SK_OVERRIDE { + void getBlendInfo(GrXferProcessor::BlendInfo* blendInfo) const override { blendInfo->fSrcBlend = kOne_GrBlendCoeff; blendInfo->fDstBlend = kZero_GrBlendCoeff; blendInfo->fBlendConstant = 0; @@ -520,9 +520,9 @@ public: private: CustomXP(SkXfermode::Mode mode, const GrDeviceCoordTexture* dstCopy, bool willReadDstColor); - void onGetGLProcessorKey(const GrGLCaps& caps, GrProcessorKeyBuilder* b) const SK_OVERRIDE; + void onGetGLProcessorKey(const GrGLCaps& caps, GrProcessorKeyBuilder* b) const override; - bool onIsEqual(const GrXferProcessor& xpBase) const SK_OVERRIDE; + bool onIsEqual(const GrXferProcessor& xpBase) const override; SkXfermode::Mode fMode; @@ -544,7 +544,7 @@ GrXPFactory* GrCustomXfermode::CreateXPFactory(SkXfermode::Mode mode) { class GLCustomXP : public GrGLXferProcessor { public: GLCustomXP(const GrXferProcessor&) {} - ~GLCustomXP() SK_OVERRIDE {} + ~GLCustomXP() override {} static void GenKey(const GrXferProcessor& proc, const GrGLCaps&, GrProcessorKeyBuilder* b) { uint32_t key = proc.numTextures(); @@ -554,7 +554,7 @@ public: } private: - void onEmitCode(const EmitArgs& args) SK_OVERRIDE { + void onEmitCode(const EmitArgs& args) override { SkXfermode::Mode mode = args.fXP.cast().mode(); GrGLFPFragmentBuilder* fsBuilder = args.fPB->getFragmentShaderBuilder(); const char* dstColor = fsBuilder->dstColor(); @@ -566,7 +566,7 @@ private: args.fInputCoverage, dstColor); } - void onSetData(const GrGLProgramDataManager&, const GrXferProcessor&) SK_OVERRIDE {} + void onSetData(const GrGLProgramDataManager&, const GrXferProcessor&) override {} typedef GrGLFragmentProcessor INHERITED; }; diff --git a/src/gpu/effects/GrCustomXfermodePriv.h b/src/gpu/effects/GrCustomXfermodePriv.h index 85092a9892..98883e04fa 100644 --- a/src/gpu/effects/GrCustomXfermodePriv.h +++ b/src/gpu/effects/GrCustomXfermodePriv.h @@ -29,19 +29,19 @@ class GrCustomXferFP : public GrFragmentProcessor { public: GrCustomXferFP(SkXfermode::Mode mode, GrTexture* background); - void getGLProcessorKey(const GrGLCaps& caps, GrProcessorKeyBuilder* b) const SK_OVERRIDE; + void getGLProcessorKey(const GrGLCaps& caps, GrProcessorKeyBuilder* b) const override; - GrGLFragmentProcessor* createGLInstance() const SK_OVERRIDE; + GrGLFragmentProcessor* createGLInstance() const override; - const char* name() const SK_OVERRIDE { return "Custom Xfermode"; } + const char* name() const override { return "Custom Xfermode"; } SkXfermode::Mode mode() const { return fMode; } const GrTextureAccess& backgroundAccess() const { return fBackgroundAccess; } private: - bool onIsEqual(const GrFragmentProcessor& other) const SK_OVERRIDE; + bool onIsEqual(const GrFragmentProcessor& other) const override; - void onComputeInvariantOutput(GrInvariantOutput* inout) const SK_OVERRIDE; + void onComputeInvariantOutput(GrInvariantOutput* inout) const override; GR_DECLARE_FRAGMENT_PROCESSOR_TEST; @@ -60,30 +60,30 @@ class GrCustomXPFactory : public GrXPFactory { public: GrCustomXPFactory(SkXfermode::Mode mode); - bool supportsRGBCoverage(GrColor knownColor, uint32_t knownColorFlags) const SK_OVERRIDE { + bool supportsRGBCoverage(GrColor knownColor, uint32_t knownColorFlags) const override { return true; } - bool canTweakAlphaForCoverage() const SK_OVERRIDE { + bool canTweakAlphaForCoverage() const override { return false; } void getInvariantOutput(const GrProcOptInfo& colorPOI, const GrProcOptInfo& coveragePOI, - GrXPFactory::InvariantOutput*) const SK_OVERRIDE; + GrXPFactory::InvariantOutput*) const override; private: GrXferProcessor* onCreateXferProcessor(const GrDrawTargetCaps& caps, const GrProcOptInfo& colorPOI, const GrProcOptInfo& coveragePOI, - const GrDeviceCoordTexture* dstCopy) const SK_OVERRIDE; + const GrDeviceCoordTexture* dstCopy) const override; bool willReadDstColor(const GrDrawTargetCaps& caps, const GrProcOptInfo& colorPOI, - const GrProcOptInfo& coveragePOI) const SK_OVERRIDE { + const GrProcOptInfo& coveragePOI) const override { return true; } - bool onIsEqual(const GrXPFactory& xpfBase) const SK_OVERRIDE { + bool onIsEqual(const GrXPFactory& xpfBase) const override { const GrCustomXPFactory& xpf = xpfBase.cast(); return fMode == xpf.fMode; } diff --git a/src/gpu/effects/GrDashingEffect.cpp b/src/gpu/effects/GrDashingEffect.cpp index eb0467cef4..a64cf5b130 100644 --- a/src/gpu/effects/GrDashingEffect.cpp +++ b/src/gpu/effects/GrDashingEffect.cpp @@ -257,17 +257,17 @@ public: return SkNEW_ARGS(DashBatch, (geometry, cap, useAA, fullDash)); } - const char* name() const SK_OVERRIDE { return "DashBatch"; } + const char* name() const override { return "DashBatch"; } - void getInvariantOutputColor(GrInitInvariantOutput* out) const SK_OVERRIDE { + void getInvariantOutputColor(GrInitInvariantOutput* out) const override { // When this is called on a batch, there is only one geometry bundle out->setKnownFourComponents(fGeoData[0].fColor); } - void getInvariantOutputCoverage(GrInitInvariantOutput* out) const SK_OVERRIDE { + void getInvariantOutputCoverage(GrInitInvariantOutput* out) const override { out->setUnknownSingleComponent(); } - void initBatchTracker(const GrPipelineInfo& init) SK_OVERRIDE { + void initBatchTracker(const GrPipelineInfo& init) override { // Handle any color overrides if (init.fColorIgnored) { fGeoData[0].fColor = GrColor_ILLEGAL; @@ -293,7 +293,7 @@ public: bool fHasEndRect; }; - void generateGeometry(GrBatchTarget* batchTarget, const GrPipeline* pipeline) SK_OVERRIDE { + void generateGeometry(GrBatchTarget* batchTarget, const GrPipeline* pipeline) override { int instanceCount = fGeoData.count(); SkMatrix invert; @@ -633,7 +633,7 @@ private: fBatch.fFullDash = fullDash; } - bool onCombineIfPossible(GrBatch* t) SK_OVERRIDE { + bool onCombineIfPossible(GrBatch* t) override { DashBatch* that = t->cast(); if (this->useAA() != that->useAA()) { @@ -775,7 +775,7 @@ public: virtual ~DashingCircleEffect(); - const char* name() const SK_OVERRIDE { return "DashingCircleEffect"; } + const char* name() const override { return "DashingCircleEffect"; } const Attribute* inPosition() const { return fInPosition; } @@ -787,23 +787,23 @@ public: virtual void getGLProcessorKey(const GrBatchTracker&, const GrGLCaps&, - GrProcessorKeyBuilder* b) const SK_OVERRIDE; + GrProcessorKeyBuilder* b) const override; virtual GrGLPrimitiveProcessor* createGLInstance(const GrBatchTracker&, - const GrGLCaps&) const SK_OVERRIDE; + const GrGLCaps&) const override; - void initBatchTracker(GrBatchTracker* bt, const GrPipelineInfo& init) const SK_OVERRIDE; + void initBatchTracker(GrBatchTracker* bt, const GrPipelineInfo& init) const override; bool onCanMakeEqual(const GrBatchTracker&, const GrGeometryProcessor&, - const GrBatchTracker&) const SK_OVERRIDE; + const GrBatchTracker&) const override; private: DashingCircleEffect(GrColor, GrPrimitiveEdgeType edgeType, const SkMatrix& localMatrix); - bool onIsEqual(const GrGeometryProcessor& other) const SK_OVERRIDE; + bool onIsEqual(const GrGeometryProcessor& other) const override; - void onGetInvariantOutputCoverage(GrInitInvariantOutput*) const SK_OVERRIDE; + void onGetInvariantOutputCoverage(GrInitInvariantOutput*) const override; GrPrimitiveEdgeType fEdgeType; const Attribute* fInPosition; @@ -821,7 +821,7 @@ class GLDashingCircleEffect : public GrGLGeometryProcessor { public: GLDashingCircleEffect(const GrGeometryProcessor&, const GrBatchTracker&); - void onEmitCode(EmitArgs&, GrGPArgs*) SK_OVERRIDE; + void onEmitCode(EmitArgs&, GrGPArgs*) override; static inline void GenKey(const GrGeometryProcessor&, const GrBatchTracker&, @@ -830,7 +830,7 @@ public: virtual void setData(const GrGLProgramDataManager&, const GrPrimitiveProcessor&, - const GrBatchTracker&) SK_OVERRIDE; + const GrBatchTracker&) override; private: UniformHandle fParamUniform; @@ -1024,7 +1024,7 @@ public: virtual ~DashingLineEffect(); - const char* name() const SK_OVERRIDE { return "DashingEffect"; } + const char* name() const override { return "DashingEffect"; } const Attribute* inPosition() const { return fInPosition; } @@ -1036,23 +1036,23 @@ public: virtual void getGLProcessorKey(const GrBatchTracker& bt, const GrGLCaps& caps, - GrProcessorKeyBuilder* b) const SK_OVERRIDE; + GrProcessorKeyBuilder* b) const override; virtual GrGLPrimitiveProcessor* createGLInstance(const GrBatchTracker& bt, - const GrGLCaps&) const SK_OVERRIDE; + const GrGLCaps&) const override; - void initBatchTracker(GrBatchTracker* bt, const GrPipelineInfo& init) const SK_OVERRIDE; + void initBatchTracker(GrBatchTracker* bt, const GrPipelineInfo& init) const override; bool onCanMakeEqual(const GrBatchTracker&, const GrGeometryProcessor&, - const GrBatchTracker&) const SK_OVERRIDE; + const GrBatchTracker&) const override; private: DashingLineEffect(GrColor, GrPrimitiveEdgeType edgeType, const SkMatrix& localMatrix); - bool onIsEqual(const GrGeometryProcessor& other) const SK_OVERRIDE; + bool onIsEqual(const GrGeometryProcessor& other) const override; - void onGetInvariantOutputCoverage(GrInitInvariantOutput*) const SK_OVERRIDE; + void onGetInvariantOutputCoverage(GrInitInvariantOutput*) const override; GrPrimitiveEdgeType fEdgeType; const Attribute* fInPosition; @@ -1070,7 +1070,7 @@ class GLDashingLineEffect : public GrGLGeometryProcessor { public: GLDashingLineEffect(const GrGeometryProcessor&, const GrBatchTracker&); - void onEmitCode(EmitArgs&, GrGPArgs*) SK_OVERRIDE; + void onEmitCode(EmitArgs&, GrGPArgs*) override; static inline void GenKey(const GrGeometryProcessor&, const GrBatchTracker&, @@ -1079,7 +1079,7 @@ public: virtual void setData(const GrGLProgramDataManager&, const GrPrimitiveProcessor&, - const GrBatchTracker&) SK_OVERRIDE; + const GrBatchTracker&) override; private: GrColor fColor; diff --git a/src/gpu/effects/GrDisableColorXP.cpp b/src/gpu/effects/GrDisableColorXP.cpp index d97589dcb6..776d804fd2 100644 --- a/src/gpu/effects/GrDisableColorXP.cpp +++ b/src/gpu/effects/GrDisableColorXP.cpp @@ -21,30 +21,30 @@ public: return SkNEW(DisableColorXP); } - ~DisableColorXP() SK_OVERRIDE {}; + ~DisableColorXP() override {}; - const char* name() const SK_OVERRIDE { return "Disable Color"; } + const char* name() const override { return "Disable Color"; } - GrGLXferProcessor* createGLInstance() const SK_OVERRIDE; + GrGLXferProcessor* createGLInstance() const override; - bool hasSecondaryOutput() const SK_OVERRIDE { return false; } + bool hasSecondaryOutput() const override { return false; } GrXferProcessor::OptFlags getOptimizations(const GrProcOptInfo& colorPOI, const GrProcOptInfo& coveragePOI, bool doesStencilWrite, GrColor* color, - const GrDrawTargetCaps& caps) SK_OVERRIDE { + const GrDrawTargetCaps& caps) override { return GrXferProcessor::kIgnoreColor_OptFlag | GrXferProcessor::kIgnoreCoverage_OptFlag; } - void getBlendInfo(GrXferProcessor::BlendInfo* blendInfo) const SK_OVERRIDE; + void getBlendInfo(GrXferProcessor::BlendInfo* blendInfo) const override; private: DisableColorXP(); - void onGetGLProcessorKey(const GrGLCaps& caps, GrProcessorKeyBuilder* b) const SK_OVERRIDE; + void onGetGLProcessorKey(const GrGLCaps& caps, GrProcessorKeyBuilder* b) const override; - bool onIsEqual(const GrXferProcessor& xpBase) const SK_OVERRIDE { + bool onIsEqual(const GrXferProcessor& xpBase) const override { return true; } @@ -57,12 +57,12 @@ class GLDisableColorXP : public GrGLXferProcessor { public: GLDisableColorXP(const GrProcessor&) {} - ~GLDisableColorXP() SK_OVERRIDE {} + ~GLDisableColorXP() override {} static void GenKey(const GrProcessor&, const GrGLCaps&, GrProcessorKeyBuilder*) {} private: - void onEmitCode(const EmitArgs& args) SK_OVERRIDE { + void onEmitCode(const EmitArgs& args) override { // This emit code should be empty. However, on the nexus 6 there is a driver bug where if // you do not give gl_FragColor a value, the gl context is lost and we end up drawing // nothing. So this fix just sets the gl_FragColor arbitrarily to 0. @@ -70,7 +70,7 @@ private: fsBuilder->codeAppendf("%s = vec4(0);", args.fOutputPrimary); } - void onSetData(const GrGLProgramDataManager&, const GrXferProcessor&) SK_OVERRIDE {} + void onSetData(const GrGLProgramDataManager&, const GrXferProcessor&) override {} typedef GrGLXferProcessor INHERITED; }; diff --git a/src/gpu/effects/GrDisableColorXP.h b/src/gpu/effects/GrDisableColorXP.h index fb855ee520..9bbe24d757 100644 --- a/src/gpu/effects/GrDisableColorXP.h +++ b/src/gpu/effects/GrDisableColorXP.h @@ -19,14 +19,14 @@ public: return SkNEW(GrDisableColorXPFactory); } - bool supportsRGBCoverage(GrColor knownColor, uint32_t knownColorFlags) const SK_OVERRIDE { + bool supportsRGBCoverage(GrColor knownColor, uint32_t knownColorFlags) const override { return true; } - bool canTweakAlphaForCoverage() const SK_OVERRIDE { return true; } + bool canTweakAlphaForCoverage() const override { return true; } void getInvariantOutput(const GrProcOptInfo& colorPOI, const GrProcOptInfo& coveragePOI, - GrXPFactory::InvariantOutput* output) const SK_OVERRIDE { + GrXPFactory::InvariantOutput* output) const override { output->fBlendedColorFlags = 0; output->fWillBlendWithDst = 0; } @@ -37,15 +37,15 @@ private: GrXferProcessor* onCreateXferProcessor(const GrDrawTargetCaps& caps, const GrProcOptInfo& colorPOI, const GrProcOptInfo& coveragePOI, - const GrDeviceCoordTexture* dstCopy) const SK_OVERRIDE; + const GrDeviceCoordTexture* dstCopy) const override; bool willReadDstColor(const GrDrawTargetCaps& caps, const GrProcOptInfo& colorPOI, - const GrProcOptInfo& coveragePOI) const SK_OVERRIDE { + const GrProcOptInfo& coveragePOI) const override { return false; } - bool onIsEqual(const GrXPFactory& xpfBase) const SK_OVERRIDE { + bool onIsEqual(const GrXPFactory& xpfBase) const override { return true; } diff --git a/src/gpu/effects/GrDistanceFieldTextureEffect.cpp b/src/gpu/effects/GrDistanceFieldTextureEffect.cpp index 2309edf064..0acf1f324a 100755 --- a/src/gpu/effects/GrDistanceFieldTextureEffect.cpp +++ b/src/gpu/effects/GrDistanceFieldTextureEffect.cpp @@ -35,7 +35,7 @@ public: #endif {} - void onEmitCode(EmitArgs& args, GrGPArgs* gpArgs) SK_OVERRIDE{ + void onEmitCode(EmitArgs& args, GrGPArgs* gpArgs) override{ const GrDistanceFieldTextureEffect& dfTexEffect = args.fGP.cast(); const DistanceFieldBatchTracker& local = args.fBT.cast(); @@ -139,7 +139,7 @@ public: virtual void setData(const GrGLProgramDataManager& pdman, const GrPrimitiveProcessor& proc, - const GrBatchTracker& bt) SK_OVERRIDE { + const GrBatchTracker& bt) override { #ifdef SK_GAMMA_APPLY_TO_A8 const GrDistanceFieldTextureEffect& dfTexEffect = proc.cast(); @@ -319,7 +319,7 @@ public: const GrBatchTracker&) : fColor(GrColor_ILLEGAL), fTextureSize(SkISize::Make(-1, -1)) {} - void onEmitCode(EmitArgs& args, GrGPArgs* gpArgs) SK_OVERRIDE{ + void onEmitCode(EmitArgs& args, GrGPArgs* gpArgs) override{ const GrDistanceFieldNoGammaTextureEffect& dfTexEffect = args.fGP.cast(); @@ -409,7 +409,7 @@ public: virtual void setData(const GrGLProgramDataManager& pdman, const GrPrimitiveProcessor& proc, - const GrBatchTracker& bt) SK_OVERRIDE { + const GrBatchTracker& bt) override { SkASSERT(fTextureSizeUni.isValid()); GrTexture* texture = proc.texture(0); @@ -566,7 +566,7 @@ public: : fColor(GrColor_ILLEGAL) , fTextColor(GrColor_ILLEGAL) {} - void onEmitCode(EmitArgs& args, GrGPArgs* gpArgs) SK_OVERRIDE{ + void onEmitCode(EmitArgs& args, GrGPArgs* gpArgs) override{ const GrDistanceFieldLCDTextureEffect& dfTexEffect = args.fGP.cast(); const DistanceFieldLCDBatchTracker& local = args.fBT.cast(); @@ -713,7 +713,7 @@ public: virtual void setData(const GrGLProgramDataManager& pdman, const GrPrimitiveProcessor& processor, - const GrBatchTracker& bt) SK_OVERRIDE { + const GrBatchTracker& bt) override { SkASSERT(fTextColorUni.isValid()); const GrDistanceFieldLCDTextureEffect& dfTexEffect = diff --git a/src/gpu/effects/GrDistanceFieldTextureEffect.h b/src/gpu/effects/GrDistanceFieldTextureEffect.h index 33209a5254..e05af7684c 100644 --- a/src/gpu/effects/GrDistanceFieldTextureEffect.h +++ b/src/gpu/effects/GrDistanceFieldTextureEffect.h @@ -66,7 +66,7 @@ public: virtual ~GrDistanceFieldTextureEffect() {} - const char* name() const SK_OVERRIDE { return "DistanceFieldTexture"; } + const char* name() const override { return "DistanceFieldTexture"; } const Attribute* inPosition() const { return fInPosition; } const Attribute* inColor() const { return fInColor; } @@ -78,16 +78,16 @@ public: virtual void getGLProcessorKey(const GrBatchTracker& bt, const GrGLCaps& caps, - GrProcessorKeyBuilder* b) const SK_OVERRIDE; + GrProcessorKeyBuilder* b) const override; virtual GrGLPrimitiveProcessor* createGLInstance(const GrBatchTracker& bt, - const GrGLCaps&) const SK_OVERRIDE; + const GrGLCaps&) const override; - void initBatchTracker(GrBatchTracker* bt, const GrPipelineInfo& init) const SK_OVERRIDE; + void initBatchTracker(GrBatchTracker* bt, const GrPipelineInfo& init) const override; bool onCanMakeEqual(const GrBatchTracker&, const GrGeometryProcessor&, - const GrBatchTracker&) const SK_OVERRIDE; + const GrBatchTracker&) const override; private: GrDistanceFieldTextureEffect(GrColor, const SkMatrix& viewMatrix, GrTexture* texture, @@ -97,9 +97,9 @@ private: #endif uint32_t flags, bool opaqueVertexColors); - bool onIsEqual(const GrGeometryProcessor& other) const SK_OVERRIDE; + bool onIsEqual(const GrGeometryProcessor& other) const override; - void onGetInvariantOutputCoverage(GrInitInvariantOutput*) const SK_OVERRIDE; + void onGetInvariantOutputCoverage(GrInitInvariantOutput*) const override; GrTextureAccess fTextureAccess; #ifdef SK_GAMMA_APPLY_TO_A8 @@ -134,7 +134,7 @@ public: virtual ~GrDistanceFieldNoGammaTextureEffect() {} - const char* name() const SK_OVERRIDE { return "DistanceFieldTexture"; } + const char* name() const override { return "DistanceFieldTexture"; } const Attribute* inPosition() const { return fInPosition; } const Attribute* inColor() const { return fInColor; } @@ -143,25 +143,25 @@ public: virtual void getGLProcessorKey(const GrBatchTracker& bt, const GrGLCaps& caps, - GrProcessorKeyBuilder* b) const SK_OVERRIDE; + GrProcessorKeyBuilder* b) const override; virtual GrGLPrimitiveProcessor* createGLInstance(const GrBatchTracker& bt, - const GrGLCaps&) const SK_OVERRIDE; + const GrGLCaps&) const override; - void initBatchTracker(GrBatchTracker* bt, const GrPipelineInfo& init) const SK_OVERRIDE; + void initBatchTracker(GrBatchTracker* bt, const GrPipelineInfo& init) const override; bool onCanMakeEqual(const GrBatchTracker&, const GrGeometryProcessor&, - const GrBatchTracker&) const SK_OVERRIDE; + const GrBatchTracker&) const override; private: GrDistanceFieldNoGammaTextureEffect(GrColor, const SkMatrix& viewMatrix, GrTexture* texture, const GrTextureParams& params, uint32_t flags, bool opaqueVertexColors); - bool onIsEqual(const GrGeometryProcessor& other) const SK_OVERRIDE; + bool onIsEqual(const GrGeometryProcessor& other) const override; - void onGetInvariantOutputCoverage(GrInitInvariantOutput*) const SK_OVERRIDE; + void onGetInvariantOutputCoverage(GrInitInvariantOutput*) const override; GrTextureAccess fTextureAccess; uint32_t fFlags; @@ -192,7 +192,7 @@ public: virtual ~GrDistanceFieldLCDTextureEffect() {} - const char* name() const SK_OVERRIDE { return "DistanceFieldLCDTexture"; } + const char* name() const override { return "DistanceFieldLCDTexture"; } const Attribute* inPosition() const { return fInPosition; } const Attribute* inTextureCoords() const { return fInTextureCoords; } @@ -201,16 +201,16 @@ public: virtual void getGLProcessorKey(const GrBatchTracker& bt, const GrGLCaps& caps, - GrProcessorKeyBuilder* b) const SK_OVERRIDE; + GrProcessorKeyBuilder* b) const override; virtual GrGLPrimitiveProcessor* createGLInstance(const GrBatchTracker& bt, - const GrGLCaps&) const SK_OVERRIDE; + const GrGLCaps&) const override; - void initBatchTracker(GrBatchTracker* bt, const GrPipelineInfo& init) const SK_OVERRIDE; + void initBatchTracker(GrBatchTracker* bt, const GrPipelineInfo& init) const override; bool onCanMakeEqual(const GrBatchTracker&, const GrGeometryProcessor&, - const GrBatchTracker&) const SK_OVERRIDE; + const GrBatchTracker&) const override; private: GrDistanceFieldLCDTextureEffect(GrColor, const SkMatrix& viewMatrix, GrTexture* texture, @@ -218,9 +218,9 @@ private: GrTexture* gamma, const GrTextureParams& gammaParams, SkColor textColor, uint32_t flags); - bool onIsEqual(const GrGeometryProcessor& other) const SK_OVERRIDE; + bool onIsEqual(const GrGeometryProcessor& other) const override; - void onGetInvariantOutputCoverage(GrInitInvariantOutput*) const SK_OVERRIDE; + void onGetInvariantOutputCoverage(GrInitInvariantOutput*) const override; GrTextureAccess fTextureAccess; GrTextureAccess fGammaTextureAccess; diff --git a/src/gpu/effects/GrDitherEffect.cpp b/src/gpu/effects/GrDitherEffect.cpp index 5e73e3bf50..3a962b02f4 100644 --- a/src/gpu/effects/GrDitherEffect.cpp +++ b/src/gpu/effects/GrDitherEffect.cpp @@ -24,11 +24,11 @@ public: virtual ~DitherEffect() {}; - const char* name() const SK_OVERRIDE { return "Dither"; } + const char* name() const override { return "Dither"; } - void getGLProcessorKey(const GrGLCaps&, GrProcessorKeyBuilder*) const SK_OVERRIDE; + void getGLProcessorKey(const GrGLCaps&, GrProcessorKeyBuilder*) const override; - GrGLFragmentProcessor* createGLInstance() const SK_OVERRIDE; + GrGLFragmentProcessor* createGLInstance() const override; private: DitherEffect() { @@ -37,9 +37,9 @@ private: } // All dither effects are equal - bool onIsEqual(const GrFragmentProcessor&) const SK_OVERRIDE { return true; } + bool onIsEqual(const GrFragmentProcessor&) const override { return true; } - void onComputeInvariantOutput(GrInvariantOutput* inout) const SK_OVERRIDE; + void onComputeInvariantOutput(GrInvariantOutput* inout) const override; GR_DECLARE_FRAGMENT_PROCESSOR_TEST; @@ -72,7 +72,7 @@ public: const char* outputColor, const char* inputColor, const TransformedCoordsArray&, - const TextureSamplerArray&) SK_OVERRIDE; + const TextureSamplerArray&) override; private: typedef GrGLFragmentProcessor INHERITED; diff --git a/src/gpu/effects/GrMatrixConvolutionEffect.cpp b/src/gpu/effects/GrMatrixConvolutionEffect.cpp index c1949737a2..cd6d7c1f86 100644 --- a/src/gpu/effects/GrMatrixConvolutionEffect.cpp +++ b/src/gpu/effects/GrMatrixConvolutionEffect.cpp @@ -18,11 +18,11 @@ public: const char* outputColor, const char* inputColor, const TransformedCoordsArray&, - const TextureSamplerArray&) SK_OVERRIDE; + const TextureSamplerArray&) override; static inline void GenKey(const GrProcessor&, const GrGLCaps&, GrProcessorKeyBuilder*); - void setData(const GrGLProgramDataManager&, const GrProcessor&) SK_OVERRIDE; + void setData(const GrGLProgramDataManager&, const GrProcessor&) override; private: typedef GrGLProgramDataManager::UniformHandle UniformHandle; diff --git a/src/gpu/effects/GrMatrixConvolutionEffect.h b/src/gpu/effects/GrMatrixConvolutionEffect.h index 8f92175fae..33d4141da6 100644 --- a/src/gpu/effects/GrMatrixConvolutionEffect.h +++ b/src/gpu/effects/GrMatrixConvolutionEffect.h @@ -60,11 +60,11 @@ public: bool convolveAlpha() const { return fConvolveAlpha; } const GrTextureDomain& domain() const { return fDomain; } - const char* name() const SK_OVERRIDE { return "MatrixConvolution"; } + const char* name() const override { return "MatrixConvolution"; } - void getGLProcessorKey(const GrGLCaps&, GrProcessorKeyBuilder*) const SK_OVERRIDE; + void getGLProcessorKey(const GrGLCaps&, GrProcessorKeyBuilder*) const override; - GrGLFragmentProcessor* createGLInstance() const SK_OVERRIDE; + GrGLFragmentProcessor* createGLInstance() const override; private: GrMatrixConvolutionEffect(GrTexture*, @@ -77,9 +77,9 @@ private: GrTextureDomain::Mode tileMode, bool convolveAlpha); - bool onIsEqual(const GrFragmentProcessor&) const SK_OVERRIDE; + bool onIsEqual(const GrFragmentProcessor&) const override; - void onComputeInvariantOutput(GrInvariantOutput* inout) const SK_OVERRIDE { + void onComputeInvariantOutput(GrInvariantOutput* inout) const override { // TODO: Try to do better? inout->mulByUnknownFourComponents(); } diff --git a/src/gpu/effects/GrOvalEffect.cpp b/src/gpu/effects/GrOvalEffect.cpp index 314b000819..0adbb67b9c 100644 --- a/src/gpu/effects/GrOvalEffect.cpp +++ b/src/gpu/effects/GrOvalEffect.cpp @@ -22,11 +22,11 @@ public: virtual ~CircleEffect() {}; - const char* name() const SK_OVERRIDE { return "Circle"; } + const char* name() const override { return "Circle"; } - void getGLProcessorKey(const GrGLCaps&, GrProcessorKeyBuilder*) const SK_OVERRIDE; + void getGLProcessorKey(const GrGLCaps&, GrProcessorKeyBuilder*) const override; - GrGLFragmentProcessor* createGLInstance() const SK_OVERRIDE; + GrGLFragmentProcessor* createGLInstance() const override; const SkPoint& getCenter() const { return fCenter; } SkScalar getRadius() const { return fRadius; } @@ -36,9 +36,9 @@ public: private: CircleEffect(GrPrimitiveEdgeType, const SkPoint& center, SkScalar radius); - bool onIsEqual(const GrFragmentProcessor&) const SK_OVERRIDE; + bool onIsEqual(const GrFragmentProcessor&) const override; - void onComputeInvariantOutput(GrInvariantOutput* inout) const SK_OVERRIDE; + void onComputeInvariantOutput(GrInvariantOutput* inout) const override; SkPoint fCenter; SkScalar fRadius; @@ -102,11 +102,11 @@ public: const char* outputColor, const char* inputColor, const TransformedCoordsArray&, - const TextureSamplerArray&) SK_OVERRIDE; + const TextureSamplerArray&) override; static inline void GenKey(const GrProcessor&, const GrGLCaps&, GrProcessorKeyBuilder*); - void setData(const GrGLProgramDataManager&, const GrProcessor&) SK_OVERRIDE; + void setData(const GrGLProgramDataManager&, const GrProcessor&) override; private: GrGLProgramDataManager::UniformHandle fCircleUniform; @@ -197,11 +197,11 @@ public: virtual ~EllipseEffect() {}; - const char* name() const SK_OVERRIDE { return "Ellipse"; } + const char* name() const override { return "Ellipse"; } - void getGLProcessorKey(const GrGLCaps&, GrProcessorKeyBuilder*) const SK_OVERRIDE; + void getGLProcessorKey(const GrGLCaps&, GrProcessorKeyBuilder*) const override; - GrGLFragmentProcessor* createGLInstance() const SK_OVERRIDE; + GrGLFragmentProcessor* createGLInstance() const override; const SkPoint& getCenter() const { return fCenter; } SkVector getRadii() const { return fRadii; } @@ -211,9 +211,9 @@ public: private: EllipseEffect(GrPrimitiveEdgeType, const SkPoint& center, SkScalar rx, SkScalar ry); - bool onIsEqual(const GrFragmentProcessor&) const SK_OVERRIDE; + bool onIsEqual(const GrFragmentProcessor&) const override; - void onComputeInvariantOutput(GrInvariantOutput* inout) const SK_OVERRIDE; + void onComputeInvariantOutput(GrInvariantOutput* inout) const override; SkPoint fCenter; SkVector fRadii; @@ -280,11 +280,11 @@ public: const char* outputColor, const char* inputColor, const TransformedCoordsArray&, - const TextureSamplerArray&) SK_OVERRIDE; + const TextureSamplerArray&) override; static inline void GenKey(const GrProcessor&, const GrGLCaps&, GrProcessorKeyBuilder*); - void setData(const GrGLProgramDataManager&, const GrProcessor&) SK_OVERRIDE; + void setData(const GrGLProgramDataManager&, const GrProcessor&) override; private: GrGLProgramDataManager::UniformHandle fEllipseUniform; diff --git a/src/gpu/effects/GrPorterDuffXferProcessor.cpp b/src/gpu/effects/GrPorterDuffXferProcessor.cpp index 4453c8935d..2735ac3c22 100644 --- a/src/gpu/effects/GrPorterDuffXferProcessor.cpp +++ b/src/gpu/effects/GrPorterDuffXferProcessor.cpp @@ -41,13 +41,13 @@ public: willReadDstColor)); } - ~PorterDuffXferProcessor() SK_OVERRIDE; + ~PorterDuffXferProcessor() override; - const char* name() const SK_OVERRIDE { return "Porter Duff"; } + const char* name() const override { return "Porter Duff"; } - GrGLXferProcessor* createGLInstance() const SK_OVERRIDE; + GrGLXferProcessor* createGLInstance() const override; - bool hasSecondaryOutput() const SK_OVERRIDE; + bool hasSecondaryOutput() const override; /////////////////////////////////////////////////////////////////////////// /// @name Stage Output Types @@ -88,9 +88,9 @@ public: const GrProcOptInfo& coveragePOI, bool doesStencilWrite, GrColor* overrideColor, - const GrDrawTargetCaps& caps) SK_OVERRIDE; + const GrDrawTargetCaps& caps) override; - void getBlendInfo(GrXferProcessor::BlendInfo* blendInfo) const SK_OVERRIDE { + void getBlendInfo(GrXferProcessor::BlendInfo* blendInfo) const override { if (!this->willReadDstColor()) { blendInfo->fSrcBlend = fSrcBlend; blendInfo->fDstBlend = fDstBlend; @@ -108,9 +108,9 @@ private: PorterDuffXferProcessor(GrBlendCoeff srcBlend, GrBlendCoeff dstBlend, GrColor constant, const GrDeviceCoordTexture* dstCopy, bool willReadDstColor); - void onGetGLProcessorKey(const GrGLCaps& caps, GrProcessorKeyBuilder* b) const SK_OVERRIDE; + void onGetGLProcessorKey(const GrGLCaps& caps, GrProcessorKeyBuilder* b) const override; - bool onIsEqual(const GrXferProcessor& xpBase) const SK_OVERRIDE { + bool onIsEqual(const GrXferProcessor& xpBase) const override { const PorterDuffXferProcessor& xp = xpBase.cast(); if (fSrcBlend != xp.fSrcBlend || fDstBlend != xp.fDstBlend || @@ -202,7 +202,7 @@ public: }; private: - void onEmitCode(const EmitArgs& args) SK_OVERRIDE { + void onEmitCode(const EmitArgs& args) override { const PorterDuffXferProcessor& xp = args.fXP.cast(); GrGLFPFragmentBuilder* fsBuilder = args.fPB->getFragmentShaderBuilder(); if (PorterDuffXferProcessor::kCustom_PrimaryOutputType != xp.primaryOutputType()) { @@ -267,7 +267,7 @@ private: } } - void onSetData(const GrGLProgramDataManager&, const GrXferProcessor&) SK_OVERRIDE {}; + void onSetData(const GrGLProgramDataManager&, const GrXferProcessor&) override {}; typedef GrGLXferProcessor INHERITED; }; diff --git a/src/gpu/effects/GrRRectEffect.cpp b/src/gpu/effects/GrRRectEffect.cpp index 2cc0651f41..24d5077d48 100644 --- a/src/gpu/effects/GrRRectEffect.cpp +++ b/src/gpu/effects/GrRRectEffect.cpp @@ -48,11 +48,11 @@ public: virtual ~CircularRRectEffect() {}; - const char* name() const SK_OVERRIDE { return "CircularRRect"; } + const char* name() const override { return "CircularRRect"; } - void getGLProcessorKey(const GrGLCaps&, GrProcessorKeyBuilder*) const SK_OVERRIDE; + void getGLProcessorKey(const GrGLCaps&, GrProcessorKeyBuilder*) const override; - GrGLFragmentProcessor* createGLInstance() const SK_OVERRIDE; + GrGLFragmentProcessor* createGLInstance() const override; const SkRRect& getRRect() const { return fRRect; } @@ -63,9 +63,9 @@ public: private: CircularRRectEffect(GrPrimitiveEdgeType, uint32_t circularCornerFlags, const SkRRect&); - bool onIsEqual(const GrFragmentProcessor& other) const SK_OVERRIDE; + bool onIsEqual(const GrFragmentProcessor& other) const override; - void onComputeInvariantOutput(GrInvariantOutput* inout) const SK_OVERRIDE; + void onComputeInvariantOutput(GrInvariantOutput* inout) const override; SkRRect fRRect; GrPrimitiveEdgeType fEdgeType; @@ -137,11 +137,11 @@ public: const char* outputColor, const char* inputColor, const TransformedCoordsArray&, - const TextureSamplerArray&) SK_OVERRIDE; + const TextureSamplerArray&) override; static inline void GenKey(const GrProcessor&, const GrGLCaps&, GrProcessorKeyBuilder*); - void setData(const GrGLProgramDataManager&, const GrProcessor&) SK_OVERRIDE; + void setData(const GrGLProgramDataManager&, const GrProcessor&) override; private: GrGLProgramDataManager::UniformHandle fInnerRectUniform; @@ -392,11 +392,11 @@ public: virtual ~EllipticalRRectEffect() {}; - const char* name() const SK_OVERRIDE { return "EllipticalRRect"; } + const char* name() const override { return "EllipticalRRect"; } - void getGLProcessorKey(const GrGLCaps&, GrProcessorKeyBuilder*) const SK_OVERRIDE; + void getGLProcessorKey(const GrGLCaps&, GrProcessorKeyBuilder*) const override; - GrGLFragmentProcessor* createGLInstance() const SK_OVERRIDE; + GrGLFragmentProcessor* createGLInstance() const override; const SkRRect& getRRect() const { return fRRect; } @@ -405,9 +405,9 @@ public: private: EllipticalRRectEffect(GrPrimitiveEdgeType, const SkRRect&); - bool onIsEqual(const GrFragmentProcessor& other) const SK_OVERRIDE; + bool onIsEqual(const GrFragmentProcessor& other) const override; - void onComputeInvariantOutput(GrInvariantOutput* inout) const SK_OVERRIDE; + void onComputeInvariantOutput(GrInvariantOutput* inout) const override; SkRRect fRRect; GrPrimitiveEdgeType fEdgeType; @@ -494,11 +494,11 @@ public: const char* outputColor, const char* inputColor, const TransformedCoordsArray&, - const TextureSamplerArray&) SK_OVERRIDE; + const TextureSamplerArray&) override; static inline void GenKey(const GrProcessor&, const GrGLCaps&, GrProcessorKeyBuilder*); - void setData(const GrGLProgramDataManager&, const GrProcessor&) SK_OVERRIDE; + void setData(const GrGLProgramDataManager&, const GrProcessor&) override; private: GrGLProgramDataManager::UniformHandle fInnerRectUniform; diff --git a/src/gpu/effects/GrSimpleTextureEffect.cpp b/src/gpu/effects/GrSimpleTextureEffect.cpp index 93f7d68249..76eece4af1 100644 --- a/src/gpu/effects/GrSimpleTextureEffect.cpp +++ b/src/gpu/effects/GrSimpleTextureEffect.cpp @@ -23,7 +23,7 @@ public: const char* outputColor, const char* inputColor, const TransformedCoordsArray& coords, - const TextureSamplerArray& samplers) SK_OVERRIDE { + const TextureSamplerArray& samplers) override { GrGLFPFragmentBuilder* fsBuilder = builder->getFragmentShaderBuilder(); fsBuilder->codeAppendf("\t%s = ", outputColor); fsBuilder->appendTextureLookupAndModulate(inputColor, diff --git a/src/gpu/effects/GrSimpleTextureEffect.h b/src/gpu/effects/GrSimpleTextureEffect.h index 8afc23583e..21d0398a73 100644 --- a/src/gpu/effects/GrSimpleTextureEffect.h +++ b/src/gpu/effects/GrSimpleTextureEffect.h @@ -47,11 +47,11 @@ public: virtual ~GrSimpleTextureEffect() {} - const char* name() const SK_OVERRIDE { return "SimpleTexture"; } + const char* name() const override { return "SimpleTexture"; } - void getGLProcessorKey(const GrGLCaps&, GrProcessorKeyBuilder*) const SK_OVERRIDE; + void getGLProcessorKey(const GrGLCaps&, GrProcessorKeyBuilder*) const override; - GrGLFragmentProcessor* createGLInstance() const SK_OVERRIDE; + GrGLFragmentProcessor* createGLInstance() const override; private: GrSimpleTextureEffect(GrTexture* texture, @@ -70,9 +70,9 @@ private: this->initClassID(); } - bool onIsEqual(const GrFragmentProcessor& other) const SK_OVERRIDE { return true; } + bool onIsEqual(const GrFragmentProcessor& other) const override { return true; } - void onComputeInvariantOutput(GrInvariantOutput* inout) const SK_OVERRIDE; + void onComputeInvariantOutput(GrInvariantOutput* inout) const override; GR_DECLARE_FRAGMENT_PROCESSOR_TEST; diff --git a/src/gpu/effects/GrTextureDomain.cpp b/src/gpu/effects/GrTextureDomain.cpp index 9516595e60..d2a8d70455 100644 --- a/src/gpu/effects/GrTextureDomain.cpp +++ b/src/gpu/effects/GrTextureDomain.cpp @@ -174,9 +174,9 @@ public: const char* outputColor, const char* inputColor, const TransformedCoordsArray&, - const TextureSamplerArray&) SK_OVERRIDE; + const TextureSamplerArray&) override; - void setData(const GrGLProgramDataManager&, const GrProcessor&) SK_OVERRIDE; + void setData(const GrGLProgramDataManager&, const GrProcessor&) override; static inline void GenKey(const GrProcessor&, const GrGLCaps&, GrProcessorKeyBuilder*); diff --git a/src/gpu/effects/GrTextureDomain.h b/src/gpu/effects/GrTextureDomain.h index 3d8b5691c4..7efd9f2dee 100644 --- a/src/gpu/effects/GrTextureDomain.h +++ b/src/gpu/effects/GrTextureDomain.h @@ -153,11 +153,11 @@ public: virtual ~GrTextureDomainEffect(); - const char* name() const SK_OVERRIDE { return "TextureDomain"; } + const char* name() const override { return "TextureDomain"; } - void getGLProcessorKey(const GrGLCaps&, GrProcessorKeyBuilder*) const SK_OVERRIDE; + void getGLProcessorKey(const GrGLCaps&, GrProcessorKeyBuilder*) const override; - GrGLFragmentProcessor* createGLInstance() const SK_OVERRIDE; + GrGLFragmentProcessor* createGLInstance() const override; const GrTextureDomain& textureDomain() const { return fTextureDomain; } @@ -172,9 +172,9 @@ private: GrTextureParams::FilterMode, GrCoordSet); - bool onIsEqual(const GrFragmentProcessor&) const SK_OVERRIDE; + bool onIsEqual(const GrFragmentProcessor&) const override; - void onComputeInvariantOutput(GrInvariantOutput* inout) const SK_OVERRIDE; + void onComputeInvariantOutput(GrInvariantOutput* inout) const override; GR_DECLARE_FRAGMENT_PROCESSOR_TEST; diff --git a/src/gpu/effects/GrYUVtoRGBEffect.cpp b/src/gpu/effects/GrYUVtoRGBEffect.cpp index fb69472cca..e92500a29d 100644 --- a/src/gpu/effects/GrYUVtoRGBEffect.cpp +++ b/src/gpu/effects/GrYUVtoRGBEffect.cpp @@ -44,7 +44,7 @@ public: uvFilterMode, colorSpace)); } - const char* name() const SK_OVERRIDE { return "YUV to RGB"; } + const char* name() const override { return "YUV to RGB"; } SkYUVColorSpace getColorSpace() const { return fColorSpace; @@ -65,7 +65,7 @@ public: const char* outputColor, const char* inputColor, const TransformedCoordsArray& coords, - const TextureSamplerArray& samplers) SK_OVERRIDE { + const TextureSamplerArray& samplers) override { GrGLFPFragmentBuilder* fsBuilder = builder->getFragmentShaderBuilder(); const char* yuvMatrix = NULL; @@ -82,7 +82,7 @@ public: } virtual void setData(const GrGLProgramDataManager& pdman, - const GrProcessor& processor) SK_OVERRIDE { + const GrProcessor& processor) override { const YUVtoRGBEffect& yuvEffect = processor.cast(); switch (yuvEffect.getColorSpace()) { case kJPEG_SkYUVColorSpace: @@ -101,11 +101,11 @@ public: }; virtual void getGLProcessorKey(const GrGLCaps& caps, - GrProcessorKeyBuilder* b) const SK_OVERRIDE { + GrProcessorKeyBuilder* b) const override { GLProcessor::GenKey(*this, caps, b); } - GrGLFragmentProcessor* createGLInstance() const SK_OVERRIDE { + GrGLFragmentProcessor* createGLInstance() const override { return SkNEW_ARGS(GLProcessor, (*this)); } @@ -129,12 +129,12 @@ private: this->addTextureAccess(&fVAccess); } - bool onIsEqual(const GrFragmentProcessor& sBase) const SK_OVERRIDE { + bool onIsEqual(const GrFragmentProcessor& sBase) const override { const YUVtoRGBEffect& s = sBase.cast(); return fColorSpace == s.getColorSpace(); } - void onComputeInvariantOutput(GrInvariantOutput* inout) const SK_OVERRIDE { + void onComputeInvariantOutput(GrInvariantOutput* inout) const override { // YUV is opaque inout->setToOther(kA_GrColorComponentFlag, 0xFF << GrColor_SHIFT_A, GrInvariantOutput::kWillNot_ReadInput); diff --git a/src/gpu/gl/GrGLCaps.h b/src/gpu/gl/GrGLCaps.h index e0d2bf6d7c..d81e34b35e 100644 --- a/src/gpu/gl/GrGLCaps.h +++ b/src/gpu/gl/GrGLCaps.h @@ -99,7 +99,7 @@ public: /** * Resets the caps such that nothing is supported. */ - void reset() SK_OVERRIDE; + void reset() override; /** * Initializes the GrGLCaps to the set of features supported in the current @@ -271,7 +271,7 @@ public: /** * Returns a string containing the caps info. */ - SkString dump() const SK_OVERRIDE; + SkString dump() const override; /** * LATC can appear under one of three possible names. In order to know diff --git a/src/gpu/gl/GrGLGeometryProcessor.h b/src/gpu/gl/GrGLGeometryProcessor.h index 2630bde075..45dd177beb 100644 --- a/src/gpu/gl/GrGLGeometryProcessor.h +++ b/src/gpu/gl/GrGLGeometryProcessor.h @@ -20,7 +20,7 @@ class GrGLGPBuilder; class GrGLGeometryProcessor : public GrGLPrimitiveProcessor { public: /* Any general emit code goes in the base class emitCode. Subclasses override onEmitCode */ - void emitCode(EmitArgs&) SK_OVERRIDE; + void emitCode(EmitArgs&) override; void setTransformData(const GrPrimitiveProcessor&, const GrGLProgramDataManager&, diff --git a/src/gpu/gl/GrGLGpu.h b/src/gpu/gl/GrGLGpu.h index c9e280c3cb..f6a48d7589 100644 --- a/src/gpu/gl/GrGLGpu.h +++ b/src/gpu/gl/GrGLGpu.h @@ -32,9 +32,9 @@ class GrPipeline; class GrGLGpu : public GrGpu { public: GrGLGpu(const GrGLContext& ctx, GrContext* context); - ~GrGLGpu() SK_OVERRIDE; + ~GrGLGpu() override; - void contextAbandoned() SK_OVERRIDE; + void contextAbandoned() override; const GrGLContext& glContext() const { return fGLContext; } @@ -50,7 +50,7 @@ public: return static_cast(pathRendering()); } - void discard(GrRenderTarget*) SK_OVERRIDE; + void discard(GrRenderTarget*) override; // Used by GrGLProgram and GrGLPathTexGenProgramEffects to configure OpenGL // state. @@ -58,18 +58,18 @@ public: // GrGpu overrides GrPixelConfig preferredReadPixelsConfig(GrPixelConfig readConfig, - GrPixelConfig surfaceConfig) const SK_OVERRIDE; + GrPixelConfig surfaceConfig) const override; GrPixelConfig preferredWritePixelsConfig(GrPixelConfig writeConfig, - GrPixelConfig surfaceConfig) const SK_OVERRIDE; - bool canWriteTexturePixels(const GrTexture*, GrPixelConfig srcConfig) const SK_OVERRIDE; + GrPixelConfig surfaceConfig) const override; + bool canWriteTexturePixels(const GrTexture*, GrPixelConfig srcConfig) const override; bool readPixelsWillPayForYFlip(GrRenderTarget* renderTarget, int left, int top, int width, int height, GrPixelConfig config, - size_t rowBytes) const SK_OVERRIDE; - bool fullReadPixelsIsFasterThanPartial() const SK_OVERRIDE; + size_t rowBytes) const override; + bool fullReadPixelsIsFasterThanPartial() const override; - bool initCopySurfaceDstDesc(const GrSurface* src, GrSurfaceDesc* desc) SK_OVERRIDE; + bool initCopySurfaceDstDesc(const GrSurface* src, GrSurfaceDesc* desc) override; // These functions should be used to bind GL objects. They track the GL state and skip redundant // bindings. Making the equivalent glBind calls directly will confuse the state tracking. @@ -98,55 +98,55 @@ public: bool copySurface(GrSurface* dst, GrSurface* src, const SkIRect& srcRect, - const SkIPoint& dstPoint) SK_OVERRIDE; + const SkIPoint& dstPoint) override; bool canCopySurface(const GrSurface* dst, const GrSurface* src, const SkIRect& srcRect, - const SkIPoint& dstPoint) SK_OVERRIDE; + const SkIPoint& dstPoint) override; void buildProgramDesc(GrProgramDesc*, const GrPrimitiveProcessor&, const GrPipeline&, - const GrBatchTracker&) const SK_OVERRIDE; + const GrBatchTracker&) const override; private: // GrGpu overrides - void onResetContext(uint32_t resetBits) SK_OVERRIDE; + void onResetContext(uint32_t resetBits) override; GrTexture* onCreateTexture(const GrSurfaceDesc& desc, bool budgeted, const void* srcData, - size_t rowBytes) SK_OVERRIDE; + size_t rowBytes) override; GrTexture* onCreateCompressedTexture(const GrSurfaceDesc& desc, bool budgeted, - const void* srcData) SK_OVERRIDE; - GrVertexBuffer* onCreateVertexBuffer(size_t size, bool dynamic) SK_OVERRIDE; - GrIndexBuffer* onCreateIndexBuffer(size_t size, bool dynamic) SK_OVERRIDE; - GrTexture* onWrapBackendTexture(const GrBackendTextureDesc&) SK_OVERRIDE; - GrRenderTarget* onWrapBackendRenderTarget(const GrBackendRenderTargetDesc&) SK_OVERRIDE; - bool createStencilBufferForRenderTarget(GrRenderTarget* rt, int width, int height) SK_OVERRIDE; - bool attachStencilBufferToRenderTarget(GrStencilBuffer* sb, GrRenderTarget* rt) SK_OVERRIDE; + const void* srcData) override; + GrVertexBuffer* onCreateVertexBuffer(size_t size, bool dynamic) override; + GrIndexBuffer* onCreateIndexBuffer(size_t size, bool dynamic) override; + GrTexture* onWrapBackendTexture(const GrBackendTextureDesc&) override; + GrRenderTarget* onWrapBackendRenderTarget(const GrBackendRenderTargetDesc&) override; + bool createStencilBufferForRenderTarget(GrRenderTarget* rt, int width, int height) override; + bool attachStencilBufferToRenderTarget(GrStencilBuffer* sb, GrRenderTarget* rt) override; void onClear(GrRenderTarget*, const SkIRect* rect, GrColor color, - bool canIgnoreRect) SK_OVERRIDE; + bool canIgnoreRect) override; - void onClearStencilClip(GrRenderTarget*, const SkIRect& rect, bool insideClip) SK_OVERRIDE; + void onClearStencilClip(GrRenderTarget*, const SkIRect& rect, bool insideClip) override; bool onReadPixels(GrRenderTarget* target, int left, int top, int width, int height, GrPixelConfig, void* buffer, - size_t rowBytes) SK_OVERRIDE; + size_t rowBytes) override; bool onWriteTexturePixels(GrTexture* texture, int left, int top, int width, int height, GrPixelConfig config, const void* buffer, - size_t rowBytes) SK_OVERRIDE; + size_t rowBytes) override; - void onResolveRenderTarget(GrRenderTarget* target) SK_OVERRIDE; + void onResolveRenderTarget(GrRenderTarget* target) override; - void onDraw(const DrawArgs&, const GrDrawTarget::DrawInfo&) SK_OVERRIDE; - void onStencilPath(const GrPath*, const StencilPathState&) SK_OVERRIDE; - void onDrawPath(const DrawArgs&, const GrPath*, const GrStencilSettings&) SK_OVERRIDE; + void onDraw(const DrawArgs&, const GrDrawTarget::DrawInfo&) override; + void onStencilPath(const GrPath*, const StencilPathState&) override; + void onDrawPath(const DrawArgs&, const GrPath*, const GrStencilSettings&) override; void onDrawPaths(const DrawArgs&, const GrPathRange*, const void* indices, @@ -154,13 +154,13 @@ private: const float transformValues[], GrDrawTarget::PathTransformType, int count, - const GrStencilSettings&) SK_OVERRIDE; + const GrStencilSettings&) override; - void clearStencil(GrRenderTarget*) SK_OVERRIDE; + void clearStencil(GrRenderTarget*) override; // GrDrawTarget overrides - void didAddGpuTraceMarker() SK_OVERRIDE; - void didRemoveGpuTraceMarker() SK_OVERRIDE; + void didAddGpuTraceMarker() override; + void didRemoveGpuTraceMarker() override; // binds texture unit in GL void setTextureUnit(int unitIdx); diff --git a/src/gpu/gl/GrGLIndexBuffer.h b/src/gpu/gl/GrGLIndexBuffer.h index 3ff746e297..4ca6360001 100644 --- a/src/gpu/gl/GrGLIndexBuffer.h +++ b/src/gpu/gl/GrGLIndexBuffer.h @@ -31,13 +31,13 @@ public: } protected: - void onAbandon() SK_OVERRIDE; - void onRelease() SK_OVERRIDE; + void onAbandon() override; + void onRelease() override; private: - void* onMap() SK_OVERRIDE; - void onUnmap() SK_OVERRIDE; - bool onUpdateData(const void* src, size_t srcSizeInBytes) SK_OVERRIDE; + void* onMap() override; + void onUnmap() override; + bool onUpdateData(const void* src, size_t srcSizeInBytes) override; GrGLGpu* getGpuGL() const { SkASSERT(!this->wasDestroyed()); diff --git a/src/gpu/gl/GrGLNameAllocator.cpp b/src/gpu/gl/GrGLNameAllocator.cpp index 9d60162f30..94792f1fab 100644 --- a/src/gpu/gl/GrGLNameAllocator.cpp +++ b/src/gpu/gl/GrGLNameAllocator.cpp @@ -133,7 +133,7 @@ public: this->updateStats(); } - SparseNameRange* SK_WARN_UNUSED_RESULT internalAllocate(GrGLuint* outName) SK_OVERRIDE { + SparseNameRange* SK_WARN_UNUSED_RESULT internalAllocate(GrGLuint* outName) override { // Try allocating the range inside fLeft's internal gaps. fLeft.reset(fLeft->internalAllocate(outName)); if (0 != *outName) { @@ -160,7 +160,7 @@ public: return this->takeRef(); } - SparseNameRange* SK_WARN_UNUSED_RESULT removeLeftmostContiguousRange(GrGLuint* removedCount) SK_OVERRIDE { + SparseNameRange* SK_WARN_UNUSED_RESULT removeLeftmostContiguousRange(GrGLuint* removedCount) override { fLeft.reset(fLeft->removeLeftmostContiguousRange(removedCount)); if (NULL == fLeft) { return fRight.detach(); @@ -169,7 +169,7 @@ public: return this->rebalance(); } - GrGLuint appendNames(GrGLuint count) SK_OVERRIDE { + GrGLuint appendNames(GrGLuint count) override { SkASSERT(fEnd + count > fEnd); // Check for integer wrap. GrGLuint name = fRight->appendNames(count); SkASSERT(fRight->end() == fEnd + count); @@ -177,7 +177,7 @@ public: return name; } - GrGLuint prependNames(GrGLuint count) SK_OVERRIDE { + GrGLuint prependNames(GrGLuint count) override { SkASSERT(fFirst > count); // We can't allocate at or below 0. GrGLuint name = fLeft->prependNames(count); SkASSERT(fLeft->first() == fFirst - count); @@ -185,7 +185,7 @@ public: return name; } - SparseNameRange* SK_WARN_UNUSED_RESULT free(GrGLuint name) SK_OVERRIDE { + SparseNameRange* SK_WARN_UNUSED_RESULT free(GrGLuint name) override { if (name < fLeft->end()) { fLeft.reset(fLeft->free(name)); if (NULL == fLeft) { @@ -280,30 +280,30 @@ public: fHeight = 0; } - SparseNameRange* SK_WARN_UNUSED_RESULT internalAllocate(GrGLuint* outName) SK_OVERRIDE { + SparseNameRange* SK_WARN_UNUSED_RESULT internalAllocate(GrGLuint* outName) override { *outName = 0; // No internal gaps, we are contiguous. return this->takeRef(); } - SparseNameRange* SK_WARN_UNUSED_RESULT removeLeftmostContiguousRange(GrGLuint* removedCount) SK_OVERRIDE { + SparseNameRange* SK_WARN_UNUSED_RESULT removeLeftmostContiguousRange(GrGLuint* removedCount) override { *removedCount = fEnd - fFirst; return NULL; } - GrGLuint appendNames(GrGLuint count) SK_OVERRIDE { + GrGLuint appendNames(GrGLuint count) override { SkASSERT(fEnd + count > fEnd); // Check for integer wrap. GrGLuint name = fEnd; fEnd += count; return name; } - GrGLuint prependNames(GrGLuint count) SK_OVERRIDE { + GrGLuint prependNames(GrGLuint count) override { SkASSERT(fFirst > count); // We can't allocate at or below 0. fFirst -= count; return fFirst; } - SparseNameRange* SK_WARN_UNUSED_RESULT free(GrGLuint name) SK_OVERRIDE { + SparseNameRange* SK_WARN_UNUSED_RESULT free(GrGLuint name) override { if (name < fFirst || name >= fEnd) { // Not-allocated names are silently ignored. return this->takeRef(); diff --git a/src/gpu/gl/GrGLPath.h b/src/gpu/gl/GrGLPath.h index f048f8543b..f02f7052d5 100644 --- a/src/gpu/gl/GrGLPath.h +++ b/src/gpu/gl/GrGLPath.h @@ -31,12 +31,12 @@ public: GrGLuint pathID() const { return fPathID; } protected: - void onRelease() SK_OVERRIDE; - void onAbandon() SK_OVERRIDE; + void onRelease() override; + void onAbandon() override; private: // TODO: Figure out how to get an approximate size of the path in Gpu memory. - size_t onGpuMemorySize() const SK_OVERRIDE { return 100; } + size_t onGpuMemorySize() const override { return 100; } GrGLuint fPathID; diff --git a/src/gpu/gl/GrGLPathProcessor.h b/src/gpu/gl/GrGLPathProcessor.h index 368f1f9fcd..0351e7fc82 100644 --- a/src/gpu/gl/GrGLPathProcessor.h +++ b/src/gpu/gl/GrGLPathProcessor.h @@ -23,7 +23,7 @@ public: const GrGLCaps&, GrProcessorKeyBuilder* b); - void emitCode(EmitArgs&) SK_OVERRIDE; + void emitCode(EmitArgs&) override; virtual void emitTransforms(GrGLGPBuilder*, const TransformsIn&, TransformsOut*) = 0; @@ -31,7 +31,7 @@ public: void setData(const GrGLProgramDataManager&, const GrPrimitiveProcessor&, - const GrBatchTracker&) SK_OVERRIDE; + const GrBatchTracker&) override; virtual void setTransformData(const GrPrimitiveProcessor&, int index, @@ -64,15 +64,15 @@ public: return firstFreeCoordSet; } - void emitTransforms(GrGLGPBuilder*, const TransformsIn& tin, TransformsOut* tout) SK_OVERRIDE; + void emitTransforms(GrGLGPBuilder*, const TransformsIn& tin, TransformsOut* tout) override; void setTransformData(const GrPrimitiveProcessor& primProc, int index, const SkTArray& transforms, GrGLPathRendering* glpr, - GrGLuint) SK_OVERRIDE; + GrGLuint) override; - void didSetData(GrGLPathRendering* glpr) SK_OVERRIDE; + void didSetData(GrGLPathRendering* glpr) override; private: SkDEBUGCODE(int fMaxTexCoords;) @@ -86,7 +86,7 @@ public: GrGLNormalPathProcessor(const GrPathProcessor& pathProc, const GrBatchTracker& bt) : INHERITED(pathProc, bt) {} - void emitTransforms(GrGLGPBuilder* pb, const TransformsIn& tin,TransformsOut* tout) SK_OVERRIDE; + void emitTransforms(GrGLGPBuilder* pb, const TransformsIn& tin,TransformsOut* tout) override; void resolveSeparableVaryings(GrGLGpu* gpu, GrGLuint programId); @@ -94,7 +94,7 @@ public: int index, const SkTArray& coordTransforms, GrGLPathRendering* glpr, - GrGLuint programID) SK_OVERRIDE; + GrGLuint programID) override; private: struct SeparableVaryingInfo { diff --git a/src/gpu/gl/GrGLPathRange.h b/src/gpu/gl/GrGLPathRange.h index ce13a3a03f..5cba9c79d7 100644 --- a/src/gpu/gl/GrGLPathRange.h +++ b/src/gpu/gl/GrGLPathRange.h @@ -42,13 +42,13 @@ public: GrGLuint basePathID() const { return fBasePathID; } protected: - void onInitPath(int index, const SkPath&) const SK_OVERRIDE; + void onInitPath(int index, const SkPath&) const override; - void onRelease() SK_OVERRIDE; - void onAbandon() SK_OVERRIDE; + void onRelease() override; + void onAbandon() override; private: - size_t onGpuMemorySize() const SK_OVERRIDE { return fGpuMemorySize; } + size_t onGpuMemorySize() const override { return fGpuMemorySize; } GrGLuint fBasePathID; mutable size_t fGpuMemorySize; diff --git a/src/gpu/gl/GrGLPathRendering.h b/src/gpu/gl/GrGLPathRendering.h index ac56a9231b..ba8abd63bd 100644 --- a/src/gpu/gl/GrGLPathRendering.h +++ b/src/gpu/gl/GrGLPathRendering.h @@ -33,17 +33,17 @@ public: virtual ~GrGLPathRendering(); // GrPathRendering implementations. - GrPath* createPath(const SkPath&, const SkStrokeRec&) SK_OVERRIDE; + GrPath* createPath(const SkPath&, const SkStrokeRec&) override; virtual GrPathRange* createPathRange(GrPathRange::PathGenerator*, - const SkStrokeRec&) SK_OVERRIDE; + const SkStrokeRec&) override; virtual GrPathRange* createGlyphs(const SkTypeface*, const SkDescriptor*, - const SkStrokeRec&) SK_OVERRIDE; - void stencilPath(const GrPath*, const GrStencilSettings&) SK_OVERRIDE; - void drawPath(const GrPath*, const GrStencilSettings&) SK_OVERRIDE; + const SkStrokeRec&) override; + void stencilPath(const GrPath*, const GrStencilSettings&) override; + void drawPath(const GrPath*, const GrStencilSettings&) override; virtual void drawPaths(const GrPathRange*, const void* indices, PathIndexType, const float transformValues[], PathTransformType, int count, - const GrStencilSettings&) SK_OVERRIDE; + const GrStencilSettings&) override; /* Called when the 3D context state is unknown. */ void resetContext(); diff --git a/src/gpu/gl/GrGLProgram.h b/src/gpu/gl/GrGLProgram.h index e49fbabf86..3c97e0f84d 100644 --- a/src/gpu/gl/GrGLProgram.h +++ b/src/gpu/gl/GrGLProgram.h @@ -175,11 +175,11 @@ protected: GrGLInstalledFragProcs* fragmentProcessors); private: - void didSetData() SK_OVERRIDE; + void didSetData() override; virtual void setTransformData(const GrPrimitiveProcessor&, const GrPendingFragmentStage&, int index, - GrGLInstalledFragProc*) SK_OVERRIDE; + GrGLInstalledFragProc*) override; virtual void onSetRenderTargetState(const GrPrimitiveProcessor&, const GrPipeline&); friend class GrGLNvprProgramBuilder; diff --git a/src/gpu/gl/GrGLRenderTarget.h b/src/gpu/gl/GrGLRenderTarget.h index 7e7349257f..4d3061c4e4 100644 --- a/src/gpu/gl/GrGLRenderTarget.h +++ b/src/gpu/gl/GrGLRenderTarget.h @@ -42,7 +42,7 @@ public: GrGLuint textureFBOID() const { return fTexFBOID; } // override of GrRenderTarget - ResolveType getResolveType() const SK_OVERRIDE { + ResolveType getResolveType() const override { if (!this->isMultisampled() || fRTFBOID == fTexFBOID) { // catches FBO 0 and non MSAA case @@ -55,7 +55,7 @@ public: } /** When we don't own the FBO ID we don't attempt to modify its attachments. */ - bool canAttemptStencilAttachment() const SK_OVERRIDE { return !fIsWrapped; } + bool canAttemptStencilAttachment() const override { return !fIsWrapped; } protected: // The public constructor registers this object with the cache. However, only the most derived @@ -66,11 +66,11 @@ protected: void init(const GrSurfaceDesc&, const IDDesc&); - void onAbandon() SK_OVERRIDE; - void onRelease() SK_OVERRIDE; + void onAbandon() override; + void onRelease() override; // In protected because subclass GrGLTextureRenderTarget calls this version. - size_t onGpuMemorySize() const SK_OVERRIDE; + size_t onGpuMemorySize() const override; private: GrGLuint fRTFBOID; diff --git a/src/gpu/gl/GrGLStencilBuffer.h b/src/gpu/gl/GrGLStencilBuffer.h index 75e98a0a17..0cce827a74 100644 --- a/src/gpu/gl/GrGLStencilBuffer.h +++ b/src/gpu/gl/GrGLStencilBuffer.h @@ -48,11 +48,11 @@ public: protected: // overrides of GrResource - void onRelease() SK_OVERRIDE; - void onAbandon() SK_OVERRIDE; + void onRelease() override; + void onAbandon() override; private: - size_t onGpuMemorySize() const SK_OVERRIDE; + size_t onGpuMemorySize() const override; Format fFormat; // may be zero for external SBs associated with external RTs diff --git a/src/gpu/gl/GrGLTexture.h b/src/gpu/gl/GrGLTexture.h index c64865fcd7..8188f74199 100644 --- a/src/gpu/gl/GrGLTexture.h +++ b/src/gpu/gl/GrGLTexture.h @@ -33,9 +33,9 @@ public: GrGLTexture(GrGLGpu*, const GrSurfaceDesc&, const IDDesc&); - GrBackendObject getTextureHandle() const SK_OVERRIDE; + GrBackendObject getTextureHandle() const override; - void textureParamsModified() SK_OVERRIDE { fTexParams.invalidate(); } + void textureParamsModified() override { fTexParams.invalidate(); } // These functions are used to track the texture parameters associated with the texture. const TexParams& getCachedTexParams(GrGpu::ResetTimestamp* timestamp) const { @@ -60,8 +60,8 @@ protected: void init(const GrSurfaceDesc&, const IDDesc&); - void onAbandon() SK_OVERRIDE; - void onRelease() SK_OVERRIDE; + void onAbandon() override; + void onRelease() override; private: TexParams fTexParams; diff --git a/src/gpu/gl/GrGLTextureRenderTarget.h b/src/gpu/gl/GrGLTextureRenderTarget.h index e2dd14c882..a9134995fa 100644 --- a/src/gpu/gl/GrGLTextureRenderTarget.h +++ b/src/gpu/gl/GrGLTextureRenderTarget.h @@ -35,19 +35,19 @@ public: } protected: - void onAbandon() SK_OVERRIDE { + void onAbandon() override { GrGLRenderTarget::onAbandon(); GrGLTexture::onAbandon(); } - void onRelease() SK_OVERRIDE { + void onRelease() override { GrGLRenderTarget::onRelease(); GrGLTexture::onRelease(); } private: // GrGLRenderTarget accounts for the texture's memory and any MSAA renderbuffer's memory. - size_t onGpuMemorySize() const SK_OVERRIDE { + size_t onGpuMemorySize() const override { return GrGLRenderTarget::onGpuMemorySize(); } diff --git a/src/gpu/gl/GrGLVertexArray.h b/src/gpu/gl/GrGLVertexArray.h index 4143ad4e3b..77f4fd0eec 100644 --- a/src/gpu/gl/GrGLVertexArray.h +++ b/src/gpu/gl/GrGLVertexArray.h @@ -162,11 +162,11 @@ public: void invalidateCachedState(); protected: - size_t onGpuMemorySize() const SK_OVERRIDE { return 0; } + size_t onGpuMemorySize() const override { return 0; } - void onAbandon() SK_OVERRIDE; + void onAbandon() override; - void onRelease() SK_OVERRIDE; + void onRelease() override; private: GrGLuint fID; diff --git a/src/gpu/gl/GrGLVertexBuffer.h b/src/gpu/gl/GrGLVertexBuffer.h index c428f4dbcd..3b0c5c17dd 100644 --- a/src/gpu/gl/GrGLVertexBuffer.h +++ b/src/gpu/gl/GrGLVertexBuffer.h @@ -31,13 +31,13 @@ public: } protected: - void onAbandon() SK_OVERRIDE; - void onRelease() SK_OVERRIDE; + void onAbandon() override; + void onRelease() override; private: - void* onMap() SK_OVERRIDE; - void onUnmap() SK_OVERRIDE; - bool onUpdateData(const void* src, size_t srcSizeInBytes) SK_OVERRIDE; + void* onMap() override; + void onUnmap() override; + bool onUpdateData(const void* src, size_t srcSizeInBytes) override; GrGLGpu* getGpuGL() const { SkASSERT(!this->wasDestroyed()); diff --git a/src/gpu/gl/SkNullGLContext.cpp b/src/gpu/gl/SkNullGLContext.cpp index 42dafc5dee..69b559629c 100644 --- a/src/gpu/gl/SkNullGLContext.cpp +++ b/src/gpu/gl/SkNullGLContext.cpp @@ -337,7 +337,7 @@ GrGLvoid GR_GL_FUNCTION_TYPE nullGLGetBufferParameteriv(GrGLenum target, GrGLenu class NullInterface : public GrGLInterface { public: NullInterface(State* state) : fState(SkRef(state)) {} - ~NullInterface() SK_OVERRIDE { + ~NullInterface() override { fState->unref(); } State* fState; diff --git a/src/gpu/gl/builders/GrGLFragmentShaderBuilder.h b/src/gpu/gl/builders/GrGLFragmentShaderBuilder.h index f294257a1b..26c723ecc4 100644 --- a/src/gpu/gl/builders/GrGLFragmentShaderBuilder.h +++ b/src/gpu/gl/builders/GrGLFragmentShaderBuilder.h @@ -89,11 +89,11 @@ public: GrGLFragmentShaderBuilder(GrGLProgramBuilder* program, uint8_t fragPosKey); // true public interface, defined explicitly in the abstract interfaces above - bool enableFeature(GLSLFeature) SK_OVERRIDE; + bool enableFeature(GLSLFeature) override; virtual SkString ensureFSCoords2D(const GrGLProcessor::TransformedCoordsArray& coords, - int index) SK_OVERRIDE; - const char* fragmentPosition() SK_OVERRIDE; - const char* dstColor() SK_OVERRIDE; + int index) override; + const char* fragmentPosition() override; + const char* dstColor() override; private: // Private public interface, used by GrGLProgramBuilder to build a fragment shader diff --git a/src/gpu/gl/builders/GrGLProgramBuilder.cpp b/src/gpu/gl/builders/GrGLProgramBuilder.cpp index a2b8a34157..3aa4c6a2ca 100644 --- a/src/gpu/gl/builders/GrGLProgramBuilder.cpp +++ b/src/gpu/gl/builders/GrGLProgramBuilder.cpp @@ -31,7 +31,7 @@ public: GrGLNvprProgramBuilder(GrGLGpu* gpu, const DrawArgs& args) : INHERITED(gpu, args) {} - GrGLProgram* createProgram(GrGLuint programID) SK_OVERRIDE { + GrGLProgram* createProgram(GrGLuint programID) override { // this is just for nvpr es, which has separable varyings that are plugged in after // building GrGLPathProcessor* pathProc = diff --git a/src/gpu/gl/builders/GrGLProgramBuilder.h b/src/gpu/gl/builders/GrGLProgramBuilder.h index 46d2816c52..2e9ab863d2 100644 --- a/src/gpu/gl/builders/GrGLProgramBuilder.h +++ b/src/gpu/gl/builders/GrGLProgramBuilder.h @@ -234,30 +234,30 @@ public: GrSLPrecision precision, const char* name, int arrayCount, - const char** outName) SK_OVERRIDE; + const char** outName) override; - const GrGLShaderVar& getUniformVariable(UniformHandle u) const SK_OVERRIDE { + const GrGLShaderVar& getUniformVariable(UniformHandle u) const override { return fUniforms[u.toShaderBuilderIndex()].fVariable; } - const char* getUniformCStr(UniformHandle u) const SK_OVERRIDE { + const char* getUniformCStr(UniformHandle u) const override { return this->getUniformVariable(u).c_str(); } - const GrGLContextInfo& ctxInfo() const SK_OVERRIDE; + const GrGLContextInfo& ctxInfo() const override; - GrGLGpu* gpu() const SK_OVERRIDE { return fGpu; } + GrGLGpu* gpu() const override { return fGpu; } - GrGLFPFragmentBuilder* getFragmentShaderBuilder() SK_OVERRIDE { return &fFS; } - GrGLVertexBuilder* getVertexShaderBuilder() SK_OVERRIDE { return &fVS; } + GrGLFPFragmentBuilder* getFragmentShaderBuilder() override { return &fFS; } + GrGLVertexBuilder* getVertexShaderBuilder() override { return &fVS; } void addVarying( const char* name, GrGLVarying*, - GrSLPrecision fsPrecision = kDefault_GrSLPrecision) SK_OVERRIDE; + GrSLPrecision fsPrecision = kDefault_GrSLPrecision) override; void addPassThroughAttribute(const GrPrimitiveProcessor::Attribute*, - const char* output) SK_OVERRIDE; + const char* output) override; // Handles for program uniforms (other than per-effect uniforms) diff --git a/src/gpu/gl/debug/GrBufferObj.h b/src/gpu/gl/debug/GrBufferObj.h index d0bb83d62c..3c7a30b6d3 100644 --- a/src/gpu/gl/debug/GrBufferObj.h +++ b/src/gpu/gl/debug/GrBufferObj.h @@ -55,7 +55,7 @@ public: void setUsage(GrGLint usage) { fUsage = usage; } GrGLint getUsage() const { return fUsage; } - void deleteAction() SK_OVERRIDE; + void deleteAction() override; protected: private: diff --git a/src/gpu/gl/debug/GrFrameBufferObj.h b/src/gpu/gl/debug/GrFrameBufferObj.h index 3cfa23686b..794450c136 100644 --- a/src/gpu/gl/debug/GrFrameBufferObj.h +++ b/src/gpu/gl/debug/GrFrameBufferObj.h @@ -46,7 +46,7 @@ public: void setStencil(GrFBBindableObj *buffer); GrFBBindableObj *getStencil() { return fStencilBuffer; } - void deleteAction() SK_OVERRIDE { + void deleteAction() override { setColor(NULL); setDepth(NULL); diff --git a/src/gpu/gl/debug/GrGLCreateDebugInterface.cpp b/src/gpu/gl/debug/GrGLCreateDebugInterface.cpp index 77a1422af1..4c2acc3fc4 100644 --- a/src/gpu/gl/debug/GrGLCreateDebugInterface.cpp +++ b/src/gpu/gl/debug/GrGLCreateDebugInterface.cpp @@ -796,7 +796,7 @@ public: fWrapped.reset(interface); } - void abandon() const SK_OVERRIDE { + void abandon() const override { GrDebugGL::abandon(); } diff --git a/src/gpu/gl/debug/GrProgramObj.h b/src/gpu/gl/debug/GrProgramObj.h index d06e410463..a25341a215 100644 --- a/src/gpu/gl/debug/GrProgramObj.h +++ b/src/gpu/gl/debug/GrProgramObj.h @@ -24,7 +24,7 @@ public: void AttachShader(GrShaderObj *shader); - void deleteAction() SK_OVERRIDE; + void deleteAction() override; // TODO: this flag system won't work w/ multiple contexts! void setInUse() { fInUse = true; } diff --git a/src/gpu/gl/debug/GrRenderBufferObj.h b/src/gpu/gl/debug/GrRenderBufferObj.h index 2ad3e2cbde..8231ef58df 100644 --- a/src/gpu/gl/debug/GrRenderBufferObj.h +++ b/src/gpu/gl/debug/GrRenderBufferObj.h @@ -25,7 +25,7 @@ public: void resetBound() { fBound = false; } bool getBound() const { return fBound; } - void deleteAction() SK_OVERRIDE { + void deleteAction() override { this->INHERITED::deleteAction(); } diff --git a/src/gpu/gl/debug/GrShaderObj.h b/src/gpu/gl/debug/GrShaderObj.h index c59d9c9453..977920fe0f 100644 --- a/src/gpu/gl/debug/GrShaderObj.h +++ b/src/gpu/gl/debug/GrShaderObj.h @@ -24,7 +24,7 @@ public: void setType(GrGLenum type) { fType = type; } GrGLenum getType() { return fType; } - void deleteAction() SK_OVERRIDE; + void deleteAction() override; protected: private: diff --git a/src/gpu/gl/debug/GrTextureObj.h b/src/gpu/gl/debug/GrTextureObj.h index 653e23fdbc..fcf851db86 100644 --- a/src/gpu/gl/debug/GrTextureObj.h +++ b/src/gpu/gl/debug/GrTextureObj.h @@ -43,7 +43,7 @@ public: return 0 != fTextureUnitReferees.count(); } - void deleteAction() SK_OVERRIDE; + void deleteAction() override; protected: diff --git a/src/gpu/gl/debug/SkDebugGLContext.h b/src/gpu/gl/debug/SkDebugGLContext.h index 35e4456c86..577953223a 100644 --- a/src/gpu/gl/debug/SkDebugGLContext.h +++ b/src/gpu/gl/debug/SkDebugGLContext.h @@ -12,9 +12,9 @@ class SkDebugGLContext : public SkGLContext { public: - ~SkDebugGLContext() SK_OVERRIDE; - void makeCurrent() const SK_OVERRIDE {} - void swapBuffers() const SK_OVERRIDE {} + ~SkDebugGLContext() override; + void makeCurrent() const override {} + void swapBuffers() const override {} static SkDebugGLContext* Create(GrGLStandard forcedGpuAPI) { if (kGLES_GrGLStandard == forcedGpuAPI) { diff --git a/src/gpu/gl/egl/SkCreatePlatformGLContext_egl.cpp b/src/gpu/gl/egl/SkCreatePlatformGLContext_egl.cpp index 9f35981e1a..d57f761008 100644 --- a/src/gpu/gl/egl/SkCreatePlatformGLContext_egl.cpp +++ b/src/gpu/gl/egl/SkCreatePlatformGLContext_egl.cpp @@ -15,9 +15,9 @@ namespace { class EGLGLContext : public SkGLContext { public: EGLGLContext(GrGLStandard forcedGpuAPI); - ~EGLGLContext() SK_OVERRIDE; - void makeCurrent() const SK_OVERRIDE; - void swapBuffers() const SK_OVERRIDE; + ~EGLGLContext() override; + void makeCurrent() const override; + void swapBuffers() const override; private: void destroyGLContext(); diff --git a/src/gpu/gl/glx/SkCreatePlatformGLContext_glx.cpp b/src/gpu/gl/glx/SkCreatePlatformGLContext_glx.cpp index 9efa993b24..8006d498aa 100644 --- a/src/gpu/gl/glx/SkCreatePlatformGLContext_glx.cpp +++ b/src/gpu/gl/glx/SkCreatePlatformGLContext_glx.cpp @@ -47,9 +47,9 @@ static int ctxErrorHandler(Display *dpy, XErrorEvent *ev) { class GLXGLContext : public SkGLContext { public: GLXGLContext(GrGLStandard forcedGpuAPI); - ~GLXGLContext() SK_OVERRIDE; - void makeCurrent() const SK_OVERRIDE; - void swapBuffers() const SK_OVERRIDE; + ~GLXGLContext() override; + void makeCurrent() const override; + void swapBuffers() const override; private: void destroyGLContext(); diff --git a/src/gpu/gl/iOS/SkCreatePlatformGLContext_iOS.mm b/src/gpu/gl/iOS/SkCreatePlatformGLContext_iOS.mm index f900976f95..884216845c 100644 --- a/src/gpu/gl/iOS/SkCreatePlatformGLContext_iOS.mm +++ b/src/gpu/gl/iOS/SkCreatePlatformGLContext_iOS.mm @@ -16,9 +16,9 @@ namespace { class IOSGLContext : public SkGLContext { public: IOSGLContext(); - ~IOSGLContext() SK_OVERRIDE; - void makeCurrent() const SK_OVERRIDE; - void swapBuffers() const SK_OVERRIDE; + ~IOSGLContext() override; + void makeCurrent() const override; + void swapBuffers() const override; private: void destroyGLContext(); diff --git a/src/gpu/gl/mac/SkCreatePlatformGLContext_mac.cpp b/src/gpu/gl/mac/SkCreatePlatformGLContext_mac.cpp index e7f21e0aae..436c53f0bb 100644 --- a/src/gpu/gl/mac/SkCreatePlatformGLContext_mac.cpp +++ b/src/gpu/gl/mac/SkCreatePlatformGLContext_mac.cpp @@ -14,9 +14,9 @@ namespace { class MacGLContext : public SkGLContext { public: MacGLContext(); - ~MacGLContext() SK_OVERRIDE; - void makeCurrent() const SK_OVERRIDE; - void swapBuffers() const SK_OVERRIDE; + ~MacGLContext() override; + void makeCurrent() const override; + void swapBuffers() const override; private: void destroyGLContext(); diff --git a/src/gpu/gl/mesa/SkMesaGLContext.h b/src/gpu/gl/mesa/SkMesaGLContext.h index df7e0b0770..bf0c7e9060 100644 --- a/src/gpu/gl/mesa/SkMesaGLContext.h +++ b/src/gpu/gl/mesa/SkMesaGLContext.h @@ -17,9 +17,9 @@ private: typedef intptr_t Context; public: - ~SkMesaGLContext() SK_OVERRIDE; - void makeCurrent() const SK_OVERRIDE; - void swapBuffers() const SK_OVERRIDE; + ~SkMesaGLContext() override; + void makeCurrent() const override; + void swapBuffers() const override; static SkMesaGLContext* Create(GrGLStandard forcedGpuAPI) { if (kGLES_GrGLStandard == forcedGpuAPI) { diff --git a/src/gpu/gl/win/SkCreatePlatformGLContext_win.cpp b/src/gpu/gl/win/SkCreatePlatformGLContext_win.cpp index 5f3d364408..d387ef4922 100644 --- a/src/gpu/gl/win/SkCreatePlatformGLContext_win.cpp +++ b/src/gpu/gl/win/SkCreatePlatformGLContext_win.cpp @@ -20,9 +20,9 @@ namespace { class WinGLContext : public SkGLContext { public: WinGLContext(GrGLStandard forcedGpuAPI); - ~WinGLContext() SK_OVERRIDE; - void makeCurrent() const SK_OVERRIDE; - void swapBuffers() const SK_OVERRIDE; + ~WinGLContext() override; + void makeCurrent() const override; + void swapBuffers() const override; private: void destroyGLContext(); diff --git a/src/image/SkImage_Gpu.h b/src/image/SkImage_Gpu.h index f4ca064d51..a771ddab24 100644 --- a/src/image/SkImage_Gpu.h +++ b/src/image/SkImage_Gpu.h @@ -21,20 +21,20 @@ public: SkImage_Gpu(const SkBitmap&, int sampleCountForNewSurfaces, SkSurface::Budgeted); - void onDraw(SkCanvas*, SkScalar x, SkScalar y, const SkPaint*) const SK_OVERRIDE; + void onDraw(SkCanvas*, SkScalar x, SkScalar y, const SkPaint*) const override; void onDrawRect(SkCanvas*, const SkRect* src, const SkRect& dst, - const SkPaint*) const SK_OVERRIDE; - SkSurface* onNewSurface(const SkImageInfo&, const SkSurfaceProps&) const SK_OVERRIDE; - GrTexture* onGetTexture() const SK_OVERRIDE; - bool getROPixels(SkBitmap*) const SK_OVERRIDE; + const SkPaint*) const override; + SkSurface* onNewSurface(const SkImageInfo&, const SkSurfaceProps&) const override; + GrTexture* onGetTexture() const override; + bool getROPixels(SkBitmap*) const override; GrTexture* getTexture() const { return fBitmap.getTexture(); } SkShader* onNewShader(SkShader::TileMode, SkShader::TileMode, - const SkMatrix* localMatrix) const SK_OVERRIDE; + const SkMatrix* localMatrix) const override; - bool isOpaque() const SK_OVERRIDE; + bool isOpaque() const override; void applyBudgetDecision() const { if (fBudgeted) { diff --git a/src/image/SkImage_Raster.cpp b/src/image/SkImage_Raster.cpp index 1165d14226..aeb5dc1a10 100644 --- a/src/image/SkImage_Raster.cpp +++ b/src/image/SkImage_Raster.cpp @@ -53,12 +53,12 @@ public: SkImage_Raster(const SkImageInfo&, SkData*, size_t rb, const SkSurfaceProps*); virtual ~SkImage_Raster(); - void onDraw(SkCanvas*, SkScalar, SkScalar, const SkPaint*) const SK_OVERRIDE; - void onDrawRect(SkCanvas*, const SkRect*, const SkRect&, const SkPaint*) const SK_OVERRIDE; - SkSurface* onNewSurface(const SkImageInfo&, const SkSurfaceProps&) const SK_OVERRIDE; - bool onReadPixels(const SkImageInfo&, void*, size_t, int srcX, int srcY) const SK_OVERRIDE; - const void* onPeekPixels(SkImageInfo*, size_t* /*rowBytes*/) const SK_OVERRIDE; - bool getROPixels(SkBitmap*) const SK_OVERRIDE; + void onDraw(SkCanvas*, SkScalar, SkScalar, const SkPaint*) const override; + void onDrawRect(SkCanvas*, const SkRect*, const SkRect&, const SkPaint*) const override; + SkSurface* onNewSurface(const SkImageInfo&, const SkSurfaceProps&) const override; + bool onReadPixels(const SkImageInfo&, void*, size_t, int srcX, int srcY) const override; + const void* onPeekPixels(SkImageInfo*, size_t* /*rowBytes*/) const override; + bool getROPixels(SkBitmap*) const override; // exposed for SkSurface_Raster via SkNewImageFromPixelRef SkImage_Raster(const SkImageInfo&, SkPixelRef*, const SkIPoint& pixelRefOrigin, size_t rowBytes, @@ -68,9 +68,9 @@ public: virtual SkShader* onNewShader(SkShader::TileMode, SkShader::TileMode, - const SkMatrix* localMatrix) const SK_OVERRIDE; + const SkMatrix* localMatrix) const override; - bool isOpaque() const SK_OVERRIDE; + bool isOpaque() const override; SkImage_Raster(const SkBitmap& bm, const SkSurfaceProps* props) : INHERITED(bm.width(), bm.height(), props) diff --git a/src/image/SkSurface_Gpu.h b/src/image/SkSurface_Gpu.h index 90c00c4b45..998d2437cb 100644 --- a/src/image/SkSurface_Gpu.h +++ b/src/image/SkSurface_Gpu.h @@ -21,13 +21,13 @@ public: SkSurface_Gpu(SkGpuDevice*); virtual ~SkSurface_Gpu(); - SkCanvas* onNewCanvas() SK_OVERRIDE; - SkSurface* onNewSurface(const SkImageInfo&) SK_OVERRIDE; - SkImage* onNewImageSnapshot(Budgeted) SK_OVERRIDE; + SkCanvas* onNewCanvas() override; + SkSurface* onNewSurface(const SkImageInfo&) override; + SkImage* onNewImageSnapshot(Budgeted) override; virtual void onDraw(SkCanvas*, SkScalar x, SkScalar y, - const SkPaint*) SK_OVERRIDE; - void onCopyOnWrite(ContentChangeMode) SK_OVERRIDE; - void onDiscard() SK_OVERRIDE; + const SkPaint*) override; + void onCopyOnWrite(ContentChangeMode) override; + void onDiscard() override; SkGpuDevice* getDevice() { return fDevice; } diff --git a/src/image/SkSurface_Raster.cpp b/src/image/SkSurface_Raster.cpp index 9c38640933..45237b0fc8 100644 --- a/src/image/SkSurface_Raster.cpp +++ b/src/image/SkSurface_Raster.cpp @@ -22,12 +22,12 @@ public: const SkSurfaceProps*); SkSurface_Raster(SkPixelRef*, const SkSurfaceProps*); - SkCanvas* onNewCanvas() SK_OVERRIDE; - SkSurface* onNewSurface(const SkImageInfo&) SK_OVERRIDE; - SkImage* onNewImageSnapshot(Budgeted) SK_OVERRIDE; + SkCanvas* onNewCanvas() override; + SkSurface* onNewSurface(const SkImageInfo&) override; + SkImage* onNewImageSnapshot(Budgeted) override; virtual void onDraw(SkCanvas*, SkScalar x, SkScalar y, - const SkPaint*) SK_OVERRIDE; - void onCopyOnWrite(ContentChangeMode) SK_OVERRIDE; + const SkPaint*) override; + void onCopyOnWrite(ContentChangeMode) override; private: SkBitmap fBitmap; diff --git a/src/images/SkDecodingImageGenerator.cpp b/src/images/SkDecodingImageGenerator.cpp index 337a96407b..329730ab3e 100644 --- a/src/images/SkDecodingImageGenerator.cpp +++ b/src/images/SkDecodingImageGenerator.cpp @@ -37,18 +37,18 @@ public: bool ditherImage); protected: - SkData* onRefEncodedData() SK_OVERRIDE; + SkData* onRefEncodedData() override; #ifdef SK_SUPPORT_LEGACY_BOOL_ONGETINFO - bool onGetInfo(SkImageInfo* info) SK_OVERRIDE { + bool onGetInfo(SkImageInfo* info) override { *info = fInfo; return true; } #endif virtual Result onGetPixels(const SkImageInfo& info, void* pixels, size_t rowBytes, const Options&, - SkPMColor ctable[], int* ctableCount) SK_OVERRIDE; + SkPMColor ctable[], int* ctableCount) override; virtual bool onGetYUV8Planes(SkISize sizes[3], void* planes[3], size_t rowBytes[3], - SkYUVColorSpace* colorSpace) SK_OVERRIDE; + SkYUVColorSpace* colorSpace) override; private: typedef SkImageGenerator INHERITED; diff --git a/src/images/SkImageDecoder_astc.cpp b/src/images/SkImageDecoder_astc.cpp index 64cdf43e5d..869acfb6b9 100644 --- a/src/images/SkImageDecoder_astc.cpp +++ b/src/images/SkImageDecoder_astc.cpp @@ -19,12 +19,12 @@ class SkASTCImageDecoder : public SkImageDecoder { public: SkASTCImageDecoder() { } - Format getFormat() const SK_OVERRIDE { + Format getFormat() const override { return kASTC_Format; } protected: - Result onDecode(SkStream* stream, SkBitmap* bm, Mode) SK_OVERRIDE; + Result onDecode(SkStream* stream, SkBitmap* bm, Mode) override; private: typedef SkImageDecoder INHERITED; diff --git a/src/images/SkImageDecoder_ktx.cpp b/src/images/SkImageDecoder_ktx.cpp index 7248950450..837fe58862 100644 --- a/src/images/SkImageDecoder_ktx.cpp +++ b/src/images/SkImageDecoder_ktx.cpp @@ -36,12 +36,12 @@ class SkKTXImageDecoder : public SkImageDecoder { public: SkKTXImageDecoder() { } - Format getFormat() const SK_OVERRIDE { + Format getFormat() const override { return kKTX_Format; } protected: - Result onDecode(SkStream* stream, SkBitmap* bm, Mode) SK_OVERRIDE; + Result onDecode(SkStream* stream, SkBitmap* bm, Mode) override; private: typedef SkImageDecoder INHERITED; @@ -251,7 +251,7 @@ SkImageDecoder::Result SkKTXImageDecoder::onDecode(SkStream* stream, SkBitmap* b class SkKTXImageEncoder : public SkImageEncoder { protected: - bool onEncode(SkWStream* stream, const SkBitmap& bm, int quality) SK_OVERRIDE; + bool onEncode(SkWStream* stream, const SkBitmap& bm, int quality) override; private: virtual bool encodePKM(SkWStream* stream, const SkData *data); diff --git a/src/images/SkImageDecoder_libbmp.cpp b/src/images/SkImageDecoder_libbmp.cpp index e28713d8a6..6647e1b668 100644 --- a/src/images/SkImageDecoder_libbmp.cpp +++ b/src/images/SkImageDecoder_libbmp.cpp @@ -19,12 +19,12 @@ class SkBMPImageDecoder : public SkImageDecoder { public: SkBMPImageDecoder() {} - Format getFormat() const SK_OVERRIDE { + Format getFormat() const override { return kBMP_Format; } protected: - Result onDecode(SkStream* stream, SkBitmap* bm, Mode mode) SK_OVERRIDE; + Result onDecode(SkStream* stream, SkBitmap* bm, Mode mode) override; private: typedef SkImageDecoder INHERITED; diff --git a/src/images/SkImageDecoder_libgif.cpp b/src/images/SkImageDecoder_libgif.cpp index b0ed810373..5d55a1341c 100644 --- a/src/images/SkImageDecoder_libgif.cpp +++ b/src/images/SkImageDecoder_libgif.cpp @@ -19,12 +19,12 @@ class SkGIFImageDecoder : public SkImageDecoder { public: - Format getFormat() const SK_OVERRIDE { + Format getFormat() const override { return kGIF_Format; } protected: - Result onDecode(SkStream* stream, SkBitmap* bm, Mode mode) SK_OVERRIDE; + Result onDecode(SkStream* stream, SkBitmap* bm, Mode mode) override; private: typedef SkImageDecoder INHERITED; diff --git a/src/images/SkImageDecoder_libico.cpp b/src/images/SkImageDecoder_libico.cpp index 1fafd528e5..b9b3fba7bc 100644 --- a/src/images/SkImageDecoder_libico.cpp +++ b/src/images/SkImageDecoder_libico.cpp @@ -15,12 +15,12 @@ class SkICOImageDecoder : public SkImageDecoder { public: SkICOImageDecoder(); - Format getFormat() const SK_OVERRIDE { + Format getFormat() const override { return kICO_Format; } protected: - Result onDecode(SkStream* stream, SkBitmap* bm, Mode) SK_OVERRIDE; + Result onDecode(SkStream* stream, SkBitmap* bm, Mode) override; private: typedef SkImageDecoder INHERITED; diff --git a/src/images/SkImageDecoder_libjpeg.cpp b/src/images/SkImageDecoder_libjpeg.cpp index 5eb827122f..14df6e38b2 100644 --- a/src/images/SkImageDecoder_libjpeg.cpp +++ b/src/images/SkImageDecoder_libjpeg.cpp @@ -232,19 +232,19 @@ public: } #endif - Format getFormat() const SK_OVERRIDE { + Format getFormat() const override { return kJPEG_Format; } protected: #ifdef SK_BUILD_FOR_ANDROID - bool onBuildTileIndex(SkStreamRewindable *stream, int *width, int *height) SK_OVERRIDE; - bool onDecodeSubset(SkBitmap* bitmap, const SkIRect& rect) SK_OVERRIDE; + bool onBuildTileIndex(SkStreamRewindable *stream, int *width, int *height) override; + bool onDecodeSubset(SkBitmap* bitmap, const SkIRect& rect) override; #endif - Result onDecode(SkStream* stream, SkBitmap* bm, Mode) SK_OVERRIDE; + Result onDecode(SkStream* stream, SkBitmap* bm, Mode) override; virtual bool onDecodeYUV8Planes(SkStream* stream, SkISize componentSizes[3], void* planes[3], size_t rowBytes[3], - SkYUVColorSpace* colorSpace) SK_OVERRIDE; + SkYUVColorSpace* colorSpace) override; private: #ifdef SK_BUILD_FOR_ANDROID diff --git a/src/images/SkImageDecoder_libpng.cpp b/src/images/SkImageDecoder_libpng.cpp index 245654dbfd..4101b3e4ec 100644 --- a/src/images/SkImageDecoder_libpng.cpp +++ b/src/images/SkImageDecoder_libpng.cpp @@ -78,7 +78,7 @@ public: SkPNGImageDecoder() { fImageIndex = NULL; } - Format getFormat() const SK_OVERRIDE { + Format getFormat() const override { return kPNG_Format; } @@ -88,10 +88,10 @@ public: protected: #ifdef SK_BUILD_FOR_ANDROID - bool onBuildTileIndex(SkStreamRewindable *stream, int *width, int *height) SK_OVERRIDE; - bool onDecodeSubset(SkBitmap* bitmap, const SkIRect& region) SK_OVERRIDE; + bool onBuildTileIndex(SkStreamRewindable *stream, int *width, int *height) override; + bool onDecodeSubset(SkBitmap* bitmap, const SkIRect& region) override; #endif - Result onDecode(SkStream* stream, SkBitmap* bm, Mode) SK_OVERRIDE; + Result onDecode(SkStream* stream, SkBitmap* bm, Mode) override; private: SkPNGImageIndex* fImageIndex; @@ -1101,7 +1101,7 @@ static inline int pack_palette(SkColorTable* ctable, class SkPNGImageEncoder : public SkImageEncoder { protected: - bool onEncode(SkWStream* stream, const SkBitmap& bm, int quality) SK_OVERRIDE; + bool onEncode(SkWStream* stream, const SkBitmap& bm, int quality) override; private: bool doEncode(SkWStream* stream, const SkBitmap& bm, const bool& hasAlpha, int colorType, diff --git a/src/images/SkImageDecoder_libwebp.cpp b/src/images/SkImageDecoder_libwebp.cpp index d2061dbd10..decccd17fb 100644 --- a/src/images/SkImageDecoder_libwebp.cpp +++ b/src/images/SkImageDecoder_libwebp.cpp @@ -98,14 +98,14 @@ public: fHasAlpha = 0; } - Format getFormat() const SK_OVERRIDE { + Format getFormat() const override { return kWEBP_Format; } protected: - bool onBuildTileIndex(SkStreamRewindable *stream, int *width, int *height) SK_OVERRIDE; - bool onDecodeSubset(SkBitmap* bitmap, const SkIRect& rect) SK_OVERRIDE; - Result onDecode(SkStream* stream, SkBitmap* bm, Mode) SK_OVERRIDE; + bool onBuildTileIndex(SkStreamRewindable *stream, int *width, int *height) override; + bool onDecodeSubset(SkBitmap* bitmap, const SkIRect& rect) override; + Result onDecode(SkStream* stream, SkBitmap* bm, Mode) override; private: /** @@ -583,7 +583,7 @@ static int stream_writer(const uint8_t* data, size_t data_size, class SkWEBPImageEncoder : public SkImageEncoder { protected: - bool onEncode(SkWStream* stream, const SkBitmap& bm, int quality) SK_OVERRIDE; + bool onEncode(SkWStream* stream, const SkBitmap& bm, int quality) override; private: typedef SkImageEncoder INHERITED; diff --git a/src/images/SkImageDecoder_pkm.cpp b/src/images/SkImageDecoder_pkm.cpp index c607c6f852..9e1a2aaf8c 100644 --- a/src/images/SkImageDecoder_pkm.cpp +++ b/src/images/SkImageDecoder_pkm.cpp @@ -19,12 +19,12 @@ class SkPKMImageDecoder : public SkImageDecoder { public: SkPKMImageDecoder() { } - Format getFormat() const SK_OVERRIDE { + Format getFormat() const override { return kPKM_Format; } protected: - Result onDecode(SkStream* stream, SkBitmap* bm, Mode) SK_OVERRIDE; + Result onDecode(SkStream* stream, SkBitmap* bm, Mode) override; private: typedef SkImageDecoder INHERITED; diff --git a/src/images/SkImageDecoder_wbmp.cpp b/src/images/SkImageDecoder_wbmp.cpp index 1f506dbc4d..d6d4f828e0 100644 --- a/src/images/SkImageDecoder_wbmp.cpp +++ b/src/images/SkImageDecoder_wbmp.cpp @@ -17,12 +17,12 @@ class SkWBMPImageDecoder : public SkImageDecoder { public: - Format getFormat() const SK_OVERRIDE { + Format getFormat() const override { return kWBMP_Format; } protected: - Result onDecode(SkStream* stream, SkBitmap* bm, Mode) SK_OVERRIDE; + Result onDecode(SkStream* stream, SkBitmap* bm, Mode) override; private: typedef SkImageDecoder INHERITED; diff --git a/src/images/SkImageEncoder_argb.cpp b/src/images/SkImageEncoder_argb.cpp index 6bc906fe23..9da15cfb16 100644 --- a/src/images/SkImageEncoder_argb.cpp +++ b/src/images/SkImageEncoder_argb.cpp @@ -13,7 +13,7 @@ class SkARGBImageEncoder : public SkImageEncoder { protected: - bool onEncode(SkWStream* stream, const SkBitmap& bm, int quality) SK_OVERRIDE; + bool onEncode(SkWStream* stream, const SkBitmap& bm, int quality) override; private: typedef SkImageEncoder INHERITED; diff --git a/src/images/SkScaledBitmapSampler.cpp b/src/images/SkScaledBitmapSampler.cpp index 123b85f56a..a040329965 100644 --- a/src/images/SkScaledBitmapSampler.cpp +++ b/src/images/SkScaledBitmapSampler.cpp @@ -834,7 +834,7 @@ class DummyDecoder : public SkImageDecoder { public: DummyDecoder() {} protected: - Result onDecode(SkStream*, SkBitmap*, SkImageDecoder::Mode) SK_OVERRIDE { + Result onDecode(SkStream*, SkBitmap*, SkImageDecoder::Mode) override { return kFailure; } }; diff --git a/src/lazy/SkCachingPixelRef.h b/src/lazy/SkCachingPixelRef.h index a46df14496..4889b83693 100644 --- a/src/lazy/SkCachingPixelRef.h +++ b/src/lazy/SkCachingPixelRef.h @@ -42,11 +42,11 @@ public: protected: virtual ~SkCachingPixelRef(); - bool onNewLockPixels(LockRec*) SK_OVERRIDE; - void onUnlockPixels() SK_OVERRIDE; - bool onLockPixelsAreWritable() const SK_OVERRIDE { return false; } + bool onNewLockPixels(LockRec*) override; + void onUnlockPixels() override; + bool onLockPixelsAreWritable() const override { return false; } - SkData* onRefEncodedData() SK_OVERRIDE { + SkData* onRefEncodedData() override { return fImageGenerator->refEncodedData(); } diff --git a/src/lazy/SkDiscardableMemoryPool.cpp b/src/lazy/SkDiscardableMemoryPool.cpp index 2da8335ff8..1f4836604d 100644 --- a/src/lazy/SkDiscardableMemoryPool.cpp +++ b/src/lazy/SkDiscardableMemoryPool.cpp @@ -32,19 +32,19 @@ public: DiscardableMemoryPool(size_t budget, SkBaseMutex* mutex = NULL); virtual ~DiscardableMemoryPool(); - SkDiscardableMemory* create(size_t bytes) SK_OVERRIDE; + SkDiscardableMemory* create(size_t bytes) override; - size_t getRAMUsed() SK_OVERRIDE; - void setRAMBudget(size_t budget) SK_OVERRIDE; - size_t getRAMBudget() SK_OVERRIDE { return fBudget; } + size_t getRAMUsed() override; + void setRAMBudget(size_t budget) override; + size_t getRAMBudget() override { return fBudget; } /** purges all unlocked DMs */ - void dumpPool() SK_OVERRIDE; + void dumpPool() override; #if SK_LAZY_CACHE_STATS // Defined in SkDiscardableMemoryPool.h - int getCacheHits() SK_OVERRIDE { return fCacheHits; } - int getCacheMisses() SK_OVERRIDE { return fCacheMisses; } - void resetCacheHitsAndMisses() SK_OVERRIDE { + int getCacheHits() override { return fCacheHits; } + int getCacheMisses() override { return fCacheMisses; } + void resetCacheHitsAndMisses() override { fCacheHits = fCacheMisses = 0; } int fCacheHits; @@ -80,9 +80,9 @@ public: PoolDiscardableMemory(DiscardableMemoryPool* pool, void* pointer, size_t bytes); virtual ~PoolDiscardableMemory(); - bool lock() SK_OVERRIDE; - void* data() SK_OVERRIDE; - void unlock() SK_OVERRIDE; + bool lock() override; + void* data() override; + void unlock() override; friend class DiscardableMemoryPool; private: SK_DECLARE_INTERNAL_LLIST_INTERFACE(PoolDiscardableMemory); diff --git a/src/lazy/SkDiscardablePixelRef.h b/src/lazy/SkDiscardablePixelRef.h index 9fef0559d0..e12f50306c 100644 --- a/src/lazy/SkDiscardablePixelRef.h +++ b/src/lazy/SkDiscardablePixelRef.h @@ -25,11 +25,11 @@ public: protected: ~SkDiscardablePixelRef(); - bool onNewLockPixels(LockRec*) SK_OVERRIDE; - void onUnlockPixels() SK_OVERRIDE; - bool onLockPixelsAreWritable() const SK_OVERRIDE { return false; } + bool onNewLockPixels(LockRec*) override; + void onUnlockPixels() override; + bool onLockPixelsAreWritable() const override { return false; } - SkData* onRefEncodedData() SK_OVERRIDE { + SkData* onRefEncodedData() override { return fGenerator->refEncodedData(); } @@ -52,7 +52,7 @@ private: virtual bool onGetYUV8Planes(SkISize sizes[3], void* planes[3], size_t rowBytes[3], - SkYUVColorSpace* colorSpace) SK_OVERRIDE { + SkYUVColorSpace* colorSpace) override { // If the image was already decoded with lockPixels(), favor not // re-decoding to YUV8 planes. if (fDiscardableMemory) { diff --git a/src/opts/SkXfermode_opts_SSE2.h b/src/opts/SkXfermode_opts_SSE2.h index 7ccce488fd..80512aca99 100644 --- a/src/opts/SkXfermode_opts_SSE2.h +++ b/src/opts/SkXfermode_opts_SSE2.h @@ -18,9 +18,9 @@ public: : INHERITED(rec, mode), fProcSIMD(procSIMD) {} virtual void xfer32(SkPMColor dst[], const SkPMColor src[], int count, - const SkAlpha aa[]) const SK_OVERRIDE; + const SkAlpha aa[]) const override; virtual void xfer16(uint16_t dst[], const SkPMColor src[], - int count, const SkAlpha aa[]) const SK_OVERRIDE; + int count, const SkAlpha aa[]) const override; SK_TO_STRING_OVERRIDE() diff --git a/src/opts/SkXfermode_opts_arm_neon.h b/src/opts/SkXfermode_opts_arm_neon.h index f091432d88..cc8c76d1ed 100644 --- a/src/opts/SkXfermode_opts_arm_neon.h +++ b/src/opts/SkXfermode_opts_arm_neon.h @@ -10,9 +10,9 @@ public: : INHERITED(rec, mode), fProcSIMD(procSIMD) {} virtual void xfer32(SkPMColor dst[], const SkPMColor src[], int count, - const SkAlpha aa[]) const SK_OVERRIDE; + const SkAlpha aa[]) const override; virtual void xfer16(uint16_t* SK_RESTRICT dst, const SkPMColor* SK_RESTRICT src, - int count, const SkAlpha* SK_RESTRICT aa) const SK_OVERRIDE; + int count, const SkAlpha* SK_RESTRICT aa) const override; SK_TO_STRING_OVERRIDE() diff --git a/src/pdf/SkPDFBitmap.cpp b/src/pdf/SkPDFBitmap.cpp index 765016dcf2..e4580fcb98 100644 --- a/src/pdf/SkPDFBitmap.cpp +++ b/src/pdf/SkPDFBitmap.cpp @@ -244,7 +244,7 @@ class PDFAlphaBitmap : public SkPDFObject { public: PDFAlphaBitmap(const SkBitmap& bm) : fBitmap(bm) {} ~PDFAlphaBitmap() {} - void emitObject(SkWStream*, SkPDFCatalog*) SK_OVERRIDE; + void emitObject(SkWStream*, SkPDFCatalog*) override; private: const SkBitmap fBitmap; diff --git a/src/pdf/SkPDFBitmap.h b/src/pdf/SkPDFBitmap.h index c1ada1a1ad..6816ed65c2 100644 --- a/src/pdf/SkPDFBitmap.h +++ b/src/pdf/SkPDFBitmap.h @@ -27,8 +27,8 @@ public: // Returns NULL on unsupported bitmap; static SkPDFBitmap* Create(SkPDFCanon*, const SkBitmap&); ~SkPDFBitmap(); - void emitObject(SkWStream*, SkPDFCatalog*) SK_OVERRIDE; - void addResources(SkPDFCatalog*) const SK_OVERRIDE; + void emitObject(SkWStream*, SkPDFCatalog*) override; + void addResources(SkPDFCatalog*) const override; bool equals(const SkBitmap& other) const { return fBitmap.getGenerationID() == other.getGenerationID() && fBitmap.pixelRefOrigin() == other.pixelRefOrigin() && diff --git a/src/pdf/SkPDFDevice.h b/src/pdf/SkPDFDevice.h index ef2cbf78bb..51dd643faa 100644 --- a/src/pdf/SkPDFDevice.h +++ b/src/pdf/SkPDFDevice.h @@ -84,40 +84,40 @@ public: and are handling any looping from the paint, and any effects from the DrawFilter. */ - void drawPaint(const SkDraw&, const SkPaint& paint) SK_OVERRIDE; + void drawPaint(const SkDraw&, const SkPaint& paint) override; void drawPoints(const SkDraw&, SkCanvas::PointMode mode, size_t count, const SkPoint[], - const SkPaint& paint) SK_OVERRIDE; - void drawRect(const SkDraw&, const SkRect& r, const SkPaint& paint) SK_OVERRIDE; - void drawOval(const SkDraw&, const SkRect& oval, const SkPaint& paint) SK_OVERRIDE; - void drawRRect(const SkDraw&, const SkRRect& rr, const SkPaint& paint) SK_OVERRIDE; + const SkPaint& paint) override; + void drawRect(const SkDraw&, const SkRect& r, const SkPaint& paint) override; + void drawOval(const SkDraw&, const SkRect& oval, const SkPaint& paint) override; + void drawRRect(const SkDraw&, const SkRRect& rr, const SkPaint& paint) override; void drawPath(const SkDraw&, const SkPath& origpath, const SkPaint& paint, const SkMatrix* prePathMatrix, - bool pathIsMutable) SK_OVERRIDE; + bool pathIsMutable) override; void drawBitmapRect(const SkDraw& draw, const SkBitmap& bitmap, const SkRect* src, const SkRect& dst, const SkPaint& paint, - SkCanvas::DrawBitmapRectFlags flags) SK_OVERRIDE; + SkCanvas::DrawBitmapRectFlags flags) override; void drawBitmap(const SkDraw&, const SkBitmap& bitmap, - const SkMatrix& matrix, const SkPaint&) SK_OVERRIDE; + const SkMatrix& matrix, const SkPaint&) override; void drawSprite(const SkDraw&, const SkBitmap& bitmap, int x, int y, - const SkPaint& paint) SK_OVERRIDE; + const SkPaint& paint) override; void drawText(const SkDraw&, const void* text, size_t len, - SkScalar x, SkScalar y, const SkPaint&) SK_OVERRIDE; + SkScalar x, SkScalar y, const SkPaint&) override; void drawPosText(const SkDraw&, const void* text, size_t len, const SkScalar pos[], int scalarsPerPos, - const SkPoint& offset, const SkPaint&) SK_OVERRIDE; + const SkPoint& offset, const SkPaint&) override; void drawVertices(const SkDraw&, SkCanvas::VertexMode, int vertexCount, const SkPoint verts[], const SkPoint texs[], const SkColor colors[], SkXfermode* xmode, const uint16_t indices[], - int indexCount, const SkPaint& paint) SK_OVERRIDE; + int indexCount, const SkPaint& paint) override; void drawDevice(const SkDraw&, SkBaseDevice*, int x, int y, - const SkPaint&) SK_OVERRIDE; + const SkPaint&) override; - void onAttachToCanvas(SkCanvas* canvas) SK_OVERRIDE; - void onDetachFromCanvas() SK_OVERRIDE; - SkImageInfo imageInfo() const SK_OVERRIDE; + void onAttachToCanvas(SkCanvas* canvas) override; + void onDetachFromCanvas() override; + SkImageInfo imageInfo() const override; enum DrawingArea { kContent_DrawingArea, // Drawing area for the page content. @@ -184,11 +184,11 @@ public: #endif // SK_DEBUG protected: - const SkBitmap& onAccessBitmap() SK_OVERRIDE { + const SkBitmap& onAccessBitmap() override { return fLegacyBitmap; } - SkSurface* newSurface(const SkImageInfo&, const SkSurfaceProps&) SK_OVERRIDE; + SkSurface* newSurface(const SkImageInfo&, const SkSurfaceProps&) override; private: // TODO(vandebo): push most of SkPDFDevice's state into a core object in @@ -237,7 +237,7 @@ private: ContentEntry* getLastContentEntry(); void setLastContentEntry(ContentEntry* contentEntry); - SkBaseDevice* onCreateDevice(const CreateInfo&, const SkPaint*) SK_OVERRIDE; + SkBaseDevice* onCreateDevice(const CreateInfo&, const SkPaint*) override; void init(); void cleanUp(bool clearFontUsage); diff --git a/src/pdf/SkPDFStream.h b/src/pdf/SkPDFStream.h index 90c6bcacb6..bb38ba96cf 100644 --- a/src/pdf/SkPDFStream.h +++ b/src/pdf/SkPDFStream.h @@ -40,7 +40,7 @@ public: virtual ~SkPDFStream(); // The SkPDFObject interface. - virtual void emitObject(SkWStream* stream, SkPDFCatalog* catalog) SK_OVERRIDE; + virtual void emitObject(SkWStream* stream, SkPDFCatalog* catalog) override; protected: enum State { diff --git a/src/pdf/SkPDFTypes.h b/src/pdf/SkPDFTypes.h index 3bc606509c..8eea7f8a6b 100644 --- a/src/pdf/SkPDFTypes.h +++ b/src/pdf/SkPDFTypes.h @@ -65,8 +65,8 @@ public: virtual ~SkPDFObjRef(); // The SkPDFObject interface. - virtual void emitObject(SkWStream* stream, SkPDFCatalog* catalog) SK_OVERRIDE; - virtual void addResources(SkPDFCatalog*) const SK_OVERRIDE; + virtual void emitObject(SkWStream* stream, SkPDFCatalog* catalog) override; + virtual void addResources(SkPDFCatalog*) const override; private: SkAutoTUnref fObj; @@ -89,7 +89,7 @@ public: virtual ~SkPDFInt(); // The SkPDFObject interface. - virtual void emitObject(SkWStream* stream, SkPDFCatalog* catalog) SK_OVERRIDE; + virtual void emitObject(SkWStream* stream, SkPDFCatalog* catalog) override; private: int32_t fValue; @@ -112,7 +112,7 @@ public: virtual ~SkPDFBool(); // The SkPDFObject interface. - virtual void emitObject(SkWStream* stream, SkPDFCatalog* catalog) SK_OVERRIDE; + virtual void emitObject(SkWStream* stream, SkPDFCatalog* catalog) override; private: bool fValue; @@ -137,7 +137,7 @@ public: static void Append(SkScalar value, SkWStream* stream); // The SkPDFObject interface. - virtual void emitObject(SkWStream* stream, SkPDFCatalog* catalog) SK_OVERRIDE; + virtual void emitObject(SkWStream* stream, SkPDFCatalog* catalog) override; private: SkScalar fValue; @@ -169,7 +169,7 @@ public: virtual ~SkPDFString(); // The SkPDFObject interface. - virtual void emitObject(SkWStream* stream, SkPDFCatalog* catalog) SK_OVERRIDE; + virtual void emitObject(SkWStream* stream, SkPDFCatalog* catalog) override; static SkString FormatString(const char* input, size_t len); static SkString FormatString(const uint16_t* input, size_t len, @@ -203,7 +203,7 @@ public: bool operator==(const SkPDFName& b) const; // The SkPDFObject interface. - virtual void emitObject(SkWStream* stream, SkPDFCatalog* catalog) SK_OVERRIDE; + virtual void emitObject(SkWStream* stream, SkPDFCatalog* catalog) override; private: static const size_t kMaxLen = 127; @@ -229,8 +229,8 @@ public: virtual ~SkPDFArray(); // The SkPDFObject interface. - virtual void emitObject(SkWStream* stream, SkPDFCatalog* catalog) SK_OVERRIDE; - virtual void addResources(SkPDFCatalog*) const SK_OVERRIDE; + virtual void emitObject(SkWStream* stream, SkPDFCatalog* catalog) override; + virtual void addResources(SkPDFCatalog*) const override; /** The size of the array. */ @@ -301,8 +301,8 @@ public: virtual ~SkPDFDict(); // The SkPDFObject interface. - virtual void emitObject(SkWStream* stream, SkPDFCatalog* catalog) SK_OVERRIDE; - virtual void addResources(SkPDFCatalog*) const SK_OVERRIDE; + virtual void emitObject(SkWStream* stream, SkPDFCatalog* catalog) override; + virtual void addResources(SkPDFCatalog*) const override; /** The size of the dictionary. */ diff --git a/src/pipe/SkGPipeRead.cpp b/src/pipe/SkGPipeRead.cpp index 916ab6a75c..f8411f5aea 100644 --- a/src/pipe/SkGPipeRead.cpp +++ b/src/pipe/SkGPipeRead.cpp @@ -162,7 +162,7 @@ public: * these SkBitmaps for bitmap shaders. Used only in cross process mode * without a shared heap. */ - SkBitmap* getBitmap(int32_t index) const SK_OVERRIDE { + SkBitmap* getBitmap(int32_t index) const override { SkASSERT(shouldFlattenBitmaps(fFlags)); return fBitmaps[index]; } @@ -170,7 +170,7 @@ public: /** * Needed to be a non-abstract subclass of SkBitmapHeapReader. */ - void releaseRef(int32_t) SK_OVERRIDE {} + void releaseRef(int32_t) override {} void setSharedHeap(SkBitmapHeap* heap) { SkASSERT(!shouldFlattenBitmaps(fFlags) || NULL == heap); diff --git a/src/pipe/SkGPipeWrite.cpp b/src/pipe/SkGPipeWrite.cpp index db6c2af4dc..2537060d2b 100644 --- a/src/pipe/SkGPipeWrite.cpp +++ b/src/pipe/SkGPipeWrite.cpp @@ -86,9 +86,9 @@ public: fPointers.freeAll(); } - void* allocThrow(size_t bytes) SK_OVERRIDE; + void* allocThrow(size_t bytes) override; - void unalloc(void* ptr) SK_OVERRIDE; + void unalloc(void* ptr) override; void setBitmapStorage(SkBitmapHeap* heap) { this->setBitmapHeap(heap); @@ -175,7 +175,7 @@ public: ~BitmapShuttle(); - bool insert(const SkBitmap& bitmap, int32_t slot) SK_OVERRIDE; + bool insert(const SkBitmap& bitmap, int32_t slot) override; /** * Remove the SkGPipeCanvas used for insertion. After this, calls to @@ -231,9 +231,9 @@ public: return (NULL == fBitmapHeap) ? 0 : fBitmapHeap->bytesAllocated(); } - void beginCommentGroup(const char* description) SK_OVERRIDE; - void addComment(const char* kywd, const char* value) SK_OVERRIDE; - void endCommentGroup() SK_OVERRIDE; + void beginCommentGroup(const char* description) override; + void addComment(const char* kywd, const char* value) override; + void endCommentGroup() override; /** * Flatten an SkBitmap to send to the reader, where it will be referenced @@ -242,56 +242,56 @@ public: bool shuttleBitmap(const SkBitmap&, int32_t slot); protected: - void willSave() SK_OVERRIDE; - SaveLayerStrategy willSaveLayer(const SkRect*, const SkPaint*, SaveFlags) SK_OVERRIDE; - void willRestore() SK_OVERRIDE; + void willSave() override; + SaveLayerStrategy willSaveLayer(const SkRect*, const SkPaint*, SaveFlags) override; + void willRestore() override; - void didConcat(const SkMatrix&) SK_OVERRIDE; - void didSetMatrix(const SkMatrix&) SK_OVERRIDE; + void didConcat(const SkMatrix&) override; + void didSetMatrix(const SkMatrix&) override; - void onDrawDRRect(const SkRRect&, const SkRRect&, const SkPaint&) SK_OVERRIDE; + void onDrawDRRect(const SkRRect&, const SkRRect&, const SkPaint&) override; virtual void onDrawText(const void* text, size_t byteLength, SkScalar x, SkScalar y, - const SkPaint&) SK_OVERRIDE; + const SkPaint&) override; virtual void onDrawPosText(const void* text, size_t byteLength, const SkPoint pos[], - const SkPaint&) SK_OVERRIDE; + const SkPaint&) override; virtual void onDrawPosTextH(const void* text, size_t byteLength, const SkScalar xpos[], - SkScalar constY, const SkPaint&) SK_OVERRIDE; + SkScalar constY, const SkPaint&) override; virtual void onDrawTextOnPath(const void* text, size_t byteLength, const SkPath& path, - const SkMatrix* matrix, const SkPaint&) SK_OVERRIDE; + const SkMatrix* matrix, const SkPaint&) override; virtual void onDrawTextBlob(const SkTextBlob* blob, SkScalar x, SkScalar y, - const SkPaint& paint) SK_OVERRIDE; + const SkPaint& paint) override; virtual void onDrawPatch(const SkPoint cubics[12], const SkColor colors[4], const SkPoint texCoords[4], SkXfermode* xmode, - const SkPaint& paint) SK_OVERRIDE; - void onDrawPaint(const SkPaint&) SK_OVERRIDE; - void onDrawPoints(PointMode, size_t count, const SkPoint pts[], const SkPaint&) SK_OVERRIDE; - void onDrawRect(const SkRect&, const SkPaint&) SK_OVERRIDE; - void onDrawOval(const SkRect&, const SkPaint&) SK_OVERRIDE; - void onDrawRRect(const SkRRect&, const SkPaint&) SK_OVERRIDE; - void onDrawPath(const SkPath&, const SkPaint&) SK_OVERRIDE; - void onDrawBitmap(const SkBitmap&, SkScalar left, SkScalar top, const SkPaint*) SK_OVERRIDE; + const SkPaint& paint) override; + void onDrawPaint(const SkPaint&) override; + void onDrawPoints(PointMode, size_t count, const SkPoint pts[], const SkPaint&) override; + void onDrawRect(const SkRect&, const SkPaint&) override; + void onDrawOval(const SkRect&, const SkPaint&) override; + void onDrawRRect(const SkRRect&, const SkPaint&) override; + void onDrawPath(const SkPath&, const SkPaint&) override; + void onDrawBitmap(const SkBitmap&, SkScalar left, SkScalar top, const SkPaint*) override; void onDrawBitmapRect(const SkBitmap&, const SkRect* src, const SkRect& dst, const SkPaint*, - DrawBitmapRectFlags flags) SK_OVERRIDE; + DrawBitmapRectFlags flags) override; #if 0 // rely on decomposition into bitmap (for now) - void onDrawImage(const SkImage*, SkScalar left, SkScalar top, const SkPaint*) SK_OVERRIDE; + void onDrawImage(const SkImage*, SkScalar left, SkScalar top, const SkPaint*) override; void onDrawImageRect(const SkImage*, const SkRect* src, const SkRect& dst, - const SkPaint*) SK_OVERRIDE; + const SkPaint*) override; #endif void onDrawBitmapNine(const SkBitmap&, const SkIRect& center, const SkRect& dst, - const SkPaint*) SK_OVERRIDE; - void onDrawSprite(const SkBitmap&, int left, int top, const SkPaint*) SK_OVERRIDE; + const SkPaint*) override; + void onDrawSprite(const SkBitmap&, int left, int top, const SkPaint*) override; void onDrawVertices(VertexMode vmode, int vertexCount, const SkPoint vertices[], const SkPoint texs[], const SkColor colors[], SkXfermode* xmode, const uint16_t indices[], int indexCount, - const SkPaint&) SK_OVERRIDE; - void onClipRect(const SkRect&, SkRegion::Op, ClipEdgeStyle) SK_OVERRIDE; - void onClipRRect(const SkRRect&, SkRegion::Op, ClipEdgeStyle) SK_OVERRIDE; - void onClipPath(const SkPath&, SkRegion::Op, ClipEdgeStyle) SK_OVERRIDE; - void onClipRegion(const SkRegion&, SkRegion::Op) SK_OVERRIDE; + const SkPaint&) override; + void onClipRect(const SkRect&, SkRegion::Op, ClipEdgeStyle) override; + void onClipRRect(const SkRRect&, SkRegion::Op, ClipEdgeStyle) override; + void onClipPath(const SkPath&, SkRegion::Op, ClipEdgeStyle) override; + void onClipRegion(const SkRegion&, SkRegion::Op) override; - void onDrawPicture(const SkPicture*, const SkMatrix*, const SkPaint*) SK_OVERRIDE; + void onDrawPicture(const SkPicture*, const SkMatrix*, const SkPaint*) override; private: void recordTranslate(const SkMatrix&); diff --git a/src/pipe/utils/SamplePipeControllers.h b/src/pipe/utils/SamplePipeControllers.h index 3442c49d67..5e074c565c 100644 --- a/src/pipe/utils/SamplePipeControllers.h +++ b/src/pipe/utils/SamplePipeControllers.h @@ -18,8 +18,8 @@ class PipeController : public SkGPipeController { public: PipeController(SkCanvas* target, SkPicture::InstallPixelRefProc proc = NULL); virtual ~PipeController(); - void* requestBlock(size_t minRequest, size_t* actual) SK_OVERRIDE; - void notifyWritten(size_t bytes) SK_OVERRIDE; + void* requestBlock(size_t minRequest, size_t* actual) override; + void notifyWritten(size_t bytes) override; protected: const void* getData() { return (const char*) fBlock + fBytesWritten; } SkGPipeReader fReader; @@ -37,8 +37,8 @@ public: TiledPipeController(const SkBitmap&, SkPicture::InstallPixelRefProc proc = NULL, const SkMatrix* initialMatrix = NULL); virtual ~TiledPipeController() {}; - void notifyWritten(size_t bytes) SK_OVERRIDE; - int numberOfReaders() const SK_OVERRIDE { return NumberOfTiles; } + void notifyWritten(size_t bytes) override; + int numberOfReaders() const override { return NumberOfTiles; } private: enum { NumberOfTiles = 10 @@ -57,9 +57,9 @@ private: class ThreadSafePipeController : public SkGPipeController { public: ThreadSafePipeController(int numberOfReaders); - void* requestBlock(size_t minRequest, size_t* actual) SK_OVERRIDE; - void notifyWritten(size_t bytes) SK_OVERRIDE; - int numberOfReaders() const SK_OVERRIDE { return fNumberOfReaders; } + void* requestBlock(size_t minRequest, size_t* actual) override; + void notifyWritten(size_t bytes) override; + int numberOfReaders() const override { return fNumberOfReaders; } /** * Play the stored drawing commands to the specified canvas. If SkGPipeWriter::startRecording diff --git a/src/ports/SkFontConfigInterface_direct.cpp b/src/ports/SkFontConfigInterface_direct.cpp index 0f2d882ca8..5d4aca905b 100644 --- a/src/ports/SkFontConfigInterface_direct.cpp +++ b/src/ports/SkFontConfigInterface_direct.cpp @@ -111,14 +111,14 @@ public: SkTypeface::Style requested, FontIdentity* outFontIdentifier, SkString* outFamilyName, - SkTypeface::Style* outStyle) SK_OVERRIDE; - SkStreamAsset* openStream(const FontIdentity&) SK_OVERRIDE; + SkTypeface::Style* outStyle) override; + SkStreamAsset* openStream(const FontIdentity&) override; // new APIs - SkDataTable* getFamilyNames() SK_OVERRIDE; + SkDataTable* getFamilyNames() override; virtual bool matchFamilySet(const char inFamilyName[], SkString* outFamilyName, - SkTArray*) SK_OVERRIDE; + SkTArray*) override; private: SkMutex mutex_; diff --git a/src/ports/SkFontConfigTypeface.h b/src/ports/SkFontConfigTypeface.h index 851bfb794f..3672f4e8d3 100644 --- a/src/ports/SkFontConfigTypeface.h +++ b/src/ports/SkFontConfigTypeface.h @@ -56,9 +56,9 @@ protected: // we default to empty fFamilyName and fIdentity } - void onGetFamilyName(SkString* familyName) const SK_OVERRIDE; - void onGetFontDescriptor(SkFontDescriptor*, bool*) const SK_OVERRIDE; - SkStreamAsset* onOpenStream(int* ttcIndex) const SK_OVERRIDE; + void onGetFamilyName(SkString* familyName) const override; + void onGetFontDescriptor(SkFontDescriptor*, bool*) const override; + SkStreamAsset* onOpenStream(int* ttcIndex) const override; private: typedef SkTypeface_FreeType INHERITED; diff --git a/src/ports/SkFontHost_FreeType.cpp b/src/ports/SkFontHost_FreeType.cpp index 19aed66a5c..5a4b75579b 100644 --- a/src/ports/SkFontHost_FreeType.cpp +++ b/src/ports/SkFontHost_FreeType.cpp @@ -193,14 +193,14 @@ public: } protected: - unsigned generateGlyphCount() SK_OVERRIDE; - uint16_t generateCharToGlyph(SkUnichar uni) SK_OVERRIDE; - void generateAdvance(SkGlyph* glyph) SK_OVERRIDE; - void generateMetrics(SkGlyph* glyph) SK_OVERRIDE; - void generateImage(const SkGlyph& glyph) SK_OVERRIDE; - void generatePath(const SkGlyph& glyph, SkPath* path) SK_OVERRIDE; - void generateFontMetrics(SkPaint::FontMetrics*) SK_OVERRIDE; - SkUnichar generateGlyphToChar(uint16_t glyph) SK_OVERRIDE; + unsigned generateGlyphCount() override; + uint16_t generateCharToGlyph(SkUnichar uni) override; + void generateAdvance(SkGlyph* glyph) override; + void generateMetrics(SkGlyph* glyph) override; + void generateImage(const SkGlyph& glyph) override; + void generatePath(const SkGlyph& glyph, SkPath* path) override; + void generateFontMetrics(SkPaint::FontMetrics*) override; + SkUnichar generateGlyphToChar(uint16_t glyph) override; private: SkFaceRec* fFaceRec; diff --git a/src/ports/SkFontHost_FreeType_common.h b/src/ports/SkFontHost_FreeType_common.h index 57aedd07cf..36efba011d 100644 --- a/src/ports/SkFontHost_FreeType_common.h +++ b/src/ports/SkFontHost_FreeType_common.h @@ -59,23 +59,23 @@ protected: {} virtual SkScalerContext* onCreateScalerContext( - const SkDescriptor*) const SK_OVERRIDE; - void onFilterRec(SkScalerContextRec*) const SK_OVERRIDE; + const SkDescriptor*) const override; + void onFilterRec(SkScalerContextRec*) const override; virtual SkAdvancedTypefaceMetrics* onGetAdvancedTypefaceMetrics( SkAdvancedTypefaceMetrics::PerGlyphInfo, - const uint32_t*, uint32_t) const SK_OVERRIDE; - int onGetUPEM() const SK_OVERRIDE; + const uint32_t*, uint32_t) const override; + int onGetUPEM() const override; virtual bool onGetKerningPairAdjustments(const uint16_t glyphs[], int count, - int32_t adjustments[]) const SK_OVERRIDE; + int32_t adjustments[]) const override; virtual int onCharsToGlyphs(const void* chars, Encoding, uint16_t glyphs[], - int glyphCount) const SK_OVERRIDE; - int onCountGlyphs() const SK_OVERRIDE; + int glyphCount) const override; + int onCountGlyphs() const override; - LocalizedStrings* onCreateFamilyNameIterator() const SK_OVERRIDE; + LocalizedStrings* onCreateFamilyNameIterator() const override; - int onGetTableTags(SkFontTableTag tags[]) const SK_OVERRIDE; + int onGetTableTags(SkFontTableTag tags[]) const override; virtual size_t onGetTableData(SkFontTableTag, size_t offset, - size_t length, void* data) const SK_OVERRIDE; + size_t length, void* data) const override; private: mutable int fGlyphCount; diff --git a/src/ports/SkFontHost_linux.cpp b/src/ports/SkFontHost_linux.cpp index 72508e989a..d96365b381 100644 --- a/src/ports/SkFontHost_linux.cpp +++ b/src/ports/SkFontHost_linux.cpp @@ -41,11 +41,11 @@ public: virtual const char* getUniqueString() const = 0; protected: - void onGetFamilyName(SkString* familyName) const SK_OVERRIDE { + void onGetFamilyName(SkString* familyName) const override { *familyName = fFamilyName; } - void onGetFontDescriptor(SkFontDescriptor* desc, bool* isLocal) const SK_OVERRIDE { + void onGetFontDescriptor(SkFontDescriptor* desc, bool* isLocal) const override { desc->setFamilyName(fFamilyName.c_str()); desc->setFontFileName(this->getUniqueString()); desc->setFontIndex(fIndex); @@ -69,10 +69,10 @@ class SkTypeface_Empty : public SkTypeface_Custom { public: SkTypeface_Empty() : INHERITED(SkFontStyle(), false, true, SkString(), 0) {} - const char* getUniqueString() const SK_OVERRIDE { return NULL; } + const char* getUniqueString() const override { return NULL; } protected: - SkStreamAsset* onOpenStream(int*) const SK_OVERRIDE { return NULL; } + SkStreamAsset* onOpenStream(int*) const override { return NULL; } private: typedef SkTypeface_Custom INHERITED; @@ -87,10 +87,10 @@ public: , fStream(stream) { } - const char* getUniqueString() const SK_OVERRIDE { return NULL; } + const char* getUniqueString() const override { return NULL; } protected: - SkStreamAsset* onOpenStream(int* ttcIndex) const SK_OVERRIDE { + SkStreamAsset* onOpenStream(int* ttcIndex) const override { *ttcIndex = this->getIndex(); return fStream->duplicate(); } @@ -118,7 +118,7 @@ public: , fStream(c_CustomTypefaceRetain ? SkStream::NewFromFile(fPath.c_str()) : NULL) { } - const char* getUniqueString() const SK_OVERRIDE { + const char* getUniqueString() const override { const char* str = strrchr(fPath.c_str(), '/'); if (str) { str += 1; // skip the '/' @@ -127,7 +127,7 @@ public: } protected: - SkStreamAsset* onOpenStream(int* ttcIndex) const SK_OVERRIDE { + SkStreamAsset* onOpenStream(int* ttcIndex) const override { *ttcIndex = this->getIndex(); if (fStream.get()) { return fStream->duplicate(); @@ -154,11 +154,11 @@ class SkFontStyleSet_Custom : public SkFontStyleSet { public: explicit SkFontStyleSet_Custom(const SkString familyName) : fFamilyName(familyName) { } - int count() SK_OVERRIDE { + int count() override { return fStyles.count(); } - void getStyle(int index, SkFontStyle* style, SkString* name) SK_OVERRIDE { + void getStyle(int index, SkFontStyle* style, SkString* name) override { SkASSERT(index < fStyles.count()); bool bold = fStyles[index]->isBold(); bool italic = fStyles[index]->isItalic(); @@ -168,7 +168,7 @@ public: name->reset(); } - SkTypeface* createTypeface(int index) SK_OVERRIDE { + SkTypeface* createTypeface(int index) override { SkASSERT(index < fStyles.count()); return SkRef(fStyles[index].get()); } @@ -181,7 +181,7 @@ public: return score; } - SkTypeface* matchStyle(const SkFontStyle& pattern) SK_OVERRIDE { + SkTypeface* matchStyle(const SkFontStyle& pattern) override { if (0 == fStyles.count()) { return NULL; } @@ -231,21 +231,21 @@ public: } protected: - int onCountFamilies() const SK_OVERRIDE { + int onCountFamilies() const override { return fFamilies.count(); } - void onGetFamilyName(int index, SkString* familyName) const SK_OVERRIDE { + void onGetFamilyName(int index, SkString* familyName) const override { SkASSERT(index < fFamilies.count()); familyName->set(fFamilies[index]->fFamilyName); } - SkFontStyleSet_Custom* onCreateStyleSet(int index) const SK_OVERRIDE { + SkFontStyleSet_Custom* onCreateStyleSet(int index) const override { SkASSERT(index < fFamilies.count()); return SkRef(fFamilies[index].get()); } - SkFontStyleSet_Custom* onMatchFamily(const char familyName[]) const SK_OVERRIDE { + SkFontStyleSet_Custom* onMatchFamily(const char familyName[]) const override { for (int i = 0; i < fFamilies.count(); ++i) { if (fFamilies[i]->fFamilyName.equals(familyName)) { return SkRef(fFamilies[i].get()); @@ -255,7 +255,7 @@ protected: } virtual SkTypeface* onMatchFamilyStyle(const char familyName[], - const SkFontStyle& fontStyle) const SK_OVERRIDE + const SkFontStyle& fontStyle) const override { SkAutoTUnref sset(this->matchFamily(familyName)); return sset->matchStyle(fontStyle); @@ -263,13 +263,13 @@ protected: virtual SkTypeface* onMatchFamilyStyleCharacter(const char familyName[], const SkFontStyle&, const char* bcp47[], int bcp47Count, - SkUnichar character) const SK_OVERRIDE + SkUnichar character) const override { return NULL; } virtual SkTypeface* onMatchFaceStyle(const SkTypeface* familyMember, - const SkFontStyle& fontStyle) const SK_OVERRIDE + const SkFontStyle& fontStyle) const override { for (int i = 0; i < fFamilies.count(); ++i) { for (int j = 0; j < fFamilies[i]->fStyles.count(); ++j) { @@ -281,11 +281,11 @@ protected: return NULL; } - SkTypeface* onCreateFromData(SkData* data, int ttcIndex) const SK_OVERRIDE { + SkTypeface* onCreateFromData(SkData* data, int ttcIndex) const override { return this->createFromStream(new SkMemoryStream(data), ttcIndex); } - SkTypeface* onCreateFromStream(SkStreamAsset* bareStream, int ttcIndex) const SK_OVERRIDE { + SkTypeface* onCreateFromStream(SkStreamAsset* bareStream, int ttcIndex) const override { SkAutoTDelete stream(bareStream); if (NULL == stream || stream->getLength() <= 0) { return NULL; @@ -302,13 +302,13 @@ protected: } } - SkTypeface* onCreateFromFile(const char path[], int ttcIndex) const SK_OVERRIDE { + SkTypeface* onCreateFromFile(const char path[], int ttcIndex) const override { SkAutoTDelete stream(SkStream::NewFromFile(path)); return stream.get() ? this->createFromStream(stream.detach(), ttcIndex) : NULL; } virtual SkTypeface* onLegacyCreateTypeface(const char familyName[], - unsigned styleBits) const SK_OVERRIDE + unsigned styleBits) const override { SkTypeface::Style oldStyle = (SkTypeface::Style)styleBits; SkFontStyle style = SkFontStyle(oldStyle & SkTypeface::kBold diff --git a/src/ports/SkFontHost_mac.cpp b/src/ports/SkFontHost_mac.cpp index 99766ed152..5be7cc1f97 100755 --- a/src/ports/SkFontHost_mac.cpp +++ b/src/ports/SkFontHost_mac.cpp @@ -463,22 +463,22 @@ public: AutoCFRelease fFontRef; protected: - int onGetUPEM() const SK_OVERRIDE; - SkStreamAsset* onOpenStream(int* ttcIndex) const SK_OVERRIDE; - void onGetFamilyName(SkString* familyName) const SK_OVERRIDE; - SkTypeface::LocalizedStrings* onCreateFamilyNameIterator() const SK_OVERRIDE; - int onGetTableTags(SkFontTableTag tags[]) const SK_OVERRIDE; + int onGetUPEM() const override; + SkStreamAsset* onOpenStream(int* ttcIndex) const override; + void onGetFamilyName(SkString* familyName) const override; + SkTypeface::LocalizedStrings* onCreateFamilyNameIterator() const override; + int onGetTableTags(SkFontTableTag tags[]) const override; virtual size_t onGetTableData(SkFontTableTag, size_t offset, - size_t length, void* data) const SK_OVERRIDE; - SkScalerContext* onCreateScalerContext(const SkDescriptor*) const SK_OVERRIDE; - void onFilterRec(SkScalerContextRec*) const SK_OVERRIDE; - void onGetFontDescriptor(SkFontDescriptor*, bool*) const SK_OVERRIDE; + size_t length, void* data) const override; + SkScalerContext* onCreateScalerContext(const SkDescriptor*) const override; + void onFilterRec(SkScalerContextRec*) const override; + void onGetFontDescriptor(SkFontDescriptor*, bool*) const override; virtual SkAdvancedTypefaceMetrics* onGetAdvancedTypefaceMetrics( SkAdvancedTypefaceMetrics::PerGlyphInfo, - const uint32_t*, uint32_t) const SK_OVERRIDE; + const uint32_t*, uint32_t) const override; virtual int onCharsToGlyphs(const void* chars, Encoding, uint16_t glyphs[], - int glyphCount) const SK_OVERRIDE; - int onCountGlyphs() const SK_OVERRIDE; + int glyphCount) const override; + int onCountGlyphs() const override; private: bool fIsLocalStream; @@ -630,13 +630,13 @@ public: SkScalerContext_Mac(SkTypeface_Mac*, const SkDescriptor*); protected: - unsigned generateGlyphCount(void) SK_OVERRIDE; - uint16_t generateCharToGlyph(SkUnichar uni) SK_OVERRIDE; - void generateAdvance(SkGlyph* glyph) SK_OVERRIDE; - void generateMetrics(SkGlyph* glyph) SK_OVERRIDE; - void generateImage(const SkGlyph& glyph) SK_OVERRIDE; - void generatePath(const SkGlyph& glyph, SkPath* path) SK_OVERRIDE; - void generateFontMetrics(SkPaint::FontMetrics*) SK_OVERRIDE; + unsigned generateGlyphCount(void) override; + uint16_t generateCharToGlyph(SkUnichar uni) override; + void generateAdvance(SkGlyph* glyph) override; + void generateMetrics(SkGlyph* glyph) override; + void generateImage(const SkGlyph& glyph) override; + void generatePath(const SkGlyph& glyph, SkPath* path) override; + void generateFontMetrics(SkPaint::FontMetrics*) override; private: static void CTPathElement(void *info, const CGPathElement *element); @@ -2108,11 +2108,11 @@ public: CFRelease(fFamilyName); } - int count() SK_OVERRIDE { + int count() override { return fCount; } - void getStyle(int index, SkFontStyle* style, SkString* name) SK_OVERRIDE { + void getStyle(int index, SkFontStyle* style, SkString* name) override { SkASSERT((unsigned)index < (unsigned)fCount); CTFontDescriptorRef desc = (CTFontDescriptorRef)CFArrayGetValueAtIndex(fArray, index); if (style) { @@ -2125,14 +2125,14 @@ public: } } - SkTypeface* createTypeface(int index) SK_OVERRIDE { + SkTypeface* createTypeface(int index) override { SkASSERT((unsigned)index < (unsigned)CFArrayGetCount(fArray)); CTFontDescriptorRef desc = (CTFontDescriptorRef)CFArrayGetValueAtIndex(fArray, index); return createFromDesc(fFamilyName, desc); } - SkTypeface* matchStyle(const SkFontStyle& pattern) SK_OVERRIDE { + SkTypeface* matchStyle(const SkFontStyle& pattern) override { if (0 == fCount) { return NULL; } @@ -2196,11 +2196,11 @@ public: } protected: - int onCountFamilies() const SK_OVERRIDE { + int onCountFamilies() const override { return fCount; } - void onGetFamilyName(int index, SkString* familyName) const SK_OVERRIDE { + void onGetFamilyName(int index, SkString* familyName) const override { if ((unsigned)index < (unsigned)fCount) { CFStringToSkString(this->stringAt(index), familyName); } else { @@ -2208,35 +2208,35 @@ protected: } } - SkFontStyleSet* onCreateStyleSet(int index) const SK_OVERRIDE { + SkFontStyleSet* onCreateStyleSet(int index) const override { if ((unsigned)index >= (unsigned)fCount) { return NULL; } return CreateSet(this->stringAt(index)); } - SkFontStyleSet* onMatchFamily(const char familyName[]) const SK_OVERRIDE { + SkFontStyleSet* onMatchFamily(const char familyName[]) const override { AutoCFRelease cfName(make_CFString(familyName)); return CreateSet(cfName); } virtual SkTypeface* onMatchFamilyStyle(const char familyName[], - const SkFontStyle&) const SK_OVERRIDE { + const SkFontStyle&) const override { return NULL; } virtual SkTypeface* onMatchFamilyStyleCharacter(const char familyName[], const SkFontStyle&, const char* bcp47[], int bcp47Count, - SkUnichar character) const SK_OVERRIDE { + SkUnichar character) const override { return NULL; } virtual SkTypeface* onMatchFaceStyle(const SkTypeface* familyMember, - const SkFontStyle&) const SK_OVERRIDE { + const SkFontStyle&) const override { return NULL; } - SkTypeface* onCreateFromData(SkData* data, int ttcIndex) const SK_OVERRIDE { + SkTypeface* onCreateFromData(SkData* data, int ttcIndex) const override { AutoCFRelease pr(SkCreateDataProviderFromData(data)); if (NULL == pr) { return NULL; @@ -2244,7 +2244,7 @@ protected: return create_from_dataProvider(pr); } - SkTypeface* onCreateFromStream(SkStreamAsset* stream, int ttcIndex) const SK_OVERRIDE { + SkTypeface* onCreateFromStream(SkStreamAsset* stream, int ttcIndex) const override { AutoCFRelease pr(SkCreateDataProviderFromStream(stream)); if (NULL == pr) { return NULL; @@ -2252,7 +2252,7 @@ protected: return create_from_dataProvider(pr); } - SkTypeface* onCreateFromFile(const char path[], int ttcIndex) const SK_OVERRIDE { + SkTypeface* onCreateFromFile(const char path[], int ttcIndex) const override { AutoCFRelease pr(CGDataProviderCreateWithFilename(path)); if (NULL == pr) { return NULL; @@ -2261,7 +2261,7 @@ protected: } virtual SkTypeface* onLegacyCreateTypeface(const char familyName[], - unsigned styleBits) const SK_OVERRIDE { + unsigned styleBits) const override { SkFontStyle style = SkFontStyle((SkTypeface::Style)styleBits); if (familyName) { diff --git a/src/ports/SkFontHost_win.cpp b/src/ports/SkFontHost_win.cpp index dc248fb31d..bb5f8de782 100755 --- a/src/ports/SkFontHost_win.cpp +++ b/src/ports/SkFontHost_win.cpp @@ -254,22 +254,22 @@ public: } protected: - SkStreamAsset* onOpenStream(int* ttcIndex) const SK_OVERRIDE; - SkScalerContext* onCreateScalerContext(const SkDescriptor*) const SK_OVERRIDE; - void onFilterRec(SkScalerContextRec*) const SK_OVERRIDE; + SkStreamAsset* onOpenStream(int* ttcIndex) const override; + SkScalerContext* onCreateScalerContext(const SkDescriptor*) const override; + void onFilterRec(SkScalerContextRec*) const override; virtual SkAdvancedTypefaceMetrics* onGetAdvancedTypefaceMetrics( SkAdvancedTypefaceMetrics::PerGlyphInfo, - const uint32_t*, uint32_t) const SK_OVERRIDE; - void onGetFontDescriptor(SkFontDescriptor*, bool*) const SK_OVERRIDE; + const uint32_t*, uint32_t) const override; + void onGetFontDescriptor(SkFontDescriptor*, bool*) const override; virtual int onCharsToGlyphs(const void* chars, Encoding encoding, - uint16_t glyphs[], int glyphCount) const SK_OVERRIDE; - int onCountGlyphs() const SK_OVERRIDE; - int onGetUPEM() const SK_OVERRIDE; - void onGetFamilyName(SkString* familyName) const SK_OVERRIDE; - SkTypeface::LocalizedStrings* onCreateFamilyNameIterator() const SK_OVERRIDE; - int onGetTableTags(SkFontTableTag tags[]) const SK_OVERRIDE; + uint16_t glyphs[], int glyphCount) const override; + int onCountGlyphs() const override; + int onGetUPEM() const override; + void onGetFamilyName(SkString* familyName) const override; + SkTypeface::LocalizedStrings* onCreateFamilyNameIterator() const override; + int onGetTableTags(SkFontTableTag tags[]) const override; virtual size_t onGetTableData(SkFontTableTag, size_t offset, - size_t length, void* data) const SK_OVERRIDE; + size_t length, void* data) const override; }; class FontMemResourceTypeface : public LogFontTypeface { @@ -282,7 +282,7 @@ public: } protected: - void weak_dispose() const SK_OVERRIDE { + void weak_dispose() const override { RemoveFontMemResourceEx(fFontMemResource); //SkTypefaceCache::Remove(this); INHERITED::weak_dispose(); @@ -540,13 +540,13 @@ public: bool isValid() const; protected: - unsigned generateGlyphCount() SK_OVERRIDE; - uint16_t generateCharToGlyph(SkUnichar uni) SK_OVERRIDE; - void generateAdvance(SkGlyph* glyph) SK_OVERRIDE; - void generateMetrics(SkGlyph* glyph) SK_OVERRIDE; - void generateImage(const SkGlyph& glyph) SK_OVERRIDE; - void generatePath(const SkGlyph& glyph, SkPath* path) SK_OVERRIDE; - void generateFontMetrics(SkPaint::FontMetrics*) SK_OVERRIDE; + unsigned generateGlyphCount() override; + uint16_t generateCharToGlyph(SkUnichar uni) override; + void generateAdvance(SkGlyph* glyph) override; + void generateMetrics(SkGlyph* glyph) override; + void generateImage(const SkGlyph& glyph) override; + void generatePath(const SkGlyph& glyph, SkPath* path) override; + void generateFontMetrics(SkPaint::FontMetrics*) override; private: DWORD getGDIGlyphPath(const SkGlyph& glyph, UINT flags, @@ -2401,11 +2401,11 @@ public: ::DeleteDC(hdc); } - int count() SK_OVERRIDE { + int count() override { return fArray.count(); } - void getStyle(int index, SkFontStyle* fs, SkString* styleName) SK_OVERRIDE { + void getStyle(int index, SkFontStyle* fs, SkString* styleName) override { if (fs) { *fs = get_style(fArray[index].elfLogFont); } @@ -2422,11 +2422,11 @@ public: } } - SkTypeface* createTypeface(int index) SK_OVERRIDE { + SkTypeface* createTypeface(int index) override { return SkCreateTypefaceFromLOGFONT(fArray[index].elfLogFont); } - SkTypeface* matchStyle(const SkFontStyle& pattern) SK_OVERRIDE { + SkTypeface* matchStyle(const SkFontStyle& pattern) override { // todo: return SkCreateTypefaceFromLOGFONT(fArray[0].elfLogFont); } @@ -2448,21 +2448,21 @@ public: } protected: - int onCountFamilies() const SK_OVERRIDE { + int onCountFamilies() const override { return fLogFontArray.count(); } - void onGetFamilyName(int index, SkString* familyName) const SK_OVERRIDE { + void onGetFamilyName(int index, SkString* familyName) const override { SkASSERT((unsigned)index < (unsigned)fLogFontArray.count()); tchar_to_skstring(fLogFontArray[index].elfLogFont.lfFaceName, familyName); } - SkFontStyleSet* onCreateStyleSet(int index) const SK_OVERRIDE { + SkFontStyleSet* onCreateStyleSet(int index) const override { SkASSERT((unsigned)index < (unsigned)fLogFontArray.count()); return SkNEW_ARGS(SkFontStyleSetGDI, (fLogFontArray[index].elfLogFont.lfFaceName)); } - SkFontStyleSet* onMatchFamily(const char familyName[]) const SK_OVERRIDE { + SkFontStyleSet* onMatchFamily(const char familyName[]) const override { if (NULL == familyName) { familyName = ""; // do we need this check??? } @@ -2472,7 +2472,7 @@ protected: } virtual SkTypeface* onMatchFamilyStyle(const char familyName[], - const SkFontStyle& fontstyle) const SK_OVERRIDE { + const SkFontStyle& fontstyle) const override { // could be in base impl SkAutoTUnref sset(this->matchFamily(familyName)); return sset->matchStyle(fontstyle); @@ -2480,35 +2480,35 @@ protected: virtual SkTypeface* onMatchFamilyStyleCharacter(const char familyName[], const SkFontStyle&, const char* bcp47[], int bcp47Count, - SkUnichar character) const SK_OVERRIDE { + SkUnichar character) const override { return NULL; } virtual SkTypeface* onMatchFaceStyle(const SkTypeface* familyMember, - const SkFontStyle& fontstyle) const SK_OVERRIDE { + const SkFontStyle& fontstyle) const override { // could be in base impl SkString familyName; ((LogFontTypeface*)familyMember)->getFamilyName(&familyName); return this->matchFamilyStyle(familyName.c_str(), fontstyle); } - SkTypeface* onCreateFromStream(SkStreamAsset* bareStream, int ttcIndex) const SK_OVERRIDE { + SkTypeface* onCreateFromStream(SkStreamAsset* bareStream, int ttcIndex) const override { SkAutoTDelete stream(bareStream); return create_from_stream(stream); } - SkTypeface* onCreateFromData(SkData* data, int ttcIndex) const SK_OVERRIDE { + SkTypeface* onCreateFromData(SkData* data, int ttcIndex) const override { // could be in base impl return this->createFromStream(SkNEW_ARGS(SkMemoryStream, (data))); } - SkTypeface* onCreateFromFile(const char path[], int ttcIndex) const SK_OVERRIDE { + SkTypeface* onCreateFromFile(const char path[], int ttcIndex) const override { // could be in base impl return this->createFromStream(SkStream::NewFromFile(path)); } virtual SkTypeface* onLegacyCreateTypeface(const char familyName[], - unsigned styleBits) const SK_OVERRIDE { + unsigned styleBits) const override { LOGFONT lf; if (NULL == familyName) { lf = get_default_font(); diff --git a/src/ports/SkFontMgr_android.cpp b/src/ports/SkFontMgr_android.cpp index 11f9449971..49ca08194b 100644 --- a/src/ports/SkFontMgr_android.cpp +++ b/src/ports/SkFontMgr_android.cpp @@ -36,7 +36,7 @@ public: , fFamilyName(familyName) { } protected: - void onGetFamilyName(SkString* familyName) const SK_OVERRIDE { + void onGetFamilyName(SkString* familyName) const override { *familyName = fFamilyName; } @@ -62,7 +62,7 @@ public: , fVariantStyle(variantStyle) { } virtual void onGetFontDescriptor(SkFontDescriptor* desc, - bool* serialize) const SK_OVERRIDE { + bool* serialize) const override { SkASSERT(desc); SkASSERT(serialize); desc->setFamilyName(fFamilyName.c_str()); @@ -70,7 +70,7 @@ public: desc->setFontIndex(fIndex); *serialize = false; } - SkStreamAsset* onOpenStream(int* ttcIndex) const SK_OVERRIDE { + SkStreamAsset* onOpenStream(int* ttcIndex) const override { *ttcIndex = fIndex; return SkStream::NewFromFile(fPathName.c_str()); } @@ -93,7 +93,7 @@ public: , fStream(stream) { } virtual void onGetFontDescriptor(SkFontDescriptor* desc, - bool* serialize) const SK_OVERRIDE { + bool* serialize) const override { SkASSERT(desc); SkASSERT(serialize); desc->setFamilyName(fFamilyName.c_str()); @@ -101,7 +101,7 @@ public: *serialize = true; } - SkStreamAsset* onOpenStream(int* ttcIndex) const SK_OVERRIDE { + SkStreamAsset* onOpenStream(int* ttcIndex) const override { *ttcIndex = fIndex; return fStream->duplicate(); } @@ -169,10 +169,10 @@ public: } } - int count() SK_OVERRIDE { + int count() override { return fStyles.count(); } - void getStyle(int index, SkFontStyle* style, SkString* name) SK_OVERRIDE { + void getStyle(int index, SkFontStyle* style, SkString* name) override { if (index < 0 || fStyles.count() <= index) { return; } @@ -183,7 +183,7 @@ public: name->reset(); } } - SkTypeface_AndroidSystem* createTypeface(int index) SK_OVERRIDE { + SkTypeface_AndroidSystem* createTypeface(int index) override { if (index < 0 || fStyles.count() <= index) { return NULL; } @@ -194,7 +194,7 @@ public: * TODO: consider replacing with SkStyleSet_Indirect::matchStyle(); * this simpler version using match_score() passes all our tests. */ - SkTypeface_AndroidSystem* matchStyle(const SkFontStyle& pattern) SK_OVERRIDE { + SkTypeface_AndroidSystem* matchStyle(const SkFontStyle& pattern) override { if (0 == fStyles.count()) { return NULL; } @@ -269,11 +269,11 @@ protected: /** Returns not how many families we have, but how many unique names * exist among the families. */ - int onCountFamilies() const SK_OVERRIDE { + int onCountFamilies() const override { return fNameToFamilyMap.count(); } - void onGetFamilyName(int index, SkString* familyName) const SK_OVERRIDE { + void onGetFamilyName(int index, SkString* familyName) const override { if (index < 0 || fNameToFamilyMap.count() <= index) { familyName->reset(); return; @@ -281,14 +281,14 @@ protected: familyName->set(fNameToFamilyMap[index].name); } - SkFontStyleSet* onCreateStyleSet(int index) const SK_OVERRIDE { + SkFontStyleSet* onCreateStyleSet(int index) const override { if (index < 0 || fNameToFamilyMap.count() <= index) { return NULL; } return SkRef(fNameToFamilyMap[index].styleSet); } - SkFontStyleSet* onMatchFamily(const char familyName[]) const SK_OVERRIDE { + SkFontStyleSet* onMatchFamily(const char familyName[]) const override { if (!familyName) { return NULL; } @@ -308,13 +308,13 @@ protected: } virtual SkTypeface* onMatchFamilyStyle(const char familyName[], - const SkFontStyle& style) const SK_OVERRIDE { + const SkFontStyle& style) const override { SkAutoTUnref sset(this->matchFamily(familyName)); return sset->matchStyle(style); } virtual SkTypeface* onMatchFaceStyle(const SkTypeface* typeface, - const SkFontStyle& style) const SK_OVERRIDE { + const SkFontStyle& style) const override { for (int i = 0; i < fFontStyleSets.count(); ++i) { for (int j = 0; j < fFontStyleSets[i]->fStyles.count(); ++j) { if (fFontStyleSets[i]->fStyles[j] == typeface) { @@ -359,7 +359,7 @@ protected: const SkFontStyle& style, const char* bcp47[], int bcp47Count, - SkUnichar character) const SK_OVERRIDE + SkUnichar character) const override { // The variant 'elegant' is 'not squashed', 'compact' is 'stays in ascent/descent'. // The variant 'default' means 'compact and elegant'. @@ -393,16 +393,16 @@ protected: return NULL; } - SkTypeface* onCreateFromData(SkData* data, int ttcIndex) const SK_OVERRIDE { + SkTypeface* onCreateFromData(SkData* data, int ttcIndex) const override { return this->createFromStream(new SkMemoryStream(data), ttcIndex); } - SkTypeface* onCreateFromFile(const char path[], int ttcIndex) const SK_OVERRIDE { + SkTypeface* onCreateFromFile(const char path[], int ttcIndex) const override { SkAutoTDelete stream(SkStream::NewFromFile(path)); return stream.get() ? this->createFromStream(stream.detach(), ttcIndex) : NULL; } - SkTypeface* onCreateFromStream(SkStreamAsset* bareStream, int ttcIndex) const SK_OVERRIDE { + SkTypeface* onCreateFromStream(SkStreamAsset* bareStream, int ttcIndex) const override { SkAutoTDelete stream(bareStream); bool isFixedPitch; SkFontStyle style; @@ -416,7 +416,7 @@ protected: virtual SkTypeface* onLegacyCreateTypeface(const char familyName[], - unsigned styleBits) const SK_OVERRIDE { + unsigned styleBits) const override { SkFontStyle style = SkFontStyle(styleBits); if (familyName) { diff --git a/src/ports/SkFontMgr_fontconfig.cpp b/src/ports/SkFontMgr_fontconfig.cpp index a0e45facf6..dc4d8c5a8c 100644 --- a/src/ports/SkFontMgr_fontconfig.cpp +++ b/src/ports/SkFontMgr_fontconfig.cpp @@ -382,16 +382,16 @@ public: , fIndex(index) { }; - void onGetFamilyName(SkString* familyName) const SK_OVERRIDE { + void onGetFamilyName(SkString* familyName) const override { familyName->reset(); } - void onGetFontDescriptor(SkFontDescriptor* desc, bool* serialize) const SK_OVERRIDE { + void onGetFontDescriptor(SkFontDescriptor* desc, bool* serialize) const override { desc->setFontIndex(fIndex); *serialize = true; } - SkStreamAsset* onOpenStream(int* ttcIndex) const SK_OVERRIDE { + SkStreamAsset* onOpenStream(int* ttcIndex) const override { *ttcIndex = fIndex; return fStream->duplicate(); } @@ -411,11 +411,11 @@ public: } mutable SkAutoFcPattern fPattern; - void onGetFamilyName(SkString* familyName) const SK_OVERRIDE { + void onGetFamilyName(SkString* familyName) const override { *familyName = get_string(fPattern, FC_FAMILY); } - void onGetFontDescriptor(SkFontDescriptor* desc, bool* serialize) const SK_OVERRIDE { + void onGetFontDescriptor(SkFontDescriptor* desc, bool* serialize) const override { FCLocker lock; desc->setFamilyName(get_string(fPattern, FC_FAMILY)); desc->setFullName(get_string(fPattern, FC_FULLNAME)); @@ -425,7 +425,7 @@ public: *serialize = false; } - SkStreamAsset* onOpenStream(int* ttcIndex) const SK_OVERRIDE { + SkStreamAsset* onOpenStream(int* ttcIndex) const override { FCLocker lock; *ttcIndex = get_int(fPattern, FC_INDEX, 0); return SkStream::NewFromFile(get_string(fPattern, FC_FILE)); @@ -469,9 +469,9 @@ class SkFontMgr_fontconfig : public SkFontMgr { fFontSet.reset(); } - int count() SK_OVERRIDE { return fFontSet->nfont; } + int count() override { return fFontSet->nfont; } - void getStyle(int index, SkFontStyle* style, SkString* styleName) SK_OVERRIDE { + void getStyle(int index, SkFontStyle* style, SkString* styleName) override { if (index < 0 || fFontSet->nfont <= index) { return; } @@ -485,14 +485,14 @@ class SkFontMgr_fontconfig : public SkFontMgr { } } - SkTypeface* createTypeface(int index) SK_OVERRIDE { + SkTypeface* createTypeface(int index) override { FCLocker lock; FcPattern* match = fFontSet->fonts[index]; return fFontMgr->createTypefaceFromFcPattern(match); } - SkTypeface* matchStyle(const SkFontStyle& style) SK_OVERRIDE { + SkTypeface* matchStyle(const SkFontStyle& style) override { FCLocker lock; SkAutoFcPattern pattern; @@ -607,15 +607,15 @@ public: } protected: - int onCountFamilies() const SK_OVERRIDE { + int onCountFamilies() const override { return fFamilyNames->count(); } - void onGetFamilyName(int index, SkString* familyName) const SK_OVERRIDE { + void onGetFamilyName(int index, SkString* familyName) const override { familyName->set(fFamilyNames->atStr(index)); } - SkFontStyleSet* onCreateStyleSet(int index) const SK_OVERRIDE { + SkFontStyleSet* onCreateStyleSet(int index) const override { return this->onMatchFamily(fFamilyNames->atStr(index)); } @@ -684,7 +684,7 @@ protected: return false; } - SkFontStyleSet* onMatchFamily(const char familyName[]) const SK_OVERRIDE { + SkFontStyleSet* onMatchFamily(const char familyName[]) const override { FCLocker lock; SkAutoFcPattern pattern; @@ -726,7 +726,7 @@ protected: } virtual SkTypeface* onMatchFamilyStyle(const char familyName[], - const SkFontStyle& style) const SK_OVERRIDE + const SkFontStyle& style) const override { FCLocker lock; @@ -767,7 +767,7 @@ protected: const SkFontStyle& style, const char* bcp47[], int bcp47Count, - SkUnichar character) const SK_OVERRIDE + SkUnichar character) const override { FCLocker lock; @@ -801,7 +801,7 @@ protected: } virtual SkTypeface* onMatchFaceStyle(const SkTypeface* typeface, - const SkFontStyle& style) const SK_OVERRIDE + const SkFontStyle& style) const override { //TODO: should the SkTypeface_fontconfig know its family? const SkTypeface_fontconfig* fcTypeface = @@ -809,7 +809,7 @@ protected: return this->matchFamilyStyle(get_string(fcTypeface->fPattern, FC_FAMILY), style); } - SkTypeface* onCreateFromStream(SkStreamAsset* bareStream, int ttcIndex) const SK_OVERRIDE { + SkTypeface* onCreateFromStream(SkStreamAsset* bareStream, int ttcIndex) const override { SkAutoTDelete stream(bareStream); const size_t length = stream->getLength(); if (length <= 0 || (1u << 30) < length) { @@ -826,16 +826,16 @@ protected: static_cast(stream.detach()))); } - SkTypeface* onCreateFromData(SkData* data, int ttcIndex) const SK_OVERRIDE { + SkTypeface* onCreateFromData(SkData* data, int ttcIndex) const override { return this->createFromStream(SkNEW_ARGS(SkMemoryStream, (data)), ttcIndex); } - SkTypeface* onCreateFromFile(const char path[], int ttcIndex) const SK_OVERRIDE { + SkTypeface* onCreateFromFile(const char path[], int ttcIndex) const override { return this->createFromStream(SkStream::NewFromFile(path), ttcIndex); } virtual SkTypeface* onLegacyCreateTypeface(const char familyName[], - unsigned styleBits) const SK_OVERRIDE { + unsigned styleBits) const override { bool bold = styleBits & SkTypeface::kBold; bool italic = styleBits & SkTypeface::kItalic; SkFontStyle style = SkFontStyle(bold ? SkFontStyle::kBold_Weight diff --git a/src/ports/SkFontMgr_win_dw.cpp b/src/ports/SkFontMgr_win_dw.cpp index bff8593688..b07a05091d 100644 --- a/src/ports/SkFontMgr_win_dw.cpp +++ b/src/ports/SkFontMgr_win_dw.cpp @@ -277,22 +277,22 @@ public: } protected: - int onCountFamilies() const SK_OVERRIDE; - void onGetFamilyName(int index, SkString* familyName) const SK_OVERRIDE; - SkFontStyleSet* onCreateStyleSet(int index) const SK_OVERRIDE; - SkFontStyleSet* onMatchFamily(const char familyName[]) const SK_OVERRIDE; + int onCountFamilies() const override; + void onGetFamilyName(int index, SkString* familyName) const override; + SkFontStyleSet* onCreateStyleSet(int index) const override; + SkFontStyleSet* onMatchFamily(const char familyName[]) const override; virtual SkTypeface* onMatchFamilyStyle(const char familyName[], - const SkFontStyle& fontstyle) const SK_OVERRIDE; + const SkFontStyle& fontstyle) const override; virtual SkTypeface* onMatchFamilyStyleCharacter(const char familyName[], const SkFontStyle&, const char* bcp47[], int bcp47Count, - SkUnichar character) const SK_OVERRIDE; + SkUnichar character) const override; virtual SkTypeface* onMatchFaceStyle(const SkTypeface* familyMember, - const SkFontStyle& fontstyle) const SK_OVERRIDE; - SkTypeface* onCreateFromStream(SkStreamAsset* stream, int ttcIndex) const SK_OVERRIDE; - SkTypeface* onCreateFromData(SkData* data, int ttcIndex) const SK_OVERRIDE; - SkTypeface* onCreateFromFile(const char path[], int ttcIndex) const SK_OVERRIDE; + const SkFontStyle& fontstyle) const override; + SkTypeface* onCreateFromStream(SkStreamAsset* stream, int ttcIndex) const override; + SkTypeface* onCreateFromData(SkData* data, int ttcIndex) const override; + SkTypeface* onCreateFromFile(const char path[], int ttcIndex) const override; virtual SkTypeface* onLegacyCreateTypeface(const char familyName[], - unsigned styleBits) const SK_OVERRIDE; + unsigned styleBits) const override; private: HRESULT getByFamilyName(const WCHAR familyName[], IDWriteFontFamily** fontFamily) const; @@ -324,10 +324,10 @@ public: , fFontFamily(SkRefComPtr(fontFamily)) { } - int count() SK_OVERRIDE; - void getStyle(int index, SkFontStyle* fs, SkString* styleName) SK_OVERRIDE; - SkTypeface* createTypeface(int index) SK_OVERRIDE; - SkTypeface* matchStyle(const SkFontStyle& pattern) SK_OVERRIDE; + int count() override; + void getStyle(int index, SkFontStyle* fs, SkString* styleName) override; + SkTypeface* createTypeface(int index) override; + SkTypeface* matchStyle(const SkFontStyle& pattern) override; private: SkAutoTUnref fFontMgr; @@ -519,7 +519,7 @@ public: DWRITE_MEASURING_MODE measuringMode, DWRITE_GLYPH_RUN const* glyphRun, DWRITE_GLYPH_RUN_DESCRIPTION const* glyphRunDescription, - IUnknown* clientDrawingEffect) SK_OVERRIDE + IUnknown* clientDrawingEffect) override { SkTScopedComPtr font; HRM(fOuter->fFontCollection->GetFontFromFontFace(glyphRun->fontFace, &font), @@ -547,7 +547,7 @@ public: FLOAT baselineOriginX, FLOAT baselineOriginY, DWRITE_UNDERLINE const* underline, - IUnknown* clientDrawingEffect) SK_OVERRIDE + IUnknown* clientDrawingEffect) override { return E_NOTIMPL; } virtual HRESULT STDMETHODCALLTYPE DrawStrikethrough( @@ -555,7 +555,7 @@ public: FLOAT baselineOriginX, FLOAT baselineOriginY, DWRITE_STRIKETHROUGH const* strikethrough, - IUnknown* clientDrawingEffect) SK_OVERRIDE + IUnknown* clientDrawingEffect) override { return E_NOTIMPL; } virtual HRESULT STDMETHODCALLTYPE DrawInlineObject( @@ -565,13 +565,13 @@ public: IDWriteInlineObject* inlineObject, BOOL isSideways, BOOL isRightToLeft, - IUnknown* clientDrawingEffect) SK_OVERRIDE + IUnknown* clientDrawingEffect) override { return E_NOTIMPL; } // IDWritePixelSnapping methods virtual HRESULT STDMETHODCALLTYPE IsPixelSnappingDisabled( void* clientDrawingContext, - BOOL* isDisabled) SK_OVERRIDE + BOOL* isDisabled) override { *isDisabled = FALSE; return S_OK; @@ -579,7 +579,7 @@ public: virtual HRESULT STDMETHODCALLTYPE GetCurrentTransform( void* clientDrawingContext, - DWRITE_MATRIX* transform) SK_OVERRIDE + DWRITE_MATRIX* transform) override { const DWRITE_MATRIX ident = { 1.0, 0.0, 0.0, 1.0, 0.0, 0.0 }; *transform = ident; @@ -588,18 +588,18 @@ public: virtual HRESULT STDMETHODCALLTYPE GetPixelsPerDip( void* clientDrawingContext, - FLOAT* pixelsPerDip) SK_OVERRIDE + FLOAT* pixelsPerDip) override { *pixelsPerDip = 1.0f; return S_OK; } // IUnknown methods - ULONG STDMETHODCALLTYPE AddRef() SK_OVERRIDE { + ULONG STDMETHODCALLTYPE AddRef() override { return InterlockedIncrement(&fRefCount); } - ULONG STDMETHODCALLTYPE Release() SK_OVERRIDE { + ULONG STDMETHODCALLTYPE Release() override { ULONG newCount = InterlockedDecrement(&fRefCount); if (0 == newCount) { delete this; @@ -607,7 +607,7 @@ public: return newCount; } - virtual HRESULT STDMETHODCALLTYPE QueryInterface(IID const& riid, void** ppvObject) SK_OVERRIDE{ + virtual HRESULT STDMETHODCALLTYPE QueryInterface(IID const& riid, void** ppvObject) override{ if (__uuidof(IUnknown) == riid || __uuidof(IDWritePixelSnapping) == riid || __uuidof(IDWriteTextRenderer) == riid) @@ -660,7 +660,7 @@ public: virtual HRESULT STDMETHODCALLTYPE GetTextAtPosition( UINT32 textPosition, WCHAR const** textString, - UINT32* textLength) SK_OVERRIDE + UINT32* textLength) override { if (fLength <= textPosition) { *textString = NULL; @@ -675,7 +675,7 @@ public: virtual HRESULT STDMETHODCALLTYPE GetTextBeforePosition( UINT32 textPosition, WCHAR const** textString, - UINT32* textLength) SK_OVERRIDE + UINT32* textLength) override { if (textPosition < 1 || fLength <= textPosition) { *textString = NULL; @@ -687,7 +687,7 @@ public: return S_OK; } - virtual DWRITE_READING_DIRECTION STDMETHODCALLTYPE GetParagraphReadingDirection() SK_OVERRIDE { + virtual DWRITE_READING_DIRECTION STDMETHODCALLTYPE GetParagraphReadingDirection() override { // TODO: this is also interesting. return DWRITE_READING_DIRECTION_LEFT_TO_RIGHT; } @@ -695,7 +695,7 @@ public: virtual HRESULT STDMETHODCALLTYPE GetLocaleName( UINT32 textPosition, UINT32* textLength, - WCHAR const** localeName) SK_OVERRIDE + WCHAR const** localeName) override { *localeName = fLocale; return S_OK; @@ -704,18 +704,18 @@ public: virtual HRESULT STDMETHODCALLTYPE GetNumberSubstitution( UINT32 textPosition, UINT32* textLength, - IDWriteNumberSubstitution** numberSubstitution) SK_OVERRIDE + IDWriteNumberSubstitution** numberSubstitution) override { *numberSubstitution = fNumberSubstitution; return S_OK; } // IUnknown methods - ULONG STDMETHODCALLTYPE AddRef() SK_OVERRIDE { + ULONG STDMETHODCALLTYPE AddRef() override { return InterlockedIncrement(&fRefCount); } - ULONG STDMETHODCALLTYPE Release() SK_OVERRIDE { + ULONG STDMETHODCALLTYPE Release() override { ULONG newCount = InterlockedDecrement(&fRefCount); if (0 == newCount) { delete this; @@ -723,7 +723,7 @@ public: return newCount; } - virtual HRESULT STDMETHODCALLTYPE QueryInterface(IID const& riid, void** ppvObject) SK_OVERRIDE{ + virtual HRESULT STDMETHODCALLTYPE QueryInterface(IID const& riid, void** ppvObject) override{ if (__uuidof(IUnknown) == riid || __uuidof(IDWriteTextAnalysisSource) == riid) { diff --git a/src/ports/SkImageDecoder_WIC.cpp b/src/ports/SkImageDecoder_WIC.cpp index 80fb8a3254..55344a7c18 100644 --- a/src/ports/SkImageDecoder_WIC.cpp +++ b/src/ports/SkImageDecoder_WIC.cpp @@ -67,7 +67,7 @@ public: bool decodeStream(SkStream* stream, SkBitmap* bm, WICModes wicMode, Format* format) const; protected: - Result onDecode(SkStream* stream, SkBitmap* bm, Mode mode) SK_OVERRIDE; + Result onDecode(SkStream* stream, SkBitmap* bm, Mode mode) override; }; struct FormatConversion { diff --git a/src/ports/SkImageGenerator_skia.cpp b/src/ports/SkImageGenerator_skia.cpp index 6938880357..3c2ce09281 100644 --- a/src/ports/SkImageGenerator_skia.cpp +++ b/src/ports/SkImageGenerator_skia.cpp @@ -21,7 +21,7 @@ public: {} protected: - bool allocPixelRef(SkBitmap* bm, SkColorTable* ctable) SK_OVERRIDE { + bool allocPixelRef(SkBitmap* bm, SkColorTable* ctable) override { const SkImageInfo bmi = bm->info(); if (bmi.width() != fInfo.width() || bmi.height() != fInfo.height() || bmi.colorType() != fInfo.colorType()) @@ -43,12 +43,12 @@ public: {} protected: - SkData* onRefEncodedData() SK_OVERRIDE { + SkData* onRefEncodedData() override { return SkRef(fData.get()); } #ifdef SK_SUPPORT_LEGACY_BOOL_ONGETINFO - virtual bool onGetInfo(SkImageInfo* info) SK_OVERRIDE { + virtual bool onGetInfo(SkImageInfo* info) override { *info = fInfo; return true; } @@ -56,7 +56,7 @@ protected: virtual Result onGetPixels(const SkImageInfo& info, void* pixels, size_t rowBytes, const Options&, - SkPMColor ctableEntries[], int* ctableCount) SK_OVERRIDE { + SkPMColor ctableEntries[], int* ctableCount) override { SkMemoryStream stream(fData->data(), fData->size(), false); SkAutoTUnref allocator(SkNEW_ARGS(BareMemoryAllocator, (info, pixels, rowBytes))); @@ -90,7 +90,7 @@ protected: } bool onGetYUV8Planes(SkISize sizes[3], void* planes[3], size_t rowBytes[3], - SkYUVColorSpace* colorSpace) SK_OVERRIDE { + SkYUVColorSpace* colorSpace) override { SkMemoryStream stream(fData->data(), fData->size(), false); return fDecoder->decodeYUV8Planes(&stream, sizes, planes, rowBytes, colorSpace); } diff --git a/src/ports/SkRemotableFontMgr_win_dw.cpp b/src/ports/SkRemotableFontMgr_win_dw.cpp index ad1efb7b12..8c6dd84ba5 100644 --- a/src/ports/SkRemotableFontMgr_win_dw.cpp +++ b/src/ports/SkRemotableFontMgr_win_dw.cpp @@ -91,7 +91,7 @@ public: memcpy(fLocaleName.get(), localeName, localeNameLength * sizeof(WCHAR)); } - SkDataTable* getFamilyNames() const SK_OVERRIDE { + SkDataTable* getFamilyNames() const override { int count = fFontCollection->GetFontFamilyCount(); SkDataTableBuilder names(1024); @@ -158,7 +158,7 @@ public: return S_OK; } - SkRemotableFontIdentitySet* getIndex(int familyIndex) const SK_OVERRIDE { + SkRemotableFontIdentitySet* getIndex(int familyIndex) const override { SkTScopedComPtr fontFamily; HRNM(fFontCollection->GetFontFamily(familyIndex, &fontFamily), "Could not get requested family."); @@ -177,7 +177,7 @@ public: } virtual SkFontIdentity matchIndexStyle(int familyIndex, - const SkFontStyle& pattern) const SK_OVERRIDE + const SkFontStyle& pattern) const override { SkFontIdentity identity = { SkFontIdentity::kInvalidDataId }; @@ -216,7 +216,7 @@ public: return S_OK; } - SkRemotableFontIdentitySet* matchName(const char familyName[]) const SK_OVERRIDE { + SkRemotableFontIdentitySet* matchName(const char familyName[]) const override { SkSMallocWCHAR dwFamilyName; if (NULL == familyName) { HR_GENERAL(getDefaultFontFamilyName(&dwFamilyName), @@ -239,7 +239,7 @@ public: } virtual SkFontIdentity matchNameStyle(const char familyName[], - const SkFontStyle& style) const SK_OVERRIDE + const SkFontStyle& style) const override { SkFontIdentity identity = { SkFontIdentity::kInvalidDataId }; @@ -279,7 +279,7 @@ public: DWRITE_MEASURING_MODE measuringMode, DWRITE_GLYPH_RUN const* glyphRun, DWRITE_GLYPH_RUN_DESCRIPTION const* glyphRunDescription, - IUnknown* clientDrawingEffect) SK_OVERRIDE + IUnknown* clientDrawingEffect) override { SkTScopedComPtr font; HRM(fOuter->fFontCollection->GetFontFromFontFace(glyphRun->fontFace, &font), @@ -303,7 +303,7 @@ public: FLOAT baselineOriginX, FLOAT baselineOriginY, DWRITE_UNDERLINE const* underline, - IUnknown* clientDrawingEffect) SK_OVERRIDE + IUnknown* clientDrawingEffect) override { return E_NOTIMPL; } virtual HRESULT STDMETHODCALLTYPE DrawStrikethrough( @@ -311,7 +311,7 @@ public: FLOAT baselineOriginX, FLOAT baselineOriginY, DWRITE_STRIKETHROUGH const* strikethrough, - IUnknown* clientDrawingEffect) SK_OVERRIDE + IUnknown* clientDrawingEffect) override { return E_NOTIMPL; } virtual HRESULT STDMETHODCALLTYPE DrawInlineObject( @@ -321,13 +321,13 @@ public: IDWriteInlineObject* inlineObject, BOOL isSideways, BOOL isRightToLeft, - IUnknown* clientDrawingEffect) SK_OVERRIDE + IUnknown* clientDrawingEffect) override { return E_NOTIMPL; } // IDWritePixelSnapping methods virtual HRESULT STDMETHODCALLTYPE IsPixelSnappingDisabled( void* clientDrawingContext, - BOOL* isDisabled) SK_OVERRIDE + BOOL* isDisabled) override { *isDisabled = FALSE; return S_OK; @@ -335,7 +335,7 @@ public: virtual HRESULT STDMETHODCALLTYPE GetCurrentTransform( void* clientDrawingContext, - DWRITE_MATRIX* transform) SK_OVERRIDE + DWRITE_MATRIX* transform) override { const DWRITE_MATRIX ident = {1.0, 0.0, 0.0, 1.0, 0.0, 0.0}; *transform = ident; @@ -344,18 +344,18 @@ public: virtual HRESULT STDMETHODCALLTYPE GetPixelsPerDip( void* clientDrawingContext, - FLOAT* pixelsPerDip) SK_OVERRIDE + FLOAT* pixelsPerDip) override { *pixelsPerDip = 1.0f; return S_OK; } // IUnknown methods - ULONG STDMETHODCALLTYPE AddRef() SK_OVERRIDE { + ULONG STDMETHODCALLTYPE AddRef() override { return InterlockedIncrement(&fRefCount); } - ULONG STDMETHODCALLTYPE Release() SK_OVERRIDE { + ULONG STDMETHODCALLTYPE Release() override { ULONG newCount = InterlockedDecrement(&fRefCount); if (0 == newCount) { delete this; @@ -364,7 +364,7 @@ public: } virtual HRESULT STDMETHODCALLTYPE QueryInterface( - IID const& riid, void** ppvObject) SK_OVERRIDE + IID const& riid, void** ppvObject) override { if (__uuidof(IUnknown) == riid || __uuidof(IDWritePixelSnapping) == riid || @@ -390,7 +390,7 @@ public: virtual SkFontIdentity matchNameStyleCharacter(const char familyName[], const SkFontStyle& pattern, const char* bcp47[], int bcp47Count, - SkUnichar character) const SK_OVERRIDE + SkUnichar character) const override { SkFontIdentity identity = { SkFontIdentity::kInvalidDataId }; @@ -452,7 +452,7 @@ public: return fontFallbackRenderer->FallbackIdentity(); } - SkStreamAsset* getData(int dataId) const SK_OVERRIDE { + SkStreamAsset* getData(int dataId) const override { SkAutoMutexAcquire ama(fDataIdCacheMutex); if (dataId >= fDataIdCache.count()) { return NULL; diff --git a/src/ports/SkScalerContext_win_dw.h b/src/ports/SkScalerContext_win_dw.h index 5c13eab615..abf2bc9aa0 100644 --- a/src/ports/SkScalerContext_win_dw.h +++ b/src/ports/SkScalerContext_win_dw.h @@ -24,13 +24,13 @@ public: virtual ~SkScalerContext_DW(); protected: - unsigned generateGlyphCount() SK_OVERRIDE; - uint16_t generateCharToGlyph(SkUnichar uni) SK_OVERRIDE; - void generateAdvance(SkGlyph* glyph) SK_OVERRIDE; - void generateMetrics(SkGlyph* glyph) SK_OVERRIDE; - void generateImage(const SkGlyph& glyph) SK_OVERRIDE; - void generatePath(const SkGlyph& glyph, SkPath* path) SK_OVERRIDE; - void generateFontMetrics(SkPaint::FontMetrics*) SK_OVERRIDE; + unsigned generateGlyphCount() override; + uint16_t generateCharToGlyph(SkUnichar uni) override; + void generateAdvance(SkGlyph* glyph) override; + void generateMetrics(SkGlyph* glyph) override; + void generateImage(const SkGlyph& glyph) override; + void generatePath(const SkGlyph& glyph, SkPath* path) override; + void generateFontMetrics(SkPaint::FontMetrics*) override; private: const void* drawDWMask(const SkGlyph& glyph, diff --git a/src/ports/SkTypeface_win_dw.cpp b/src/ports/SkTypeface_win_dw.cpp index a5072b96ce..6650751f3a 100644 --- a/src/ports/SkTypeface_win_dw.cpp +++ b/src/ports/SkTypeface_win_dw.cpp @@ -137,7 +137,7 @@ public: : fIndex(0), fStrings(strings) { } - bool next(SkTypeface::LocalizedString* localizedString) SK_OVERRIDE { + bool next(SkTypeface::LocalizedString* localizedString) override { if (fIndex >= fStrings->GetCount()) { return false; } diff --git a/src/ports/SkTypeface_win_dw.h b/src/ports/SkTypeface_win_dw.h index 9e824e5948..9921aed4f7 100644 --- a/src/ports/SkTypeface_win_dw.h +++ b/src/ports/SkTypeface_win_dw.h @@ -84,7 +84,7 @@ public: } protected: - void weak_dispose() const SK_OVERRIDE { + void weak_dispose() const override { if (fDWriteFontCollectionLoader.get()) { HRV(fFactory->UnregisterFontCollectionLoader(fDWriteFontCollectionLoader.get())); } @@ -96,22 +96,22 @@ protected: INHERITED::weak_dispose(); } - SkStreamAsset* onOpenStream(int* ttcIndex) const SK_OVERRIDE; - SkScalerContext* onCreateScalerContext(const SkDescriptor*) const SK_OVERRIDE; - void onFilterRec(SkScalerContextRec*) const SK_OVERRIDE; + SkStreamAsset* onOpenStream(int* ttcIndex) const override; + SkScalerContext* onCreateScalerContext(const SkDescriptor*) const override; + void onFilterRec(SkScalerContextRec*) const override; virtual SkAdvancedTypefaceMetrics* onGetAdvancedTypefaceMetrics( SkAdvancedTypefaceMetrics::PerGlyphInfo, - const uint32_t*, uint32_t) const SK_OVERRIDE; - void onGetFontDescriptor(SkFontDescriptor*, bool*) const SK_OVERRIDE; + const uint32_t*, uint32_t) const override; + void onGetFontDescriptor(SkFontDescriptor*, bool*) const override; virtual int onCharsToGlyphs(const void* chars, Encoding encoding, - uint16_t glyphs[], int glyphCount) const SK_OVERRIDE; - int onCountGlyphs() const SK_OVERRIDE; - int onGetUPEM() const SK_OVERRIDE; - void onGetFamilyName(SkString* familyName) const SK_OVERRIDE; - SkTypeface::LocalizedStrings* onCreateFamilyNameIterator() const SK_OVERRIDE; - int onGetTableTags(SkFontTableTag tags[]) const SK_OVERRIDE; + uint16_t glyphs[], int glyphCount) const override; + int onCountGlyphs() const override; + int onGetUPEM() const override; + void onGetFamilyName(SkString* familyName) const override; + SkTypeface::LocalizedStrings* onCreateFamilyNameIterator() const override; + int onGetTableTags(SkFontTableTag tags[]) const override; virtual size_t onGetTableData(SkFontTableTag, size_t offset, - size_t length, void* data) const SK_OVERRIDE; + size_t length, void* data) const override; private: typedef SkTypeface INHERITED; diff --git a/src/sfnt/SkOTUtils.h b/src/sfnt/SkOTUtils.h index cbaf31cf70..e1db048b18 100644 --- a/src/sfnt/SkOTUtils.h +++ b/src/sfnt/SkOTUtils.h @@ -54,7 +54,7 @@ struct SkOTUtils { */ static LocalizedStrings_NameTable* CreateForFamilyNames(const SkTypeface& typeface); - bool next(SkTypeface::LocalizedString* localizedString) SK_OVERRIDE; + bool next(SkTypeface::LocalizedString* localizedString) override; private: static SkOTTableName::Record::NameID::Predefined::Value familyNameTypes[3]; @@ -72,7 +72,7 @@ struct SkOTUtils { : fName(name), fLanguage(language), fHasNext(true) { } - bool next(SkTypeface::LocalizedString* localizedString) SK_OVERRIDE { + bool next(SkTypeface::LocalizedString* localizedString) override { localizedString->fString = fName; localizedString->fLanguage = fLanguage; diff --git a/src/svg/SkSVGDevice.h b/src/svg/SkSVGDevice.h index 914642392f..d6b56e87c3 100644 --- a/src/svg/SkSVGDevice.h +++ b/src/svg/SkSVGDevice.h @@ -16,46 +16,46 @@ class SkSVGDevice : public SkBaseDevice { public: static SkBaseDevice* Create(const SkISize& size, SkXMLWriter* writer); - virtual SkImageInfo imageInfo() const SK_OVERRIDE; + virtual SkImageInfo imageInfo() const override; protected: - virtual void drawPaint(const SkDraw&, const SkPaint& paint) SK_OVERRIDE; + virtual void drawPaint(const SkDraw&, const SkPaint& paint) override; virtual void drawPoints(const SkDraw&, SkCanvas::PointMode mode, size_t count, - const SkPoint[], const SkPaint& paint) SK_OVERRIDE; - virtual void drawRect(const SkDraw&, const SkRect& r, const SkPaint& paint) SK_OVERRIDE; - virtual void drawOval(const SkDraw&, const SkRect& oval, const SkPaint& paint) SK_OVERRIDE; - virtual void drawRRect(const SkDraw&, const SkRRect& rr, const SkPaint& paint) SK_OVERRIDE; + const SkPoint[], const SkPaint& paint) override; + virtual void drawRect(const SkDraw&, const SkRect& r, const SkPaint& paint) override; + virtual void drawOval(const SkDraw&, const SkRect& oval, const SkPaint& paint) override; + virtual void drawRRect(const SkDraw&, const SkRRect& rr, const SkPaint& paint) override; virtual void drawPath(const SkDraw&, const SkPath& path, const SkPaint& paint, const SkMatrix* prePathMatrix = NULL, - bool pathIsMutable = false) SK_OVERRIDE; + bool pathIsMutable = false) override; virtual void drawBitmap(const SkDraw&, const SkBitmap& bitmap, - const SkMatrix& matrix, const SkPaint& paint) SK_OVERRIDE; + const SkMatrix& matrix, const SkPaint& paint) override; virtual void drawSprite(const SkDraw&, const SkBitmap& bitmap, - int x, int y, const SkPaint& paint) SK_OVERRIDE; + int x, int y, const SkPaint& paint) override; virtual void drawBitmapRect(const SkDraw&, const SkBitmap&, const SkRect* srcOrNull, const SkRect& dst, const SkPaint& paint, - SkCanvas::DrawBitmapRectFlags flags) SK_OVERRIDE; + SkCanvas::DrawBitmapRectFlags flags) override; virtual void drawText(const SkDraw&, const void* text, size_t len, - SkScalar x, SkScalar y, const SkPaint& paint) SK_OVERRIDE; + SkScalar x, SkScalar y, const SkPaint& paint) override; virtual void drawPosText(const SkDraw&, const void* text, size_t len, const SkScalar pos[], int scalarsPerPos, - const SkPoint& offset, const SkPaint& paint) SK_OVERRIDE; + const SkPoint& offset, const SkPaint& paint) override; virtual void drawTextOnPath(const SkDraw&, const void* text, size_t len, const SkPath& path, const SkMatrix* matrix, - const SkPaint& paint) SK_OVERRIDE; + const SkPaint& paint) override; virtual void drawVertices(const SkDraw&, SkCanvas::VertexMode, int vertexCount, const SkPoint verts[], const SkPoint texs[], const SkColor colors[], SkXfermode* xmode, const uint16_t indices[], int indexCount, - const SkPaint& paint) SK_OVERRIDE; + const SkPaint& paint) override; virtual void drawDevice(const SkDraw&, SkBaseDevice*, int x, int y, - const SkPaint&) SK_OVERRIDE; - virtual const SkBitmap& onAccessBitmap() SK_OVERRIDE; + const SkPaint&) override; + virtual const SkBitmap& onAccessBitmap() override; private: SkSVGDevice(const SkISize& size, SkXMLWriter* writer); diff --git a/src/utils/SkCanvasStack.h b/src/utils/SkCanvasStack.h index 27bc6bc018..6602110e31 100644 --- a/src/utils/SkCanvasStack.h +++ b/src/utils/SkCanvasStack.h @@ -18,7 +18,7 @@ public: virtual ~SkCanvasStack(); void pushCanvas(SkCanvas* canvas, const SkIPoint& origin); - void removeAll() SK_OVERRIDE; + void removeAll() override; /* * The following add/remove canvas methods are overrides from SkNWayCanvas @@ -26,16 +26,16 @@ public: * can share most of the other implementation of NWay we override those * methods to be no-ops. */ - void addCanvas(SkCanvas*) SK_OVERRIDE { SkDEBUGFAIL("Invalid Op"); } - void removeCanvas(SkCanvas*) SK_OVERRIDE { SkDEBUGFAIL("Invalid Op"); } + void addCanvas(SkCanvas*) override { SkDEBUGFAIL("Invalid Op"); } + void removeCanvas(SkCanvas*) override { SkDEBUGFAIL("Invalid Op"); } protected: - void didSetMatrix(const SkMatrix&) SK_OVERRIDE; + void didSetMatrix(const SkMatrix&) override; - void onClipRect(const SkRect&, SkRegion::Op, ClipEdgeStyle) SK_OVERRIDE; - void onClipRRect(const SkRRect&, SkRegion::Op, ClipEdgeStyle) SK_OVERRIDE; - void onClipPath(const SkPath&, SkRegion::Op, ClipEdgeStyle) SK_OVERRIDE; - void onClipRegion(const SkRegion&, SkRegion::Op) SK_OVERRIDE; + void onClipRect(const SkRect&, SkRegion::Op, ClipEdgeStyle) override; + void onClipRRect(const SkRRect&, SkRegion::Op, ClipEdgeStyle) override; + void onClipPath(const SkPath&, SkRegion::Op, ClipEdgeStyle) override; + void onClipRegion(const SkRegion&, SkRegion::Op) override; private: void clipToZOrderedBounds(); diff --git a/src/utils/SkCanvasStateUtils.cpp b/src/utils/SkCanvasStateUtils.cpp index 0a148024db..f7a9447de2 100644 --- a/src/utils/SkCanvasStateUtils.cpp +++ b/src/utils/SkCanvasStateUtils.cpp @@ -141,15 +141,15 @@ public: bool failed() { return fFailed; } // ClipVisitor - void clipRect(const SkRect& rect, SkRegion::Op op, bool antialias) SK_OVERRIDE { + void clipRect(const SkRect& rect, SkRegion::Op op, bool antialias) override { fFailed |= antialias; } - void clipRRect(const SkRRect& rrect, SkRegion::Op op, bool antialias) SK_OVERRIDE { + void clipRRect(const SkRRect& rrect, SkRegion::Op op, bool antialias) override { fFailed |= antialias; } - void clipPath(const SkPath&, SkRegion::Op, bool antialias) SK_OVERRIDE { + void clipPath(const SkPath&, SkRegion::Op, bool antialias) override { fFailed |= antialias; } diff --git a/src/utils/SkDeferredCanvas.cpp b/src/utils/SkDeferredCanvas.cpp index 5b3b58cdf0..d2488231d5 100644 --- a/src/utils/SkDeferredCanvas.cpp +++ b/src/utils/SkDeferredCanvas.cpp @@ -65,8 +65,8 @@ public: DeferredPipeController(); void setPlaybackCanvas(SkCanvas*); virtual ~DeferredPipeController(); - void* requestBlock(size_t minRequest, size_t* actual) SK_OVERRIDE; - void notifyWritten(size_t bytes) SK_OVERRIDE; + void* requestBlock(size_t minRequest, size_t* actual) override; + void notifyWritten(size_t bytes) override; void playback(bool silent); bool hasPendingCommands() const { return fAllocator.totalUsed() != 0; } size_t storageAllocatedForRecording() const { return fAllocator.totalCapacity(); } @@ -158,90 +158,90 @@ public: void recordedDrawCommand(); void setIsDrawingToLayer(bool value) {fIsDrawingToLayer = value;} - SkImageInfo imageInfo() const SK_OVERRIDE; + SkImageInfo imageInfo() const override; - GrRenderTarget* accessRenderTarget() SK_OVERRIDE; + GrRenderTarget* accessRenderTarget() override; - SkBaseDevice* onCreateDevice(const CreateInfo&, const SkPaint*) SK_OVERRIDE; + SkBaseDevice* onCreateDevice(const CreateInfo&, const SkPaint*) override; - SkSurface* newSurface(const SkImageInfo&, const SkSurfaceProps&) SK_OVERRIDE; + SkSurface* newSurface(const SkImageInfo&, const SkSurfaceProps&) override; protected: - const SkBitmap& onAccessBitmap() SK_OVERRIDE; - bool onReadPixels(const SkImageInfo&, void*, size_t, int x, int y) SK_OVERRIDE; - bool onWritePixels(const SkImageInfo&, const void*, size_t, int x, int y) SK_OVERRIDE; + const SkBitmap& onAccessBitmap() override; + bool onReadPixels(const SkImageInfo&, void*, size_t, int x, int y) override; + bool onWritePixels(const SkImageInfo&, const void*, size_t, int x, int y) override; // None of the following drawing methods should ever get called on the // deferred device - void drawPaint(const SkDraw&, const SkPaint& paint) SK_OVERRIDE + void drawPaint(const SkDraw&, const SkPaint& paint) override {SkASSERT(0);} virtual void drawPoints(const SkDraw&, SkCanvas::PointMode mode, size_t count, const SkPoint[], - const SkPaint& paint) SK_OVERRIDE + const SkPaint& paint) override {SkASSERT(0);} virtual void drawRect(const SkDraw&, const SkRect& r, - const SkPaint& paint) SK_OVERRIDE + const SkPaint& paint) override {SkASSERT(0);} - void drawOval(const SkDraw&, const SkRect&, const SkPaint&) SK_OVERRIDE + void drawOval(const SkDraw&, const SkRect&, const SkPaint&) override {SkASSERT(0);} virtual void drawRRect(const SkDraw&, const SkRRect& rr, - const SkPaint& paint) SK_OVERRIDE + const SkPaint& paint) override {SkASSERT(0);} virtual void drawPath(const SkDraw&, const SkPath& path, const SkPaint& paint, const SkMatrix* prePathMatrix = NULL, - bool pathIsMutable = false) SK_OVERRIDE + bool pathIsMutable = false) override {SkASSERT(0);} virtual void drawBitmap(const SkDraw&, const SkBitmap& bitmap, - const SkMatrix& matrix, const SkPaint& paint) SK_OVERRIDE + const SkMatrix& matrix, const SkPaint& paint) override {SkASSERT(0);} virtual void drawBitmapRect(const SkDraw&, const SkBitmap&, const SkRect*, const SkRect&, const SkPaint&, - SkCanvas::DrawBitmapRectFlags) SK_OVERRIDE + SkCanvas::DrawBitmapRectFlags) override {SkASSERT(0);} virtual void drawSprite(const SkDraw&, const SkBitmap& bitmap, - int x, int y, const SkPaint& paint) SK_OVERRIDE + int x, int y, const SkPaint& paint) override {SkASSERT(0);} virtual void drawText(const SkDraw&, const void* text, size_t len, - SkScalar x, SkScalar y, const SkPaint& paint) SK_OVERRIDE + SkScalar x, SkScalar y, const SkPaint& paint) override {SkASSERT(0);} virtual void drawPosText(const SkDraw&, const void* text, size_t len, const SkScalar pos[], int scalarsPerPos, - const SkPoint& offset, const SkPaint& paint) SK_OVERRIDE + const SkPoint& offset, const SkPaint& paint) override {SkASSERT(0);} virtual void drawTextOnPath(const SkDraw&, const void* text, size_t len, const SkPath& path, const SkMatrix* matrix, - const SkPaint& paint) SK_OVERRIDE + const SkPaint& paint) override {SkASSERT(0);} virtual void drawVertices(const SkDraw&, SkCanvas::VertexMode, int vertexCount, const SkPoint verts[], const SkPoint texs[], const SkColor colors[], SkXfermode* xmode, const uint16_t indices[], - int indexCount, const SkPaint& paint) SK_OVERRIDE + int indexCount, const SkPaint& paint) override {SkASSERT(0);} virtual void drawPatch(const SkDraw&, const SkPoint cubics[12], const SkColor colors[4], const SkPoint texCoords[4], SkXfermode* xmode, - const SkPaint& paint) SK_OVERRIDE + const SkPaint& paint) override {SkASSERT(0);} virtual void drawDevice(const SkDraw&, SkBaseDevice*, int x, int y, - const SkPaint&) SK_OVERRIDE + const SkPaint&) override {SkASSERT(0);} - void lockPixels() SK_OVERRIDE {} - void unlockPixels() SK_OVERRIDE {} + void lockPixels() override {} + void unlockPixels() override {} - bool canHandleImageFilter(const SkImageFilter*) SK_OVERRIDE { + bool canHandleImageFilter(const SkImageFilter*) override { return false; } virtual bool filterImage(const SkImageFilter*, const SkBitmap&, - const SkImageFilter::Context&, SkBitmap*, SkIPoint*) SK_OVERRIDE { + const SkImageFilter::Context&, SkBitmap*, SkIPoint*) override { return false; } private: - void flush() SK_OVERRIDE; - void replaceBitmapBackendForRasterSurface(const SkBitmap&) SK_OVERRIDE {} + void flush() override; + void replaceBitmapBackendForRasterSurface(const SkBitmap&) override {} void beginRecording(); void init(); diff --git a/src/utils/SkEventTracer.cpp b/src/utils/SkEventTracer.cpp index ef2a0552b5..bbd8c3d6b3 100644 --- a/src/utils/SkEventTracer.cpp +++ b/src/utils/SkEventTracer.cpp @@ -18,19 +18,19 @@ class SkDefaultEventTracer: public SkEventTracer { const char** argNames, const uint8_t* argTypes, const uint64_t* argValues, - uint8_t flags) SK_OVERRIDE { return 0; } + uint8_t flags) override { return 0; } virtual void updateTraceEventDuration(const uint8_t* categoryEnabledFlag, const char* name, - SkEventTracer::Handle handle) SK_OVERRIDE {}; + SkEventTracer::Handle handle) override {}; - const uint8_t* getCategoryGroupEnabled(const char* name) SK_OVERRIDE { + const uint8_t* getCategoryGroupEnabled(const char* name) override { static uint8_t no = 0; return &no; }; virtual const char* getCategoryGroupName( - const uint8_t* categoryEnabledFlag) SK_OVERRIDE { + const uint8_t* categoryEnabledFlag) override { static const char* dummy = "dummy"; return dummy; }; diff --git a/src/utils/SkFrontBufferedStream.cpp b/src/utils/SkFrontBufferedStream.cpp index 562d376c1c..f23b1f99c4 100644 --- a/src/utils/SkFrontBufferedStream.cpp +++ b/src/utils/SkFrontBufferedStream.cpp @@ -14,21 +14,21 @@ public: // Called by Create. FrontBufferedStream(SkStream*, size_t bufferSize); - size_t read(void* buffer, size_t size) SK_OVERRIDE; + size_t read(void* buffer, size_t size) override; - bool isAtEnd() const SK_OVERRIDE; + bool isAtEnd() const override; - bool rewind() SK_OVERRIDE; + bool rewind() override; - bool hasPosition() const SK_OVERRIDE { return true; } + bool hasPosition() const override { return true; } - size_t getPosition() const SK_OVERRIDE { return fOffset; } + size_t getPosition() const override { return fOffset; } - bool hasLength() const SK_OVERRIDE { return fHasLength; } + bool hasLength() const override { return fHasLength; } - size_t getLength() const SK_OVERRIDE { return fLength; } + size_t getLength() const override { return fLength; } - SkStreamRewindable* duplicate() const SK_OVERRIDE { return NULL; } + SkStreamRewindable* duplicate() const override { return NULL; } private: SkAutoTDelete fStream; diff --git a/src/utils/SkMD5.h b/src/utils/SkMD5.h index 889338bec0..1834a1b03b 100644 --- a/src/utils/SkMD5.h +++ b/src/utils/SkMD5.h @@ -24,12 +24,12 @@ public: /** Processes input, adding it to the digest. * Note that this treats the buffer as a series of uint8_t values. */ - bool write(const void* buffer, size_t size) SK_OVERRIDE { + bool write(const void* buffer, size_t size) override { this->update(reinterpret_cast(buffer), size); return true; } - size_t bytesWritten() const SK_OVERRIDE { return SkToSizeT(this->byteCount); } + size_t bytesWritten() const override { return SkToSizeT(this->byteCount); } /** Processes input, adding it to the digest. Calling this after finish is undefined. */ void update(const uint8_t* input, size_t length); diff --git a/src/utils/SkSHA1.h b/src/utils/SkSHA1.h index e7ede64640..aa0867fed3 100644 --- a/src/utils/SkSHA1.h +++ b/src/utils/SkSHA1.h @@ -24,12 +24,12 @@ public: /** Processes input, adding it to the digest. * Note that this treats the buffer as a series of uint8_t values. */ - bool write(const void* buffer, size_t size) SK_OVERRIDE { + bool write(const void* buffer, size_t size) override { update(reinterpret_cast(buffer), size); return true; } - size_t bytesWritten() const SK_OVERRIDE { return SkToSizeT(this->byteCount); } + size_t bytesWritten() const override { return SkToSizeT(this->byteCount); } /** Processes input, adding it to the digest. Calling this after finish is undefined. */ void update(const uint8_t* input, size_t length); diff --git a/src/utils/SkTextBox.cpp b/src/utils/SkTextBox.cpp index 0bb7a6bf5a..05b3b49e45 100644 --- a/src/utils/SkTextBox.cpp +++ b/src/utils/SkTextBox.cpp @@ -246,7 +246,7 @@ public: CanvasVisitor(SkCanvas* canvas) : fCanvas(canvas) {} virtual void operator()(const char text[], size_t length, SkScalar x, SkScalar y, - const SkPaint& paint) SK_OVERRIDE { + const SkPaint& paint) override { fCanvas->drawText(text, length, x, y, paint); } }; @@ -284,7 +284,7 @@ public: SkTextBlobBuilder fBuilder; virtual void operator()(const char text[], size_t length, SkScalar x, SkScalar y, - const SkPaint& paint) SK_OVERRIDE { + const SkPaint& paint) override { SkPaint p(paint); p.setTextEncoding(SkPaint::kGlyphID_TextEncoding); const int count = paint.countText(text, length); diff --git a/src/utils/SkTextureCompressor_Blitter.h b/src/utils/SkTextureCompressor_Blitter.h index 186df530c3..613b3d96bd 100644 --- a/src/utils/SkTextureCompressor_Blitter.h +++ b/src/utils/SkTextureCompressor_Blitter.h @@ -85,7 +85,7 @@ public: virtual ~SkTCompressedAlphaBlitter() { this->flushRuns(); } // Blit a horizontal run of one or more pixels. - void blitH(int x, int y, int width) SK_OVERRIDE { + void blitH(int x, int y, int width) override { // This function is intended to be called from any standard RGB // buffer, so we should never encounter it. However, if some code // path does end up here, then this needs to be investigated. @@ -96,7 +96,7 @@ public: // zero-terminated run-length encoding of spans of constant alpha values. virtual void blitAntiH(int x, int y, const SkAlpha antialias[], - const int16_t runs[]) SK_OVERRIDE { + const int16_t runs[]) override { SkASSERT(0 == x); // Make sure that the new row to blit is either the first @@ -141,7 +141,7 @@ public: } // Blit a vertical run of pixels with a constant alpha value. - void blitV(int x, int y, int height, SkAlpha alpha) SK_OVERRIDE { + void blitV(int x, int y, int height, SkAlpha alpha) override { // This function is currently not implemented. It is not explicitly // required by the contract, but if at some time a code path runs into // this function (which is entirely possible), it needs to be implemented. @@ -163,7 +163,7 @@ public: #ifdef SK_DEBUG bool fCalledOnceWithNonzeroY; #endif - void blitRect(int x, int y, int width, int height) SK_OVERRIDE { + void blitRect(int x, int y, int width, int height) override { // Assumptions: SkASSERT(0 == x); @@ -279,7 +279,7 @@ public: // width (zero or more) opaque pixels, and one alpha-blended column // on the right. The result will always be at least two pixels wide. virtual void blitAntiRect(int x, int y, int width, int height, - SkAlpha leftAlpha, SkAlpha rightAlpha) SK_OVERRIDE { + SkAlpha leftAlpha, SkAlpha rightAlpha) override { // This function is currently not implemented. It is not explicitly // required by the contract, but if at some time a code path runs into // this function (which is entirely possible), it needs to be implemented. @@ -306,7 +306,7 @@ public: #ifdef SK_DEBUG bool fBlitMaskCalled; #endif - void blitMask(const SkMask& mask, const SkIRect& clip) SK_OVERRIDE { + void blitMask(const SkMask& mask, const SkIRect& clip) override { // Assumptions: SkASSERT(!fBlitMaskCalled); @@ -368,7 +368,7 @@ public: // If the blitter just sets a single value for each pixel, return the // bitmap it draws into, and assign value. If not, return NULL and ignore // the value parameter. - const SkBitmap* justAnOpaqueColor(uint32_t* value) SK_OVERRIDE { + const SkBitmap* justAnOpaqueColor(uint32_t* value) override { return NULL; } @@ -378,7 +378,7 @@ public: * to preserve semantics if blitAntiH doesn't get called in too many * weird ways... */ - int requestRowsPreserved() const SK_OVERRIDE { return BlockDim; } + int requestRowsPreserved() const override { return BlockDim; } private: static const int kPixelsPerBlock = BlockDim * BlockDim; diff --git a/src/utils/android/SkAndroidSDKCanvas.h b/src/utils/android/SkAndroidSDKCanvas.h index fc046189f7..dc79be25a1 100644 --- a/src/utils/android/SkAndroidSDKCanvas.h +++ b/src/utils/android/SkAndroidSDKCanvas.h @@ -33,70 +33,70 @@ protected: // FILTERING - void onDrawPaint(const SkPaint& paint) SK_OVERRIDE; + void onDrawPaint(const SkPaint& paint) override; void onDrawPoints(PointMode pMode, size_t count, const SkPoint pts[], - const SkPaint& paint) SK_OVERRIDE; - void onDrawOval(const SkRect& r, const SkPaint& paint) SK_OVERRIDE; - void onDrawRect(const SkRect& r, const SkPaint& paint) SK_OVERRIDE; - void onDrawRRect(const SkRRect& r, const SkPaint& paint) SK_OVERRIDE; - void onDrawPath(const SkPath& path, const SkPaint& paint) SK_OVERRIDE; + const SkPaint& paint) override; + void onDrawOval(const SkRect& r, const SkPaint& paint) override; + void onDrawRect(const SkRect& r, const SkPaint& paint) override; + void onDrawRRect(const SkRRect& r, const SkPaint& paint) override; + void onDrawPath(const SkPath& path, const SkPaint& paint) override; void onDrawBitmap(const SkBitmap& bitmap, SkScalar left, SkScalar top, - const SkPaint* paint) SK_OVERRIDE; + const SkPaint* paint) override; void onDrawBitmapRect(const SkBitmap& bitmap, const SkRect* src, const SkRect& dst, - const SkPaint* paint, DrawBitmapRectFlags flags) SK_OVERRIDE; + const SkPaint* paint, DrawBitmapRectFlags flags) override; void onDrawBitmapNine(const SkBitmap& bitmap, const SkIRect& center, - const SkRect& dst, const SkPaint* paint) SK_OVERRIDE; + const SkRect& dst, const SkPaint* paint) override; void onDrawSprite(const SkBitmap& bitmap, int left, int top, - const SkPaint* paint) SK_OVERRIDE; + const SkPaint* paint) override; void onDrawVertices(VertexMode vMode, int vertexCount, const SkPoint vertices[], const SkPoint texs[], const SkColor colors[], SkXfermode* xMode, const uint16_t indices[], int indexCount, - const SkPaint& paint) SK_OVERRIDE; + const SkPaint& paint) override; void onDrawDRRect(const SkRRect& outer, const SkRRect& inner, - const SkPaint& paint) SK_OVERRIDE; + const SkPaint& paint) override; void onDrawText(const void* text, size_t byteLength, SkScalar x, SkScalar y, - const SkPaint& paint) SK_OVERRIDE; + const SkPaint& paint) override; void onDrawPosText(const void* text, size_t byteLength, const SkPoint pos[], - const SkPaint& paint) SK_OVERRIDE; + const SkPaint& paint) override; void onDrawPosTextH(const void* text, size_t byteLength, const SkScalar xpos[], - SkScalar constY, const SkPaint& paint) SK_OVERRIDE; + SkScalar constY, const SkPaint& paint) override; void onDrawTextOnPath(const void* text, size_t byteLength, const SkPath& path, - const SkMatrix* matrix, const SkPaint& paint) SK_OVERRIDE; + const SkMatrix* matrix, const SkPaint& paint) override; void onDrawTextBlob(const SkTextBlob* blob, SkScalar x, SkScalar y, - const SkPaint& paint) SK_OVERRIDE; + const SkPaint& paint) override; void onDrawPatch(const SkPoint cubics[12], const SkColor colors[4], const SkPoint texCoords[4], SkXfermode* xmode, - const SkPaint& paint) SK_OVERRIDE; + const SkPaint& paint) override; - void onDrawImage(const SkImage*, SkScalar, SkScalar, const SkPaint*) SK_OVERRIDE; + void onDrawImage(const SkImage*, SkScalar, SkScalar, const SkPaint*) override; void onDrawImageRect(const SkImage*, const SkRect*, const SkRect&, const SkPaint*) - SK_OVERRIDE; + override; void onDrawPicture(const SkPicture*, const SkMatrix*, const SkPaint*); // PASS THROUGH - void onDrawDrawable(SkDrawable*) SK_OVERRIDE; - SkISize getBaseLayerSize() const SK_OVERRIDE; - bool getClipBounds(SkRect*) const SK_OVERRIDE; - bool getClipDeviceBounds(SkIRect*) const SK_OVERRIDE; - bool isClipEmpty() const SK_OVERRIDE; - bool isClipRect() const SK_OVERRIDE; - SkSurface* onNewSurface(const SkImageInfo&, const SkSurfaceProps&) SK_OVERRIDE; - const void* onPeekPixels(SkImageInfo*, size_t*) SK_OVERRIDE; - void* onAccessTopLayerPixels(SkImageInfo*, size_t*) SK_OVERRIDE; - void willSave() SK_OVERRIDE; - void willRestore() SK_OVERRIDE; - void didRestore() SK_OVERRIDE; - void didConcat(const SkMatrix&) SK_OVERRIDE; - void didSetMatrix(const SkMatrix&) SK_OVERRIDE; - void onClipRect(const SkRect&, SkRegion::Op, ClipEdgeStyle) SK_OVERRIDE; - void onClipRRect(const SkRRect&, SkRegion::Op, ClipEdgeStyle) SK_OVERRIDE; - void onClipPath(const SkPath&, SkRegion::Op, ClipEdgeStyle) SK_OVERRIDE; - void onClipRegion(const SkRegion&, SkRegion::Op) SK_OVERRIDE; - void onDiscard() SK_OVERRIDE; + void onDrawDrawable(SkDrawable*) override; + SkISize getBaseLayerSize() const override; + bool getClipBounds(SkRect*) const override; + bool getClipDeviceBounds(SkIRect*) const override; + bool isClipEmpty() const override; + bool isClipRect() const override; + SkSurface* onNewSurface(const SkImageInfo&, const SkSurfaceProps&) override; + const void* onPeekPixels(SkImageInfo*, size_t*) override; + void* onAccessTopLayerPixels(SkImageInfo*, size_t*) override; + void willSave() override; + void willRestore() override; + void didRestore() override; + void didConcat(const SkMatrix&) override; + void didSetMatrix(const SkMatrix&) override; + void onClipRect(const SkRect&, SkRegion::Op, ClipEdgeStyle) override; + void onClipRRect(const SkRRect&, SkRegion::Op, ClipEdgeStyle) override; + void onClipPath(const SkPath&, SkRegion::Op, ClipEdgeStyle) override; + void onClipRegion(const SkRegion&, SkRegion::Op) override; + void onDiscard() override; protected: SkCanvas* fProxyTarget; diff --git a/src/utils/debugger/SkDebugCanvas.cpp b/src/utils/debugger/SkDebugCanvas.cpp index 779d6950d7..6d186a7ee8 100644 --- a/src/utils/debugger/SkDebugCanvas.cpp +++ b/src/utils/debugger/SkDebugCanvas.cpp @@ -90,7 +90,7 @@ int SkDebugCanvas::getCommandAtPoint(int x, int y, int index) { class OverdrawXfermode : public SkXfermode { public: - SkPMColor xferColor(SkPMColor src, SkPMColor dst) const SK_OVERRIDE { + SkPMColor xferColor(SkPMColor src, SkPMColor dst) const override { // This table encodes the color progression of the overdraw visualization static const SkPMColor gTable[] = { SkPackARGB32(0x00, 0x00, 0x00, 0x00), @@ -123,9 +123,9 @@ public: return gTable[idx]; } - Factory getFactory() const SK_OVERRIDE { return NULL; } + Factory getFactory() const override { return NULL; } #ifndef SK_IGNORE_TO_STRING - virtual void toString(SkString* str) const SK_OVERRIDE { str->set("OverdrawXfermode"); } + virtual void toString(SkString* str) const override { str->set("OverdrawXfermode"); } #endif }; @@ -139,7 +139,7 @@ public: delete fXferMode; } - bool filter(SkPaint* p, Type) SK_OVERRIDE { + bool filter(SkPaint* p, Type) override { p->setXfermode(fXferMode); p->setAntiAlias(false); return true; @@ -163,7 +163,7 @@ public: fFilterQuality = filterQuality; } - bool filter(SkPaint* p, Type) SK_OVERRIDE { + bool filter(SkPaint* p, Type) override { p->setFilterQuality(fFilterQuality); return true; } @@ -179,21 +179,21 @@ class SkDebugClipVisitor : public SkCanvas::ClipVisitor { public: SkDebugClipVisitor(SkCanvas* canvas) : fCanvas(canvas) {} - void clipRect(const SkRect& r, SkRegion::Op, bool doAA) SK_OVERRIDE { + void clipRect(const SkRect& r, SkRegion::Op, bool doAA) override { SkPaint p; p.setColor(SK_ColorRED); p.setStyle(SkPaint::kStroke_Style); p.setAntiAlias(doAA); fCanvas->drawRect(r, p); } - void clipRRect(const SkRRect& rr, SkRegion::Op, bool doAA) SK_OVERRIDE { + void clipRRect(const SkRRect& rr, SkRegion::Op, bool doAA) override { SkPaint p; p.setColor(SK_ColorGREEN); p.setStyle(SkPaint::kStroke_Style); p.setAntiAlias(doAA); fCanvas->drawRRect(rr, p); } - void clipPath(const SkPath& path, SkRegion::Op, bool doAA) SK_OVERRIDE { + void clipPath(const SkPath& path, SkRegion::Op, bool doAA) override { SkPaint p; p.setColor(SK_ColorBLUE); p.setStyle(SkPaint::kStroke_Style); diff --git a/src/utils/debugger/SkDebugCanvas.h b/src/utils/debugger/SkDebugCanvas.h index 5771dd9a74..66b85fc38f 100644 --- a/src/utils/debugger/SkDebugCanvas.h +++ b/src/utils/debugger/SkDebugCanvas.h @@ -142,16 +142,16 @@ public: // Inherited from SkCanvas //////////////////////////////////////////////////////////////////////////////// - void beginCommentGroup(const char* description) SK_OVERRIDE; - void addComment(const char* kywd, const char* value) SK_OVERRIDE; - void endCommentGroup() SK_OVERRIDE; + void beginCommentGroup(const char* description) override; + void addComment(const char* kywd, const char* value) override; + void endCommentGroup() override; static const int kVizImageHeight = 256; static const int kVizImageWidth = 256; - bool isClipEmpty() const SK_OVERRIDE { return false; } - bool isClipRect() const SK_OVERRIDE { return true; } - bool getClipBounds(SkRect* bounds) const SK_OVERRIDE { + bool isClipEmpty() const override { return false; } + bool isClipRect() const override { return true; } + bool getClipBounds(SkRect* bounds) const override { if (bounds) { bounds->setXYWH(0, 0, SkIntToScalar(this->imageInfo().width()), @@ -159,7 +159,7 @@ public: } return true; } - bool getClipDeviceBounds(SkIRect* bounds) const SK_OVERRIDE { + bool getClipDeviceBounds(SkIRect* bounds) const override { if (bounds) { bounds->setLargest(); } @@ -167,54 +167,54 @@ public: } protected: - void willSave() SK_OVERRIDE; - SaveLayerStrategy willSaveLayer(const SkRect*, const SkPaint*, SaveFlags) SK_OVERRIDE; - void willRestore() SK_OVERRIDE; + void willSave() override; + SaveLayerStrategy willSaveLayer(const SkRect*, const SkPaint*, SaveFlags) override; + void willRestore() override; - void didConcat(const SkMatrix&) SK_OVERRIDE; - void didSetMatrix(const SkMatrix&) SK_OVERRIDE; + void didConcat(const SkMatrix&) override; + void didSetMatrix(const SkMatrix&) override; - void onDrawDRRect(const SkRRect&, const SkRRect&, const SkPaint&) SK_OVERRIDE; + void onDrawDRRect(const SkRRect&, const SkRRect&, const SkPaint&) override; void onDrawText(const void* text, size_t byteLength, SkScalar x, SkScalar y, - const SkPaint&) SK_OVERRIDE; + const SkPaint&) override; void onDrawPosText(const void* text, size_t byteLength, const SkPoint pos[], - const SkPaint&) SK_OVERRIDE; + const SkPaint&) override; void onDrawPosTextH(const void* text, size_t byteLength, const SkScalar xpos[], - SkScalar constY, const SkPaint&) SK_OVERRIDE; + SkScalar constY, const SkPaint&) override; void onDrawTextOnPath(const void* text, size_t byteLength, const SkPath& path, - const SkMatrix* matrix, const SkPaint&) SK_OVERRIDE; + const SkMatrix* matrix, const SkPaint&) override; void onDrawTextBlob(const SkTextBlob* blob, SkScalar x, SkScalar y, - const SkPaint& paint) SK_OVERRIDE; + const SkPaint& paint) override; void onDrawPatch(const SkPoint cubics[12], const SkColor colors[4], const SkPoint texCoords[4], SkXfermode* xmode, const SkPaint& paint); - void onDrawPaint(const SkPaint&) SK_OVERRIDE; + void onDrawPaint(const SkPaint&) override; - void onDrawRect(const SkRect&, const SkPaint&) SK_OVERRIDE; - void onDrawOval(const SkRect&, const SkPaint&) SK_OVERRIDE; - void onDrawRRect(const SkRRect&, const SkPaint&) SK_OVERRIDE; - void onDrawPoints(PointMode, size_t count, const SkPoint pts[], const SkPaint&) SK_OVERRIDE; + void onDrawRect(const SkRect&, const SkPaint&) override; + void onDrawOval(const SkRect&, const SkPaint&) override; + void onDrawRRect(const SkRRect&, const SkPaint&) override; + void onDrawPoints(PointMode, size_t count, const SkPoint pts[], const SkPaint&) override; void onDrawVertices(VertexMode vmode, int vertexCount, const SkPoint vertices[], const SkPoint texs[], const SkColor colors[], SkXfermode* xmode, const uint16_t indices[], int indexCount, - const SkPaint&) SK_OVERRIDE; - void onDrawPath(const SkPath&, const SkPaint&) SK_OVERRIDE; - void onDrawBitmap(const SkBitmap&, SkScalar left, SkScalar top, const SkPaint*) SK_OVERRIDE; + const SkPaint&) override; + void onDrawPath(const SkPath&, const SkPaint&) override; + void onDrawBitmap(const SkBitmap&, SkScalar left, SkScalar top, const SkPaint*) override; void onDrawBitmapRect(const SkBitmap&, const SkRect* src, const SkRect& dst, const SkPaint*, - DrawBitmapRectFlags flags) SK_OVERRIDE; - void onDrawImage(const SkImage*, SkScalar left, SkScalar top, const SkPaint*) SK_OVERRIDE; + DrawBitmapRectFlags flags) override; + void onDrawImage(const SkImage*, SkScalar left, SkScalar top, const SkPaint*) override; void onDrawImageRect(const SkImage*, const SkRect* src, const SkRect& dst, - const SkPaint*) SK_OVERRIDE; + const SkPaint*) override; void onDrawBitmapNine(const SkBitmap&, const SkIRect& center, const SkRect& dst, - const SkPaint*) SK_OVERRIDE; - void onDrawSprite(const SkBitmap&, int left, int top, const SkPaint*) SK_OVERRIDE; - void onClipRect(const SkRect&, SkRegion::Op, ClipEdgeStyle) SK_OVERRIDE; - void onClipRRect(const SkRRect&, SkRegion::Op, ClipEdgeStyle) SK_OVERRIDE; - void onClipPath(const SkPath&, SkRegion::Op, ClipEdgeStyle) SK_OVERRIDE; - void onClipRegion(const SkRegion& region, SkRegion::Op) SK_OVERRIDE; - - void onDrawPicture(const SkPicture*, const SkMatrix*, const SkPaint*) SK_OVERRIDE; + const SkPaint*) override; + void onDrawSprite(const SkBitmap&, int left, int top, const SkPaint*) override; + void onClipRect(const SkRect&, SkRegion::Op, ClipEdgeStyle) override; + void onClipRRect(const SkRRect&, SkRegion::Op, ClipEdgeStyle) override; + void onClipPath(const SkPath&, SkRegion::Op, ClipEdgeStyle) override; + void onClipRegion(const SkRegion& region, SkRegion::Op) override; + + void onDrawPicture(const SkPicture*, const SkMatrix*, const SkPaint*) override; void markActiveCommands(int index); diff --git a/src/utils/debugger/SkDrawCommand.h b/src/utils/debugger/SkDrawCommand.h index bcc97ca791..9e25f4d20d 100644 --- a/src/utils/debugger/SkDrawCommand.h +++ b/src/utils/debugger/SkDrawCommand.h @@ -113,8 +113,8 @@ private: class SkRestoreCommand : public SkDrawCommand { public: SkRestoreCommand(); - void execute(SkCanvas* canvas) const SK_OVERRIDE; - Action action() const SK_OVERRIDE { return kPopLayer_Action; } + void execute(SkCanvas* canvas) const override; + Action action() const override { return kPopLayer_Action; } private: typedef SkDrawCommand INHERITED; @@ -123,7 +123,7 @@ private: class SkClearCommand : public SkDrawCommand { public: SkClearCommand(SkColor color); - void execute(SkCanvas* canvas) const SK_OVERRIDE; + void execute(SkCanvas* canvas) const override; private: SkColor fColor; @@ -133,8 +133,8 @@ private: class SkClipPathCommand : public SkDrawCommand { public: SkClipPathCommand(const SkPath& path, SkRegion::Op op, bool doAA); - void execute(SkCanvas* canvas) const SK_OVERRIDE; - bool render(SkCanvas* canvas) const SK_OVERRIDE; + void execute(SkCanvas* canvas) const override; + bool render(SkCanvas* canvas) const override; private: SkPath fPath; SkRegion::Op fOp; @@ -146,7 +146,7 @@ private: class SkClipRegionCommand : public SkDrawCommand { public: SkClipRegionCommand(const SkRegion& region, SkRegion::Op op); - void execute(SkCanvas* canvas) const SK_OVERRIDE; + void execute(SkCanvas* canvas) const override; private: SkRegion fRegion; SkRegion::Op fOp; @@ -157,7 +157,7 @@ private: class SkClipRectCommand : public SkDrawCommand { public: SkClipRectCommand(const SkRect& rect, SkRegion::Op op, bool doAA); - void execute(SkCanvas* canvas) const SK_OVERRIDE; + void execute(SkCanvas* canvas) const override; const SkRect& rect() const { return fRect; } SkRegion::Op op() const { return fOp; } @@ -174,8 +174,8 @@ private: class SkClipRRectCommand : public SkDrawCommand { public: SkClipRRectCommand(const SkRRect& rrect, SkRegion::Op op, bool doAA); - void execute(SkCanvas* canvas) const SK_OVERRIDE; - bool render(SkCanvas* canvas) const SK_OVERRIDE; + void execute(SkCanvas* canvas) const override; + bool render(SkCanvas* canvas) const override; const SkRRect& rrect() const { return fRRect; } SkRegion::Op op() const { return fOp; } @@ -192,7 +192,7 @@ private: class SkConcatCommand : public SkDrawCommand { public: SkConcatCommand(const SkMatrix& matrix); - void execute(SkCanvas* canvas) const SK_OVERRIDE; + void execute(SkCanvas* canvas) const override; private: SkMatrix fMatrix; @@ -203,8 +203,8 @@ class SkDrawBitmapCommand : public SkDrawCommand { public: SkDrawBitmapCommand(const SkBitmap& bitmap, SkScalar left, SkScalar top, const SkPaint* paint); - void execute(SkCanvas* canvas) const SK_OVERRIDE; - bool render(SkCanvas* canvas) const SK_OVERRIDE; + void execute(SkCanvas* canvas) const override; + bool render(SkCanvas* canvas) const override; private: SkBitmap fBitmap; SkScalar fLeft; @@ -219,8 +219,8 @@ class SkDrawBitmapNineCommand : public SkDrawCommand { public: SkDrawBitmapNineCommand(const SkBitmap& bitmap, const SkIRect& center, const SkRect& dst, const SkPaint* paint); - void execute(SkCanvas* canvas) const SK_OVERRIDE; - bool render(SkCanvas* canvas) const SK_OVERRIDE; + void execute(SkCanvas* canvas) const override; + bool render(SkCanvas* canvas) const override; private: SkBitmap fBitmap; SkIRect fCenter; @@ -236,8 +236,8 @@ public: SkDrawBitmapRectCommand(const SkBitmap& bitmap, const SkRect* src, const SkRect& dst, const SkPaint* paint, SkCanvas::DrawBitmapRectFlags flags); - void execute(SkCanvas* canvas) const SK_OVERRIDE; - bool render(SkCanvas* canvas) const SK_OVERRIDE; + void execute(SkCanvas* canvas) const override; + bool render(SkCanvas* canvas) const override; const SkBitmap& bitmap() const { return fBitmap; } @@ -273,7 +273,7 @@ private: class SkBeginCommentGroupCommand : public SkDrawCommand { public: SkBeginCommentGroupCommand(const char* description); - void execute(SkCanvas* canvas) const SK_OVERRIDE { + void execute(SkCanvas* canvas) const override { canvas->beginCommentGroup(fDescription.c_str()); }; private: @@ -285,7 +285,7 @@ private: class SkCommentCommand : public SkDrawCommand { public: SkCommentCommand(const char* kywd, const char* value); - void execute(SkCanvas* canvas) const SK_OVERRIDE { + void execute(SkCanvas* canvas) const override { canvas->addComment(fKywd.c_str(), fValue.c_str()); }; private: @@ -298,7 +298,7 @@ private: class SkEndCommentGroupCommand : public SkDrawCommand { public: SkEndCommentGroupCommand(); - void execute(SkCanvas* canvas) const SK_OVERRIDE { + void execute(SkCanvas* canvas) const override { canvas->endCommentGroup(); }; private: @@ -308,8 +308,8 @@ private: class SkDrawOvalCommand : public SkDrawCommand { public: SkDrawOvalCommand(const SkRect& oval, const SkPaint& paint); - void execute(SkCanvas* canvas) const SK_OVERRIDE; - bool render(SkCanvas* canvas) const SK_OVERRIDE; + void execute(SkCanvas* canvas) const override; + bool render(SkCanvas* canvas) const override; private: SkRect fOval; SkPaint fPaint; @@ -320,8 +320,8 @@ private: class SkDrawPaintCommand : public SkDrawCommand { public: SkDrawPaintCommand(const SkPaint& paint); - void execute(SkCanvas* canvas) const SK_OVERRIDE; - bool render(SkCanvas* canvas) const SK_OVERRIDE; + void execute(SkCanvas* canvas) const override; + bool render(SkCanvas* canvas) const override; private: SkPaint fPaint; @@ -331,8 +331,8 @@ private: class SkDrawPathCommand : public SkDrawCommand { public: SkDrawPathCommand(const SkPath& path, const SkPaint& paint); - void execute(SkCanvas* canvas) const SK_OVERRIDE; - bool render(SkCanvas* canvas) const SK_OVERRIDE; + void execute(SkCanvas* canvas) const override; + bool render(SkCanvas* canvas) const override; private: SkPath fPath; @@ -344,8 +344,8 @@ private: class SkDrawPictureCommand : public SkDrawCommand { public: SkDrawPictureCommand(const SkPicture* picture, const SkMatrix* matrix, const SkPaint* paint); - void execute(SkCanvas* canvas) const SK_OVERRIDE; - bool render(SkCanvas* canvas) const SK_OVERRIDE; + void execute(SkCanvas* canvas) const override; + bool render(SkCanvas* canvas) const override; private: SkAutoTUnref fPicture; @@ -362,8 +362,8 @@ public: SkDrawPointsCommand(SkCanvas::PointMode mode, size_t count, const SkPoint pts[], const SkPaint& paint); virtual ~SkDrawPointsCommand() { delete [] fPts; } - void execute(SkCanvas* canvas) const SK_OVERRIDE; - bool render(SkCanvas* canvas) const SK_OVERRIDE; + void execute(SkCanvas* canvas) const override; + bool render(SkCanvas* canvas) const override; private: SkCanvas::PointMode fMode; size_t fCount; @@ -378,7 +378,7 @@ public: SkDrawTextCommand(const void* text, size_t byteLength, SkScalar x, SkScalar y, const SkPaint& paint); virtual ~SkDrawTextCommand() { delete [] fText; } - void execute(SkCanvas* canvas) const SK_OVERRIDE; + void execute(SkCanvas* canvas) const override; private: char* fText; size_t fByteLength; @@ -394,7 +394,7 @@ public: SkDrawPosTextCommand(const void* text, size_t byteLength, const SkPoint pos[], const SkPaint& paint); virtual ~SkDrawPosTextCommand() { delete [] fPos; delete [] fText; } - void execute(SkCanvas* canvas) const SK_OVERRIDE; + void execute(SkCanvas* canvas) const override; private: char* fText; size_t fByteLength; @@ -409,7 +409,7 @@ public: SkDrawTextOnPathCommand(const void* text, size_t byteLength, const SkPath& path, const SkMatrix* matrix, const SkPaint& paint); virtual ~SkDrawTextOnPathCommand() { delete [] fText; } - void execute(SkCanvas* canvas) const SK_OVERRIDE; + void execute(SkCanvas* canvas) const override; private: char* fText; size_t fByteLength; @@ -425,7 +425,7 @@ public: SkDrawPosTextHCommand(const void* text, size_t byteLength, const SkScalar xpos[], SkScalar constY, const SkPaint& paint); virtual ~SkDrawPosTextHCommand() { delete [] fXpos; delete [] fText; } - void execute(SkCanvas* canvas) const SK_OVERRIDE; + void execute(SkCanvas* canvas) const override; private: SkScalar* fXpos; char* fText; @@ -440,8 +440,8 @@ class SkDrawTextBlobCommand : public SkDrawCommand { public: SkDrawTextBlobCommand(const SkTextBlob* blob, SkScalar x, SkScalar y, const SkPaint& paint); - void execute(SkCanvas* canvas) const SK_OVERRIDE; - bool render(SkCanvas* canvas) const SK_OVERRIDE; + void execute(SkCanvas* canvas) const override; + bool render(SkCanvas* canvas) const override; private: SkAutoTUnref fBlob; @@ -457,7 +457,7 @@ public: SkDrawPatchCommand(const SkPoint cubics[12], const SkColor colors[4], const SkPoint texCoords[4], SkXfermode* xmode, const SkPaint& paint); - void execute(SkCanvas* canvas) const SK_OVERRIDE; + void execute(SkCanvas* canvas) const override; private: SkPoint fCubics[12]; @@ -473,7 +473,7 @@ private: class SkDrawRectCommand : public SkDrawCommand { public: SkDrawRectCommand(const SkRect& rect, const SkPaint& paint); - void execute(SkCanvas* canvas) const SK_OVERRIDE; + void execute(SkCanvas* canvas) const override; const SkRect& rect() const { return fRect; } const SkPaint& paint() const { return fPaint; } @@ -487,8 +487,8 @@ private: class SkDrawRRectCommand : public SkDrawCommand { public: SkDrawRRectCommand(const SkRRect& rrect, const SkPaint& paint); - void execute(SkCanvas* canvas) const SK_OVERRIDE; - bool render(SkCanvas* canvas) const SK_OVERRIDE; + void execute(SkCanvas* canvas) const override; + bool render(SkCanvas* canvas) const override; private: SkRRect fRRect; SkPaint fPaint; @@ -500,8 +500,8 @@ class SkDrawDRRectCommand : public SkDrawCommand { public: SkDrawDRRectCommand(const SkRRect& outer, const SkRRect& inner, const SkPaint& paint); - void execute(SkCanvas* canvas) const SK_OVERRIDE; - bool render(SkCanvas* canvas) const SK_OVERRIDE; + void execute(SkCanvas* canvas) const override; + bool render(SkCanvas* canvas) const override; private: SkRRect fOuter; SkRRect fInner; @@ -513,8 +513,8 @@ private: class SkDrawSpriteCommand : public SkDrawCommand { public: SkDrawSpriteCommand(const SkBitmap& bitmap, int left, int top, const SkPaint* paint); - void execute(SkCanvas* canvas) const SK_OVERRIDE; - bool render(SkCanvas* canvas) const SK_OVERRIDE; + void execute(SkCanvas* canvas) const override; + bool render(SkCanvas* canvas) const override; private: SkBitmap fBitmap; int fLeft; @@ -533,7 +533,7 @@ public: const uint16_t indices[], int indexCount, const SkPaint& paint); virtual ~SkDrawVerticesCommand(); - void execute(SkCanvas* canvas) const SK_OVERRIDE; + void execute(SkCanvas* canvas) const override; private: SkCanvas::VertexMode fVmode; int fVertexCount; @@ -551,8 +551,8 @@ private: class SkSaveCommand : public SkDrawCommand { public: SkSaveCommand(); - void execute(SkCanvas* canvas) const SK_OVERRIDE; - Action action() const SK_OVERRIDE { return kPushLayer_Action; } + void execute(SkCanvas* canvas) const override; + Action action() const override { return kPushLayer_Action; } private: typedef SkDrawCommand INHERITED; }; @@ -561,11 +561,11 @@ class SkSaveLayerCommand : public SkDrawCommand { public: SkSaveLayerCommand(const SkRect* bounds, const SkPaint* paint, SkCanvas::SaveFlags flags); - void execute(SkCanvas* canvas) const SK_OVERRIDE; - void vizExecute(SkCanvas* canvas) const SK_OVERRIDE; - Action action() const SK_OVERRIDE{ return kPushLayer_Action; } - void setActive(bool active) SK_OVERRIDE { fActive = active; } - bool active() const SK_OVERRIDE { return fActive; } + void execute(SkCanvas* canvas) const override; + void vizExecute(SkCanvas* canvas) const override; + Action action() const override{ return kPushLayer_Action; } + void setActive(bool active) override { fActive = active; } + bool active() const override { return fActive; } const SkPaint* paint() const { return fPaintPtr; } @@ -583,8 +583,8 @@ private: class SkSetMatrixCommand : public SkDrawCommand { public: SkSetMatrixCommand(const SkMatrix& matrix); - void setUserMatrix(const SkMatrix&) SK_OVERRIDE; - void execute(SkCanvas* canvas) const SK_OVERRIDE; + void setUserMatrix(const SkMatrix&) override; + void execute(SkCanvas* canvas) const override; private: SkMatrix fUserMatrix; SkMatrix fMatrix; diff --git a/src/utils/win/SkDWriteFontFileStream.h b/src/utils/win/SkDWriteFontFileStream.h index ba16f704a3..e78b621c02 100644 --- a/src/utils/win/SkDWriteFontFileStream.h +++ b/src/utils/win/SkDWriteFontFileStream.h @@ -25,16 +25,16 @@ public: explicit SkDWriteFontFileStream(IDWriteFontFileStream* fontFileStream); virtual ~SkDWriteFontFileStream(); - size_t read(void* buffer, size_t size) SK_OVERRIDE; - bool isAtEnd() const SK_OVERRIDE; - bool rewind() SK_OVERRIDE; - SkDWriteFontFileStream* duplicate() const SK_OVERRIDE; - size_t getPosition() const SK_OVERRIDE; - bool seek(size_t position) SK_OVERRIDE; - bool move(long offset) SK_OVERRIDE; - SkDWriteFontFileStream* fork() const SK_OVERRIDE; - size_t getLength() const SK_OVERRIDE; - const void* getMemoryBase() SK_OVERRIDE; + size_t read(void* buffer, size_t size) override; + bool isAtEnd() const override; + bool rewind() override; + SkDWriteFontFileStream* duplicate() const override; + size_t getPosition() const override; + bool seek(size_t position) override; + bool move(long offset) override; + SkDWriteFontFileStream* fork() const override; + size_t getLength() const override; + const void* getMemoryBase() override; private: SkTScopedComPtr fFontFileStream; diff --git a/src/utils/win/SkDWriteGeometrySink.h b/src/utils/win/SkDWriteGeometrySink.h index 703ac3d439..417c7f0d07 100644 --- a/src/utils/win/SkDWriteGeometrySink.h +++ b/src/utils/win/SkDWriteGeometrySink.h @@ -28,17 +28,17 @@ protected: virtual ~SkDWriteGeometrySink(); public: - HRESULT STDMETHODCALLTYPE QueryInterface(REFIID iid, void **object) SK_OVERRIDE; - ULONG STDMETHODCALLTYPE AddRef(void) SK_OVERRIDE; - ULONG STDMETHODCALLTYPE Release(void) SK_OVERRIDE; - - void STDMETHODCALLTYPE SetFillMode(D2D1_FILL_MODE fillMode) SK_OVERRIDE; - void STDMETHODCALLTYPE SetSegmentFlags(D2D1_PATH_SEGMENT vertexFlags) SK_OVERRIDE; - void STDMETHODCALLTYPE BeginFigure(D2D1_POINT_2F startPoint, D2D1_FIGURE_BEGIN figureBegin) SK_OVERRIDE; - void STDMETHODCALLTYPE AddLines(const D2D1_POINT_2F *points, UINT pointsCount) SK_OVERRIDE; - void STDMETHODCALLTYPE AddBeziers(const D2D1_BEZIER_SEGMENT *beziers, UINT beziersCount) SK_OVERRIDE; - void STDMETHODCALLTYPE EndFigure(D2D1_FIGURE_END figureEnd) SK_OVERRIDE; - HRESULT STDMETHODCALLTYPE Close() SK_OVERRIDE; + HRESULT STDMETHODCALLTYPE QueryInterface(REFIID iid, void **object) override; + ULONG STDMETHODCALLTYPE AddRef(void) override; + ULONG STDMETHODCALLTYPE Release(void) override; + + void STDMETHODCALLTYPE SetFillMode(D2D1_FILL_MODE fillMode) override; + void STDMETHODCALLTYPE SetSegmentFlags(D2D1_PATH_SEGMENT vertexFlags) override; + void STDMETHODCALLTYPE BeginFigure(D2D1_POINT_2F startPoint, D2D1_FIGURE_BEGIN figureBegin) override; + void STDMETHODCALLTYPE AddLines(const D2D1_POINT_2F *points, UINT pointsCount) override; + void STDMETHODCALLTYPE AddBeziers(const D2D1_BEZIER_SEGMENT *beziers, UINT beziersCount) override; + void STDMETHODCALLTYPE EndFigure(D2D1_FIGURE_END figureEnd) override; + HRESULT STDMETHODCALLTYPE Close() override; static HRESULT Create(SkPath* path, IDWriteGeometrySink** geometryToPath); }; diff --git a/tests/BitmapHeapTest.cpp b/tests/BitmapHeapTest.cpp index 21ce2f39e8..eb86283618 100644 --- a/tests/BitmapHeapTest.cpp +++ b/tests/BitmapHeapTest.cpp @@ -18,11 +18,11 @@ struct SimpleFlatController : public SkFlatController { SimpleFlatController() : SkFlatController() {} ~SimpleFlatController() { fAllocations.freeAll(); } - void* allocThrow(size_t bytes) SK_OVERRIDE { + void* allocThrow(size_t bytes) override { fAllocations.push(sk_malloc_throw(bytes)); return fAllocations.top(); } - void unalloc(void*) SK_OVERRIDE { } + void unalloc(void*) override { } void setBitmapStorage(SkBitmapHeap* h) { this->setBitmapHeap(h); } private: SkTDArray fAllocations; diff --git a/tests/CachedDecodingPixelRefTest.cpp b/tests/CachedDecodingPixelRefTest.cpp index ddc0994e56..fc56edd823 100644 --- a/tests/CachedDecodingPixelRefTest.cpp +++ b/tests/CachedDecodingPixelRefTest.cpp @@ -183,7 +183,7 @@ protected: } #ifdef SK_SUPPORT_LEGACY_BOOL_ONGETINFO - bool onGetInfo(SkImageInfo* info) SK_OVERRIDE { + bool onGetInfo(SkImageInfo* info) override { REPORTER_ASSERT(fReporter, info); *info = GetMyInfo(); return true; @@ -192,7 +192,7 @@ protected: virtual Result onGetPixels(const SkImageInfo& info, void* pixels, size_t rowBytes, const Options&, - SkPMColor ctable[], int* ctableCount) SK_OVERRIDE { + SkPMColor ctable[], int* ctableCount) override { REPORTER_ASSERT(fReporter, pixels != NULL); REPORTER_ASSERT(fReporter, rowBytes >= info.minRowBytes()); if (fType != kSucceedGetPixels_TestType) { diff --git a/tests/CanvasStateTest.cpp b/tests/CanvasStateTest.cpp index 8f77fb4d49..f4db1a53d7 100644 --- a/tests/CanvasStateTest.cpp +++ b/tests/CanvasStateTest.cpp @@ -254,7 +254,7 @@ DEF_TEST(CanvasState_test_complex_clips, reporter) { class TestDrawFilter : public SkDrawFilter { public: - bool filter(SkPaint*, Type) SK_OVERRIDE { return true; } + bool filter(SkPaint*, Type) override { return true; } }; DEF_TEST(CanvasState_test_draw_filters, reporter) { diff --git a/tests/CanvasTest.cpp b/tests/CanvasTest.cpp index 23d49834c2..d709a935a6 100644 --- a/tests/CanvasTest.cpp +++ b/tests/CanvasTest.cpp @@ -190,13 +190,13 @@ class Canvas2CanvasClipVisitor : public SkCanvas::ClipVisitor { public: Canvas2CanvasClipVisitor(SkCanvas* target) : fTarget(target) {} - void clipRect(const SkRect& r, SkRegion::Op op, bool aa) SK_OVERRIDE { + void clipRect(const SkRect& r, SkRegion::Op op, bool aa) override { fTarget->clipRect(r, op, aa); } - void clipRRect(const SkRRect& r, SkRegion::Op op, bool aa) SK_OVERRIDE { + void clipRRect(const SkRRect& r, SkRegion::Op op, bool aa) override { fTarget->clipRRect(r, op, aa); } - void clipPath(const SkPath& p, SkRegion::Op op, bool aa) SK_OVERRIDE { + void clipPath(const SkPath& p, SkRegion::Op op, bool aa) override { fTarget->clipPath(p, op, aa); } diff --git a/tests/DeferredCanvasTest.cpp b/tests/DeferredCanvasTest.cpp index e83bc8106b..56b1bea93f 100644 --- a/tests/DeferredCanvasTest.cpp +++ b/tests/DeferredCanvasTest.cpp @@ -56,19 +56,19 @@ public: fBitmap.allocN32Pixels(width, height); } - SkCanvas* onNewCanvas() SK_OVERRIDE { + SkCanvas* onNewCanvas() override { return SkNEW_ARGS(SkCanvas, (fBitmap)); } - SkSurface* onNewSurface(const SkImageInfo&) SK_OVERRIDE { + SkSurface* onNewSurface(const SkImageInfo&) override { return NULL; } - SkImage* onNewImageSnapshot(Budgeted) SK_OVERRIDE { + SkImage* onNewImageSnapshot(Budgeted) override { return SkNewImageFromBitmap(fBitmap, true, &this->props()); } - void onCopyOnWrite(ContentChangeMode mode) SK_OVERRIDE { + void onCopyOnWrite(ContentChangeMode mode) override { if (mode == SkSurface::kDiscard_ContentChangeMode) { fCOWDiscardCount++; } else { @@ -76,7 +76,7 @@ public: } } - void onDiscard() SK_OVERRIDE { + void onDiscard() override { fDiscardCount++; } @@ -446,7 +446,7 @@ public: fDrawBitmapCallCount = 0; } virtual void drawBitmap(const SkDraw&, const SkBitmap&, - const SkMatrix&, const SkPaint&) SK_OVERRIDE { + const SkMatrix&, const SkPaint&) override { fDrawBitmapCallCount++; } @@ -460,16 +460,16 @@ public: fFlushedDrawCommandsCount = fSkippedPendingDrawCommandsCount = 0; } - void prepareForDraw() SK_OVERRIDE { + void prepareForDraw() override { fPrepareForDrawCount++; } - void storageAllocatedForRecordingChanged(size_t) SK_OVERRIDE { + void storageAllocatedForRecordingChanged(size_t) override { fStorageAllocatedChangedCount++; } - void flushedDrawCommands() SK_OVERRIDE { + void flushedDrawCommands() override { fFlushedDrawCommandsCount++; } - void skippedPendingDrawCommands() SK_OVERRIDE { + void skippedPendingDrawCommands() override { fSkippedPendingDrawCommandsCount++; } diff --git a/tests/DrawBitmapRectTest.cpp b/tests/DrawBitmapRectTest.cpp index bde0095df9..060e08b3a7 100644 --- a/tests/DrawBitmapRectTest.cpp +++ b/tests/DrawBitmapRectTest.cpp @@ -23,7 +23,7 @@ public: FailureImageGenerator() : SkImageGenerator(SkImageInfo::MakeN32Premul(100, 100)) {} protected: #ifdef SK_SUPPORT_LEGACY_BOOL_ONGETINFO - bool onGetInfo(SkImageInfo* info) SK_OVERRIDE { + bool onGetInfo(SkImageInfo* info) override { *info = SkImageInfo::MakeN32Premul(100, 100); return true; } diff --git a/tests/FrontBufferedStreamTest.cpp b/tests/FrontBufferedStreamTest.cpp index 69dade04b9..f3ef47db59 100644 --- a/tests/FrontBufferedStreamTest.cpp +++ b/tests/FrontBufferedStreamTest.cpp @@ -131,7 +131,7 @@ public: : INHERITED(data, size, ownMemory) , fIsAtEnd(false) {} - size_t read(void* dst, size_t requested) SK_OVERRIDE { + size_t read(void* dst, size_t requested) override { size_t bytesRead = this->INHERITED::read(dst, requested); if (bytesRead < requested) { fIsAtEnd = true; @@ -139,7 +139,7 @@ public: return bytesRead; } - bool isAtEnd() const SK_OVERRIDE { + bool isAtEnd() const override { return fIsAtEnd; } @@ -175,19 +175,19 @@ public: , fHasPosition(hasPosition) {} - bool hasLength() const SK_OVERRIDE { + bool hasLength() const override { return fHasLength; } - bool hasPosition() const SK_OVERRIDE { + bool hasPosition() const override { return fHasPosition; } - size_t read(void*, size_t) SK_OVERRIDE { + size_t read(void*, size_t) override { return 0; } - bool isAtEnd() const SK_OVERRIDE { + bool isAtEnd() const override { return true; } @@ -264,7 +264,7 @@ public: : fAtEnd(false) , fReadAfterEnd(false) {} - size_t read(void* buffer, size_t size) SK_OVERRIDE { + size_t read(void* buffer, size_t size) override { if (fAtEnd) { fReadAfterEnd = true; } else { @@ -273,7 +273,7 @@ public: return 0; } - bool isAtEnd() const SK_OVERRIDE { + bool isAtEnd() const override { return fAtEnd; } diff --git a/tests/GLProgramsTest.cpp b/tests/GLProgramsTest.cpp index b2204b4b2b..ed74ae8f6a 100644 --- a/tests/GLProgramsTest.cpp +++ b/tests/GLProgramsTest.cpp @@ -61,14 +61,14 @@ public: return SkRef(gBigKeyProcessor); } - const char* name() const SK_OVERRIDE { return "Big Ole Key"; } + const char* name() const override { return "Big Ole Key"; } virtual void getGLProcessorKey(const GrGLCaps& caps, - GrProcessorKeyBuilder* b) const SK_OVERRIDE { + GrProcessorKeyBuilder* b) const override { GLBigKeyProcessor::GenKey(*this, caps, b); } - GrGLFragmentProcessor* createGLInstance() const SK_OVERRIDE { + GrGLFragmentProcessor* createGLInstance() const override { return SkNEW_ARGS(GLBigKeyProcessor, (*this)); } @@ -76,8 +76,8 @@ private: BigKeyProcessor() { this->initClassID(); } - bool onIsEqual(const GrFragmentProcessor&) const SK_OVERRIDE { return true; } - void onComputeInvariantOutput(GrInvariantOutput* inout) const SK_OVERRIDE { } + bool onIsEqual(const GrFragmentProcessor&) const override { return true; } + void onComputeInvariantOutput(GrInvariantOutput* inout) const override { } GR_DECLARE_FRAGMENT_PROCESSOR_TEST; diff --git a/tests/ImageCacheTest.cpp b/tests/ImageCacheTest.cpp index 45dee92a2f..2244bb0a53 100644 --- a/tests/ImageCacheTest.cpp +++ b/tests/ImageCacheTest.cpp @@ -24,8 +24,8 @@ struct TestingRec : public SkResourceCache::Rec { TestingKey fKey; intptr_t fValue; - const Key& getKey() const SK_OVERRIDE { return fKey; } - size_t bytesUsed() const SK_OVERRIDE { return sizeof(fKey) + sizeof(fValue); } + const Key& getKey() const override { return fKey; } + size_t bytesUsed() const override { return sizeof(fKey) + sizeof(fValue); } static bool Visitor(const SkResourceCache::Rec& baseRec, void* context) { const TestingRec& rec = static_cast(baseRec); diff --git a/tests/ImageDecodingTest.cpp b/tests/ImageDecodingTest.cpp index b94e29c11d..3c78e0f407 100644 --- a/tests/ImageDecodingTest.cpp +++ b/tests/ImageDecodingTest.cpp @@ -696,7 +696,7 @@ public: SingleAllocator(void* p, size_t s) : fPixels(p), fSize(s) { } ~SingleAllocator() {} // If the pixels in fPixels are big enough, use them. - bool allocPixelRef(SkBitmap* bm, SkColorTable* ct) SK_OVERRIDE { + bool allocPixelRef(SkBitmap* bm, SkColorTable* ct) override { SkASSERT(bm); if (bm->info().getSafeSize(bm->rowBytes()) <= fSize) { bm->setPixels(fPixels, ct); diff --git a/tests/ImageFilterTest.cpp b/tests/ImageFilterTest.cpp index 87aabd1c8d..1fe9228fe4 100644 --- a/tests/ImageFilterTest.cpp +++ b/tests/ImageFilterTest.cpp @@ -50,7 +50,7 @@ public: } virtual bool onFilterImage(Proxy*, const SkBitmap& src, const Context& ctx, - SkBitmap* result, SkIPoint* offset) const SK_OVERRIDE { + SkBitmap* result, SkIPoint* offset) const override { REPORTER_ASSERT(fReporter, ctx.ctm() == fExpectedMatrix); return true; } @@ -59,7 +59,7 @@ public: SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(MatrixTestImageFilter) protected: - void flatten(SkWriteBuffer& buffer) const SK_OVERRIDE { + void flatten(SkWriteBuffer& buffer) const override { this->INHERITED::flatten(buffer); buffer.writeFunctionPtr(fReporter); buffer.writeMatrix(fExpectedMatrix); diff --git a/tests/LayerDrawLooperTest.cpp b/tests/LayerDrawLooperTest.cpp index bc76a02a4b..2c9b525aa2 100644 --- a/tests/LayerDrawLooperTest.cpp +++ b/tests/LayerDrawLooperTest.cpp @@ -30,7 +30,7 @@ public: FakeDevice() : SkBitmapDevice(make_bm(100, 100)) { } virtual void drawRect(const SkDraw& draw, const SkRect& r, - const SkPaint& paint) SK_OVERRIDE { + const SkPaint& paint) override { fLastMatrix = *draw.fMatrix; this->INHERITED::drawRect(draw, r, paint); } diff --git a/tests/LazyPtrTest.cpp b/tests/LazyPtrTest.cpp index 8bded1e9df..1b845bc502 100644 --- a/tests/LazyPtrTest.cpp +++ b/tests/LazyPtrTest.cpp @@ -49,7 +49,7 @@ namespace { struct Racer : public SkRunnable { Racer() : fLazy(NULL), fSeen(NULL) {} - void run() SK_OVERRIDE { fSeen = fLazy->get(); } + void run() override { fSeen = fLazy->get(); } SkLazyPtr* fLazy; int* fSeen; diff --git a/tests/OnceTest.cpp b/tests/OnceTest.cpp index 1344cee5c4..034c5d912f 100644 --- a/tests/OnceTest.cpp +++ b/tests/OnceTest.cpp @@ -39,7 +39,7 @@ public: SkOnceFlag* once; int* ptr; - void run() SK_OVERRIDE { + void run() override { SkOnce(once, add_six, ptr); } }; diff --git a/tests/PDFInvalidBitmapTest.cpp b/tests/PDFInvalidBitmapTest.cpp index bc7143a159..8a9b1fa132 100644 --- a/tests/PDFInvalidBitmapTest.cpp +++ b/tests/PDFInvalidBitmapTest.cpp @@ -23,8 +23,8 @@ class InvalidPixelRef : public SkPixelRef { public: InvalidPixelRef(const SkImageInfo& info) : SkPixelRef(info) {} private: - bool onNewLockPixels(LockRec*) SK_OVERRIDE { return false; } - void onUnlockPixels() SK_OVERRIDE { + bool onNewLockPixels(LockRec*) override { return false; } + void onUnlockPixels() override { SkDEBUGFAIL("InvalidPixelRef can't be locked"); } }; diff --git a/tests/PDFPrimitivesTest.cpp b/tests/PDFPrimitivesTest.cpp index f2bb5f4710..36c803f6d5 100644 --- a/tests/PDFPrimitivesTest.cpp +++ b/tests/PDFPrimitivesTest.cpp @@ -298,9 +298,9 @@ namespace { class DummyImageFilter : public SkImageFilter { public: DummyImageFilter(bool visited = false) : SkImageFilter(0, NULL), fVisited(visited) {} - ~DummyImageFilter() SK_OVERRIDE {} + ~DummyImageFilter() override {} virtual bool onFilterImage(Proxy*, const SkBitmap& src, const Context&, - SkBitmap* result, SkIPoint* offset) const SK_OVERRIDE { + SkBitmap* result, SkIPoint* offset) const override { fVisited = true; offset->fX = offset->fY = 0; *result = src; diff --git a/tests/PathOpsSkpClipTest.cpp b/tests/PathOpsSkpClipTest.cpp index 3cc788f13c..9a23eaa377 100755 --- a/tests/PathOpsSkpClipTest.cpp +++ b/tests/PathOpsSkpClipTest.cpp @@ -253,7 +253,7 @@ struct TestRunner { class TestRunnable : public SkRunnable { public: - void run() SK_OVERRIDE { + void run() override { SkGraphics::SetTLSFontCacheLimit(1 * 1024 * 1024); (*fTestFun)(&fState); } @@ -819,10 +819,10 @@ typedef SkTRegistry TestRegistry; public: \ static Test* Factory(void*) { return SkNEW(name##Class); } \ protected: \ - void onGetName(SkString* name) SK_OVERRIDE { \ + void onGetName(SkString* name) override { \ name->set(#name); \ } \ - void onRun() SK_OVERRIDE { test_##name(); } \ + void onRun() override { test_##name(); } \ }; \ static TestRegistry gReg_##name##Class(name##Class::Factory); \ static void test_##name() diff --git a/tests/PathOpsThreadedCommon.h b/tests/PathOpsThreadedCommon.h index e43afe1ac0..5bf5da2682 100644 --- a/tests/PathOpsThreadedCommon.h +++ b/tests/PathOpsThreadedCommon.h @@ -73,7 +73,7 @@ public: fTestFun = testFun; } - void run() SK_OVERRIDE { + void run() override { SkBitmap bitmap; fState.fBitmap = &bitmap; char pathStr[PATH_STR_SIZE]; diff --git a/tests/PictureBBHTest.cpp b/tests/PictureBBHTest.cpp index 771aa1261d..d09403ff14 100644 --- a/tests/PictureBBHTest.cpp +++ b/tests/PictureBBHTest.cpp @@ -62,7 +62,7 @@ public: : PictureBBHTestBase(2, 2, 1, 1) { } virtual ~DrawEmptyPictureBBHTest() { } - void doTest(SkCanvas&, SkCanvas&) SK_OVERRIDE { } + void doTest(SkCanvas&, SkCanvas&) override { } }; // Test to verify the playback of a picture into a canvas that has @@ -73,7 +73,7 @@ public: EmptyClipPictureBBHTest() : PictureBBHTestBase(2, 2, 3, 3) { } - void doTest(SkCanvas& playbackCanvas, SkCanvas& recordingCanvas) SK_OVERRIDE { + void doTest(SkCanvas& playbackCanvas, SkCanvas& recordingCanvas) override { // intersect with out of bounds rect -> empty clip. playbackCanvas.clipRect(SkRect::MakeXYWH(SkIntToScalar(10), SkIntToScalar(10), SkIntToScalar(1), SkIntToScalar(1)), SkRegion::kIntersect_Op); diff --git a/tests/PictureTest.cpp b/tests/PictureTest.cpp index 12d9b1559b..14e703fce4 100644 --- a/tests/PictureTest.cpp +++ b/tests/PictureTest.cpp @@ -548,17 +548,17 @@ public: } virtual SaveLayerStrategy willSaveLayer(const SkRect* bounds, const SkPaint* paint, - SaveFlags flags) SK_OVERRIDE { + SaveFlags flags) override { ++fSaveLayerCount; return this->INHERITED::willSaveLayer(bounds, paint, flags); } - void willSave() SK_OVERRIDE { + void willSave() override { ++fSaveCount; this->INHERITED::willSave(); } - void willRestore() SK_OVERRIDE { + void willRestore() override { ++fRestoreCount; this->INHERITED::willRestore(); } @@ -994,26 +994,26 @@ public: virtual void onClipRect(const SkRect& r, SkRegion::Op op, - ClipEdgeStyle edgeStyle) SK_OVERRIDE { + ClipEdgeStyle edgeStyle) override { fClipCount += 1; this->INHERITED::onClipRect(r, op, edgeStyle); } virtual void onClipRRect(const SkRRect& rrect, SkRegion::Op op, - ClipEdgeStyle edgeStyle)SK_OVERRIDE { + ClipEdgeStyle edgeStyle)override { fClipCount += 1; this->INHERITED::onClipRRect(rrect, op, edgeStyle); } virtual void onClipPath(const SkPath& path, SkRegion::Op op, - ClipEdgeStyle edgeStyle) SK_OVERRIDE { + ClipEdgeStyle edgeStyle) override { fClipCount += 1; this->INHERITED::onClipPath(path, op, edgeStyle); } - void onClipRegion(const SkRegion& deviceRgn, SkRegion::Op op) SK_OVERRIDE { + void onClipRegion(const SkRegion& deviceRgn, SkRegion::Op op) override { fClipCount += 1; this->INHERITED::onClipRegion(deviceRgn, op); } @@ -1241,19 +1241,19 @@ struct CountingBBH : public SkBBoxHierarchy { CountingBBH(const SkRect& bound) : searchCalls(0), rootBound(bound) {} - void search(const SkRect& query, SkTDArray* results) const SK_OVERRIDE { + void search(const SkRect& query, SkTDArray* results) const override { this->searchCalls++; } - void insert(const SkRect[], int) SK_OVERRIDE {} - virtual size_t bytesUsed() const SK_OVERRIDE { return 0; } - SkRect getRootBound() const SK_OVERRIDE { return rootBound; } + void insert(const SkRect[], int) override {} + virtual size_t bytesUsed() const override { return 0; } + SkRect getRootBound() const override { return rootBound; } }; class SpoonFedBBHFactory : public SkBBHFactory { public: explicit SpoonFedBBHFactory(SkBBoxHierarchy* bbh) : fBBH(bbh) {} - SkBBoxHierarchy* operator()(const SkRect&) const SK_OVERRIDE { + SkBBoxHierarchy* operator()(const SkRect&) const override { return SkRef(fBBH); } private: diff --git a/tests/PixelRefTest.cpp b/tests/PixelRefTest.cpp index b9a28244ec..e13d0e07e5 100644 --- a/tests/PixelRefTest.cpp +++ b/tests/PixelRefTest.cpp @@ -6,7 +6,7 @@ class TestListener : public SkPixelRef::GenIDChangeListener { public: explicit TestListener(int* ptr) : fPtr(ptr) {} - void onChange() SK_OVERRIDE { (*fPtr)++; } + void onChange() override { (*fPtr)++; } private: int* fPtr; }; diff --git a/tests/QuickRejectTest.cpp b/tests/QuickRejectTest.cpp index 447d81615b..e5dea247fb 100644 --- a/tests/QuickRejectTest.cpp +++ b/tests/QuickRejectTest.cpp @@ -16,14 +16,14 @@ class TestLooper : public SkDrawLooper { public: - SkDrawLooper::Context* createContext(SkCanvas*, void* storage) const SK_OVERRIDE { + SkDrawLooper::Context* createContext(SkCanvas*, void* storage) const override { return SkNEW_PLACEMENT(storage, TestDrawLooperContext); } - size_t contextSize() const SK_OVERRIDE { return sizeof(TestDrawLooperContext); } + size_t contextSize() const override { return sizeof(TestDrawLooperContext); } #ifndef SK_IGNORE_TO_STRING - void toString(SkString* str) const SK_OVERRIDE { + void toString(SkString* str) const override { str->append("TestLooper:"); } #endif @@ -36,7 +36,7 @@ private: TestDrawLooperContext() : fOnce(true) {} virtual ~TestDrawLooperContext() {} - bool next(SkCanvas* canvas, SkPaint*) SK_OVERRIDE { + bool next(SkCanvas* canvas, SkPaint*) override { if (fOnce) { fOnce = false; canvas->translate(SkIntToScalar(10), 0); diff --git a/tests/RecordDrawTest.cpp b/tests/RecordDrawTest.cpp index baee712b37..1e365bce30 100644 --- a/tests/RecordDrawTest.cpp +++ b/tests/RecordDrawTest.cpp @@ -24,7 +24,7 @@ class JustOneDraw : public SkPicture::AbortCallback { public: JustOneDraw() : fCalls(0) {} - bool abort() SK_OVERRIDE { return fCalls++ > 0; } + bool abort() override { return fCalls++ > 0; } private: int fCalls; }; @@ -123,7 +123,7 @@ DEF_TEST(RecordDraw_SetMatrixClobber, r) { } struct TestBBH : public SkBBoxHierarchy { - void insert(const SkRect boundsArray[], int N) SK_OVERRIDE { + void insert(const SkRect boundsArray[], int N) override { fEntries.setCount(N); for (int i = 0; i < N; i++) { Entry e = { (unsigned)i, boundsArray[i] }; @@ -131,9 +131,9 @@ struct TestBBH : public SkBBoxHierarchy { } } - void search(const SkRect& query, SkTDArray* results) const SK_OVERRIDE {} - size_t bytesUsed() const SK_OVERRIDE { return 0; } - SkRect getRootBound() const SK_OVERRIDE { return SkRect::MakeEmpty(); } + void search(const SkRect& query, SkTDArray* results) const override {} + size_t bytesUsed() const override { return 0; } + SkRect getRootBound() const override { return SkRect::MakeEmpty(); } struct Entry { unsigned opIndex; @@ -290,12 +290,12 @@ DEF_TEST(RecordDraw_drawImage, r){ } void onDrawImage(const SkImage* image, SkScalar left, SkScalar top, - const SkPaint* paint) SK_OVERRIDE { + const SkPaint* paint) override { fDrawImageCalled = true; } void onDrawImageRect(const SkImage* image, const SkRect* src, const SkRect& dst, - const SkPaint* paint) SK_OVERRIDE { + const SkPaint* paint) override { fDrawImageRectCalled = true; } diff --git a/tests/RecordReplaceDrawTest.cpp b/tests/RecordReplaceDrawTest.cpp index 55f47cee6c..41da9a1b5c 100644 --- a/tests/RecordReplaceDrawTest.cpp +++ b/tests/RecordReplaceDrawTest.cpp @@ -26,7 +26,7 @@ class JustOneDraw : public SkPicture::AbortCallback { public: JustOneDraw() : fCalls(0) {} - bool abort() SK_OVERRIDE { return fCalls++ > 0; } + bool abort() override { return fCalls++ > 0; } private: int fCalls; }; diff --git a/tests/ResourceCacheTest.cpp b/tests/ResourceCacheTest.cpp index b6e1eb7c89..737d7432b1 100644 --- a/tests/ResourceCacheTest.cpp +++ b/tests/ResourceCacheTest.cpp @@ -248,7 +248,7 @@ private: this->registerWithCache(); } - size_t onGpuMemorySize() const SK_OVERRIDE { return fSize; } + size_t onGpuMemorySize() const override { return fSize; } TestResource* fToDelete; size_t fSize; diff --git a/tests/SkpSkGrTest.cpp b/tests/SkpSkGrTest.cpp index c2f1a798d6..2c3c5b7fbf 100644 --- a/tests/SkpSkGrTest.cpp +++ b/tests/SkpSkGrTest.cpp @@ -146,7 +146,7 @@ public: fTestFun = testFun; } - void run() SK_OVERRIDE { + void run() override { SkGraphics::SetTLSFontCacheLimit(1 * 1024 * 1024); (*fTestFun)(&fState); } diff --git a/tests/skia_test.cpp b/tests/skia_test.cpp index 74029d457b..1b92290808 100644 --- a/tests/skia_test.cpp +++ b/tests/skia_test.cpp @@ -84,12 +84,12 @@ public: struct TestReporter : public skiatest::Reporter { public: TestReporter() : fError(false), fTestCount(0) {} - void bumpTestCount() SK_OVERRIDE { ++fTestCount; } - bool allowExtendedTest() const SK_OVERRIDE { + void bumpTestCount() override { ++fTestCount; } + bool allowExtendedTest() const override { return FLAGS_extendedTest; } - bool verbose() const SK_OVERRIDE { return FLAGS_veryVerbose; } - void reportFailed(const skiatest::Failure& failure) SK_OVERRIDE { + bool verbose() const override { return FLAGS_veryVerbose; } + void reportFailed(const skiatest::Failure& failure) override { SkDebugf("\nFAILED: %s", failure.toString().c_str()); fError = true; } diff --git a/tools/CopyTilesRenderer.h b/tools/CopyTilesRenderer.h index 507e0fd2d4..3d9a1eb18c 100644 --- a/tools/CopyTilesRenderer.h +++ b/tools/CopyTilesRenderer.h @@ -32,15 +32,15 @@ namespace sk_tools { const SkString* mismatchPath, const SkString* inputFilename, bool useChecksumBasedFilenames, - bool useMultiPictureDraw) SK_OVERRIDE; + bool useMultiPictureDraw) override; /** * Similar to TiledPictureRenderer, this will draw a PNG for each tile. However, the * numbering (and actual tiles) will be different. */ - bool render(SkBitmap** out) SK_OVERRIDE; + bool render(SkBitmap** out) override; - bool supportsTimingIndividualTiles() SK_OVERRIDE { return false; } + bool supportsTimingIndividualTiles() override { return false; } private: int fXTilesPerLargeTile; @@ -49,7 +49,7 @@ namespace sk_tools { int fLargeTileWidth; int fLargeTileHeight; - SkString getConfigNameInternal() SK_OVERRIDE; + SkString getConfigNameInternal() override; typedef TiledPictureRenderer INHERITED; }; diff --git a/tools/PictureRenderer.h b/tools/PictureRenderer.h index d52b988819..e1434686c6 100644 --- a/tools/PictureRenderer.h +++ b/tools/PictureRenderer.h @@ -501,17 +501,17 @@ public: RecordPictureRenderer(const GrContext::Options &opts) : INHERITED(opts) { } #endif - bool render(SkBitmap** out = NULL) SK_OVERRIDE; + bool render(SkBitmap** out = NULL) override; - SkString getPerIterTimeFormat() SK_OVERRIDE { return SkString("%.4f"); } + SkString getPerIterTimeFormat() override { return SkString("%.4f"); } - SkString getNormalTimeFormat() SK_OVERRIDE { return SkString("%6.4f"); } + SkString getNormalTimeFormat() override { return SkString("%6.4f"); } protected: - SkCanvas* setupCanvas(int width, int height) SK_OVERRIDE; + SkCanvas* setupCanvas(int width, int height) override; private: - SkString getConfigNameInternal() SK_OVERRIDE; + SkString getConfigNameInternal() override; typedef PictureRenderer INHERITED; }; @@ -522,10 +522,10 @@ public: PipePictureRenderer(const GrContext::Options &opts) : INHERITED(opts) { } #endif - bool render(SkBitmap** out = NULL) SK_OVERRIDE; + bool render(SkBitmap** out = NULL) override; private: - SkString getConfigNameInternal() SK_OVERRIDE; + SkString getConfigNameInternal() override; typedef PictureRenderer INHERITED; }; @@ -541,12 +541,12 @@ public: const SkString* mismatchPath, const SkString* inputFilename, bool useChecksumBasedFilenames, - bool useMultiPictureDraw) SK_OVERRIDE; + bool useMultiPictureDraw) override; - bool render(SkBitmap** out = NULL) SK_OVERRIDE; + bool render(SkBitmap** out = NULL) override; private: - SkString getConfigNameInternal() SK_OVERRIDE; + SkString getConfigNameInternal() override; typedef PictureRenderer INHERITED; }; @@ -564,16 +564,16 @@ public: const SkString* mismatchPath, const SkString* inputFilename, bool useChecksumBasedFilenames, - bool useMultiPictureDraw) SK_OVERRIDE; + bool useMultiPictureDraw) override; /** * Renders to tiles, rather than a single canvas. * If fWritePath was provided, a separate file is * created for each tile, named "path0.png", "path1.png", etc. */ - bool render(SkBitmap** out = NULL) SK_OVERRIDE; + bool render(SkBitmap** out = NULL) override; - void end() SK_OVERRIDE; + void end() override; void setTileWidth(int width) { fTileWidth = width; @@ -620,7 +620,7 @@ public: return fTileMinPowerOf2Width; } - TiledPictureRenderer* getTiledRenderer() SK_OVERRIDE { return this; } + TiledPictureRenderer* getTiledRenderer() override { return this; } virtual bool supportsTimingIndividualTiles() { return true; } @@ -655,8 +655,8 @@ public: protected: SkTDArray fTileRects; - SkCanvas* setupCanvas(int width, int height) SK_OVERRIDE; - SkString getConfigNameInternal() SK_OVERRIDE; + SkCanvas* setupCanvas(int width, int height) override; + SkString getConfigNameInternal() override; private: int fTileWidth; @@ -692,18 +692,18 @@ public: PlaybackCreationRenderer(const GrContext::Options &opts) : INHERITED(opts) { } #endif - void setup() SK_OVERRIDE; + void setup() override; - bool render(SkBitmap** out = NULL) SK_OVERRIDE; + bool render(SkBitmap** out = NULL) override; - SkString getPerIterTimeFormat() SK_OVERRIDE { return SkString("%.4f"); } + SkString getPerIterTimeFormat() override { return SkString("%.4f"); } - SkString getNormalTimeFormat() SK_OVERRIDE { return SkString("%6.4f"); } + SkString getNormalTimeFormat() override { return SkString("%6.4f"); } private: SkAutoTDelete fRecorder; - SkString getConfigNameInternal() SK_OVERRIDE; + SkString getConfigNameInternal() override; typedef PictureRenderer INHERITED; }; diff --git a/tools/PictureResultsWriter.h b/tools/PictureResultsWriter.h index d3d346fd1c..67371024e3 100644 --- a/tools/PictureResultsWriter.h +++ b/tools/PictureResultsWriter.h @@ -56,22 +56,22 @@ public: fWriters.push_back(newWriter); } virtual ~PictureResultsMultiWriter() {} - void bench(const char name[], int32_t x, int32_t y) SK_OVERRIDE { + void bench(const char name[], int32_t x, int32_t y) override { for(int i=0; ibench(name, x, y); } } - void logRenderer(sk_tools::PictureRenderer *pr) SK_OVERRIDE { + void logRenderer(sk_tools::PictureRenderer *pr) override { for(int i=0; ilogRenderer(pr); } } - void tileMeta(int x, int y, int tx, int ty) SK_OVERRIDE { + void tileMeta(int x, int y, int tx, int ty) override { for(int i=0; itileMeta(x, y, tx, ty); } } - void addTileFlag(PictureResultsWriter::TileFlags flag) SK_OVERRIDE { + void addTileFlag(PictureResultsWriter::TileFlags flag) override { for(int i=0; iaddTileFlag(flag); } @@ -81,13 +81,13 @@ public: const char format[], const TimerData::Result result, uint32_t timerTypes, - int numInnerLoops = 1) SK_OVERRIDE { + int numInnerLoops = 1) override { for(int i=0; itileData(data, format, result, timerTypes, numInnerLoops); } } - void end() SK_OVERRIDE { + void end() override { for(int i=0; iend(); } @@ -109,18 +109,18 @@ private: public: PictureResultsLoggerWriter(BenchLogger* log) : fLogger(log), fCurrentLine() {} - void bench(const char name[], int32_t x, int32_t y) SK_OVERRIDE { + void bench(const char name[], int32_t x, int32_t y) override { SkString result; result.printf("running bench [%i %i] %s ", x, y, name); this->logProgress(result.c_str()); } - void logRenderer(sk_tools::PictureRenderer* renderer) SK_OVERRIDE { + void logRenderer(sk_tools::PictureRenderer* renderer) override { fCurrentLine = renderer->getConfigName(); } - void tileMeta(int x, int y, int tx, int ty) SK_OVERRIDE { + void tileMeta(int x, int y, int tx, int ty) override { fCurrentLine.appendf(": tile [%i,%i] out of [%i,%i]", x, y, tx, ty); } - void addTileFlag(PictureResultsWriter::TileFlags flag) SK_OVERRIDE { + void addTileFlag(PictureResultsWriter::TileFlags flag) override { if(flag == PictureResultsWriter::kPurging) { fCurrentLine.append(" "); } else if(flag == PictureResultsWriter::kAvg) { @@ -132,13 +132,13 @@ public: const char format[], const TimerData::Result result, uint32_t timerTypes, - int numInnerLoops = 1) SK_OVERRIDE { + int numInnerLoops = 1) override { SkString results = data->getResult(format, result, fCurrentLine.c_str(), timerTypes, numInnerLoops); results.append("\n"); this->logProgress(results.c_str()); } - void end() SK_OVERRIDE {} + void end() override {} private: BenchLogger* fLogger; SkString fCurrentLine; @@ -189,23 +189,23 @@ public: fBuilderData = this->makeBuilderJson(); } - void bench(const char name[], int32_t x, int32_t y) SK_OVERRIDE { + void bench(const char name[], int32_t x, int32_t y) override { fBenchName = SkString(name); } - void logRenderer(sk_tools::PictureRenderer* pr) SK_OVERRIDE { + void logRenderer(sk_tools::PictureRenderer* pr) override { fParams = pr->getJSONConfig(); fConfigString = pr->getConfigName(); } // Apparently tiles aren't used, so tileMeta is empty - void tileMeta(int x, int y, int tx, int ty) SK_OVERRIDE {} + void tileMeta(int x, int y, int tx, int ty) override {} // Flags aren't used, so addTileFlag is empty - void addTileFlag(PictureResultsWriter::TileFlags flag) SK_OVERRIDE {} + void addTileFlag(PictureResultsWriter::TileFlags flag) override {} virtual void tileData( TimerData* data, const char format[], const TimerData::Result result, uint32_t timerTypes, - int numInnerLoops = 1) SK_OVERRIDE { + int numInnerLoops = 1) override { Json::Value newData = data->getJSON(timerTypes, result, numInnerLoops); Json::Value combinedParams(fBuilderData); for(Json::ValueIterator iter = fParams.begin(); iter != fParams.end(); @@ -241,7 +241,7 @@ public: fStream.writeText(Json::FastWriter().write(data).c_str()); } } - void end() SK_OVERRIDE { + void end() override { fStream.flush(); } private: diff --git a/tools/iOSShell.h b/tools/iOSShell.h index 9a9608f3be..eaecba5e0b 100644 --- a/tools/iOSShell.h +++ b/tools/iOSShell.h @@ -20,10 +20,10 @@ public: virtual ~ShellWindow(); protected: - void onSizeChange() SK_OVERRIDE; + void onSizeChange() override; virtual bool onDispatchClick(int x, int y, Click::State, void* owner, - unsigned modi) SK_OVERRIDE; + unsigned modi) override; private: typedef SkOSWindow INHERITED; diff --git a/tools/render_pdfs_main.cpp b/tools/render_pdfs_main.cpp index 4820a335f4..4e13f7ebd0 100644 --- a/tools/render_pdfs_main.cpp +++ b/tools/render_pdfs_main.cpp @@ -98,11 +98,11 @@ namespace { class NullWStream : public SkWStream { public: NullWStream() : fBytesWritten(0) { } - bool write(const void*, size_t size) SK_OVERRIDE { + bool write(const void*, size_t size) override { fBytesWritten += size; return true; } - size_t bytesWritten() const SK_OVERRIDE { return fBytesWritten; } + size_t bytesWritten() const override { return fBytesWritten; } size_t fBytesWritten; }; } // namespace diff --git a/tools/sk_tool_utils.h b/tools/sk_tool_utils.h index 8754de69af..0299e742d2 100644 --- a/tools/sk_tool_utils.h +++ b/tools/sk_tool_utils.h @@ -61,9 +61,9 @@ namespace sk_tool_utils { // used. class PngPixelSerializer : public SkPixelSerializer { public: - bool onUseEncodedData(const void*, size_t) SK_OVERRIDE { return true; } + bool onUseEncodedData(const void*, size_t) override { return true; } SkData* onEncodePixels(const SkImageInfo& info, const void* pixels, - size_t rowBytes) SK_OVERRIDE { + size_t rowBytes) override { return SkImageEncoder::EncodeData(info, pixels, rowBytes, SkImageEncoder::kPNG_Type, 100); } diff --git a/tools/skpdiff/SkCLImageDiffer.h b/tools/skpdiff/SkCLImageDiffer.h index 177940d977..cb9a8d6460 100644 --- a/tools/skpdiff/SkCLImageDiffer.h +++ b/tools/skpdiff/SkCLImageDiffer.h @@ -26,7 +26,7 @@ class SkCLImageDiffer : public SkImageDiffer { public: SkCLImageDiffer(); - bool requiresOpenCL() const SK_OVERRIDE { return true; } + bool requiresOpenCL() const override { return true; } /** * Initializes the OpenCL resources this differ needs to work diff --git a/tools/skpdiff/SkDiffContext.cpp b/tools/skpdiff/SkDiffContext.cpp index c072c27955..c422636f6e 100644 --- a/tools/skpdiff/SkDiffContext.cpp +++ b/tools/skpdiff/SkDiffContext.cpp @@ -219,7 +219,7 @@ public: fTestPath = testPath; } - void run() SK_OVERRIDE { + void run() override { fDiffContext->addDiff(fBaselinePath.c_str(), fTestPath.c_str()); } diff --git a/tools/skpdiff/SkDifferentPixelsMetric.h b/tools/skpdiff/SkDifferentPixelsMetric.h index 0ef7337b5d..1f39b3552e 100644 --- a/tools/skpdiff/SkDifferentPixelsMetric.h +++ b/tools/skpdiff/SkDifferentPixelsMetric.h @@ -27,14 +27,14 @@ class SkDifferentPixelsMetric : public SkImageDiffer { #endif public: - const char* getName() const SK_OVERRIDE; + const char* getName() const override; virtual bool diff(SkBitmap* baseline, SkBitmap* test, const BitmapsToCreate& bitmapsToCreate, - Result* result) const SK_OVERRIDE; + Result* result) const override; protected: #if SK_SUPPORT_OPENCL - bool onInit() SK_OVERRIDE; + bool onInit() override; #endif private: diff --git a/tools/skpdiff/SkPMetric.h b/tools/skpdiff/SkPMetric.h index 8f7aa6a05b..0448708980 100644 --- a/tools/skpdiff/SkPMetric.h +++ b/tools/skpdiff/SkPMetric.h @@ -18,9 +18,9 @@ */ class SkPMetric : public SkImageDiffer { public: - const char* getName() const SK_OVERRIDE { return "perceptual"; } + const char* getName() const override { return "perceptual"; } virtual bool diff(SkBitmap* baseline, SkBitmap* test, const BitmapsToCreate& bitmapsToCreate, - Result* result) const SK_OVERRIDE; + Result* result) const override; private: typedef SkImageDiffer INHERITED;