mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 02:14:43 +00:00
Bug 1050610 - Fix more bad implicit constructors in gfx; r=roc
--HG-- extra : rebase_source : 5c6b62dbed81018370ce274e1913620ffb0ff7a2
This commit is contained in:
parent
2f12f5203d
commit
93ec08d11c
@ -29,7 +29,7 @@ public:
|
||||
, mDT(nullptr)
|
||||
{ }
|
||||
|
||||
BorrowedCairoContext(DrawTarget *aDT)
|
||||
explicit BorrowedCairoContext(DrawTarget *aDT)
|
||||
: mDT(aDT)
|
||||
{
|
||||
mCairo = BorrowCairoContextFromDrawTarget(aDT);
|
||||
@ -84,7 +84,7 @@ public:
|
||||
, mDT(nullptr)
|
||||
{ }
|
||||
|
||||
BorrowedCGContext(DrawTarget *aDT)
|
||||
explicit BorrowedCGContext(DrawTarget *aDT)
|
||||
: mDT(aDT)
|
||||
{
|
||||
cg = BorrowCGContextFromDrawTarget(aDT);
|
||||
|
@ -17,7 +17,7 @@ class DataSourceSurfaceWrapper : public DataSourceSurface
|
||||
{
|
||||
public:
|
||||
MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(DataSourceSurfaceWrapper)
|
||||
DataSourceSurfaceWrapper(DataSourceSurface *aSurface)
|
||||
explicit DataSourceSurfaceWrapper(DataSourceSurface *aSurface)
|
||||
: mSurface(aSurface)
|
||||
{}
|
||||
|
||||
|
@ -26,7 +26,7 @@ class DrawEventRecorderPrivate : public DrawEventRecorder
|
||||
{
|
||||
public:
|
||||
MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(DrawEventRecorderPrivate)
|
||||
DrawEventRecorderPrivate(std::ostream *aStream);
|
||||
explicit DrawEventRecorderPrivate(std::ostream *aStream);
|
||||
virtual ~DrawEventRecorderPrivate() { }
|
||||
|
||||
void RecordEvent(const RecordedEvent &aEvent);
|
||||
@ -66,7 +66,7 @@ class DrawEventRecorderFile : public DrawEventRecorderPrivate
|
||||
{
|
||||
public:
|
||||
MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(DrawEventRecorderFile)
|
||||
DrawEventRecorderFile(const char *aFilename);
|
||||
explicit DrawEventRecorderFile(const char *aFilename);
|
||||
~DrawEventRecorderFile();
|
||||
|
||||
private:
|
||||
|
@ -14,7 +14,7 @@ namespace gfx {
|
||||
class AutoSaveTransform
|
||||
{
|
||||
public:
|
||||
AutoSaveTransform(DrawTarget *aTarget)
|
||||
explicit AutoSaveTransform(DrawTarget *aTarget)
|
||||
: mDrawTarget(aTarget),
|
||||
mOldTransform(aTarget->GetTransform())
|
||||
{
|
||||
|
@ -72,7 +72,7 @@ public:
|
||||
double aContentsScaleFactor = 1.0,
|
||||
bool aHasAlpha = true);
|
||||
|
||||
MacIOSurface(const void *aIOSurfacePtr, double aContentsScaleFactor = 1.0, bool aHasAlpha = true)
|
||||
explicit MacIOSurface(const void *aIOSurfacePtr, double aContentsScaleFactor = 1.0, bool aHasAlpha = true)
|
||||
: mIOSurfacePtr(aIOSurfacePtr), mContentsScaleFactor(aContentsScaleFactor), mHasAlpha(aHasAlpha) {}
|
||||
virtual ~MacIOSurface();
|
||||
IOSurfaceID GetIOSurfaceID();
|
||||
|
@ -25,7 +25,7 @@ public:
|
||||
mCGPath = aPath;
|
||||
}
|
||||
|
||||
PathBuilderCG(FillRule aFillRule)
|
||||
explicit PathBuilderCG(FillRule aFillRule)
|
||||
: mFillRule(aFillRule)
|
||||
{
|
||||
mCGPath = CGPathCreateMutable();
|
||||
|
@ -20,7 +20,7 @@ class PathBuilderCairo : public PathBuilder
|
||||
{
|
||||
public:
|
||||
MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(PathBuilderCairo)
|
||||
PathBuilderCairo(FillRule aFillRule);
|
||||
explicit PathBuilderCairo(FillRule aFillRule);
|
||||
|
||||
virtual void MoveTo(const Point &aPoint);
|
||||
virtual void LineTo(const Point &aPoint);
|
||||
@ -51,7 +51,7 @@ class PathCairo : public Path
|
||||
public:
|
||||
MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(PathCairo)
|
||||
PathCairo(FillRule aFillRule, std::vector<cairo_path_data_t> &aPathData, const Point &aCurrentPoint);
|
||||
PathCairo(cairo_t *aContext);
|
||||
explicit PathCairo(cairo_t *aContext);
|
||||
~PathCairo();
|
||||
|
||||
virtual BackendType GetBackendType() const { return BackendType::CAIRO; }
|
||||
|
@ -31,7 +31,7 @@ struct ReferencePtr
|
||||
: mLongPtr(0)
|
||||
{}
|
||||
|
||||
ReferencePtr(const void* aLongPtr)
|
||||
MOZ_IMPLICIT ReferencePtr(const void* aLongPtr)
|
||||
: mLongPtr(uint64_t(aLongPtr))
|
||||
{}
|
||||
|
||||
@ -203,7 +203,7 @@ public:
|
||||
protected:
|
||||
friend class DrawEventRecorderPrivate;
|
||||
|
||||
RecordedEvent(int32_t aType) : mType(aType)
|
||||
MOZ_IMPLICIT RecordedEvent(int32_t aType) : mType(aType)
|
||||
{}
|
||||
|
||||
int32_t mType;
|
||||
@ -255,12 +255,12 @@ public:
|
||||
private:
|
||||
friend class RecordedEvent;
|
||||
|
||||
RecordedDrawTargetCreation(std::istream &aStream);
|
||||
MOZ_IMPLICIT RecordedDrawTargetCreation(std::istream &aStream);
|
||||
};
|
||||
|
||||
class RecordedDrawTargetDestruction : public RecordedEvent {
|
||||
public:
|
||||
RecordedDrawTargetDestruction(ReferencePtr aRefPtr)
|
||||
MOZ_IMPLICIT RecordedDrawTargetDestruction(ReferencePtr aRefPtr)
|
||||
: RecordedEvent(DRAWTARGETDESTRUCTION), mRefPtr(aRefPtr)
|
||||
{}
|
||||
|
||||
@ -278,7 +278,7 @@ public:
|
||||
private:
|
||||
friend class RecordedEvent;
|
||||
|
||||
RecordedDrawTargetDestruction(std::istream &aStream);
|
||||
MOZ_IMPLICIT RecordedDrawTargetDestruction(std::istream &aStream);
|
||||
};
|
||||
|
||||
class RecordedFillRect : public RecordedDrawingEvent {
|
||||
@ -298,7 +298,7 @@ public:
|
||||
private:
|
||||
friend class RecordedEvent;
|
||||
|
||||
RecordedFillRect(std::istream &aStream);
|
||||
MOZ_IMPLICIT RecordedFillRect(std::istream &aStream);
|
||||
|
||||
Rect mRect;
|
||||
PatternStorage mPattern;
|
||||
@ -324,7 +324,7 @@ public:
|
||||
private:
|
||||
friend class RecordedEvent;
|
||||
|
||||
RecordedStrokeRect(std::istream &aStream);
|
||||
MOZ_IMPLICIT RecordedStrokeRect(std::istream &aStream);
|
||||
|
||||
Rect mRect;
|
||||
PatternStorage mPattern;
|
||||
@ -352,7 +352,7 @@ public:
|
||||
private:
|
||||
friend class RecordedEvent;
|
||||
|
||||
RecordedStrokeLine(std::istream &aStream);
|
||||
MOZ_IMPLICIT RecordedStrokeLine(std::istream &aStream);
|
||||
|
||||
Point mBegin;
|
||||
Point mEnd;
|
||||
@ -378,7 +378,7 @@ public:
|
||||
private:
|
||||
friend class RecordedEvent;
|
||||
|
||||
RecordedFill(std::istream &aStream);
|
||||
MOZ_IMPLICIT RecordedFill(std::istream &aStream);
|
||||
|
||||
ReferencePtr mPath;
|
||||
PatternStorage mPattern;
|
||||
@ -407,7 +407,7 @@ public:
|
||||
private:
|
||||
friend class RecordedEvent;
|
||||
|
||||
RecordedFillGlyphs(std::istream &aStream);
|
||||
MOZ_IMPLICIT RecordedFillGlyphs(std::istream &aStream);
|
||||
|
||||
ReferencePtr mScaledFont;
|
||||
PatternStorage mPattern;
|
||||
@ -434,7 +434,7 @@ public:
|
||||
private:
|
||||
friend class RecordedEvent;
|
||||
|
||||
RecordedMask(std::istream &aStream);
|
||||
MOZ_IMPLICIT RecordedMask(std::istream &aStream);
|
||||
|
||||
PatternStorage mSource;
|
||||
PatternStorage mMask;
|
||||
@ -460,7 +460,7 @@ public:
|
||||
private:
|
||||
friend class RecordedEvent;
|
||||
|
||||
RecordedStroke(std::istream &aStream);
|
||||
MOZ_IMPLICIT RecordedStroke(std::istream &aStream);
|
||||
|
||||
ReferencePtr mPath;
|
||||
PatternStorage mPattern;
|
||||
@ -484,7 +484,7 @@ public:
|
||||
private:
|
||||
friend class RecordedEvent;
|
||||
|
||||
RecordedClearRect(std::istream &aStream);
|
||||
MOZ_IMPLICIT RecordedClearRect(std::istream &aStream);
|
||||
|
||||
Rect mRect;
|
||||
};
|
||||
@ -507,7 +507,7 @@ public:
|
||||
private:
|
||||
friend class RecordedEvent;
|
||||
|
||||
RecordedCopySurface(std::istream &aStream);
|
||||
MOZ_IMPLICIT RecordedCopySurface(std::istream &aStream);
|
||||
|
||||
ReferencePtr mSourceSurface;
|
||||
IntRect mSourceRect;
|
||||
@ -530,7 +530,7 @@ public:
|
||||
private:
|
||||
friend class RecordedEvent;
|
||||
|
||||
RecordedPushClip(std::istream &aStream);
|
||||
MOZ_IMPLICIT RecordedPushClip(std::istream &aStream);
|
||||
|
||||
ReferencePtr mPath;
|
||||
};
|
||||
@ -551,14 +551,14 @@ public:
|
||||
private:
|
||||
friend class RecordedEvent;
|
||||
|
||||
RecordedPushClipRect(std::istream &aStream);
|
||||
MOZ_IMPLICIT RecordedPushClipRect(std::istream &aStream);
|
||||
|
||||
Rect mRect;
|
||||
};
|
||||
|
||||
class RecordedPopClip : public RecordedDrawingEvent {
|
||||
public:
|
||||
RecordedPopClip(DrawTarget *aDT)
|
||||
MOZ_IMPLICIT RecordedPopClip(DrawTarget *aDT)
|
||||
: RecordedDrawingEvent(POPCLIP, aDT)
|
||||
{}
|
||||
|
||||
@ -571,7 +571,7 @@ public:
|
||||
private:
|
||||
friend class RecordedEvent;
|
||||
|
||||
RecordedPopClip(std::istream &aStream);
|
||||
MOZ_IMPLICIT RecordedPopClip(std::istream &aStream);
|
||||
};
|
||||
|
||||
class RecordedSetTransform : public RecordedDrawingEvent {
|
||||
@ -590,7 +590,7 @@ public:
|
||||
private:
|
||||
friend class RecordedEvent;
|
||||
|
||||
RecordedSetTransform(std::istream &aStream);
|
||||
MOZ_IMPLICIT RecordedSetTransform(std::istream &aStream);
|
||||
|
||||
Matrix mTransform;
|
||||
};
|
||||
@ -614,7 +614,7 @@ public:
|
||||
private:
|
||||
friend class RecordedEvent;
|
||||
|
||||
RecordedDrawSurface(std::istream &aStream);
|
||||
MOZ_IMPLICIT RecordedDrawSurface(std::istream &aStream);
|
||||
|
||||
ReferencePtr mRefSource;
|
||||
Rect mDest;
|
||||
@ -642,7 +642,7 @@ public:
|
||||
private:
|
||||
friend class RecordedEvent;
|
||||
|
||||
RecordedDrawSurfaceWithShadow(std::istream &aStream);
|
||||
MOZ_IMPLICIT RecordedDrawSurfaceWithShadow(std::istream &aStream);
|
||||
|
||||
ReferencePtr mRefSource;
|
||||
Point mDest;
|
||||
@ -672,7 +672,7 @@ public:
|
||||
private:
|
||||
friend class RecordedEvent;
|
||||
|
||||
RecordedDrawFilter(std::istream &aStream);
|
||||
MOZ_IMPLICIT RecordedDrawFilter(std::istream &aStream);
|
||||
|
||||
ReferencePtr mNode;
|
||||
Rect mSourceRect;
|
||||
@ -682,7 +682,7 @@ private:
|
||||
|
||||
class RecordedPathCreation : public RecordedEvent {
|
||||
public:
|
||||
RecordedPathCreation(PathRecording *aPath);
|
||||
MOZ_IMPLICIT RecordedPathCreation(PathRecording *aPath);
|
||||
~RecordedPathCreation();
|
||||
|
||||
virtual void PlayEvent(Translator *aTranslator) const;
|
||||
@ -699,12 +699,12 @@ private:
|
||||
FillRule mFillRule;
|
||||
std::vector<PathOp> mPathOps;
|
||||
|
||||
RecordedPathCreation(std::istream &aStream);
|
||||
MOZ_IMPLICIT RecordedPathCreation(std::istream &aStream);
|
||||
};
|
||||
|
||||
class RecordedPathDestruction : public RecordedEvent {
|
||||
public:
|
||||
RecordedPathDestruction(PathRecording *aPath)
|
||||
MOZ_IMPLICIT RecordedPathDestruction(PathRecording *aPath)
|
||||
: RecordedEvent(PATHDESTRUCTION), mRefPtr(aPath)
|
||||
{
|
||||
}
|
||||
@ -721,7 +721,7 @@ private:
|
||||
|
||||
ReferencePtr mRefPtr;
|
||||
|
||||
RecordedPathDestruction(std::istream &aStream);
|
||||
MOZ_IMPLICIT RecordedPathDestruction(std::istream &aStream);
|
||||
};
|
||||
|
||||
class RecordedSourceSurfaceCreation : public RecordedEvent {
|
||||
@ -752,12 +752,12 @@ private:
|
||||
SurfaceFormat mFormat;
|
||||
bool mDataOwned;
|
||||
|
||||
RecordedSourceSurfaceCreation(std::istream &aStream);
|
||||
MOZ_IMPLICIT RecordedSourceSurfaceCreation(std::istream &aStream);
|
||||
};
|
||||
|
||||
class RecordedSourceSurfaceDestruction : public RecordedEvent {
|
||||
public:
|
||||
RecordedSourceSurfaceDestruction(ReferencePtr aRefPtr)
|
||||
MOZ_IMPLICIT RecordedSourceSurfaceDestruction(ReferencePtr aRefPtr)
|
||||
: RecordedEvent(SOURCESURFACEDESTRUCTION), mRefPtr(aRefPtr)
|
||||
{
|
||||
}
|
||||
@ -774,7 +774,7 @@ private:
|
||||
|
||||
ReferencePtr mRefPtr;
|
||||
|
||||
RecordedSourceSurfaceDestruction(std::istream &aStream);
|
||||
MOZ_IMPLICIT RecordedSourceSurfaceDestruction(std::istream &aStream);
|
||||
};
|
||||
|
||||
class RecordedFilterNodeCreation : public RecordedEvent {
|
||||
@ -799,12 +799,12 @@ private:
|
||||
ReferencePtr mRefPtr;
|
||||
FilterType mType;
|
||||
|
||||
RecordedFilterNodeCreation(std::istream &aStream);
|
||||
MOZ_IMPLICIT RecordedFilterNodeCreation(std::istream &aStream);
|
||||
};
|
||||
|
||||
class RecordedFilterNodeDestruction : public RecordedEvent {
|
||||
public:
|
||||
RecordedFilterNodeDestruction(ReferencePtr aRefPtr)
|
||||
MOZ_IMPLICIT RecordedFilterNodeDestruction(ReferencePtr aRefPtr)
|
||||
: RecordedEvent(FILTERNODEDESTRUCTION), mRefPtr(aRefPtr)
|
||||
{
|
||||
}
|
||||
@ -821,7 +821,7 @@ private:
|
||||
|
||||
ReferencePtr mRefPtr;
|
||||
|
||||
RecordedFilterNodeDestruction(std::istream &aStream);
|
||||
MOZ_IMPLICIT RecordedFilterNodeDestruction(std::istream &aStream);
|
||||
};
|
||||
|
||||
class RecordedGradientStopsCreation : public RecordedEvent {
|
||||
@ -851,12 +851,12 @@ private:
|
||||
ExtendMode mExtendMode;
|
||||
bool mDataOwned;
|
||||
|
||||
RecordedGradientStopsCreation(std::istream &aStream);
|
||||
MOZ_IMPLICIT RecordedGradientStopsCreation(std::istream &aStream);
|
||||
};
|
||||
|
||||
class RecordedGradientStopsDestruction : public RecordedEvent {
|
||||
public:
|
||||
RecordedGradientStopsDestruction(ReferencePtr aRefPtr)
|
||||
MOZ_IMPLICIT RecordedGradientStopsDestruction(ReferencePtr aRefPtr)
|
||||
: RecordedEvent(GRADIENTSTOPSDESTRUCTION), mRefPtr(aRefPtr)
|
||||
{
|
||||
}
|
||||
@ -873,7 +873,7 @@ private:
|
||||
|
||||
ReferencePtr mRefPtr;
|
||||
|
||||
RecordedGradientStopsDestruction(std::istream &aStream);
|
||||
MOZ_IMPLICIT RecordedGradientStopsDestruction(std::istream &aStream);
|
||||
};
|
||||
|
||||
class RecordedSnapshot : public RecordedEvent {
|
||||
@ -896,7 +896,7 @@ private:
|
||||
ReferencePtr mRefPtr;
|
||||
ReferencePtr mDT;
|
||||
|
||||
RecordedSnapshot(std::istream &aStream);
|
||||
MOZ_IMPLICIT RecordedSnapshot(std::istream &aStream);
|
||||
};
|
||||
|
||||
class RecordedScaledFontCreation : public RecordedEvent {
|
||||
@ -933,12 +933,12 @@ private:
|
||||
Float mGlyphSize;
|
||||
uint32_t mIndex;
|
||||
|
||||
RecordedScaledFontCreation(std::istream &aStream);
|
||||
MOZ_IMPLICIT RecordedScaledFontCreation(std::istream &aStream);
|
||||
};
|
||||
|
||||
class RecordedScaledFontDestruction : public RecordedEvent {
|
||||
public:
|
||||
RecordedScaledFontDestruction(ReferencePtr aRefPtr)
|
||||
MOZ_IMPLICIT RecordedScaledFontDestruction(ReferencePtr aRefPtr)
|
||||
: RecordedEvent(SCALEDFONTDESTRUCTION), mRefPtr(aRefPtr)
|
||||
{
|
||||
}
|
||||
@ -955,7 +955,7 @@ private:
|
||||
|
||||
ReferencePtr mRefPtr;
|
||||
|
||||
RecordedScaledFontDestruction(std::istream &aStream);
|
||||
MOZ_IMPLICIT RecordedScaledFontDestruction(std::istream &aStream);
|
||||
};
|
||||
|
||||
class RecordedMaskSurface : public RecordedDrawingEvent {
|
||||
@ -977,7 +977,7 @@ public:
|
||||
private:
|
||||
friend class RecordedEvent;
|
||||
|
||||
RecordedMaskSurface(std::istream &aStream);
|
||||
MOZ_IMPLICIT RecordedMaskSurface(std::istream &aStream);
|
||||
|
||||
PatternStorage mPattern;
|
||||
ReferencePtr mRefMask;
|
||||
@ -1036,7 +1036,7 @@ private:
|
||||
ArgType mArgType;
|
||||
std::vector<uint8_t> mPayload;
|
||||
|
||||
RecordedFilterNodeSetAttribute(std::istream &aStream);
|
||||
MOZ_IMPLICIT RecordedFilterNodeSetAttribute(std::istream &aStream);
|
||||
};
|
||||
|
||||
class RecordedFilterNodeSetInput : public RecordedEvent
|
||||
@ -1070,7 +1070,7 @@ private:
|
||||
ReferencePtr mInputFilter;
|
||||
ReferencePtr mInputSurface;
|
||||
|
||||
RecordedFilterNodeSetInput(std::istream &aStream);
|
||||
MOZ_IMPLICIT RecordedFilterNodeSetInput(std::istream &aStream);
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -55,7 +55,7 @@ namespace {
|
||||
|
||||
struct RandomNumberSource
|
||||
{
|
||||
RandomNumberSource(int32_t aSeed) : mLast(SetupSeed(aSeed)) {}
|
||||
explicit RandomNumberSource(int32_t aSeed) : mLast(SetupSeed(aSeed)) {}
|
||||
int32_t Next() { mLast = Random(mLast); return mLast; }
|
||||
|
||||
private:
|
||||
|
@ -29,7 +29,7 @@ class SourceSurfaceCG : public SourceSurface
|
||||
public:
|
||||
MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(SourceSurfaceCG)
|
||||
SourceSurfaceCG() {}
|
||||
SourceSurfaceCG(CGImageRef aImage) : mImage(aImage) {}
|
||||
explicit SourceSurfaceCG(CGImageRef aImage) : mImage(aImage) {}
|
||||
~SourceSurfaceCG();
|
||||
|
||||
virtual SurfaceType GetType() const { return SurfaceType::COREGRAPHICS_IMAGE; }
|
||||
@ -58,7 +58,7 @@ class DataSourceSurfaceCG : public DataSourceSurface
|
||||
public:
|
||||
MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(DataSourceSurfaceCG)
|
||||
DataSourceSurfaceCG() {}
|
||||
DataSourceSurfaceCG(CGImageRef aImage);
|
||||
explicit DataSourceSurfaceCG(CGImageRef aImage);
|
||||
~DataSourceSurfaceCG();
|
||||
|
||||
virtual SurfaceType GetType() const { return SurfaceType::DATA; }
|
||||
@ -100,7 +100,7 @@ class SourceSurfaceCGBitmapContext : public SourceSurfaceCGContext
|
||||
{
|
||||
public:
|
||||
MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(DataSourceSurfaceCGBitmapContext)
|
||||
SourceSurfaceCGBitmapContext(DrawTargetCG *);
|
||||
explicit SourceSurfaceCGBitmapContext(DrawTargetCG *);
|
||||
~SourceSurfaceCGBitmapContext();
|
||||
|
||||
virtual SurfaceType GetType() const { return SurfaceType::COREGRAPHICS_CGCONTEXT; }
|
||||
@ -156,7 +156,7 @@ class SourceSurfaceCGIOSurfaceContext : public SourceSurfaceCGContext
|
||||
{
|
||||
public:
|
||||
MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(DataSourceSurfaceCGIOSurfaceContext)
|
||||
SourceSurfaceCGIOSurfaceContext(DrawTargetCG *);
|
||||
explicit SourceSurfaceCGIOSurfaceContext(DrawTargetCG *);
|
||||
~SourceSurfaceCGIOSurfaceContext();
|
||||
|
||||
virtual SurfaceType GetType() const { return SurfaceType::COREGRAPHICS_CGCONTEXT; }
|
||||
|
@ -145,7 +145,7 @@ class GLBlitHelper MOZ_FINAL
|
||||
|
||||
public:
|
||||
|
||||
GLBlitHelper(GLContext* gl);
|
||||
explicit GLBlitHelper(GLContext* gl);
|
||||
~GLBlitHelper();
|
||||
|
||||
// If you don't have |srcFormats| for the 2nd definition,
|
||||
|
@ -31,7 +31,7 @@ class GLBlitTextureImageHelper MOZ_FINAL
|
||||
|
||||
public:
|
||||
|
||||
GLBlitTextureImageHelper(GLContext *gl);
|
||||
explicit GLBlitTextureImageHelper(GLContext *gl);
|
||||
~GLBlitTextureImageHelper();
|
||||
|
||||
/**
|
||||
|
@ -2567,9 +2567,9 @@ public:
|
||||
// -----------------------------------------------------------------------------
|
||||
// Constructor
|
||||
protected:
|
||||
GLContext(const SurfaceCaps& caps,
|
||||
GLContext* sharedContext = nullptr,
|
||||
bool isOffscreen = false);
|
||||
explicit GLContext(const SurfaceCaps& caps,
|
||||
GLContext* sharedContext = nullptr,
|
||||
bool isOffscreen = false);
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
@ -41,7 +41,7 @@ class GLReadTexImageHelper MOZ_FINAL
|
||||
|
||||
public:
|
||||
|
||||
GLReadTexImageHelper(GLContext* gl);
|
||||
explicit GLReadTexImageHelper(GLContext* gl);
|
||||
~GLReadTexImageHelper();
|
||||
|
||||
/**
|
||||
|
@ -21,7 +21,7 @@ enum SharedHandleType {
|
||||
class SharedTextureHandleWrapper
|
||||
{
|
||||
public:
|
||||
SharedTextureHandleWrapper(SharedHandleType aHandleType) : mHandleType(aHandleType)
|
||||
explicit SharedTextureHandleWrapper(SharedHandleType aHandleType) : mHandleType(aHandleType)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -23,7 +23,7 @@ private:
|
||||
protected:
|
||||
GLContext* const mGL;
|
||||
|
||||
ScopedGLWrapper(GLContext* gl)
|
||||
explicit ScopedGLWrapper(GLContext* gl)
|
||||
: mIsUnwrapped(false)
|
||||
, mGL(gl)
|
||||
{
|
||||
@ -115,7 +115,7 @@ protected:
|
||||
GLuint mTexture;
|
||||
|
||||
public:
|
||||
ScopedTexture(GLContext* aGL);
|
||||
explicit ScopedTexture(GLContext* aGL);
|
||||
GLuint Texture() { return mTexture; }
|
||||
|
||||
protected:
|
||||
@ -132,7 +132,7 @@ protected:
|
||||
GLuint mFB;
|
||||
|
||||
public:
|
||||
ScopedFramebuffer(GLContext* aGL);
|
||||
explicit ScopedFramebuffer(GLContext* aGL);
|
||||
GLuint FB() { return mFB; }
|
||||
|
||||
protected:
|
||||
@ -149,7 +149,7 @@ protected:
|
||||
GLuint mRB;
|
||||
|
||||
public:
|
||||
ScopedRenderbuffer(GLContext* aGL);
|
||||
explicit ScopedRenderbuffer(GLContext* aGL);
|
||||
GLuint RB() { return mRB; }
|
||||
|
||||
protected:
|
||||
@ -307,7 +307,7 @@ protected:
|
||||
};
|
||||
|
||||
struct ScopedGLDrawState {
|
||||
ScopedGLDrawState(GLContext* gl);
|
||||
explicit ScopedGLDrawState(GLContext* gl);
|
||||
~ScopedGLDrawState();
|
||||
|
||||
GLuint boundProgram;
|
||||
|
@ -136,7 +136,7 @@ protected:
|
||||
|
||||
public:
|
||||
MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(SurfaceStream_SingleBuffer)
|
||||
SurfaceStream_SingleBuffer(SurfaceStream* prevStream);
|
||||
explicit SurfaceStream_SingleBuffer(SurfaceStream* prevStream);
|
||||
virtual ~SurfaceStream_SingleBuffer();
|
||||
|
||||
/* Since we're non-OMTC, we know the order of execution here:
|
||||
@ -161,7 +161,7 @@ protected:
|
||||
|
||||
public:
|
||||
MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(SurfaceStream_TripleBuffer_Copy)
|
||||
SurfaceStream_TripleBuffer_Copy(SurfaceStream* prevStream);
|
||||
explicit SurfaceStream_TripleBuffer_Copy(SurfaceStream* prevStream);
|
||||
virtual ~SurfaceStream_TripleBuffer_Copy();
|
||||
|
||||
virtual SharedSurface* SwapProducer(SurfaceFactory* factory,
|
||||
@ -188,7 +188,7 @@ protected:
|
||||
|
||||
public:
|
||||
MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(SurfaceStream_TripleBuffer)
|
||||
SurfaceStream_TripleBuffer(SurfaceStream* prevStream);
|
||||
explicit SurfaceStream_TripleBuffer(SurfaceStream* prevStream);
|
||||
virtual ~SurfaceStream_TripleBuffer();
|
||||
virtual bool CopySurfaceToProducer(SharedSurface* src, SurfaceFactory* factory);
|
||||
|
||||
@ -213,7 +213,7 @@ protected:
|
||||
virtual void WaitForCompositor() MOZ_OVERRIDE;
|
||||
|
||||
public:
|
||||
SurfaceStream_TripleBuffer_Async(SurfaceStream* prevStream);
|
||||
explicit SurfaceStream_TripleBuffer_Async(SurfaceStream* prevStream);
|
||||
virtual ~SurfaceStream_TripleBuffer_Async();
|
||||
};
|
||||
|
||||
|
@ -31,7 +31,7 @@ private:
|
||||
std::stack<GLuint> mGarbageTextures;
|
||||
|
||||
public:
|
||||
TextureGarbageBin(GLContext* gl)
|
||||
explicit TextureGarbageBin(GLContext* gl)
|
||||
: mGL(gl)
|
||||
, mMutex("TextureGarbageBin mutex")
|
||||
{}
|
||||
|
@ -1630,7 +1630,7 @@ struct FilterAttribute {
|
||||
AttributeType Type() const { return mType; }
|
||||
|
||||
#define MAKE_CONSTRUCTOR_AND_ACCESSOR_BASIC(type, typeLabel) \
|
||||
FilterAttribute(type aValue) \
|
||||
explicit FilterAttribute(type aValue) \
|
||||
: mType(AttributeType::e##typeLabel), m##typeLabel(aValue) \
|
||||
{} \
|
||||
type As##typeLabel() { \
|
||||
@ -1639,7 +1639,7 @@ struct FilterAttribute {
|
||||
}
|
||||
|
||||
#define MAKE_CONSTRUCTOR_AND_ACCESSOR_CLASS(className) \
|
||||
FilterAttribute(const className& aValue) \
|
||||
explicit FilterAttribute(const className& aValue) \
|
||||
: mType(AttributeType::e##className), m##className(new className(aValue)) \
|
||||
{} \
|
||||
className As##className() { \
|
||||
|
@ -293,7 +293,7 @@ public:
|
||||
};
|
||||
|
||||
FilterPrimitiveDescription();
|
||||
FilterPrimitiveDescription(PrimitiveType aType);
|
||||
explicit FilterPrimitiveDescription(PrimitiveType aType);
|
||||
FilterPrimitiveDescription(const FilterPrimitiveDescription& aOther);
|
||||
FilterPrimitiveDescription& operator=(const FilterPrimitiveDescription& aOther);
|
||||
|
||||
@ -377,7 +377,7 @@ private:
|
||||
*/
|
||||
struct FilterDescription MOZ_FINAL {
|
||||
FilterDescription() {}
|
||||
FilterDescription(const nsTArray<FilterPrimitiveDescription>& aPrimitives)
|
||||
explicit FilterDescription(const nsTArray<FilterPrimitiveDescription>& aPrimitives)
|
||||
: mPrimitives(aPrimitives)
|
||||
{}
|
||||
|
||||
|
@ -24,7 +24,7 @@ namespace mozilla {
|
||||
class NS_GFX ScopedGfxFeatureReporter
|
||||
{
|
||||
public:
|
||||
ScopedGfxFeatureReporter(const char *aFeature, bool force = false)
|
||||
explicit ScopedGfxFeatureReporter(const char *aFeature, bool force = false)
|
||||
: mFeature(aFeature), mStatusChar('-')
|
||||
{
|
||||
WriteAppNote(force ? '!' : '?');
|
||||
|
@ -28,12 +28,6 @@ private:
|
||||
|
||||
public:
|
||||
nsTransform2D(void) { m20 = m21 = 0.0f; m00 = m11 = 1.0f; }
|
||||
nsTransform2D(nsTransform2D *aTransform2D) {
|
||||
m00 = aTransform2D->m00;
|
||||
m11 = aTransform2D->m11;
|
||||
m20 = aTransform2D->m20;
|
||||
m21 = aTransform2D->m21;
|
||||
}
|
||||
|
||||
~nsTransform2D(void) { }
|
||||
|
||||
|
@ -171,7 +171,7 @@ struct BlurCacheKey : public PLDHashEntryHdr {
|
||||
, mBackend(aBackend)
|
||||
{ }
|
||||
|
||||
BlurCacheKey(const BlurCacheKey* aOther)
|
||||
explicit BlurCacheKey(const BlurCacheKey* aOther)
|
||||
: mRect(aOther->mRect)
|
||||
, mBlurRadius(aOther->mBlurRadius)
|
||||
, mSkipRect(aOther->mSkipRect)
|
||||
|
@ -41,7 +41,7 @@ UserDataKey gfxContext::sDontUseAsSourceKey;
|
||||
class GeneralPattern
|
||||
{
|
||||
public:
|
||||
GeneralPattern(gfxContext *aContext) : mContext(aContext), mPattern(nullptr) {}
|
||||
explicit GeneralPattern(gfxContext *aContext) : mContext(aContext), mPattern(nullptr) {}
|
||||
~GeneralPattern() { if (mPattern) { mPattern->~Pattern(); } }
|
||||
|
||||
operator mozilla::gfx::Pattern&()
|
||||
|
@ -14,7 +14,7 @@ class gfxMacFont;
|
||||
|
||||
class gfxCoreTextShaper : public gfxFontShaper {
|
||||
public:
|
||||
gfxCoreTextShaper(gfxMacFont *aFont);
|
||||
explicit gfxCoreTextShaper(gfxMacFont *aFont);
|
||||
|
||||
virtual ~gfxCoreTextShaper();
|
||||
|
||||
|
@ -125,7 +125,7 @@ gfxPatternDrawable::~gfxPatternDrawable()
|
||||
|
||||
class DrawingCallbackFromDrawable : public gfxDrawingCallback {
|
||||
public:
|
||||
DrawingCallbackFromDrawable(gfxDrawable* aDrawable)
|
||||
explicit DrawingCallbackFromDrawable(gfxDrawable* aDrawable)
|
||||
: mDrawable(aDrawable) {
|
||||
NS_ASSERTION(aDrawable, "aDrawable is null!");
|
||||
}
|
||||
|
@ -24,7 +24,7 @@ class gfxPattern;
|
||||
class gfxDrawable {
|
||||
NS_INLINE_DECL_REFCOUNTING(gfxDrawable)
|
||||
public:
|
||||
gfxDrawable(const gfxIntSize aSize)
|
||||
explicit gfxDrawable(const gfxIntSize aSize)
|
||||
: mSize(aSize) {}
|
||||
|
||||
/**
|
||||
|
@ -555,7 +555,7 @@ gfxFontEntry::TryGetColorGlyphs()
|
||||
class gfxFontEntry::FontTableBlobData {
|
||||
public:
|
||||
// Adopts the content of aBuffer.
|
||||
FontTableBlobData(FallibleTArray<uint8_t>& aBuffer)
|
||||
explicit FontTableBlobData(FallibleTArray<uint8_t>& aBuffer)
|
||||
: mHashtable(nullptr), mHashKey(0)
|
||||
{
|
||||
MOZ_COUNT_CTOR(FontTableBlobData);
|
||||
@ -6132,7 +6132,7 @@ gfxFontGroup::UpdateFontList()
|
||||
}
|
||||
|
||||
struct PrefFontCallbackData {
|
||||
PrefFontCallbackData(nsTArray<nsRefPtr<gfxFontFamily> >& aFamiliesArray)
|
||||
explicit PrefFontCallbackData(nsTArray<nsRefPtr<gfxFontFamily> >& aFamiliesArray)
|
||||
: mPrefFamilies(aFamiliesArray)
|
||||
{}
|
||||
|
||||
@ -7009,7 +7009,7 @@ HasNonOpaqueColor(gfxContext *aContext, gfxRGBA& aCurrentColor)
|
||||
|
||||
// helper class for double-buffering drawing with non-opaque color
|
||||
struct BufferAlphaColor {
|
||||
BufferAlphaColor(gfxContext *aContext)
|
||||
explicit BufferAlphaColor(gfxContext *aContext)
|
||||
: mContext(aContext)
|
||||
{
|
||||
|
||||
|
@ -31,7 +31,7 @@ class FontInfoLoadCompleteEvent : public nsRunnable {
|
||||
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
|
||||
FontInfoLoadCompleteEvent(FontInfoData *aFontInfo) :
|
||||
explicit FontInfoLoadCompleteEvent(FontInfoData *aFontInfo) :
|
||||
mFontInfo(aFontInfo)
|
||||
{}
|
||||
|
||||
@ -45,7 +45,7 @@ class AsyncFontInfoLoader : public nsRunnable {
|
||||
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
|
||||
AsyncFontInfoLoader(FontInfoData *aFontInfo) :
|
||||
explicit AsyncFontInfoLoader(FontInfoData *aFontInfo) :
|
||||
mFontInfo(aFontInfo)
|
||||
{
|
||||
mCompleteEvent = new FontInfoLoadCompleteEvent(aFontInfo);
|
||||
|
@ -192,7 +192,7 @@ protected:
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSIOBSERVER
|
||||
|
||||
ShutdownObserver(gfxFontInfoLoader *aLoader)
|
||||
explicit ShutdownObserver(gfxFontInfoLoader *aLoader)
|
||||
: mLoader(aLoader)
|
||||
{ }
|
||||
|
||||
|
@ -29,7 +29,7 @@ struct GradientCacheKey : public PLDHashEntryHdr {
|
||||
: mStops(aStops), mExtend(aExtend), mBackendType(aBackendType)
|
||||
{ }
|
||||
|
||||
GradientCacheKey(const GradientCacheKey* aOther)
|
||||
explicit GradientCacheKey(const GradientCacheKey* aOther)
|
||||
: mStops(aOther->mStops), mExtend(aOther->mExtend), mBackendType(aOther->mBackendType)
|
||||
{ }
|
||||
|
||||
|
@ -14,7 +14,7 @@ struct gr_segment;
|
||||
|
||||
class gfxGraphiteShaper : public gfxFontShaper {
|
||||
public:
|
||||
gfxGraphiteShaper(gfxFont *aFont);
|
||||
explicit gfxGraphiteShaper(gfxFont *aFont);
|
||||
virtual ~gfxGraphiteShaper();
|
||||
|
||||
virtual bool ShapeText(gfxContext *aContext,
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
class gfxHarfBuzzShaper : public gfxFontShaper {
|
||||
public:
|
||||
gfxHarfBuzzShaper(gfxFont *aFont);
|
||||
explicit gfxHarfBuzzShaper(gfxFont *aFont);
|
||||
virtual ~gfxHarfBuzzShaper();
|
||||
|
||||
/*
|
||||
|
@ -69,7 +69,7 @@ public:
|
||||
gfxImageSurface(const gfxIntSize& aSize, gfxImageFormat aFormat,
|
||||
long aStride, int32_t aMinimalAllocation, bool aClear);
|
||||
|
||||
gfxImageSurface(cairo_surface_t *csurf);
|
||||
explicit gfxImageSurface(cairo_surface_t *csurf);
|
||||
|
||||
virtual ~gfxImageSurface();
|
||||
|
||||
|
@ -380,7 +380,7 @@ MacOSFontEntry::AddSizeOfIncludingThis(MallocSizeOf aMallocSizeOf,
|
||||
class gfxMacFontFamily : public gfxFontFamily
|
||||
{
|
||||
public:
|
||||
gfxMacFontFamily(nsAString& aName) :
|
||||
explicit gfxMacFontFamily(nsAString& aName) :
|
||||
gfxFontFamily(aName)
|
||||
{}
|
||||
|
||||
@ -543,7 +543,7 @@ gfxMacFontFamily::FindStyleVariations(FontInfoData *aFontInfoData)
|
||||
class gfxSingleFaceMacFontFamily : public gfxFontFamily
|
||||
{
|
||||
public:
|
||||
gfxSingleFaceMacFontFamily(nsAString& aName) :
|
||||
explicit gfxSingleFaceMacFontFamily(nsAString& aName) :
|
||||
gfxFontFamily(aName)
|
||||
{
|
||||
mFaceNamesInitialized = true; // omit from face name lists
|
||||
|
@ -29,7 +29,7 @@ public:
|
||||
* that are passed in, and will hb_blob_destroy() them when finished;
|
||||
* the caller should -not- destroy this reference.
|
||||
*/
|
||||
gfxMathTable(hb_blob_t* aMathTable);
|
||||
explicit gfxMathTable(hb_blob_t* aMathTable);
|
||||
|
||||
/**
|
||||
* Releases our reference to the MATH table and cleans up everything else.
|
||||
|
@ -511,7 +511,7 @@ gfxPlatformFontList::GetFontList(nsIAtom *aLangGroup,
|
||||
}
|
||||
|
||||
struct FontFamilyListData {
|
||||
FontFamilyListData(nsTArray<nsRefPtr<gfxFontFamily> >& aFamilyArray)
|
||||
explicit FontFamilyListData(nsTArray<nsRefPtr<gfxFontFamily> >& aFamilyArray)
|
||||
: mFamilyArray(aFamilyArray)
|
||||
{}
|
||||
|
||||
@ -968,7 +968,7 @@ gfxPlatformFontList::LoadFontInfo()
|
||||
}
|
||||
|
||||
struct LookupMissedFaceNamesData {
|
||||
LookupMissedFaceNamesData(gfxPlatformFontList *aFontList)
|
||||
explicit LookupMissedFaceNamesData(gfxPlatformFontList *aFontList)
|
||||
: mFontList(aFontList), mFoundName(false) {}
|
||||
|
||||
gfxPlatformFontList *mFontList;
|
||||
@ -990,7 +990,7 @@ gfxPlatformFontList::LookupMissedFaceNamesProc(nsStringHashKey *aKey,
|
||||
}
|
||||
|
||||
struct LookupMissedOtherNamesData {
|
||||
LookupMissedOtherNamesData(gfxPlatformFontList *aFontList)
|
||||
explicit LookupMissedOtherNamesData(gfxPlatformFontList *aFontList)
|
||||
: mFontList(aFontList), mFoundName(false) {}
|
||||
|
||||
gfxPlatformFontList *mFontList;
|
||||
|
@ -25,7 +25,7 @@ public:
|
||||
typedef gfxCharacterMap* KeyType;
|
||||
typedef const gfxCharacterMap* KeyTypePointer;
|
||||
|
||||
CharMapHashKey(const gfxCharacterMap *aCharMap) :
|
||||
explicit CharMapHashKey(const gfxCharacterMap *aCharMap) :
|
||||
mCharMap(const_cast<gfxCharacterMap*>(aCharMap))
|
||||
{
|
||||
MOZ_COUNT_CTOR(CharMapHashKey);
|
||||
@ -197,7 +197,7 @@ protected:
|
||||
NS_DECL_NSIMEMORYREPORTER
|
||||
};
|
||||
|
||||
gfxPlatformFontList(bool aNeedFullnamePostscriptNames = true);
|
||||
explicit gfxPlatformFontList(bool aNeedFullnamePostscriptNames = true);
|
||||
|
||||
static gfxPlatformFontList *sPlatformFontList;
|
||||
|
||||
|
@ -13,8 +13,8 @@ class gfxImageSurface;
|
||||
|
||||
class gfxQuartzImageSurface : public gfxASurface {
|
||||
public:
|
||||
gfxQuartzImageSurface(gfxImageSurface *imageSurface);
|
||||
gfxQuartzImageSurface(cairo_surface_t *csurf);
|
||||
explicit gfxQuartzImageSurface(gfxImageSurface *imageSurface);
|
||||
explicit gfxQuartzImageSurface(cairo_surface_t *csurf);
|
||||
|
||||
virtual ~gfxQuartzImageSurface();
|
||||
|
||||
|
@ -15,7 +15,7 @@ class gfxImageSurface;
|
||||
*/
|
||||
class gfxReusableImageSurfaceWrapper : public gfxReusableSurfaceWrapper {
|
||||
public:
|
||||
gfxReusableImageSurfaceWrapper(gfxImageSurface* aSurface);
|
||||
explicit gfxReusableImageSurfaceWrapper(gfxImageSurface* aSurface);
|
||||
protected:
|
||||
~gfxReusableImageSurfaceWrapper();
|
||||
|
||||
|
@ -23,7 +23,7 @@ template<class T> class nsRefPtr;
|
||||
*/
|
||||
class gfxTeeSurface : public gfxASurface {
|
||||
public:
|
||||
gfxTeeSurface(cairo_surface_t *csurf);
|
||||
explicit gfxTeeSurface(cairo_surface_t *csurf);
|
||||
gfxTeeSurface(gfxASurface **aSurfaces, int32_t aSurfaceCount);
|
||||
|
||||
virtual const gfxIntSize GetSize() const;
|
||||
|
@ -86,7 +86,7 @@ class gfxMixedFontFamily : public gfxFontFamily {
|
||||
public:
|
||||
friend class gfxUserFontSet;
|
||||
|
||||
gfxMixedFontFamily(const nsAString& aName)
|
||||
explicit gfxMixedFontFamily(const nsAString& aName)
|
||||
: gfxFontFamily(aName) { }
|
||||
|
||||
virtual ~gfxMixedFontFamily() { }
|
||||
@ -373,7 +373,7 @@ public:
|
||||
typedef const Key& KeyType;
|
||||
typedef const Key* KeyTypePointer;
|
||||
|
||||
Entry(KeyTypePointer aKey)
|
||||
explicit Entry(KeyTypePointer aKey)
|
||||
: mURI(aKey->mURI),
|
||||
mPrincipal(aKey->mPrincipal),
|
||||
mCRC32(aKey->mCRC32),
|
||||
|
Loading…
Reference in New Issue
Block a user