mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 13:51:41 +00:00
Bug 1317637 - Use C++11's override and remove virtual where applicable in gfx/. r=jrmuizel
MozReview-Commit-ID: 2nzBWEAu2wt --HG-- extra : rebase_source : 0fffd208a79f8d72bc36d77600ba925cbe254a7c
This commit is contained in:
parent
70b7835557
commit
98ef2aa49c
@ -1948,9 +1948,9 @@ public:
|
||||
: SkImageFilter(nullptr, 0, nullptr)
|
||||
{}
|
||||
|
||||
virtual sk_sp<SkSpecialImage> onFilterImage(SkSpecialImage* source,
|
||||
const Context& ctx,
|
||||
SkIPoint* offset) const override {
|
||||
sk_sp<SkSpecialImage> onFilterImage(SkSpecialImage* source,
|
||||
const Context& ctx,
|
||||
SkIPoint* offset) const override {
|
||||
offset->set(0, 0);
|
||||
return sk_ref_sp(source);
|
||||
}
|
||||
|
@ -21,12 +21,12 @@ public:
|
||||
pthread_create(&mThread, nullptr, ThreadCallback, static_cast<WorkerThread*>(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
|
||||
//
|
||||
|
@ -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<ColorLayer*>(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<ImageLayer*>(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<CanvasLayer*>(mLayer.get());
|
||||
|
||||
|
@ -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<SourceSurface> GetAsSourceSurface() override;
|
||||
already_AddRefed<SourceSurface> GetAsSourceSurface() override;
|
||||
|
||||
protected:
|
||||
BasicLayerManager* BasicManager()
|
||||
|
@ -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,
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user