diff --git a/gfx/2d/DrawTargetSkia.cpp b/gfx/2d/DrawTargetSkia.cpp index e9a2bc418b46..2395d9cce2e6 100644 --- a/gfx/2d/DrawTargetSkia.cpp +++ b/gfx/2d/DrawTargetSkia.cpp @@ -1948,9 +1948,9 @@ public: : SkImageFilter(nullptr, 0, nullptr) {} - virtual sk_sp onFilterImage(SkSpecialImage* source, - const Context& ctx, - SkIPoint* offset) const override { + sk_sp onFilterImage(SkSpecialImage* source, + const Context& ctx, + SkIPoint* offset) const override { offset->set(0, 0); return sk_ref_sp(source); } diff --git a/gfx/2d/JobScheduler_posix.cpp b/gfx/2d/JobScheduler_posix.cpp index fcbdca820442..01a81c21407c 100644 --- a/gfx/2d/JobScheduler_posix.cpp +++ b/gfx/2d/JobScheduler_posix.cpp @@ -21,12 +21,12 @@ public: pthread_create(&mThread, nullptr, ThreadCallback, static_cast(this)); } - ~WorkerThreadPosix() + ~WorkerThreadPosix() override { pthread_join(mThread, nullptr); } - virtual void SetName(const char*) override + void SetName(const char*) override { // XXX - temporarily disabled, see bug 1209039 // diff --git a/gfx/layers/LayerTreeInvalidation.cpp b/gfx/layers/LayerTreeInvalidation.cpp index 5604fafee344..a5fdb2df008c 100644 --- a/gfx/layers/LayerTreeInvalidation.cpp +++ b/gfx/layers/LayerTreeInvalidation.cpp @@ -157,7 +157,7 @@ struct LayerPropertiesBase : public LayerProperties { MOZ_COUNT_CTOR(LayerPropertiesBase); } - ~LayerPropertiesBase() + ~LayerPropertiesBase() override { MOZ_COUNT_DTOR(LayerPropertiesBase); } @@ -167,11 +167,11 @@ protected: LayerPropertiesBase& operator=(const LayerPropertiesBase& a) = delete; public: - virtual nsIntRegion ComputeDifferences(Layer* aRoot, - NotifySubDocInvalidationFunc aCallback, - bool* aGeometryChanged); + nsIntRegion ComputeDifferences(Layer* aRoot, + NotifySubDocInvalidationFunc aCallback, + bool* aGeometryChanged) override; - virtual void MoveBy(const IntPoint& aOffset); + void MoveBy(const IntPoint& aOffset) override; nsIntRegion ComputeChange(NotifySubDocInvalidationFunc aCallback, bool& aGeometryChanged) @@ -454,8 +454,8 @@ protected: ColorLayerProperties& operator=(const ColorLayerProperties& a) = delete; public: - virtual nsIntRegion ComputeChangeInternal(NotifySubDocInvalidationFunc aCallback, - bool& aGeometryChanged) + nsIntRegion ComputeChangeInternal(NotifySubDocInvalidationFunc aCallback, + bool& aGeometryChanged) override { ColorLayer* color = static_cast(mLayer.get()); @@ -505,8 +505,8 @@ struct ImageLayerProperties : public LayerPropertiesBase } } - virtual nsIntRegion ComputeChangeInternal(NotifySubDocInvalidationFunc aCallback, - bool& aGeometryChanged) + nsIntRegion ComputeChangeInternal(NotifySubDocInvalidationFunc aCallback, + bool& aGeometryChanged) override { ImageLayer* imageLayer = static_cast(mLayer.get()); @@ -566,8 +566,8 @@ struct CanvasLayerProperties : public LayerPropertiesBase mFrameID = mImageHost ? mImageHost->GetFrameID() : -1; } - virtual nsIntRegion ComputeChangeInternal(NotifySubDocInvalidationFunc aCallback, - bool& aGeometryChanged) + nsIntRegion ComputeChangeInternal(NotifySubDocInvalidationFunc aCallback, + bool& aGeometryChanged) override { CanvasLayer* canvasLayer = static_cast(mLayer.get()); diff --git a/gfx/layers/basic/BasicImageLayer.cpp b/gfx/layers/basic/BasicImageLayer.cpp index 0bb6b132d091..6e69bfe2e2d0 100644 --- a/gfx/layers/basic/BasicImageLayer.cpp +++ b/gfx/layers/basic/BasicImageLayer.cpp @@ -31,24 +31,24 @@ public: MOZ_COUNT_CTOR(BasicImageLayer); } protected: - virtual ~BasicImageLayer() + ~BasicImageLayer() override { MOZ_COUNT_DTOR(BasicImageLayer); } public: - virtual void SetVisibleRegion(const LayerIntRegion& aRegion) override + void SetVisibleRegion(const LayerIntRegion& aRegion) override { NS_ASSERTION(BasicManager()->InConstruction(), "Can only set properties in construction phase"); ImageLayer::SetVisibleRegion(aRegion); } - virtual void Paint(DrawTarget* aDT, - const gfx::Point& aDeviceOffset, - Layer* aMaskLayer) override; + void Paint(DrawTarget* aDT, + const gfx::Point& aDeviceOffset, + Layer* aMaskLayer) override; - virtual already_AddRefed GetAsSourceSurface() override; + already_AddRefed GetAsSourceSurface() override; protected: BasicLayerManager* BasicManager() diff --git a/gfx/thebes/gfxDrawable.cpp b/gfx/thebes/gfxDrawable.cpp index b52bd9718b06..cf6c2d8c7609 100644 --- a/gfx/thebes/gfxDrawable.cpp +++ b/gfx/thebes/gfxDrawable.cpp @@ -190,12 +190,12 @@ public: NS_ASSERTION(aDrawable, "aDrawable is null!"); } - virtual ~DrawingCallbackFromDrawable() = default; + ~DrawingCallbackFromDrawable() override = default; - virtual bool operator()(gfxContext* aContext, - const gfxRect& aFillRect, - const SamplingFilter aSamplingFilter, - const gfxMatrix& aTransform = gfxMatrix()) + bool operator()(gfxContext* aContext, + const gfxRect& aFillRect, + const SamplingFilter aSamplingFilter, + const gfxMatrix& aTransform = gfxMatrix()) override { return mDrawable->Draw(aContext, aFillRect, ExtendMode::CLAMP, aSamplingFilter, 1.0, diff --git a/gfx/thebes/gfxPlatform.cpp b/gfx/thebes/gfxPlatform.cpp index 127326429dcd..afe7d614cbac 100644 --- a/gfx/thebes/gfxPlatform.cpp +++ b/gfx/thebes/gfxPlatform.cpp @@ -195,11 +195,11 @@ class CrashStatsLogForwarder: public mozilla::gfx::LogForwarder { public: explicit CrashStatsLogForwarder(const char* aKey); - virtual void Log(const std::string& aString) override; - virtual void CrashAction(LogReason aReason) override; - virtual bool UpdateStringsVector(const std::string& aString) override; + void Log(const std::string& aString) override; + void CrashAction(LogReason aReason) override; + bool UpdateStringsVector(const std::string& aString) override; - virtual LoggingRecord LoggingRecordCopy() override; + LoggingRecord LoggingRecordCopy() override; void SetCircularBufferSize(uint32_t aCapacity); @@ -307,7 +307,7 @@ void CrashStatsLogForwarder::UpdateCrashReport() class LogForwarderEvent : public Runnable { - virtual ~LogForwarderEvent() = default; + ~LogForwarderEvent() override = default; NS_DECL_ISUPPORTS_INHERITED @@ -361,7 +361,7 @@ void CrashStatsLogForwarder::Log(const std::string& aString) class CrashTelemetryEvent : public Runnable { - virtual ~CrashTelemetryEvent() = default; + ~CrashTelemetryEvent() override = default; NS_DECL_ISUPPORTS_INHERITED diff --git a/gfx/thebes/gfxPlatformMac.cpp b/gfx/thebes/gfxPlatformMac.cpp index 9e957ca673b6..e8189accc905 100644 --- a/gfx/thebes/gfxPlatformMac.cpp +++ b/gfx/thebes/gfxPlatformMac.cpp @@ -400,7 +400,7 @@ public: { } - virtual Display& GetGlobalDisplay() override + Display& GetGlobalDisplay() override { return mGlobalDisplay; } @@ -415,7 +415,7 @@ public: mTimer = do_CreateInstance(NS_TIMER_CONTRACTID); } - ~OSXDisplay() + ~OSXDisplay() override { MOZ_ASSERT(NS_IsMainThread()); } @@ -428,7 +428,7 @@ public: osxDisplay->EnableVsync(); } - virtual void EnableVsync() override + void EnableVsync() override { MOZ_ASSERT(NS_IsMainThread()); if (IsVsyncEnabled()) { @@ -488,7 +488,7 @@ public: } } - virtual void DisableVsync() override + void DisableVsync() override { MOZ_ASSERT(NS_IsMainThread()); if (!IsVsyncEnabled()) { @@ -502,18 +502,18 @@ public: } } - virtual bool IsVsyncEnabled() override + bool IsVsyncEnabled() override { MOZ_ASSERT(NS_IsMainThread()); return mDisplayLink != nullptr; } - virtual TimeDuration GetVsyncRate() override + TimeDuration GetVsyncRate() override { return mVsyncRate; } - virtual void Shutdown() override + void Shutdown() override { MOZ_ASSERT(NS_IsMainThread()); mTimer->Cancel(); @@ -536,7 +536,7 @@ public: }; // OSXDisplay private: - virtual ~OSXVsyncSource() = default; + ~OSXVsyncSource() override = default; OSXDisplay mGlobalDisplay; }; // OSXVsyncSource