diff options
128 files changed, 182 insertions, 184 deletions
diff --git a/bench/BlurRectBench.cpp b/bench/BlurRectBench.cpp index 774bafaf27..163130201e 100644 --- a/bench/BlurRectBench.cpp +++ b/bench/BlurRectBench.cpp @@ -105,7 +105,7 @@ class BlurRectSeparableBench: public BlurRectBench { public: BlurRectSeparableBench(SkScalar rad) : INHERITED(rad) { } - ~BlurRectSeparableBench() { + ~BlurRectSeparableBench() override { SkMask::FreeImage(fSrcMask.fImage); } diff --git a/bench/GMBench.h b/bench/GMBench.h index 5e8b04ab46..c9ec80c643 100644 --- a/bench/GMBench.h +++ b/bench/GMBench.h @@ -18,7 +18,7 @@ class GMBench : public Benchmark { public: // Constructor takes ownership of the GM param. GMBench(skiagm::GM* gm); - virtual ~GMBench(); + ~GMBench() override; protected: const char* onGetName() override; diff --git a/bench/PDFBench.cpp b/bench/PDFBench.cpp index 3716ff3be0..c07bc222c9 100644 --- a/bench/PDFBench.cpp +++ b/bench/PDFBench.cpp @@ -61,7 +61,7 @@ static void test_pdf_object_serialization(const sk_sp<SkPDFObject> object) { class PDFImageBench : public Benchmark { public: PDFImageBench() {} - virtual ~PDFImageBench() {} + ~PDFImageBench() override {} protected: const char* onGetName() override { return "PDFImage"; } @@ -100,7 +100,7 @@ private: class PDFJpegImageBench : public Benchmark { public: PDFJpegImageBench() {} - virtual ~PDFJpegImageBench() {} + ~PDFJpegImageBench() override {} protected: const char* onGetName() override { return "PDFJpegImage"; } @@ -139,7 +139,7 @@ private: class PDFCompressionBench : public Benchmark { public: PDFCompressionBench() {} - virtual ~PDFCompressionBench() {} + ~PDFCompressionBench() override {} protected: const char* onGetName() override { return "PDFCompression"; } diff --git a/bench/ResultsWriter.h b/bench/ResultsWriter.h index 1d6dc3eef1..85c44136fe 100644 --- a/bench/ResultsWriter.h +++ b/bench/ResultsWriter.h @@ -85,7 +85,7 @@ public: , fBench(nullptr) , fConfig(nullptr) {} - ~NanoJSONResultsWriter() { + ~NanoJSONResultsWriter() override { this->flush(); } diff --git a/bench/TextBench.cpp b/bench/TextBench.cpp index a048ffd4a1..f4a7cddbae 100644 --- a/bench/TextBench.cpp +++ b/bench/TextBench.cpp @@ -63,7 +63,7 @@ public: fPaint.setColor(color); } - virtual ~TextBench() { + ~TextBench() override { delete[] fPos; } diff --git a/experimental/SkPerlinNoiseShader2/SkPerlinNoiseShader2.cpp b/experimental/SkPerlinNoiseShader2/SkPerlinNoiseShader2.cpp index 246d34e9b6..da4c42f760 100644 --- a/experimental/SkPerlinNoiseShader2/SkPerlinNoiseShader2.cpp +++ b/experimental/SkPerlinNoiseShader2/SkPerlinNoiseShader2.cpp @@ -633,7 +633,7 @@ public: std::move(permutationsProxy), std::move(noiseProxy), matrix)); } - virtual ~GrPerlinNoise2Effect() { delete fPaintingData; } + ~GrPerlinNoise2Effect() override { delete fPaintingData; } const char* name() const override { return "PerlinNoise"; } @@ -1053,7 +1053,7 @@ public: std::move(gradientProxy), matrix)); } - virtual ~GrImprovedPerlinNoiseEffect() { delete fPaintingData; } + ~GrImprovedPerlinNoiseEffect() override { delete fPaintingData; } const char* name() const override { return "ImprovedPerlinNoise"; } diff --git a/experimental/SkPerlinNoiseShader2/SkPerlinNoiseShader2.h b/experimental/SkPerlinNoiseShader2/SkPerlinNoiseShader2.h index 1f4839c8b4..0f40ae4af3 100644 --- a/experimental/SkPerlinNoiseShader2/SkPerlinNoiseShader2.h +++ b/experimental/SkPerlinNoiseShader2/SkPerlinNoiseShader2.h @@ -86,7 +86,7 @@ public: class PerlinNoiseShaderContext : public SkShader::Context { public: PerlinNoiseShaderContext(const SkPerlinNoiseShader2& shader, const ContextRec&); - virtual ~PerlinNoiseShaderContext(); + ~PerlinNoiseShaderContext() override; void shadeSpan(int x, int y, SkPMColor[], int count) override; @@ -120,7 +120,7 @@ private: SkPerlinNoiseShader2(SkPerlinNoiseShader2::Type type, SkScalar baseFrequencyX, SkScalar baseFrequencyY, int numOctaves, SkScalar seed, const SkISize* tileSize); - virtual ~SkPerlinNoiseShader2(); + ~SkPerlinNoiseShader2() override; const SkPerlinNoiseShader2::Type fType; const SkScalar fBaseFrequencyX; diff --git a/experimental/svg/model/SkSVGCircle.h b/experimental/svg/model/SkSVGCircle.h index 16ee54d280..19db926f21 100644 --- a/experimental/svg/model/SkSVGCircle.h +++ b/experimental/svg/model/SkSVGCircle.h @@ -15,7 +15,7 @@ struct SkPoint; class SkSVGCircle final : public SkSVGShape { public: - virtual ~SkSVGCircle() = default; + ~SkSVGCircle() override = default; static sk_sp<SkSVGCircle> Make() { return sk_sp<SkSVGCircle>(new SkSVGCircle()); } void setCx(const SkSVGLength&); diff --git a/experimental/svg/model/SkSVGContainer.h b/experimental/svg/model/SkSVGContainer.h index 6a0b00244c..3a6841f3ad 100644 --- a/experimental/svg/model/SkSVGContainer.h +++ b/experimental/svg/model/SkSVGContainer.h @@ -13,7 +13,7 @@ class SkSVGContainer : public SkSVGTransformableNode { public: - virtual ~SkSVGContainer() = default; + ~SkSVGContainer() override = default; void appendChild(sk_sp<SkSVGNode>) override; diff --git a/experimental/svg/model/SkSVGEllipse.h b/experimental/svg/model/SkSVGEllipse.h index f17c1e1137..68cebd75db 100644 --- a/experimental/svg/model/SkSVGEllipse.h +++ b/experimental/svg/model/SkSVGEllipse.h @@ -15,7 +15,7 @@ struct SkRect; class SkSVGEllipse final : public SkSVGShape { public: - virtual ~SkSVGEllipse() = default; + ~SkSVGEllipse() override = default; static sk_sp<SkSVGEllipse> Make() { return sk_sp<SkSVGEllipse>(new SkSVGEllipse()); } void setCx(const SkSVGLength&); diff --git a/experimental/svg/model/SkSVGLine.h b/experimental/svg/model/SkSVGLine.h index 0f15ca5ac7..ec6213cf77 100644 --- a/experimental/svg/model/SkSVGLine.h +++ b/experimental/svg/model/SkSVGLine.h @@ -15,7 +15,7 @@ struct SkPoint; class SkSVGLine final : public SkSVGShape { public: - virtual ~SkSVGLine() = default; + ~SkSVGLine() override = default; static sk_sp<SkSVGLine> Make() { return sk_sp<SkSVGLine>(new SkSVGLine()); } void setX1(const SkSVGLength&); diff --git a/experimental/svg/model/SkSVGLinearGradient.h b/experimental/svg/model/SkSVGLinearGradient.h index 2e4e3f5dee..4e5905c02d 100644 --- a/experimental/svg/model/SkSVGLinearGradient.h +++ b/experimental/svg/model/SkSVGLinearGradient.h @@ -13,7 +13,7 @@ class SkSVGLinearGradient : public SkSVGHiddenContainer { public: - virtual ~SkSVGLinearGradient() = default; + ~SkSVGLinearGradient() override = default; static sk_sp<SkSVGLinearGradient> Make() { return sk_sp<SkSVGLinearGradient>(new SkSVGLinearGradient()); } diff --git a/experimental/svg/model/SkSVGPath.h b/experimental/svg/model/SkSVGPath.h index 8b1f2e98f8..176b83873e 100644 --- a/experimental/svg/model/SkSVGPath.h +++ b/experimental/svg/model/SkSVGPath.h @@ -13,7 +13,7 @@ class SkSVGPath final : public SkSVGShape { public: - virtual ~SkSVGPath() = default; + ~SkSVGPath() override = default; static sk_sp<SkSVGPath> Make() { return sk_sp<SkSVGPath>(new SkSVGPath()); } void setPath(const SkPath& path) { fPath = path; } diff --git a/experimental/svg/model/SkSVGPoly.h b/experimental/svg/model/SkSVGPoly.h index 90fb354d35..3259bc0612 100644 --- a/experimental/svg/model/SkSVGPoly.h +++ b/experimental/svg/model/SkSVGPoly.h @@ -14,7 +14,7 @@ // Handles <polygon> and <polyline> elements. class SkSVGPoly final : public SkSVGShape { public: - virtual ~SkSVGPoly() = default; + ~SkSVGPoly() override = default; static sk_sp<SkSVGPoly> MakePolygon() { return sk_sp<SkSVGPoly>(new SkSVGPoly(SkSVGTag::kPolygon)); diff --git a/experimental/svg/model/SkSVGRect.h b/experimental/svg/model/SkSVGRect.h index a0c07a1957..e61f276418 100644 --- a/experimental/svg/model/SkSVGRect.h +++ b/experimental/svg/model/SkSVGRect.h @@ -15,7 +15,7 @@ class SkRRect; class SkSVGRect final : public SkSVGShape { public: - virtual ~SkSVGRect() = default; + ~SkSVGRect() override = default; static sk_sp<SkSVGRect> Make() { return sk_sp<SkSVGRect>(new SkSVGRect()); } void setX(const SkSVGLength&); diff --git a/experimental/svg/model/SkSVGSVG.h b/experimental/svg/model/SkSVGSVG.h index 675c83351f..0dfeb766fd 100644 --- a/experimental/svg/model/SkSVGSVG.h +++ b/experimental/svg/model/SkSVGSVG.h @@ -16,7 +16,7 @@ class SkSVGLengthContext; class SkSVGSVG : public SkSVGContainer { public: - virtual ~SkSVGSVG() = default; + ~SkSVGSVG() override = default; static sk_sp<SkSVGSVG> Make() { return sk_sp<SkSVGSVG>(new SkSVGSVG()); } diff --git a/experimental/svg/model/SkSVGShape.h b/experimental/svg/model/SkSVGShape.h index 48b2ead0c1..f40609e8f8 100644 --- a/experimental/svg/model/SkSVGShape.h +++ b/experimental/svg/model/SkSVGShape.h @@ -16,7 +16,7 @@ class SkPaint; class SkSVGShape : public SkSVGTransformableNode { public: - virtual ~SkSVGShape() = default; + ~SkSVGShape() override = default; void appendChild(sk_sp<SkSVGNode>) override; diff --git a/experimental/svg/model/SkSVGStop.h b/experimental/svg/model/SkSVGStop.h index 2ffbc5c852..5eb044271d 100644 --- a/experimental/svg/model/SkSVGStop.h +++ b/experimental/svg/model/SkSVGStop.h @@ -15,7 +15,7 @@ class SkSVGLengthContext; class SkSVGStop : public SkSVGHiddenContainer { public: - virtual ~SkSVGStop() = default; + ~SkSVGStop() override = default; static sk_sp<SkSVGStop> Make() { return sk_sp<SkSVGStop>(new SkSVGStop()); } diff --git a/experimental/svg/model/SkSVGTransformableNode.h b/experimental/svg/model/SkSVGTransformableNode.h index ad217a92f9..f9cd668003 100644 --- a/experimental/svg/model/SkSVGTransformableNode.h +++ b/experimental/svg/model/SkSVGTransformableNode.h @@ -13,7 +13,7 @@ class SkSVGTransformableNode : public SkSVGNode { public: - virtual ~SkSVGTransformableNode() = default; + ~SkSVGTransformableNode() override = default; void setTransform(const SkSVGTransformType& t) { fTransform = t; } diff --git a/gm/giantbitmap.cpp b/gm/giantbitmap.cpp index e1ba737d2f..37b76a64ab 100644 --- a/gm/giantbitmap.cpp +++ b/gm/giantbitmap.cpp @@ -66,7 +66,7 @@ public: fDoRotate = doRotate; } - virtual ~GiantBitmapGM() { delete fBM; } + ~GiantBitmapGM() override { delete fBM; } protected: diff --git a/gm/image.cpp b/gm/image.cpp index 43e3a0bd21..f672e07ed1 100644 --- a/gm/image.cpp +++ b/gm/image.cpp @@ -114,7 +114,7 @@ public: fSize.set(SkIntToScalar(W), SkIntToScalar(H)); } - virtual ~ImageGM() { + ~ImageGM() override { sk_free(fBuffer); } diff --git a/gm/multipicturedraw.cpp b/gm/multipicturedraw.cpp index 35f4c12986..e7d4baabef 100644 --- a/gm/multipicturedraw.cpp +++ b/gm/multipicturedraw.cpp @@ -470,7 +470,7 @@ namespace skiagm { } } - virtual ~MultiPictureDraw() { + ~MultiPictureDraw() override { for (int i = 0; i < kNumPictures; ++i) { SkSafeUnref(fPictures[i]); } diff --git a/include/core/SkImageFilter.h b/include/core/SkImageFilter.h index 86e12e1f4f..ea2afa2f2e 100644 --- a/include/core/SkImageFilter.h +++ b/include/core/SkImageFilter.h @@ -270,7 +270,7 @@ protected: SkImageFilter(sk_sp<SkImageFilter>* inputs, int inputCount, const CropRect* cropRect); - virtual ~SkImageFilter(); + ~SkImageFilter() override; /** * Constructs a new SkImageFilter read from an SkReadBuffer object. diff --git a/include/core/SkMallocPixelRef.h b/include/core/SkMallocPixelRef.h index ab337b9241..bb07fa2dab 100644 --- a/include/core/SkMallocPixelRef.h +++ b/include/core/SkMallocPixelRef.h @@ -99,7 +99,7 @@ protected: // The ownPixels version of this constructor is deprecated. SkMallocPixelRef(const SkImageInfo&, void* addr, size_t rb, SkColorTable*, bool ownPixels); - virtual ~SkMallocPixelRef(); + ~SkMallocPixelRef() override; bool onNewLockPixels(LockRec*) override; void onUnlockPixels() override; diff --git a/include/core/SkShader.h b/include/core/SkShader.h index 4c264e4741..e49ad5f6a6 100644 --- a/include/core/SkShader.h +++ b/include/core/SkShader.h @@ -40,7 +40,7 @@ class GrFragmentProcessor; class SK_API SkShader : public SkFlattenable { public: SkShader(const SkMatrix* localMatrix = NULL); - virtual ~SkShader(); + ~SkShader() override; /** * Returns the local matrix. diff --git a/include/core/SkStream.h b/include/core/SkStream.h index e10aece360..428f247fc5 100644 --- a/include/core/SkStream.h +++ b/include/core/SkStream.h @@ -261,7 +261,7 @@ public: */ explicit SkFILEStream(FILE* file); - virtual ~SkFILEStream(); + ~SkFILEStream() override; /** Returns true if the current path could be opened. */ bool isValid() const { return fFILE != nullptr; } @@ -357,7 +357,7 @@ private: class SK_API SkFILEWStream : public SkWStream { public: SkFILEWStream(const char path[]); - virtual ~SkFILEWStream(); + ~SkFILEWStream() override; /** Returns true if the current path could be opened. */ @@ -377,7 +377,7 @@ private: class SK_API SkDynamicMemoryWStream : public SkWStream { public: SkDynamicMemoryWStream(); - virtual ~SkDynamicMemoryWStream(); + ~SkDynamicMemoryWStream() override; bool write(const void* buffer, size_t size) override; size_t bytesWritten() const override; diff --git a/include/core/SkWriteBuffer.h b/include/core/SkWriteBuffer.h index a104ffcb1f..12d5d3b022 100644 --- a/include/core/SkWriteBuffer.h +++ b/include/core/SkWriteBuffer.h @@ -81,7 +81,7 @@ public: SkBinaryWriteBuffer(uint32_t flags = 0); SkBinaryWriteBuffer(void* initialStorage, size_t storageSize, uint32_t flags = 0); - ~SkBinaryWriteBuffer(); + ~SkBinaryWriteBuffer() override; bool isCrossProcess() const override { return SkToBool(fFlags & kCrossProcess_Flag); diff --git a/include/effects/SkCornerPathEffect.h b/include/effects/SkCornerPathEffect.h index 593f4bea2b..c252943fbe 100644 --- a/include/effects/SkCornerPathEffect.h +++ b/include/effects/SkCornerPathEffect.h @@ -35,7 +35,7 @@ public: #endif protected: - virtual ~SkCornerPathEffect(); + ~SkCornerPathEffect() override; explicit SkCornerPathEffect(SkScalar radius); void flatten(SkWriteBuffer&) const override; diff --git a/include/effects/SkDashPathEffect.h b/include/effects/SkDashPathEffect.h index 045bb25d05..13cbb4def0 100644 --- a/include/effects/SkDashPathEffect.h +++ b/include/effects/SkDashPathEffect.h @@ -55,7 +55,7 @@ public: #endif protected: - virtual ~SkDashPathEffect(); + ~SkDashPathEffect() override; SkDashPathEffect(const SkScalar intervals[], int count, SkScalar phase); void flatten(SkWriteBuffer&) const override; diff --git a/include/effects/SkLayerDrawLooper.h b/include/effects/SkLayerDrawLooper.h index c0a95345d4..3a3514091f 100644 --- a/include/effects/SkLayerDrawLooper.h +++ b/include/effects/SkLayerDrawLooper.h @@ -15,7 +15,7 @@ class SK_API SkLayerDrawLooper : public SkDrawLooper { public: - virtual ~SkLayerDrawLooper(); + ~SkLayerDrawLooper() override; /** * Bits specifies which aspects of the layer's paint should replace the diff --git a/include/effects/SkLayerRasterizer.h b/include/effects/SkLayerRasterizer.h index a1b7e2dc0c..7fcfd6b2f0 100644 --- a/include/effects/SkLayerRasterizer.h +++ b/include/effects/SkLayerRasterizer.h @@ -16,7 +16,7 @@ class SkPaint; class SK_API SkLayerRasterizer : public SkRasterizer { public: - virtual ~SkLayerRasterizer(); + ~SkLayerRasterizer() override; class SK_API Builder { public: diff --git a/include/effects/SkPerlinNoiseShader.h b/include/effects/SkPerlinNoiseShader.h index 4e648f31b1..a86c89ba39 100644 --- a/include/effects/SkPerlinNoiseShader.h +++ b/include/effects/SkPerlinNoiseShader.h @@ -65,7 +65,7 @@ public: class PerlinNoiseShaderContext : public SkShader::Context { public: PerlinNoiseShaderContext(const SkPerlinNoiseShader& shader, const ContextRec&); - virtual ~PerlinNoiseShaderContext(); + ~PerlinNoiseShaderContext() override; void shadeSpan(int x, int y, SkPMColor[], int count) override; @@ -98,7 +98,7 @@ private: SkPerlinNoiseShader(SkPerlinNoiseShader::Type type, SkScalar baseFrequencyX, SkScalar baseFrequencyY, int numOctaves, SkScalar seed, const SkISize* tileSize); - virtual ~SkPerlinNoiseShader(); + ~SkPerlinNoiseShader() override; const SkPerlinNoiseShader::Type fType; const SkScalar fBaseFrequencyX; diff --git a/include/effects/SkTableMaskFilter.h b/include/effects/SkTableMaskFilter.h index 757ddf2084..f226dd1760 100644 --- a/include/effects/SkTableMaskFilter.h +++ b/include/effects/SkTableMaskFilter.h @@ -50,7 +50,7 @@ public: SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkTableMaskFilter) protected: - virtual ~SkTableMaskFilter(); + ~SkTableMaskFilter() override; void flatten(SkWriteBuffer&) const override; diff --git a/include/private/SkWeakRefCnt.h b/include/private/SkWeakRefCnt.h index d6631e946f..c65ea9e7f1 100644 --- a/include/private/SkWeakRefCnt.h +++ b/include/private/SkWeakRefCnt.h @@ -60,7 +60,7 @@ public: /** Destruct, asserting that the weak reference count is 1. */ - virtual ~SkWeakRefCnt() { + ~SkWeakRefCnt() override { #ifdef SK_DEBUG SkASSERT(getWeakCnt() == 1); fWeakCnt.store(0, std::memory_order_relaxed); diff --git a/include/utils/SkDumpCanvas.h b/include/utils/SkDumpCanvas.h index b8fff72258..727c5797d7 100644 --- a/include/utils/SkDumpCanvas.h +++ b/include/utils/SkDumpCanvas.h @@ -22,7 +22,7 @@ public: class Dumper; explicit SkDumpCanvas(Dumper* = 0); - virtual ~SkDumpCanvas(); + ~SkDumpCanvas() override; enum Verb { kNULL_Verb, diff --git a/include/utils/SkLuaCanvas.h b/include/utils/SkLuaCanvas.h index 49ff377af3..7653b45366 100644 --- a/include/utils/SkLuaCanvas.h +++ b/include/utils/SkLuaCanvas.h @@ -19,7 +19,7 @@ public: void pushThis(); SkLuaCanvas(int width, int height, lua_State*, const char function[]); - virtual ~SkLuaCanvas(); + ~SkLuaCanvas() override; protected: void willSave() override; diff --git a/include/utils/SkNWayCanvas.h b/include/utils/SkNWayCanvas.h index 3407853fd6..ba0745e420 100644 --- a/include/utils/SkNWayCanvas.h +++ b/include/utils/SkNWayCanvas.h @@ -15,7 +15,7 @@ class SK_API SkNWayCanvas : public SkNoDrawCanvas { public: SkNWayCanvas(int width, int height); - virtual ~SkNWayCanvas(); + ~SkNWayCanvas() override; virtual void addCanvas(SkCanvas*); virtual void removeCanvas(SkCanvas*); diff --git a/include/views/SkOSWindow_Unix.h b/include/views/SkOSWindow_Unix.h index 9d1b8e0392..48838e764c 100644 --- a/include/views/SkOSWindow_Unix.h +++ b/include/views/SkOSWindow_Unix.h @@ -26,7 +26,7 @@ struct SkUnixWindow { class SkOSWindow : public SkWindow { public: SkOSWindow(void*); - ~SkOSWindow(); + ~SkOSWindow() override; void* getHWND() const { return (void*)fUnixWindow.fWin; } void* getDisplay() const { return (void*)fUnixWindow.fDisplay; } diff --git a/samplecode/GMSampleView.h b/samplecode/GMSampleView.h index 4d29190230..6424b43d25 100644 --- a/samplecode/GMSampleView.h +++ b/samplecode/GMSampleView.h @@ -18,7 +18,7 @@ private: public: GMSampleView(GM*); - virtual ~GMSampleView(); + ~GMSampleView() override; static SkEvent* NewShowSizeEvt(bool doShowSize); diff --git a/samplecode/OverView.cpp b/samplecode/OverView.cpp index 0cd129e573..62e8c2aa19 100644 --- a/samplecode/OverView.cpp +++ b/samplecode/OverView.cpp @@ -45,7 +45,7 @@ static bool draw_this_name(const SkString& name, const SkString& filter) { class OverView : public SkView { public: OverView(int count, const SkViewFactory* factories[]); - virtual ~OverView(); + ~OverView() override; protected: bool onEvent(const SkEvent&) override; diff --git a/samplecode/SampleApp.cpp b/samplecode/SampleApp.cpp index 79023a0b99..6b9a888651 100644 --- a/samplecode/SampleApp.cpp +++ b/samplecode/SampleApp.cpp @@ -205,7 +205,7 @@ public: fBackend = kNone_BackEndType; } - virtual ~DefaultDeviceManager() { + ~DefaultDeviceManager() override { #if SK_SUPPORT_GPU SkSafeUnref(fCurContext); SkSafeUnref(fCurIntf); diff --git a/samplecode/SampleApp.h b/samplecode/SampleApp.h index 7b0dbf4942..e4c1f38922 100644 --- a/samplecode/SampleApp.h +++ b/samplecode/SampleApp.h @@ -114,7 +114,7 @@ public: }; SampleWindow(void* hwnd, int argc, char** argv, DeviceManager*); - virtual ~SampleWindow(); + ~SampleWindow() override; sk_sp<SkSurface> makeSurface() override { sk_sp<SkSurface> surface; diff --git a/samplecode/SamplePathText.cpp b/samplecode/SamplePathText.cpp index 26ffb9a31c..bb2142ef92 100644 --- a/samplecode/SamplePathText.cpp +++ b/samplecode/SamplePathText.cpp @@ -116,7 +116,7 @@ public: , fBackMatrices(kNumPaths) { } - ~MovingPathText() { + ~MovingPathText() override { fBackgroundAnimationTask.wait(); } @@ -227,7 +227,7 @@ public: : fFrontPaths(kNumPaths) , fBackPaths(kNumPaths) {} - ~WavyPathText() { + ~WavyPathText() override { fBackgroundAnimationTask.wait(); } diff --git a/samplecode/SampleSVGFile.cpp b/samplecode/SampleSVGFile.cpp index efffb20d7a..0be7944f8e 100644 --- a/samplecode/SampleSVGFile.cpp +++ b/samplecode/SampleSVGFile.cpp @@ -20,7 +20,7 @@ class SVGFileView : public SampleView { public: SVGFileView(const SkString& path) : fPath(path), fLabel(SkStringPrintf("[%s]", SkOSPath::Basename(path.c_str()).c_str())) {} - virtual ~SVGFileView() = default; + ~SVGFileView() override = default; protected: void onOnceBeforeDraw() override { diff --git a/src/codec/SkPngCodec.h b/src/codec/SkPngCodec.h index 7a2ebae210..09231f16bd 100644 --- a/src/codec/SkPngCodec.h +++ b/src/codec/SkPngCodec.h @@ -32,7 +32,7 @@ public: // Assume IsPng was called and returned true. static SkCodec* NewFromStream(SkStream*, SkPngChunkReader* = NULL); - virtual ~SkPngCodec(); + ~SkPngCodec() override; protected: // We hold the png_ptr and info_ptr as voidp to avoid having to include png.h diff --git a/src/codec/SkRawAdapterCodec.h b/src/codec/SkRawAdapterCodec.h index 8777180ec2..29e817c7d8 100644 --- a/src/codec/SkRawAdapterCodec.h +++ b/src/codec/SkRawAdapterCodec.h @@ -24,7 +24,7 @@ public: explicit SkRawAdapterCodec(SkRawCodec*); - virtual ~SkRawAdapterCodec() {} + ~SkRawAdapterCodec() override {} protected: diff --git a/src/codec/SkRawCodec.cpp b/src/codec/SkRawCodec.cpp index 0a1cea1688..97baa9c2a7 100644 --- a/src/codec/SkRawCodec.cpp +++ b/src/codec/SkRawCodec.cpp @@ -201,7 +201,7 @@ public: class SkRawLimitedDynamicMemoryWStream : public SkDynamicMemoryWStream { public: - virtual ~SkRawLimitedDynamicMemoryWStream() {} + ~SkRawLimitedDynamicMemoryWStream() override {} bool write(const void* buffer, size_t size) override { size_t newSize; diff --git a/src/codec/SkSampledCodec.h b/src/codec/SkSampledCodec.h index 35e4f571d0..4bcf5bcadf 100644 --- a/src/codec/SkSampledCodec.h +++ b/src/codec/SkSampledCodec.h @@ -19,7 +19,7 @@ public: explicit SkSampledCodec(SkCodec*); - virtual ~SkSampledCodec() {} + ~SkSampledCodec() override {} protected: diff --git a/src/codec/SkWebpAdapterCodec.h b/src/codec/SkWebpAdapterCodec.h index ece46a668a..b2c6c7bd3b 100644 --- a/src/codec/SkWebpAdapterCodec.h +++ b/src/codec/SkWebpAdapterCodec.h @@ -19,7 +19,7 @@ public: explicit SkWebpAdapterCodec(SkWebpCodec*); - virtual ~SkWebpAdapterCodec() {} + ~SkWebpAdapterCodec() override {} protected: diff --git a/src/core/SkAAClip.h b/src/core/SkAAClip.h index c94756fd5f..ff7801fbdc 100644 --- a/src/core/SkAAClip.h +++ b/src/core/SkAAClip.h @@ -100,7 +100,7 @@ private: class SkAAClipBlitter : public SkBlitter { public: SkAAClipBlitter() : fScanlineScratch(nullptr) {} - virtual ~SkAAClipBlitter(); + ~SkAAClipBlitter() override; void init(SkBlitter* blitter, const SkAAClip* aaclip) { SkASSERT(aaclip && !aaclip->isEmpty()); diff --git a/src/core/SkBitmapCache.cpp b/src/core/SkBitmapCache.cpp index 0751089083..76b45886e9 100644 --- a/src/core/SkBitmapCache.cpp +++ b/src/core/SkBitmapCache.cpp @@ -228,7 +228,7 @@ struct MipMapRec : public SkResourceCache::Rec { fMipMap->attachToCacheAndRef(); } - virtual ~MipMapRec() { + ~MipMapRec() override { fMipMap->detachFromCacheAndUnref(); } diff --git a/src/core/SkBlitter.cpp b/src/core/SkBlitter.cpp index a386904dcd..0e8bd2db22 100644 --- a/src/core/SkBlitter.cpp +++ b/src/core/SkBlitter.cpp @@ -611,7 +611,7 @@ public: } } - virtual ~Sk3DShaderContext() { + ~Sk3DShaderContext() override { if (fProxyContext) { fProxyContext->~Context(); } diff --git a/src/core/SkBlitter_RGB16.cpp b/src/core/SkBlitter_RGB16.cpp index e91e23fd69..6330a39357 100644 --- a/src/core/SkBlitter_RGB16.cpp +++ b/src/core/SkBlitter_RGB16.cpp @@ -111,7 +111,7 @@ class SkRGB16_Shader_Blitter : public SkShaderBlitter { public: SkRGB16_Shader_Blitter(const SkPixmap& device, const SkPaint& paint, SkShader::Context* shaderContext); - virtual ~SkRGB16_Shader_Blitter(); + ~SkRGB16_Shader_Blitter() override; void blitH(int x, int y, int width) override; virtual void blitAntiH(int x, int y, const SkAlpha* antialias, const int16_t* runs) override; @@ -133,7 +133,7 @@ class SkRGB16_Shader_Xfermode_Blitter : public SkShaderBlitter { public: SkRGB16_Shader_Xfermode_Blitter(const SkPixmap& device, const SkPaint& paint, SkShader::Context* shaderContext); - virtual ~SkRGB16_Shader_Xfermode_Blitter(); + ~SkRGB16_Shader_Xfermode_Blitter() override; void blitH(int x, int y, int width) override; virtual void blitAntiH(int x, int y, const SkAlpha* antialias, const int16_t* runs) override; diff --git a/src/core/SkCoreBlitters.h b/src/core/SkCoreBlitters.h index 85392dd8fd..0e8b819c67 100644 --- a/src/core/SkCoreBlitters.h +++ b/src/core/SkCoreBlitters.h @@ -85,7 +85,7 @@ class SkA8_Shader_Blitter : public SkShaderBlitter { public: SkA8_Shader_Blitter(const SkPixmap& device, const SkPaint& paint, SkShader::Context* shaderContext); - virtual ~SkA8_Shader_Blitter(); + ~SkA8_Shader_Blitter() 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 blitMask(const SkMask&, const SkIRect&) override; @@ -156,7 +156,7 @@ class SkARGB32_Shader_Blitter : public SkShaderBlitter { public: SkARGB32_Shader_Blitter(const SkPixmap& device, const SkPaint& paint, SkShader::Context* shaderContext); - virtual ~SkARGB32_Shader_Blitter(); + ~SkARGB32_Shader_Blitter() 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; diff --git a/src/core/SkDraw.cpp b/src/core/SkDraw.cpp index 03ca87eb9f..689e5b7c34 100644 --- a/src/core/SkDraw.cpp +++ b/src/core/SkDraw.cpp @@ -1697,7 +1697,7 @@ public: class TriColorShaderContext : public SkShader::Context { public: TriColorShaderContext(const SkTriColorShader& shader, const ContextRec&); - virtual ~TriColorShaderContext(); + ~TriColorShaderContext() override; void shadeSpan(int x, int y, SkPMColor dstC[], int count) override; private: diff --git a/src/core/SkExecutor.cpp b/src/core/SkExecutor.cpp index 5e94d1bf19..6144dfddac 100644 --- a/src/core/SkExecutor.cpp +++ b/src/core/SkExecutor.cpp @@ -56,7 +56,7 @@ public: } } - ~SkThreadPool() { + ~SkThreadPool() override { // Signal each thread that it's time to shut down. for (int i = 0; i < fThreads.count(); i++) { this->add(nullptr); diff --git a/src/core/SkMaskCache.cpp b/src/core/SkMaskCache.cpp index eb7c8f0941..ccfae18e05 100644 --- a/src/core/SkMaskCache.cpp +++ b/src/core/SkMaskCache.cpp @@ -44,7 +44,7 @@ struct RRectBlurRec : public SkResourceCache::Rec { fValue.fData = data; fValue.fData->attachToCacheAndRef(); } - ~RRectBlurRec() { + ~RRectBlurRec() override { fValue.fData->detachFromCacheAndUnref(); } @@ -138,7 +138,7 @@ struct RectsBlurRec : public SkResourceCache::Rec { fValue.fData = data; fValue.fData->attachToCacheAndRef(); } - ~RectsBlurRec() { + ~RectsBlurRec() override { fValue.fData->detachFromCacheAndUnref(); } diff --git a/src/core/SkNormalBevelSource.h b/src/core/SkNormalBevelSource.h index 1d1983c66a..2fefacda8e 100644 --- a/src/core/SkNormalBevelSource.h +++ b/src/core/SkNormalBevelSource.h @@ -34,7 +34,7 @@ private: public: Provider(); - virtual ~Provider(); + ~Provider() override; void fillScanLine(int x, int y, SkPoint3 output[], int count) const override; diff --git a/src/core/SkNormalFlatSource.h b/src/core/SkNormalFlatSource.h index 4a8f74304b..82b56f1a8b 100644 --- a/src/core/SkNormalFlatSource.h +++ b/src/core/SkNormalFlatSource.h @@ -31,7 +31,7 @@ private: public: Provider(); - virtual ~Provider(); + ~Provider() override; void fillScanLine(int x, int y, SkPoint3 output[], int count) const override; diff --git a/src/core/SkPictureRecord.h b/src/core/SkPictureRecord.h index 4e0bf460e9..dc9a002ac9 100644 --- a/src/core/SkPictureRecord.h +++ b/src/core/SkPictureRecord.h @@ -30,7 +30,7 @@ class SkPictureRecord : public SkCanvas { public: SkPictureRecord(const SkISize& dimensions, uint32_t recordFlags); - virtual ~SkPictureRecord(); + ~SkPictureRecord() override; const SkTDArray<const SkPicture* >& getPictureRefs() const { return fPictureRefs; diff --git a/src/core/SkRTree.h b/src/core/SkRTree.h index 499f7a5d7d..0fb491e22f 100644 --- a/src/core/SkRTree.h +++ b/src/core/SkRTree.h @@ -38,7 +38,7 @@ public: * create better proportioned tiles of rectangles. */ explicit SkRTree(SkScalar aspectRatio = 1); - virtual ~SkRTree() {} + ~SkRTree() override {} void insert(const SkRect[], int N) override; void search(const SkRect& query, SkTDArray<int>* results) const override; diff --git a/src/core/SkRWBuffer.cpp b/src/core/SkRWBuffer.cpp index 4ef2d94c77..49967bd271 100644 --- a/src/core/SkRWBuffer.cpp +++ b/src/core/SkRWBuffer.cpp @@ -272,7 +272,7 @@ public: fGlobalOffset = fLocalOffset = 0; } - virtual ~SkROBufferStreamAsset() { fBuffer->unref(); } + ~SkROBufferStreamAsset() override { fBuffer->unref(); } size_t getLength() const override { return fBuffer->size(); } diff --git a/src/core/SkRegion_path.cpp b/src/core/SkRegion_path.cpp index 47df8f6d71..fec78256b3 100644 --- a/src/core/SkRegion_path.cpp +++ b/src/core/SkRegion_path.cpp @@ -26,7 +26,7 @@ static bool sk_memeq32(const int32_t* SK_RESTRICT a, const int32_t* SK_RESTRICT class SkRgnBuilder : public SkBlitter { public: SkRgnBuilder(); - virtual ~SkRgnBuilder(); + ~SkRgnBuilder() override; // returns true if it could allocate the working storage needed bool init(int maxHeight, int maxTransitions, bool pathIsInverse); diff --git a/src/core/SkResourceCache.cpp b/src/core/SkResourceCache.cpp index e7c2f94bd5..9f5bc25453 100644 --- a/src/core/SkResourceCache.cpp +++ b/src/core/SkResourceCache.cpp @@ -91,7 +91,7 @@ public: // The pixelref will ref() the colortable (if not NULL), and unref() in destructor SkOneShotDiscardablePixelRef(const SkImageInfo&, SkDiscardableMemory*, size_t rowBytes, SkColorTable*); - ~SkOneShotDiscardablePixelRef(); + ~SkOneShotDiscardablePixelRef() override; protected: bool onNewLockPixels(LockRec*) override; diff --git a/src/core/SkScan_AAAPath.cpp b/src/core/SkScan_AAAPath.cpp index 499408a3e1..3eca137642 100644 --- a/src/core/SkScan_AAAPath.cpp +++ b/src/core/SkScan_AAAPath.cpp @@ -95,7 +95,7 @@ static inline void safelyAddAlpha(SkAlpha* alpha, SkAlpha delta) { class AdditiveBlitter : public SkBlitter { public: - virtual ~AdditiveBlitter() {} + ~AdditiveBlitter() override {} virtual SkBlitter* getRealBlitter(bool forceRealBlitter = false) = 0; @@ -136,7 +136,7 @@ class MaskAdditiveBlitter : public AdditiveBlitter { public: MaskAdditiveBlitter(SkBlitter* realBlitter, const SkIRect& ir, const SkRegion& clip, bool isInverse); - ~MaskAdditiveBlitter() { + ~MaskAdditiveBlitter() override { fRealBlitter->blitMask(fMask, fClipRect); } @@ -278,7 +278,7 @@ class RunBasedAdditiveBlitter : public AdditiveBlitter { public: RunBasedAdditiveBlitter(SkBlitter* realBlitter, const SkIRect& ir, const SkRegion& clip, bool isInverse); - ~RunBasedAdditiveBlitter(); + ~RunBasedAdditiveBlitter() override; SkBlitter* getRealBlitter(bool forceRealBlitter) override; diff --git a/src/core/SkScan_AntiPath.cpp b/src/core/SkScan_AntiPath.cpp index 19989ff6d2..ac4c8c39f4 100644 --- a/src/core/SkScan_AntiPath.cpp +++ b/src/core/SkScan_AntiPath.cpp @@ -104,7 +104,7 @@ class SuperBlitter : public BaseSuperBlitter { public: SuperBlitter(SkBlitter* realBlitter, const SkIRect& ir, const SkRegion& clip, bool isInverse); - virtual ~SuperBlitter() { + ~SuperBlitter() override { this->flush(); } @@ -394,7 +394,7 @@ void SuperBlitter::blitRect(int x, int y, int width, int height) { class MaskSuperBlitter : public BaseSuperBlitter { public: MaskSuperBlitter(SkBlitter* realBlitter, const SkIRect& ir, const SkRegion&, bool isInverse); - virtual ~MaskSuperBlitter() { + ~MaskSuperBlitter() override { fRealBlitter->blitMask(fMask, fClipRect); } diff --git a/src/core/SkSpriteBlitter_ARGB32.cpp b/src/core/SkSpriteBlitter_ARGB32.cpp index 6b6d8b10d7..3ecfcf472b 100644 --- a/src/core/SkSpriteBlitter_ARGB32.cpp +++ b/src/core/SkSpriteBlitter_ARGB32.cpp @@ -81,7 +81,7 @@ public: fAlpha = paint.getAlpha(); } - virtual ~Sprite_D32_XferFilter() { + ~Sprite_D32_XferFilter() override { delete[] fBuffer; SkSafeUnref(fColorFilter); } diff --git a/src/core/SkYUVPlanesCache.cpp b/src/core/SkYUVPlanesCache.cpp index 07a07c698b..a962d5a4b7 100644 --- a/src/core/SkYUVPlanesCache.cpp +++ b/src/core/SkYUVPlanesCache.cpp @@ -39,7 +39,7 @@ struct YUVPlanesRec : public SkResourceCache::Rec { fValue.fInfo = *info; fValue.fData->attachToCacheAndRef(); } - ~YUVPlanesRec() { + ~YUVPlanesRec() override { fValue.fData->detachFromCacheAndUnref(); } diff --git a/src/effects/SkDisplacementMapEffect.cpp b/src/effects/SkDisplacementMapEffect.cpp index e0b76a2c8c..9bd159d40b 100644 --- a/src/effects/SkDisplacementMapEffect.cpp +++ b/src/effects/SkDisplacementMapEffect.cpp @@ -227,7 +227,7 @@ public: colorDimensions)); } - virtual ~GrDisplacementMapEffect(); + ~GrDisplacementMapEffect() override; SkDisplacementMapEffect::ChannelSelectorType xChannelSelector() const { return fXChannelSelector; diff --git a/src/effects/SkHighContrastFilter.cpp b/src/effects/SkHighContrastFilter.cpp index 267a8ef0dc..c3937cc9f6 100644 --- a/src/effects/SkHighContrastFilter.cpp +++ b/src/effects/SkHighContrastFilter.cpp @@ -158,7 +158,7 @@ public: 1.0f - FLT_EPSILON); } - virtual ~SkHighContrast_Filter() { } + ~SkHighContrast_Filter() override {} #if SK_SUPPORT_GPU sk_sp<GrFragmentProcessor> asFragmentProcessor(GrContext*, SkColorSpace*) const override; diff --git a/src/effects/SkLightingImageFilter.cpp b/src/effects/SkLightingImageFilter.cpp index 34e7034602..54b8cb108e 100644 --- a/src/effects/SkLightingImageFilter.cpp +++ b/src/effects/SkLightingImageFilter.cpp @@ -702,7 +702,7 @@ private: class GrGLDistantLight : public GrGLLight { public: - virtual ~GrGLDistantLight() {} + ~GrGLDistantLight() override {} void setData(const GrGLSLProgramDataManager&, const SkImageFilterLight* light) const override; void emitSurfaceToLight(GrGLSLUniformHandler*, GrGLSLFPFragmentBuilder*, const char* z) override; @@ -715,7 +715,7 @@ private: class GrGLPointLight : public GrGLLight { public: - virtual ~GrGLPointLight() {} + ~GrGLPointLight() override {} void setData(const GrGLSLProgramDataManager&, const SkImageFilterLight* light) const override; void emitSurfaceToLight(GrGLSLUniformHandler*, GrGLSLFPFragmentBuilder*, const char* z) override; @@ -728,7 +728,7 @@ private: class GrGLSpotLight : public GrGLLight { public: - virtual ~GrGLSpotLight() {} + ~GrGLSpotLight() override {} void setData(const GrGLSLProgramDataManager&, const SkImageFilterLight* light) const override; void emitSurfaceToLight(GrGLSLUniformHandler*, GrGLSLFPFragmentBuilder*, const char* z) override; void emitLightColor(GrGLSLUniformHandler*, @@ -758,8 +758,6 @@ class GrGLLight; class SkImageFilterLight : public SkRefCnt { public: - - enum LightType { kDistant_LightType, kPoint_LightType, @@ -1630,7 +1628,7 @@ SkString emitNormalFunc(BoundaryMode mode, class GrGLLightingEffect : public GrGLSLFragmentProcessor { public: GrGLLightingEffect() : fLight(nullptr) { } - virtual ~GrGLLightingEffect() { delete fLight; } + ~GrGLLightingEffect() override { delete fLight; } void emitCode(EmitArgs&) override; diff --git a/src/effects/SkPerlinNoiseShader.cpp b/src/effects/SkPerlinNoiseShader.cpp index aa85d1bf6b..1e02ced89b 100644 --- a/src/effects/SkPerlinNoiseShader.cpp +++ b/src/effects/SkPerlinNoiseShader.cpp @@ -497,7 +497,7 @@ public: std::move(permutationsProxy), std::move(noiseProxy), matrix)); } - virtual ~GrPerlinNoiseEffect() { delete fPaintingData; } + ~GrPerlinNoiseEffect() override { delete fPaintingData; } const char* name() const override { return "PerlinNoise"; } diff --git a/src/effects/SkTableColorFilter.cpp b/src/effects/SkTableColorFilter.cpp index 393543b4bb..f09d5ed259 100644 --- a/src/effects/SkTableColorFilter.cpp +++ b/src/effects/SkTableColorFilter.cpp @@ -80,7 +80,7 @@ public: } } - virtual ~SkTable_ColorFilter() { delete fBitmap; } + ~SkTable_ColorFilter() override { delete fBitmap; } bool asComponentTable(SkBitmap* table) const override; sk_sp<SkColorFilter> makeComposed(sk_sp<SkColorFilter> inner) const override; diff --git a/src/effects/gradients/SkGradientShaderPriv.h b/src/effects/gradients/SkGradientShaderPriv.h index 7f1f5f8c88..f64b4396c2 100644 --- a/src/effects/gradients/SkGradientShaderPriv.h +++ b/src/effects/gradients/SkGradientShaderPriv.h @@ -119,7 +119,7 @@ public: }; SkGradientShaderBase(const Descriptor& desc, const SkMatrix& ptsToUnit); - virtual ~SkGradientShaderBase(); + ~SkGradientShaderBase() override; // The cache is initialized on-demand when getCache32 is called. class GradientShaderCache : public SkRefCnt { @@ -353,7 +353,7 @@ public: class GLSLProcessor; - virtual ~GrGradientEffect(); + ~GrGradientEffect() override; bool useAtlas() const { return SkToBool(-1 != fRow); } SkScalar getYCoord() const { return fYCoord; } diff --git a/src/effects/gradients/SkLinearGradient.cpp b/src/effects/gradients/SkLinearGradient.cpp index 1dbe2e7060..b58cb29784 100644 --- a/src/effects/gradients/SkLinearGradient.cpp +++ b/src/effects/gradients/SkLinearGradient.cpp @@ -421,7 +421,7 @@ public: return sk_sp<GrFragmentProcessor>(new GrLinearGradient(args)); } - virtual ~GrLinearGradient() { } + ~GrLinearGradient() override {} const char* name() const override { return "Linear Gradient"; } @@ -446,7 +446,7 @@ class GrLinearGradient::GLSLLinearProcessor : public GrGradientEffect::GLSLProce public: GLSLLinearProcessor(const GrProcessor&) {} - virtual ~GLSLLinearProcessor() { } + ~GLSLLinearProcessor() override {} virtual void emitCode(EmitArgs&) override; diff --git a/src/effects/gradients/SkRadialGradient.cpp b/src/effects/gradients/SkRadialGradient.cpp index f282babf82..2caf905a51 100644 --- a/src/effects/gradients/SkRadialGradient.cpp +++ b/src/effects/gradients/SkRadialGradient.cpp @@ -249,7 +249,7 @@ public: return sk_sp<GrFragmentProcessor>(new GrRadialGradient(args)); } - virtual ~GrRadialGradient() { } + ~GrRadialGradient() override {} const char* name() const override { return "Radial Gradient"; } @@ -273,7 +273,7 @@ private: class GrRadialGradient::GLSLRadialProcessor : public GrGradientEffect::GLSLProcessor { public: GLSLRadialProcessor(const GrProcessor&) {} - virtual ~GLSLRadialProcessor() { } + ~GLSLRadialProcessor() override {} virtual void emitCode(EmitArgs&) override; diff --git a/src/effects/gradients/SkSweepGradient.cpp b/src/effects/gradients/SkSweepGradient.cpp index 928de4c42c..79013b3322 100644 --- a/src/effects/gradients/SkSweepGradient.cpp +++ b/src/effects/gradients/SkSweepGradient.cpp @@ -131,7 +131,7 @@ public: static sk_sp<GrFragmentProcessor> Make(const CreateArgs& args) { return sk_sp<GrFragmentProcessor>(new GrSweepGradient(args)); } - virtual ~GrSweepGradient() { } + ~GrSweepGradient() override {} const char* name() const override { return "Sweep Gradient"; } @@ -155,7 +155,7 @@ private: class GrSweepGradient::GLSLSweepProcessor : public GrGradientEffect::GLSLProcessor { public: GLSLSweepProcessor(const GrProcessor&) {} - virtual ~GLSLSweepProcessor() { } + ~GLSLSweepProcessor() override {} virtual void emitCode(EmitArgs&) override; diff --git a/src/effects/gradients/SkTwoPointConicalGradient.h b/src/effects/gradients/SkTwoPointConicalGradient.h index e509f92703..d73ba11512 100644 --- a/src/effects/gradients/SkTwoPointConicalGradient.h +++ b/src/effects/gradients/SkTwoPointConicalGradient.h @@ -47,7 +47,7 @@ public: class TwoPointConicalGradientContext : public SkGradientShaderBase::GradientShaderBaseContext { public: TwoPointConicalGradientContext(const SkTwoPointConicalGradient&, const ContextRec&); - ~TwoPointConicalGradientContext() {} + ~TwoPointConicalGradientContext() override {} void shadeSpan(int x, int y, SkPMColor dstC[], int count) override; diff --git a/src/effects/gradients/SkTwoPointConicalGradient_gpu.cpp b/src/effects/gradients/SkTwoPointConicalGradient_gpu.cpp index 3bf9c1e342..9ac8528085 100644 --- a/src/effects/gradients/SkTwoPointConicalGradient_gpu.cpp +++ b/src/effects/gradients/SkTwoPointConicalGradient_gpu.cpp @@ -65,7 +65,7 @@ public: return sk_sp<GrFragmentProcessor>(new Edge2PtConicalEffect(args)); } - virtual ~Edge2PtConicalEffect() {} + ~Edge2PtConicalEffect() override {} const char* name() const override { return "Two-Point Conical Gradient Edge Touching"; @@ -139,7 +139,7 @@ private: class Edge2PtConicalEffect::GLSLEdge2PtConicalProcessor : public GrGradientEffect::GLSLProcessor { public: GLSLEdge2PtConicalProcessor(const GrProcessor&); - virtual ~GLSLEdge2PtConicalProcessor() { } + ~GLSLEdge2PtConicalProcessor() override {} virtual void emitCode(EmitArgs&) override; @@ -375,7 +375,7 @@ public: new FocalOutside2PtConicalEffect(args, focalX)); } - virtual ~FocalOutside2PtConicalEffect() { } + ~FocalOutside2PtConicalEffect() override {} const char* name() const override { return "Two-Point Conical Gradient Focal Outside"; @@ -420,7 +420,7 @@ class FocalOutside2PtConicalEffect::GLSLFocalOutside2PtConicalProcessor : public GrGradientEffect::GLSLProcessor { public: GLSLFocalOutside2PtConicalProcessor(const GrProcessor&); - virtual ~GLSLFocalOutside2PtConicalProcessor() { } + ~GLSLFocalOutside2PtConicalProcessor() override {} virtual void emitCode(EmitArgs&) override; @@ -589,7 +589,7 @@ public: new FocalInside2PtConicalEffect(args, focalX)); } - virtual ~FocalInside2PtConicalEffect() {} + ~FocalInside2PtConicalEffect() override {} const char* name() const override { return "Two-Point Conical Gradient Focal Inside"; @@ -626,7 +626,7 @@ class FocalInside2PtConicalEffect::GLSLFocalInside2PtConicalProcessor : public GrGradientEffect::GLSLProcessor { public: GLSLFocalInside2PtConicalProcessor(const GrProcessor&); - virtual ~GLSLFocalInside2PtConicalProcessor() {} + ~GLSLFocalInside2PtConicalProcessor() override {} virtual void emitCode(EmitArgs&) override; @@ -828,7 +828,7 @@ public: new CircleInside2PtConicalEffect(args, info)); } - virtual ~CircleInside2PtConicalEffect() {} + ~CircleInside2PtConicalEffect() override {} const char* name() const override { return "Two-Point Conical Gradient Inside"; } @@ -869,7 +869,7 @@ class CircleInside2PtConicalEffect::GLSLCircleInside2PtConicalProcessor : public GrGradientEffect::GLSLProcessor { public: GLSLCircleInside2PtConicalProcessor(const GrProcessor&); - virtual ~GLSLCircleInside2PtConicalProcessor() {} + ~GLSLCircleInside2PtConicalProcessor() override {} virtual void emitCode(EmitArgs&) override; @@ -1044,7 +1044,7 @@ public: new CircleOutside2PtConicalEffect(args, info)); } - virtual ~CircleOutside2PtConicalEffect() {} + ~CircleOutside2PtConicalEffect() override {} const char* name() const override { return "Two-Point Conical Gradient Outside"; } @@ -1100,7 +1100,7 @@ class CircleOutside2PtConicalEffect::GLSLCircleOutside2PtConicalProcessor : public GrGradientEffect::GLSLProcessor { public: GLSLCircleOutside2PtConicalProcessor(const GrProcessor&); - virtual ~GLSLCircleOutside2PtConicalProcessor() {} + ~GLSLCircleOutside2PtConicalProcessor() override {} virtual void emitCode(EmitArgs&) override; diff --git a/src/gpu/GrRectanizer_pow2.h b/src/gpu/GrRectanizer_pow2.h index 424d22e003..b8cc0a15b4 100644 --- a/src/gpu/GrRectanizer_pow2.h +++ b/src/gpu/GrRectanizer_pow2.h @@ -24,7 +24,7 @@ public: this->reset(); } - virtual ~GrRectanizerPow2() { } + ~GrRectanizerPow2() override {} void reset() override { fNextStripY = 0; diff --git a/src/gpu/effects/GrBezierEffect.h b/src/gpu/effects/GrBezierEffect.h index f90855195d..3a130ec187 100644 --- a/src/gpu/effects/GrBezierEffect.h +++ b/src/gpu/effects/GrBezierEffect.h @@ -89,7 +89,7 @@ public: } } - virtual ~GrConicEffect(); + ~GrConicEffect() override; const char* name() const override { return "Conic"; } @@ -171,7 +171,7 @@ public: } } - virtual ~GrQuadEffect(); + ~GrQuadEffect() override; const char* name() const override { return "Quad"; } @@ -248,7 +248,7 @@ public: } } - virtual ~GrCubicEffect(); + ~GrCubicEffect() override; const char* name() const override { return "Cubic"; } diff --git a/src/gpu/effects/GrBicubicEffect.h b/src/gpu/effects/GrBicubicEffect.h index ed22ba1a02..e24422f5e8 100644 --- a/src/gpu/effects/GrBicubicEffect.h +++ b/src/gpu/effects/GrBicubicEffect.h @@ -20,7 +20,7 @@ public: kFilterTexelPad = 2, // Given a src rect in texels to be filtered, this number of // surrounding texels are needed by the kernel in x and y. }; - virtual ~GrBicubicEffect(); + ~GrBicubicEffect() override; const char* name() const override { return "Bicubic"; } diff --git a/src/gpu/effects/GrBitmapTextGeoProc.h b/src/gpu/effects/GrBitmapTextGeoProc.h index 2221e8ac33..aa9afc2e5c 100644 --- a/src/gpu/effects/GrBitmapTextGeoProc.h +++ b/src/gpu/effects/GrBitmapTextGeoProc.h @@ -30,7 +30,7 @@ public: localMatrix, usesLocalCoords)); } - virtual ~GrBitmapTextGeoProc() {} + ~GrBitmapTextGeoProc() override {} const char* name() const override { return "Texture"; } diff --git a/src/gpu/effects/GrConvexPolyEffect.h b/src/gpu/effects/GrConvexPolyEffect.h index 89a81242c4..34f8b22cff 100644 --- a/src/gpu/effects/GrConvexPolyEffect.h +++ b/src/gpu/effects/GrConvexPolyEffect.h @@ -57,7 +57,7 @@ public: */ static sk_sp<GrFragmentProcessor> Make(GrPrimitiveEdgeType, const SkRect&); - virtual ~GrConvexPolyEffect(); + ~GrConvexPolyEffect() override; const char* name() const override { return "ConvexPoly"; } diff --git a/src/gpu/effects/GrDistanceFieldGeoProc.h b/src/gpu/effects/GrDistanceFieldGeoProc.h index cf5d5f9deb..1384d2fc63 100644 --- a/src/gpu/effects/GrDistanceFieldGeoProc.h +++ b/src/gpu/effects/GrDistanceFieldGeoProc.h @@ -70,7 +70,7 @@ public: } #endif - virtual ~GrDistanceFieldA8TextGeoProc() {} + ~GrDistanceFieldA8TextGeoProc() override {} const char* name() const override { return "DistanceFieldA8Text"; } diff --git a/src/gpu/effects/GrDitherEffect.cpp b/src/gpu/effects/GrDitherEffect.cpp index adae12c979..864a5d2d81 100644 --- a/src/gpu/effects/GrDitherEffect.cpp +++ b/src/gpu/effects/GrDitherEffect.cpp @@ -20,7 +20,7 @@ public: return sk_sp<GrFragmentProcessor>(new DitherEffect); } - virtual ~DitherEffect() {} + ~DitherEffect() override {} const char* name() const override { return "Dither"; } diff --git a/src/gpu/effects/GrOvalEffect.cpp b/src/gpu/effects/GrOvalEffect.cpp index 62b1c529c9..a8b0c847b9 100644 --- a/src/gpu/effects/GrOvalEffect.cpp +++ b/src/gpu/effects/GrOvalEffect.cpp @@ -23,7 +23,7 @@ public: static sk_sp<GrFragmentProcessor> Make(GrPrimitiveEdgeType, const SkPoint& center, SkScalar radius); - virtual ~CircleEffect() {} + ~CircleEffect() override {} const char* name() const override { return "Circle"; } @@ -185,7 +185,7 @@ public: static sk_sp<GrFragmentProcessor> Make(GrPrimitiveEdgeType, const SkPoint& center, SkScalar rx, SkScalar ry); - virtual ~EllipseEffect() {} + ~EllipseEffect() override {} const char* name() const override { return "Ellipse"; } diff --git a/src/gpu/effects/GrPorterDuffXferProcessor.cpp b/src/gpu/effects/GrPorterDuffXferProcessor.cpp index f98435515a..3dc5325fd9 100644 --- a/src/gpu/effects/GrPorterDuffXferProcessor.cpp +++ b/src/gpu/effects/GrPorterDuffXferProcessor.cpp @@ -589,7 +589,7 @@ class GLPDLCDXferProcessor : public GrGLSLXferProcessor { public: GLPDLCDXferProcessor(const GrProcessor&) : fLastAlpha(SK_MaxU32) {} - virtual ~GLPDLCDXferProcessor() {} + ~GLPDLCDXferProcessor() override {} static void GenKey(const GrProcessor& processor, const GrShaderCaps& caps, GrProcessorKeyBuilder* b) {} diff --git a/src/gpu/effects/GrRRectEffect.cpp b/src/gpu/effects/GrRRectEffect.cpp index 7253de8eb5..1b4772d155 100644 --- a/src/gpu/effects/GrRRectEffect.cpp +++ b/src/gpu/effects/GrRRectEffect.cpp @@ -48,7 +48,7 @@ public: static sk_sp<GrFragmentProcessor> Make(GrPrimitiveEdgeType, uint32_t circularCornerFlags, const SkRRect&); - virtual ~CircularRRectEffect() {} + ~CircularRRectEffect() override {} const char* name() const override { return "CircularRRect"; } @@ -387,7 +387,7 @@ class EllipticalRRectEffect : public GrFragmentProcessor { public: static sk_sp<GrFragmentProcessor> Make(GrPrimitiveEdgeType, const SkRRect&); - virtual ~EllipticalRRectEffect() {} + ~EllipticalRRectEffect() override {} const char* name() const override { return "EllipticalRRect"; } diff --git a/src/gpu/effects/GrSimpleTextureEffect.h b/src/gpu/effects/GrSimpleTextureEffect.h index 69b87493d5..b3030bfc6f 100644 --- a/src/gpu/effects/GrSimpleTextureEffect.h +++ b/src/gpu/effects/GrSimpleTextureEffect.h @@ -80,7 +80,7 @@ public: matrix, p)); } - virtual ~GrSimpleTextureEffect() {} + ~GrSimpleTextureEffect() override {} const char* name() const override { return "SimpleTexture"; } diff --git a/src/gpu/gl/GrGLBuffer.h b/src/gpu/gl/GrGLBuffer.h index 6a90d0334c..3400819a5d 100644 --- a/src/gpu/gl/GrGLBuffer.h +++ b/src/gpu/gl/GrGLBuffer.h @@ -19,7 +19,7 @@ public: static GrGLBuffer* Create(GrGLGpu*, size_t size, GrBufferType intendedType, GrAccessPattern, const void* data = nullptr); - ~GrGLBuffer() { + ~GrGLBuffer() override { // either release or abandon should have been called by the owner of this object. SkASSERT(0 == fBufferID); } diff --git a/src/gpu/gl/GrGLGpuCommandBuffer.h b/src/gpu/gl/GrGLGpuCommandBuffer.h index 519272f116..73deba33f3 100644 --- a/src/gpu/gl/GrGLGpuCommandBuffer.h +++ b/src/gpu/gl/GrGLGpuCommandBuffer.h @@ -24,7 +24,7 @@ class GrGLGpuCommandBuffer : public GrGpuCommandBuffer { public: GrGLGpuCommandBuffer(GrGLGpu* gpu) : fGpu(gpu), fRenderTarget(nullptr) {} - virtual ~GrGLGpuCommandBuffer() {} + ~GrGLGpuCommandBuffer() override {} void end() override {} diff --git a/src/gpu/gl/GrGLPathRendering.h b/src/gpu/gl/GrGLPathRendering.h index d7a7dbf4a8..8c3cd47f8f 100644 --- a/src/gpu/gl/GrGLPathRendering.h +++ b/src/gpu/gl/GrGLPathRendering.h @@ -31,7 +31,7 @@ public: * Create a new GrGLPathRendering object from a given GrGLGpu. */ GrGLPathRendering(GrGLGpu* gpu); - virtual ~GrGLPathRendering(); + ~GrGLPathRendering() override; // GrPathRendering implementations. GrPath* createPath(const SkPath&, const GrStyle&) override; diff --git a/src/gpu/ops/GrAAConvexPathRenderer.cpp b/src/gpu/ops/GrAAConvexPathRenderer.cpp index ba2b00e0db..e316fecc5f 100644 --- a/src/gpu/ops/GrAAConvexPathRenderer.cpp +++ b/src/gpu/ops/GrAAConvexPathRenderer.cpp @@ -530,7 +530,7 @@ public: return sk_sp<GrGeometryProcessor>(new QuadEdgeEffect(color, localMatrix, usesLocalCoords)); } - virtual ~QuadEdgeEffect() {} + ~QuadEdgeEffect() override {} const char* name() const override { return "QuadEdge"; } diff --git a/src/gpu/ops/GrAnalyticRectOp.cpp b/src/gpu/ops/GrAnalyticRectOp.cpp index 5dbfd5e36c..45e20f0dbc 100644 --- a/src/gpu/ops/GrAnalyticRectOp.cpp +++ b/src/gpu/ops/GrAnalyticRectOp.cpp @@ -69,7 +69,7 @@ public: const SkMatrix& localMatrix() const { return fLocalMatrix; } - virtual ~RectGeometryProcessor() {} + ~RectGeometryProcessor() override {} const char* name() const override { return "RectEdge"; } diff --git a/src/gpu/ops/GrMSAAPathRenderer.cpp b/src/gpu/ops/GrMSAAPathRenderer.cpp index 04b0b1439f..ccbd0e2452 100644 --- a/src/gpu/ops/GrMSAAPathRenderer.cpp +++ b/src/gpu/ops/GrMSAAPathRenderer.cpp @@ -116,7 +116,7 @@ public: return new MSAAQuadProcessor(viewMatrix); } - virtual ~MSAAQuadProcessor() {} + ~MSAAQuadProcessor() override {} const char* name() const override { return "MSAAQuadProcessor"; } diff --git a/src/gpu/ops/GrOvalOpFactory.cpp b/src/gpu/ops/GrOvalOpFactory.cpp index 8ab33f5bdc..dbab985a6c 100644 --- a/src/gpu/ops/GrOvalOpFactory.cpp +++ b/src/gpu/ops/GrOvalOpFactory.cpp @@ -103,7 +103,7 @@ public: bool implementsDistanceVector() const override { return !fInClipPlane; } - virtual ~CircleGeometryProcessor() {} + ~CircleGeometryProcessor() override {} const char* name() const override { return "CircleEdge"; } @@ -274,7 +274,7 @@ public: fStroke = stroke; } - virtual ~EllipseGeometryProcessor() {} + ~EllipseGeometryProcessor() override {} const char* name() const override { return "EllipseEdge"; } @@ -416,7 +416,7 @@ public: fStyle = style; } - virtual ~DIEllipseGeometryProcessor() {} + ~DIEllipseGeometryProcessor() override {} const char* name() const override { return "DIEllipseEdge"; } diff --git a/src/gpu/ops/GrSmallPathRenderer.h b/src/gpu/ops/GrSmallPathRenderer.h index ba752d0cff..d43da8381c 100644 --- a/src/gpu/ops/GrSmallPathRenderer.h +++ b/src/gpu/ops/GrSmallPathRenderer.h @@ -21,7 +21,7 @@ class GrContext; class GrSmallPathRenderer : public GrPathRenderer { public: GrSmallPathRenderer(); - virtual ~GrSmallPathRenderer(); + ~GrSmallPathRenderer() override; private: StencilSupport onGetStencilSupport(const GrShape&) const override { diff --git a/src/gpu/vk/GrVkGpuCommandBuffer.h b/src/gpu/vk/GrVkGpuCommandBuffer.h index d3eece3ce1..93370fe2bf 100644 --- a/src/gpu/vk/GrVkGpuCommandBuffer.h +++ b/src/gpu/vk/GrVkGpuCommandBuffer.h @@ -27,7 +27,7 @@ public: const LoadAndStoreInfo& colorInfo, const LoadAndStoreInfo& stencilInfo); - virtual ~GrVkGpuCommandBuffer(); + ~GrVkGpuCommandBuffer() override; void end() override; diff --git a/src/image/SkImage_Raster.cpp b/src/image/SkImage_Raster.cpp index 6f3a54d664..14285897ee 100644 --- a/src/image/SkImage_Raster.cpp +++ b/src/image/SkImage_Raster.cpp @@ -74,7 +74,7 @@ public: } SkImage_Raster(const SkImageInfo&, sk_sp<SkData>, size_t rb, SkColorTable*); - virtual ~SkImage_Raster(); + ~SkImage_Raster() override; SkImageInfo onImageInfo() const override { return fBitmap.info(); diff --git a/src/image/SkSurface_Gpu.h b/src/image/SkSurface_Gpu.h index 5b92eebe3a..cc8b87dc41 100644 --- a/src/image/SkSurface_Gpu.h +++ b/src/image/SkSurface_Gpu.h @@ -17,7 +17,7 @@ class SkGpuDevice; class SkSurface_Gpu : public SkSurface_Base { public: SkSurface_Gpu(sk_sp<SkGpuDevice>); - virtual ~SkSurface_Gpu(); + ~SkSurface_Gpu() override; GrBackendObject onGetTextureHandle(BackendHandleAccess) override; bool onGetRenderTargetHandle(GrBackendObject*, BackendHandleAccess) override; diff --git a/src/lazy/SkDiscardableMemoryPool.cpp b/src/lazy/SkDiscardableMemoryPool.cpp index fece7f0d6f..2cb1b3f22b 100644 --- a/src/lazy/SkDiscardableMemoryPool.cpp +++ b/src/lazy/SkDiscardableMemoryPool.cpp @@ -31,7 +31,7 @@ public: * Without mutex, will be not be thread safe. */ DiscardableMemoryPool(size_t budget, SkBaseMutex* mutex = nullptr); - virtual ~DiscardableMemoryPool(); + ~DiscardableMemoryPool() override; SkDiscardableMemory* create(size_t bytes) override; @@ -80,7 +80,7 @@ class PoolDiscardableMemory : public SkDiscardableMemory { public: PoolDiscardableMemory(DiscardableMemoryPool* pool, void* pointer, size_t bytes); - virtual ~PoolDiscardableMemory(); + ~PoolDiscardableMemory() override; bool lock() override; void* data() override; void unlock() override; diff --git a/src/pdf/SkDeflate.h b/src/pdf/SkDeflate.h index 387de40a15..be76a1d53e 100644 --- a/src/pdf/SkDeflate.h +++ b/src/pdf/SkDeflate.h @@ -35,7 +35,7 @@ public: bool gzip = false); /** The destructor calls finalize(). */ - ~SkDeflateWStream(); + ~SkDeflateWStream() override; /** Write the end of the compressed stream. All subsequent calls to write() will fail. Subsequent calls to finalize() do nothing. */ diff --git a/src/pdf/SkPDFCanvas.h b/src/pdf/SkPDFCanvas.h index 7c4d26f714..93c055a26a 100644 --- a/src/pdf/SkPDFCanvas.h +++ b/src/pdf/SkPDFCanvas.h @@ -14,7 +14,7 @@ class SkPDFDevice; class SkPDFCanvas : public SkCanvas { public: SkPDFCanvas(const sk_sp<SkPDFDevice>&); - ~SkPDFCanvas(); + ~SkPDFCanvas() override; protected: void onClipRect(const SkRect&, SkClipOp, ClipEdgeStyle) override; diff --git a/src/pdf/SkPDFDevice.h b/src/pdf/SkPDFDevice.h index 303d450bbe..93eb78dc50 100644 --- a/src/pdf/SkPDFDevice.h +++ b/src/pdf/SkPDFDevice.h @@ -72,7 +72,7 @@ public: return new SkPDFDevice(pageSize, rasterDpi, doc, false); } - virtual ~SkPDFDevice(); + ~SkPDFDevice() 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, diff --git a/src/pdf/SkPDFDocument.h b/src/pdf/SkPDFDocument.h index 15e147961d..aa6dcb286f 100644 --- a/src/pdf/SkPDFDocument.h +++ b/src/pdf/SkPDFDocument.h @@ -50,7 +50,7 @@ public: const SkDocument::PDFMetadata&, sk_sp<SkPixelSerializer>, bool); - virtual ~SkPDFDocument(); + ~SkPDFDocument() override; SkCanvas* onBeginPage(SkScalar, SkScalar, const SkRect&) override; void onEndPage() override; void onClose(SkWStream*) override; diff --git a/src/pdf/SkPDFFont.cpp b/src/pdf/SkPDFFont.cpp index 41b0d4da72..09d133ece7 100644 --- a/src/pdf/SkPDFFont.cpp +++ b/src/pdf/SkPDFFont.cpp @@ -51,7 +51,7 @@ static const int32_t kPdfSymbolic = 4; struct SkPDFType0Font final : public SkPDFFont { SkPDFType0Font(SkPDFFont::Info, const SkAdvancedTypefaceMetrics&); - virtual ~SkPDFType0Font(); + ~SkPDFType0Font() override; void getFontSubset(SkPDFCanon*) override; #ifdef SK_DEBUG void emitObject(SkWStream*, const SkPDFObjNumMap&) const override; @@ -62,13 +62,13 @@ struct SkPDFType0Font final : public SkPDFFont { struct SkPDFType1Font final : public SkPDFFont { SkPDFType1Font(SkPDFFont::Info, const SkAdvancedTypefaceMetrics&, SkPDFCanon*); - virtual ~SkPDFType1Font() {} + ~SkPDFType1Font() override {} void getFontSubset(SkPDFCanon*) override {} // TODO(halcanary): implement }; struct SkPDFType3Font final : public SkPDFFont { SkPDFType3Font(SkPDFFont::Info, const SkAdvancedTypefaceMetrics&); - virtual ~SkPDFType3Font() {} + ~SkPDFType3Font() override {} void getFontSubset(SkPDFCanon*) override; }; diff --git a/src/pdf/SkPDFFont.h b/src/pdf/SkPDFFont.h index 3858b64ce1..67786f33fc 100644 --- a/src/pdf/SkPDFFont.h +++ b/src/pdf/SkPDFFont.h @@ -29,7 +29,7 @@ class SkPDFFont; class SkPDFFont : public SkPDFDict { public: - virtual ~SkPDFFont(); + ~SkPDFFont() override; /** Returns the typeface represented by this class. Returns nullptr for the * default typeface. diff --git a/src/pdf/SkPDFTypes.h b/src/pdf/SkPDFTypes.h index 201d62b2ef..0be20f13a1 100644 --- a/src/pdf/SkPDFTypes.h +++ b/src/pdf/SkPDFTypes.h @@ -187,7 +187,7 @@ public: /** Create a PDF array. Maximum length is 8191. */ SkPDFArray(); - virtual ~SkPDFArray(); + ~SkPDFArray() override; // The SkPDFObject interface. void emitObject(SkWStream* stream, @@ -235,7 +235,7 @@ public: */ explicit SkPDFDict(const char type[] = nullptr); - virtual ~SkPDFDict(); + ~SkPDFDict() override; // The SkPDFObject interface. void emitObject(SkWStream* stream, @@ -298,7 +298,7 @@ private: class SkPDFSharedStream final : public SkPDFObject { public: SkPDFSharedStream(std::unique_ptr<SkStreamAsset> data); - ~SkPDFSharedStream(); + ~SkPDFSharedStream() override; SkPDFDict* dict() { return &fDict; } void emitObject(SkWStream*, const SkPDFObjNumMap&) const override; @@ -327,7 +327,7 @@ public: * @param stream The data part of the stream. */ explicit SkPDFStream(sk_sp<SkData> data); explicit SkPDFStream(std::unique_ptr<SkStreamAsset> stream); - virtual ~SkPDFStream(); + ~SkPDFStream() override; SkPDFDict* dict() { return &fDict; } diff --git a/src/ports/SkFontHost_FreeType.cpp b/src/ports/SkFontHost_FreeType.cpp index 9e3a7d3f9d..5489996033 100644 --- a/src/ports/SkFontHost_FreeType.cpp +++ b/src/ports/SkFontHost_FreeType.cpp @@ -450,7 +450,7 @@ public: SkScalerContext_FreeType(sk_sp<SkTypeface>, const SkScalerContextEffects&, const SkDescriptor* desc); - virtual ~SkScalerContext_FreeType(); + ~SkScalerContext_FreeType() override; bool success() const { return fFTSize != nullptr && fFace != nullptr; diff --git a/src/ports/SkFontMgr_fontconfig.cpp b/src/ports/SkFontMgr_fontconfig.cpp index 85230b394e..bceb4de3bd 100644 --- a/src/ports/SkFontMgr_fontconfig.cpp +++ b/src/ports/SkFontMgr_fontconfig.cpp @@ -503,7 +503,7 @@ public: return info; } - virtual ~SkTypeface_fontconfig() { + ~SkTypeface_fontconfig() override { // Hold the lock while unrefing the pattern. FCLocker lock; fPattern.reset(); @@ -534,7 +534,7 @@ class SkFontMgr_fontconfig : public SkFontMgr { : fFontMgr(SkRef(parent)), fFontSet(fontSet) { } - virtual ~StyleSet() { + ~StyleSet() override { // Hold the lock while unrefing the font set. FCLocker lock; fFontSet.reset(); @@ -667,7 +667,7 @@ public: : fFC(config ? config : FcInitLoadConfigAndFonts()) , fFamilyNames(GetFamilyNames(fFC)) { } - virtual ~SkFontMgr_fontconfig() { + ~SkFontMgr_fontconfig() override { // Hold the lock while unrefing the config. FCLocker lock; fFC.reset(); diff --git a/src/sksl/SkSLCompiler.h b/src/sksl/SkSLCompiler.h index 497d06dd83..ec02c5ac52 100644 --- a/src/sksl/SkSLCompiler.h +++ b/src/sksl/SkSLCompiler.h @@ -40,7 +40,7 @@ class Compiler : public ErrorReporter { public: Compiler(); - ~Compiler(); + ~Compiler() override; std::unique_ptr<Program> convertProgram(Program::Kind kind, SkString text, const Program::Settings& settings); diff --git a/src/svg/SkSVGDevice.h b/src/svg/SkSVGDevice.h index 092ef282ba..e05dc9283e 100644 --- a/src/svg/SkSVGDevice.h +++ b/src/svg/SkSVGDevice.h @@ -52,7 +52,7 @@ protected: private: SkSVGDevice(const SkISize& size, SkXMLWriter* writer); - virtual ~SkSVGDevice(); + ~SkSVGDevice() override; struct MxCp; void drawBitmapCommon(const MxCp&, const SkBitmap& bm, const SkPaint& paint); diff --git a/src/utils/SkCanvasStack.h b/src/utils/SkCanvasStack.h index cdeeb843b6..22cfc3e538 100644 --- a/src/utils/SkCanvasStack.h +++ b/src/utils/SkCanvasStack.h @@ -21,7 +21,7 @@ class SkCanvasStack : public SkNWayCanvas { public: SkCanvasStack(int width, int height); - virtual ~SkCanvasStack(); + ~SkCanvasStack() override; void pushCanvas(std::unique_ptr<SkCanvas>, const SkIPoint& origin); void removeAll() override; diff --git a/src/utils/SkMultiPictureDocument.cpp b/src/utils/SkMultiPictureDocument.cpp index 217e7a3007..d987818f86 100644 --- a/src/utils/SkMultiPictureDocument.cpp +++ b/src/utils/SkMultiPictureDocument.cpp @@ -46,7 +46,7 @@ struct MultiPictureDocument final : public SkDocument { SkTArray<SkSize> fSizes; MultiPictureDocument(SkWStream* s, void (*d)(SkWStream*, bool)) : SkDocument(s, d) {} - ~MultiPictureDocument() { this->close(); } + ~MultiPictureDocument() override { this->close(); } SkCanvas* onBeginPage(SkScalar w, SkScalar h, const SkRect& c) override { fCurrentPageSize.set(w, h); diff --git a/src/xml/SkXMLWriter.h b/src/xml/SkXMLWriter.h index b1d513c508..c500e16c33 100644 --- a/src/xml/SkXMLWriter.h +++ b/src/xml/SkXMLWriter.h @@ -64,7 +64,7 @@ private: class SkXMLStreamWriter : public SkXMLWriter { public: SkXMLStreamWriter(SkWStream*); - virtual ~SkXMLStreamWriter(); + ~SkXMLStreamWriter() override; void writeHeader() override; protected: @@ -80,7 +80,7 @@ private: class SkXMLParserWriter : public SkXMLWriter { public: SkXMLParserWriter(SkXMLParser*); - virtual ~SkXMLParserWriter(); + ~SkXMLParserWriter() override; protected: void onStartElementLen(const char elem[], size_t length) override; void onEndElement() override; diff --git a/tests/CachedDecodingPixelRefTest.cpp b/tests/CachedDecodingPixelRefTest.cpp index d9a9e9e1c5..c42344178e 100644 --- a/tests/CachedDecodingPixelRefTest.cpp +++ b/tests/CachedDecodingPixelRefTest.cpp @@ -37,7 +37,7 @@ public: : INHERITED(GetMyInfo(colorType)), fType(type), fReporter(reporter) { SkASSERT((fType <= kLast_TestType) && (fType >= 0)); } - virtual ~TestImageGenerator() { } + ~TestImageGenerator() override {} protected: static SkImageInfo GetMyInfo(SkColorType colorType) { diff --git a/tests/LayerRasterizerTest.cpp b/tests/LayerRasterizerTest.cpp index dcbfdd1520..310aa3b2fe 100644 --- a/tests/LayerRasterizerTest.cpp +++ b/tests/LayerRasterizerTest.cpp @@ -26,7 +26,7 @@ public: gCount++; } - ~DummyRasterizer() { + ~DummyRasterizer() override { // Not threadsafe. Only used in one thread. gCount--; } diff --git a/tests/PathTest.cpp b/tests/PathTest.cpp index 0949a5d8a8..d41ed47f77 100644 --- a/tests/PathTest.cpp +++ b/tests/PathTest.cpp @@ -4315,7 +4315,7 @@ namespace { class ChangeListener : public SkPathRef::GenIDChangeListener { public: ChangeListener(bool *changed) : fChanged(changed) { *fChanged = false; } - virtual ~ChangeListener() {} + ~ChangeListener() override {} void onChange() override { *fChanged = true; } diff --git a/tests/PictureBBHTest.cpp b/tests/PictureBBHTest.cpp index b8698bcdbd..69cb443879 100644 --- a/tests/PictureBBHTest.cpp +++ b/tests/PictureBBHTest.cpp @@ -59,10 +59,10 @@ private: class DrawEmptyPictureBBHTest : public PictureBBHTestBase { public: DrawEmptyPictureBBHTest() - : PictureBBHTestBase(2, 2, 1, 1) { } - virtual ~DrawEmptyPictureBBHTest() { } + : PictureBBHTestBase(2, 2, 1, 1) {} + ~DrawEmptyPictureBBHTest() override {} - void doTest(SkCanvas&, SkCanvas&) override { } + void doTest(SkCanvas&, SkCanvas&) override {} }; // Test to verify the playback of a picture into a canvas that has @@ -71,7 +71,7 @@ public: class EmptyClipPictureBBHTest : public PictureBBHTestBase { public: EmptyClipPictureBBHTest() - : PictureBBHTestBase(2, 2, 3, 3) { } + : PictureBBHTestBase(2, 2, 3, 3) {} void doTest(SkCanvas& playbackCanvas, SkCanvas& recordingCanvas) override { // intersect with out of bounds rect -> empty clip. @@ -80,7 +80,7 @@ public: recordingCanvas.drawRect(SkRect::MakeWH(3, 3), paint); } - virtual ~EmptyClipPictureBBHTest() { } + ~EmptyClipPictureBBHTest() override {} }; DEF_TEST(PictureBBH, reporter) { diff --git a/tests/QuickRejectTest.cpp b/tests/QuickRejectTest.cpp index 6f472dcd86..cf886d3d34 100644 --- a/tests/QuickRejectTest.cpp +++ b/tests/QuickRejectTest.cpp @@ -34,7 +34,7 @@ private: class TestDrawLooperContext : public SkDrawLooper::Context { public: TestDrawLooperContext() : fOnce(true) {} - virtual ~TestDrawLooperContext() {} + ~TestDrawLooperContext() override {} bool next(SkCanvas* canvas, SkPaint*) override { if (fOnce) { diff --git a/tests/ResourceCacheTest.cpp b/tests/ResourceCacheTest.cpp index 8051191d4b..9573161b9e 100644 --- a/tests/ResourceCacheTest.cpp +++ b/tests/ResourceCacheTest.cpp @@ -295,7 +295,7 @@ public: return new TestResource(gpu, size); } - ~TestResource() { + ~TestResource() override { --fNumAlive; SkSafeUnref(fToDelete); } diff --git a/tools/debugger/SkDebugCanvas.h b/tools/debugger/SkDebugCanvas.h index 0f2ae514dd..7c6a0f4d54 100644 --- a/tools/debugger/SkDebugCanvas.h +++ b/tools/debugger/SkDebugCanvas.h @@ -26,7 +26,7 @@ class SkDebugCanvas : public SkCanvas { public: SkDebugCanvas(int width, int height); - virtual ~SkDebugCanvas(); + ~SkDebugCanvas() override; void toggleFilter(bool toggle) { fFilter = toggle; } diff --git a/tools/debugger/SkDrawCommand.h b/tools/debugger/SkDrawCommand.h index e23eed138c..4004b3bc2c 100644 --- a/tools/debugger/SkDrawCommand.h +++ b/tools/debugger/SkDrawCommand.h @@ -533,7 +533,7 @@ class SkDrawPointsCommand : public SkDrawCommand { public: SkDrawPointsCommand(SkCanvas::PointMode mode, size_t count, const SkPoint pts[], const SkPaint& paint); - virtual ~SkDrawPointsCommand() { delete [] fPts; } + ~SkDrawPointsCommand() override { delete [] fPts; } void execute(SkCanvas* canvas) const override; bool render(SkCanvas* canvas) const override; Json::Value toJSON(UrlDataManager& urlDataManager) const override; @@ -552,7 +552,7 @@ class SkDrawTextCommand : public SkDrawCommand { public: SkDrawTextCommand(const void* text, size_t byteLength, SkScalar x, SkScalar y, const SkPaint& paint); - virtual ~SkDrawTextCommand() { delete [] fText; } + ~SkDrawTextCommand() override { delete [] fText; } void execute(SkCanvas* canvas) const override; Json::Value toJSON(UrlDataManager& urlDataManager) const override; static SkDrawTextCommand* fromJSON(Json::Value& command, UrlDataManager& urlDataManager); @@ -571,7 +571,7 @@ class SkDrawPosTextCommand : public SkDrawCommand { public: SkDrawPosTextCommand(const void* text, size_t byteLength, const SkPoint pos[], const SkPaint& paint); - virtual ~SkDrawPosTextCommand() { delete [] fPos; delete [] fText; } + ~SkDrawPosTextCommand() override { delete [] fPos; delete [] fText; } void execute(SkCanvas* canvas) const override; Json::Value toJSON(UrlDataManager& urlDataManager) const override; static SkDrawPosTextCommand* fromJSON(Json::Value& command, UrlDataManager& urlDataManager); @@ -589,7 +589,7 @@ class SkDrawTextOnPathCommand : public SkDrawCommand { public: SkDrawTextOnPathCommand(const void* text, size_t byteLength, const SkPath& path, const SkMatrix* matrix, const SkPaint& paint); - virtual ~SkDrawTextOnPathCommand() { delete [] fText; } + ~SkDrawTextOnPathCommand() override { delete [] fText; } void execute(SkCanvas* canvas) const override; Json::Value toJSON(UrlDataManager& urlDataManager) const override; static SkDrawTextOnPathCommand* fromJSON(Json::Value& command, UrlDataManager& urlDataManager); @@ -628,7 +628,7 @@ class SkDrawPosTextHCommand : public SkDrawCommand { public: SkDrawPosTextHCommand(const void* text, size_t byteLength, const SkScalar xpos[], SkScalar constY, const SkPaint& paint); - virtual ~SkDrawPosTextHCommand() { delete [] fXpos; delete [] fText; } + ~SkDrawPosTextHCommand() override { delete [] fXpos; delete [] fText; } void execute(SkCanvas* canvas) const override; Json::Value toJSON(UrlDataManager& urlDataManager) const override; static SkDrawPosTextHCommand* fromJSON(Json::Value& command, UrlDataManager& urlDataManager); @@ -759,7 +759,7 @@ private: class SkSaveLayerCommand : public SkDrawCommand { public: SkSaveLayerCommand(const SkCanvas::SaveLayerRec&); - virtual ~SkSaveLayerCommand(); + ~SkSaveLayerCommand() override; void execute(SkCanvas* canvas) const override; Json::Value toJSON(UrlDataManager& urlDataManager) const override; static SkSaveLayerCommand* fromJSON(Json::Value& command, UrlDataManager& urlDataManager); diff --git a/tools/gpu/gl/GLTestContext.h b/tools/gpu/gl/GLTestContext.h index 09dce05685..9bd10395f7 100644 --- a/tools/gpu/gl/GLTestContext.h +++ b/tools/gpu/gl/GLTestContext.h @@ -18,7 +18,7 @@ namespace sk_gpu_test { */ class GLTestContext : public TestContext { public: - virtual ~GLTestContext(); + ~GLTestContext() override; virtual GrBackend backend() override { return kOpenGL_GrBackend; } virtual GrBackendContext backendContext() override { diff --git a/tools/gpu/gl/debug/GrBufferObj.h b/tools/gpu/gl/debug/GrBufferObj.h index c91606da92..d0217b2ffa 100644 --- a/tools/gpu/gl/debug/GrBufferObj.h +++ b/tools/gpu/gl/debug/GrBufferObj.h @@ -25,7 +25,7 @@ public: , fSize(0) , fUsage(GR_GL_STATIC_DRAW) { } - virtual ~GrBufferObj() { + ~GrBufferObj() override { delete[] fDataPtr; } diff --git a/tools/gpu/gl/debug/GrFrameBufferObj.h b/tools/gpu/gl/debug/GrFrameBufferObj.h index 3bd642f460..9003127a6c 100644 --- a/tools/gpu/gl/debug/GrFrameBufferObj.h +++ b/tools/gpu/gl/debug/GrFrameBufferObj.h @@ -27,7 +27,7 @@ public: , fStencilBuffer(nullptr) { } - virtual ~GrFrameBufferObj() { + ~GrFrameBufferObj() override { fColorBuffer = nullptr; fDepthBuffer = nullptr; fStencilBuffer = nullptr; diff --git a/tools/gpu/gl/debug/GrTextureObj.h b/tools/gpu/gl/debug/GrTextureObj.h index e2908386cb..5532723969 100644 --- a/tools/gpu/gl/debug/GrTextureObj.h +++ b/tools/gpu/gl/debug/GrTextureObj.h @@ -22,7 +22,7 @@ public: : GrFBBindableObj() { } - virtual ~GrTextureObj() { + ~GrTextureObj() override { GrAlwaysAssert(0 == fTextureUnitReferees.count()); } |