зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1613985 - Use default for equivalent-to-default constructors/destructors in dom/canvas. r=jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D63142 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
5dd2428621
Коммит
723b05dfb6
|
@ -58,7 +58,7 @@ class CanvasGradient : public nsWrapperCache {
|
|||
nsTArray<mozilla::gfx::GradientStop> mRawStops;
|
||||
RefPtr<mozilla::gfx::GradientStops> mStops;
|
||||
Type mType;
|
||||
virtual ~CanvasGradient() {}
|
||||
virtual ~CanvasGradient() = default;
|
||||
};
|
||||
|
||||
} // namespace dom
|
||||
|
|
|
@ -70,7 +70,7 @@ class ImageCacheEntry : public PLDHashEntryHdr {
|
|||
: mData(new ImageCacheEntryData(*aKey)) {}
|
||||
ImageCacheEntry(const ImageCacheEntry& toCopy)
|
||||
: mData(new ImageCacheEntryData(*toCopy.mData)) {}
|
||||
~ImageCacheEntry() {}
|
||||
~ImageCacheEntry() = default;
|
||||
|
||||
bool KeyEquals(KeyTypePointer key) const {
|
||||
return mData->mImage == key->mImage && mData->mCanvas == key->mCanvas;
|
||||
|
@ -105,7 +105,7 @@ class AllCanvasImageCacheEntry : public PLDHashEntryHdr {
|
|||
AllCanvasImageCacheEntry(const AllCanvasImageCacheEntry& toCopy)
|
||||
: mImage(toCopy.mImage), mSourceSurface(toCopy.mSourceSurface) {}
|
||||
|
||||
~AllCanvasImageCacheEntry() {}
|
||||
~AllCanvasImageCacheEntry() = default;
|
||||
|
||||
bool KeyEquals(KeyTypePointer key) const { return mImage == key->mImage; }
|
||||
|
||||
|
@ -174,7 +174,7 @@ class ImageCacheObserver final : public nsIObserver {
|
|||
}
|
||||
|
||||
private:
|
||||
virtual ~ImageCacheObserver() {}
|
||||
virtual ~ImageCacheObserver() = default;
|
||||
|
||||
void RegisterMemoryPressureEvent() {
|
||||
nsCOMPtr<nsIObserverService> observerService =
|
||||
|
@ -205,7 +205,7 @@ class ImageCacheObserver final : public nsIObserver {
|
|||
NS_IMPL_ISUPPORTS(ImageCacheObserver, nsIObserver)
|
||||
|
||||
class CanvasImageCacheShutdownObserver final : public nsIObserver {
|
||||
~CanvasImageCacheShutdownObserver() {}
|
||||
~CanvasImageCacheShutdownObserver() = default;
|
||||
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
|
|
|
@ -66,7 +66,7 @@ class CanvasPath final : public nsWrapperCache {
|
|||
ErrorResult& aError);
|
||||
|
||||
private:
|
||||
virtual ~CanvasPath() {}
|
||||
virtual ~CanvasPath() = default;
|
||||
|
||||
nsCOMPtr<nsISupports> mParent;
|
||||
static gfx::Float ToFloat(double aValue) { return gfx::Float(aValue); }
|
||||
|
|
|
@ -23,7 +23,7 @@ namespace dom {
|
|||
class SVGMatrix;
|
||||
|
||||
class CanvasPattern final : public nsWrapperCache {
|
||||
~CanvasPattern() {}
|
||||
~CanvasPattern() = default;
|
||||
|
||||
public:
|
||||
NS_INLINE_DECL_CYCLE_COLLECTING_NATIVE_REFCOUNTING(CanvasPattern)
|
||||
|
|
|
@ -171,7 +171,7 @@ class MOZ_RAII AutoSaveRestore {
|
|||
// of a canvas are stored. Furthermore, this memory will be tracked by the
|
||||
// underlying surface implementations. See bug 655638 for details.
|
||||
class Canvas2dPixelsReporter final : public nsIMemoryReporter {
|
||||
~Canvas2dPixelsReporter() {}
|
||||
~Canvas2dPixelsReporter() = default;
|
||||
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
|
@ -762,7 +762,7 @@ class CanvasShutdownObserver final : public nsIObserver {
|
|||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSIOBSERVER
|
||||
private:
|
||||
~CanvasShutdownObserver() {}
|
||||
~CanvasShutdownObserver() = default;
|
||||
|
||||
CanvasRenderingContext2D* mCanvas;
|
||||
};
|
||||
|
|
|
@ -96,7 +96,7 @@ class ImageBitmapShutdownObserver final : public nsIObserver {
|
|||
NS_DECL_THREADSAFE_ISUPPORTS
|
||||
NS_DECL_NSIOBSERVER
|
||||
private:
|
||||
~ImageBitmapShutdownObserver() {}
|
||||
~ImageBitmapShutdownObserver() = default;
|
||||
|
||||
class SendShutdownToWorkerThread : public MainThreadWorkerControlRunnable {
|
||||
public:
|
||||
|
@ -1091,7 +1091,7 @@ class CreateImageBitmapFromBlob final : public CancelableRunnable,
|
|||
mMainThreadEventTarget(aMainThreadEventTarget),
|
||||
mThread(PR_GetCurrentThread()) {}
|
||||
|
||||
virtual ~CreateImageBitmapFromBlob() {}
|
||||
virtual ~CreateImageBitmapFromBlob() = default;
|
||||
|
||||
bool IsCurrentThread() const { return mThread == PR_GetCurrentThread(); }
|
||||
|
||||
|
|
|
@ -116,7 +116,7 @@ class ImageUtils::Impl {
|
|||
}
|
||||
|
||||
protected:
|
||||
Impl() {}
|
||||
Impl() = default;
|
||||
|
||||
DataSourceSurface* Surface() const {
|
||||
if (!mSurface) {
|
||||
|
|
|
@ -31,7 +31,7 @@ OffscreenCanvasCloneData::OffscreenCanvasCloneData(
|
|||
mNeutered(aNeutered),
|
||||
mIsWriteOnly(aIsWriteOnly) {}
|
||||
|
||||
OffscreenCanvasCloneData::~OffscreenCanvasCloneData() {}
|
||||
OffscreenCanvasCloneData::~OffscreenCanvasCloneData() = default;
|
||||
|
||||
OffscreenCanvas::OffscreenCanvas(nsIGlobalObject* aGlobal, uint32_t aWidth,
|
||||
uint32_t aHeight,
|
||||
|
|
|
@ -588,7 +588,7 @@ TexUnpackImage::TexUnpackImage(const WebGLContext* webgl, TexImageTarget target,
|
|||
srcAlphaType),
|
||||
mImage(image) {}
|
||||
|
||||
TexUnpackImage::~TexUnpackImage() {}
|
||||
TexUnpackImage::~TexUnpackImage() = default;
|
||||
|
||||
bool TexUnpackImage::Validate(WebGLContext* webgl,
|
||||
const webgl::PackingInfo& pi) {
|
||||
|
|
|
@ -59,7 +59,7 @@ class TexUnpackBlob {
|
|||
uint32_t depth, gfxAlphaType srcAlphaType);
|
||||
|
||||
public:
|
||||
virtual ~TexUnpackBlob() {}
|
||||
virtual ~TexUnpackBlob() = default;
|
||||
|
||||
protected:
|
||||
bool ConvertIfNeeded(WebGLContext* webgl, const uint32_t rowLength,
|
||||
|
|
|
@ -39,10 +39,10 @@ class BasicSource {
|
|||
: mProducer(std::move(aProducer)) {
|
||||
MOZ_ASSERT(mProducer);
|
||||
}
|
||||
virtual ~BasicSource() {}
|
||||
virtual ~BasicSource() = default;
|
||||
|
||||
// For IPDL:
|
||||
BasicSource() {}
|
||||
BasicSource() = default;
|
||||
friend struct mozilla::ipc::IPDLParamTraits<BasicSource>;
|
||||
|
||||
protected:
|
||||
|
@ -55,10 +55,10 @@ class BasicSink {
|
|||
: mConsumer(std::move(aConsumer)) {
|
||||
MOZ_ASSERT(mConsumer);
|
||||
}
|
||||
virtual ~BasicSink() {}
|
||||
virtual ~BasicSink() = default;
|
||||
|
||||
// For IPDL:
|
||||
BasicSink() {}
|
||||
BasicSink() = default;
|
||||
friend struct mozilla::ipc::IPDLParamTraits<BasicSink>;
|
||||
|
||||
protected:
|
||||
|
@ -95,7 +95,7 @@ class CommandSource : public BasicSource {
|
|||
}
|
||||
|
||||
// For IPDL:
|
||||
CommandSource() {}
|
||||
CommandSource() = default;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -174,7 +174,7 @@ class CommandSink : public BasicSink {
|
|||
}
|
||||
|
||||
// For IPDL:
|
||||
CommandSink() {}
|
||||
CommandSink() = default;
|
||||
|
||||
// non-void return value, non-const method variant
|
||||
template <typename T, typename ReturnType, typename... Args>
|
||||
|
@ -315,7 +315,7 @@ class SyncCommandSource : public CommandSource<Command> {
|
|||
}
|
||||
|
||||
// for IPDL:
|
||||
SyncCommandSource() {}
|
||||
SyncCommandSource() = default;
|
||||
friend struct mozilla::ipc::IPDLParamTraits<SyncCommandSource<Command>>;
|
||||
|
||||
protected:
|
||||
|
@ -361,7 +361,7 @@ class SyncCommandSink : public CommandSink<Command> {
|
|||
mProducer(std::move(aResponseProducer)) {}
|
||||
|
||||
// for IPDL:
|
||||
SyncCommandSink() {}
|
||||
SyncCommandSink() = default;
|
||||
friend struct mozilla::ipc::IPDLParamTraits<SyncCommandSink<Command>>;
|
||||
|
||||
// Places RESPONSE_ACK and the typed return value, or RESPONSE_NAK, in
|
||||
|
|
|
@ -129,7 +129,7 @@ bool WebGLContextOptions::operator==(const WebGLContextOptions& r) const {
|
|||
|
||||
static std::list<WebGLContext*> sWebglLru;
|
||||
|
||||
WebGLContext::LruPosition::LruPosition() : mItr(sWebglLru.end()) {}
|
||||
WebGLContext::LruPosition::LruPosition() : mItr(sWebglLru.end()) {} // NOLINT
|
||||
|
||||
WebGLContext::LruPosition::LruPosition(WebGLContext& context)
|
||||
: mItr(sWebglLru.insert(sWebglLru.end(), &context)) {}
|
||||
|
|
|
@ -983,7 +983,7 @@ class WebGLContext : public VRefCounted, public SupportsWeakPtr<WebGLContext> {
|
|||
nsCString key; // For reporting.
|
||||
nsCString info;
|
||||
|
||||
FailureReason() {}
|
||||
FailureReason() = default;
|
||||
|
||||
template <typename A, typename B>
|
||||
FailureReason(const A& _key, const B& _info)
|
||||
|
|
|
@ -41,7 +41,7 @@ class HostWebGLCommandSink : public SyncCommandSink<size_t> {
|
|||
// For IPDL:
|
||||
friend struct mozilla::ipc::IPDLParamTraits<HostWebGLCommandSink>;
|
||||
friend class mozilla::layers::PCompositorBridgeParent;
|
||||
HostWebGLCommandSink() {}
|
||||
HostWebGLCommandSink() = default;
|
||||
|
||||
bool DispatchCommand(size_t command) override;
|
||||
};
|
||||
|
|
|
@ -403,7 +403,7 @@ class FormatUsageAuthority {
|
|||
static UniquePtr<FormatUsageAuthority> CreateForWebGL2(gl::GLContext* gl);
|
||||
|
||||
private:
|
||||
FormatUsageAuthority() {}
|
||||
FormatUsageAuthority() = default;
|
||||
|
||||
public:
|
||||
FormatUsageInfo* EditUsage(EffectiveFormat format);
|
||||
|
|
|
@ -512,7 +512,7 @@ webgl::LinkedProgramInfo::LinkedProgramInfo(WebGLProgram* prog)
|
|||
transformFeedbackBufferMode(prog->mNextLink_TransformFeedbackBufferMode) {
|
||||
}
|
||||
|
||||
webgl::LinkedProgramInfo::~LinkedProgramInfo() {}
|
||||
webgl::LinkedProgramInfo::~LinkedProgramInfo() = default;
|
||||
|
||||
webgl::AttribBaseType webgl::ToAttribBaseType(const GLenum elemType) {
|
||||
switch (elemType) {
|
||||
|
|
|
@ -713,7 +713,7 @@ class RawBuffer {
|
|||
return mData[idx];
|
||||
}
|
||||
|
||||
RawBuffer() {}
|
||||
RawBuffer() = default;
|
||||
RawBuffer(const RawBuffer&) = delete;
|
||||
RawBuffer& operator=(const RawBuffer&) = delete;
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ namespace mozilla {
|
|||
class WebGLVertexArrayFake final : public WebGLVertexArray {
|
||||
public:
|
||||
explicit WebGLVertexArrayFake(WebGLContext* webgl);
|
||||
~WebGLVertexArrayFake() override {}
|
||||
~WebGLVertexArrayFake() override = default;
|
||||
|
||||
virtual void BindVertexArray() override;
|
||||
};
|
||||
|
|
Загрузка…
Ссылка в новой задаче