Bug 1540581 - P6. Tidy some C++ declarations in gfx/. r=gerald,jrmuizel
* Remove redundant virtual keywords
* Mark all destructors of inheriting classes as virtual for clarity
* Mark all classes without virtual destructor as final (exposed errors)
* Make destructor virtual where it needed to be (some were missing)
* Replace empty ({}) code declaration in header with = default
* Remove virtual unused methods
I probably missed some, it quickly became a rabbit hole.
Differential Revision: https://phabricator.services.mozilla.com/D26060
This commit is contained in:
36
gfx/2d/2D.h
36
gfx/2d/2D.h
@@ -194,7 +194,7 @@ struct DrawSurfaceOptions {
|
|||||||
class GradientStops : public external::AtomicRefCounted<GradientStops> {
|
class GradientStops : public external::AtomicRefCounted<GradientStops> {
|
||||||
public:
|
public:
|
||||||
MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(GradientStops)
|
MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(GradientStops)
|
||||||
virtual ~GradientStops() {}
|
virtual ~GradientStops() = default;
|
||||||
|
|
||||||
virtual BackendType GetBackendType() const = 0;
|
virtual BackendType GetBackendType() const = 0;
|
||||||
virtual bool IsValid() const { return true; }
|
virtual bool IsValid() const { return true; }
|
||||||
@@ -211,12 +211,12 @@ class GradientStops : public external::AtomicRefCounted<GradientStops> {
|
|||||||
*/
|
*/
|
||||||
class Pattern {
|
class Pattern {
|
||||||
public:
|
public:
|
||||||
virtual ~Pattern() {}
|
virtual ~Pattern() = default;
|
||||||
|
|
||||||
virtual PatternType GetType() const = 0;
|
virtual PatternType GetType() const = 0;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
Pattern() {}
|
Pattern() = default;
|
||||||
};
|
};
|
||||||
|
|
||||||
class ColorPattern : public Pattern {
|
class ColorPattern : public Pattern {
|
||||||
@@ -225,7 +225,7 @@ class ColorPattern : public Pattern {
|
|||||||
// creating a ColorPattern.
|
// creating a ColorPattern.
|
||||||
explicit ColorPattern(const Color &aColor) : mColor(aColor) {}
|
explicit ColorPattern(const Color &aColor) : mColor(aColor) {}
|
||||||
|
|
||||||
virtual PatternType GetType() const override { return PatternType::COLOR; }
|
PatternType GetType() const override { return PatternType::COLOR; }
|
||||||
|
|
||||||
Color mColor;
|
Color mColor;
|
||||||
};
|
};
|
||||||
@@ -242,9 +242,7 @@ class LinearGradientPattern : public Pattern {
|
|||||||
GradientStops *aStops, const Matrix &aMatrix = Matrix())
|
GradientStops *aStops, const Matrix &aMatrix = Matrix())
|
||||||
: mBegin(aBegin), mEnd(aEnd), mStops(aStops), mMatrix(aMatrix) {}
|
: mBegin(aBegin), mEnd(aEnd), mStops(aStops), mMatrix(aMatrix) {}
|
||||||
|
|
||||||
virtual PatternType GetType() const override {
|
PatternType GetType() const override { return PatternType::LINEAR_GRADIENT; }
|
||||||
return PatternType::LINEAR_GRADIENT;
|
|
||||||
}
|
|
||||||
|
|
||||||
Point mBegin; //!< Start of the linear gradient
|
Point mBegin; //!< Start of the linear gradient
|
||||||
Point mEnd; /**< End of the linear gradient - NOTE: In the case
|
Point mEnd; /**< End of the linear gradient - NOTE: In the case
|
||||||
@@ -276,9 +274,7 @@ class RadialGradientPattern : public Pattern {
|
|||||||
mStops(aStops),
|
mStops(aStops),
|
||||||
mMatrix(aMatrix) {}
|
mMatrix(aMatrix) {}
|
||||||
|
|
||||||
virtual PatternType GetType() const override {
|
PatternType GetType() const override { return PatternType::RADIAL_GRADIENT; }
|
||||||
return PatternType::RADIAL_GRADIENT;
|
|
||||||
}
|
|
||||||
|
|
||||||
Point mCenter1; //!< Center of the inner (focal) circle.
|
Point mCenter1; //!< Center of the inner (focal) circle.
|
||||||
Point mCenter2; //!< Center of the outer circle.
|
Point mCenter2; //!< Center of the outer circle.
|
||||||
@@ -308,7 +304,7 @@ class SurfacePattern : public Pattern {
|
|||||||
mMatrix(aMatrix),
|
mMatrix(aMatrix),
|
||||||
mSamplingRect(aSamplingRect) {}
|
mSamplingRect(aSamplingRect) {}
|
||||||
|
|
||||||
virtual PatternType GetType() const override { return PatternType::SURFACE; }
|
PatternType GetType() const override { return PatternType::SURFACE; }
|
||||||
|
|
||||||
RefPtr<SourceSurface> mSurface; //!< Surface to use for drawing
|
RefPtr<SourceSurface> mSurface; //!< Surface to use for drawing
|
||||||
ExtendMode mExtendMode; /**< This determines how the image is extended
|
ExtendMode mExtendMode; /**< This determines how the image is extended
|
||||||
@@ -338,7 +334,7 @@ class DrawTargetCaptureImpl;
|
|||||||
class SourceSurface : public external::AtomicRefCounted<SourceSurface> {
|
class SourceSurface : public external::AtomicRefCounted<SourceSurface> {
|
||||||
public:
|
public:
|
||||||
MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(SourceSurface)
|
MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(SourceSurface)
|
||||||
virtual ~SourceSurface() {}
|
virtual ~SourceSurface() = default;
|
||||||
|
|
||||||
virtual SurfaceType GetType() const = 0;
|
virtual SurfaceType GetType() const = 0;
|
||||||
virtual IntSize GetSize() const = 0;
|
virtual IntSize GetSize() const = 0;
|
||||||
@@ -429,7 +425,7 @@ class DataSourceSurface : public SourceSurface {
|
|||||||
*/
|
*/
|
||||||
class ScopedMap final {
|
class ScopedMap final {
|
||||||
public:
|
public:
|
||||||
explicit ScopedMap(DataSourceSurface *aSurface, MapType aType)
|
ScopedMap(DataSourceSurface *aSurface, MapType aType)
|
||||||
: mSurface(aSurface), mIsMapped(aSurface->Map(aType, &mMap)) {}
|
: mSurface(aSurface), mIsMapped(aSurface->Map(aType, &mMap)) {}
|
||||||
|
|
||||||
ScopedMap(ScopedMap &&aOther)
|
ScopedMap(ScopedMap &&aOther)
|
||||||
@@ -484,7 +480,7 @@ class DataSourceSurface : public SourceSurface {
|
|||||||
bool mIsMapped;
|
bool mIsMapped;
|
||||||
};
|
};
|
||||||
|
|
||||||
virtual SurfaceType GetType() const override { return SurfaceType::DATA; }
|
SurfaceType GetType() const override { return SurfaceType::DATA; }
|
||||||
/** @deprecated
|
/** @deprecated
|
||||||
* Get the raw bitmap data of the surface.
|
* Get the raw bitmap data of the surface.
|
||||||
* Can return null if there was OOM allocating surface data.
|
* Can return null if there was OOM allocating surface data.
|
||||||
@@ -535,7 +531,7 @@ class DataSourceSurface : public SourceSurface {
|
|||||||
* The returning surface might be null, because of OOM or gfx device reset.
|
* The returning surface might be null, because of OOM or gfx device reset.
|
||||||
* The caller needs to do null-check before using it.
|
* The caller needs to do null-check before using it.
|
||||||
*/
|
*/
|
||||||
virtual already_AddRefed<DataSourceSurface> GetDataSurface() override;
|
already_AddRefed<DataSourceSurface> GetDataSurface() override;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add the size of the underlying data buffer to the aggregate.
|
* Add the size of the underlying data buffer to the aggregate.
|
||||||
@@ -570,7 +566,7 @@ class DataSourceSurface : public SourceSurface {
|
|||||||
class PathSink : public RefCounted<PathSink> {
|
class PathSink : public RefCounted<PathSink> {
|
||||||
public:
|
public:
|
||||||
MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(PathSink)
|
MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(PathSink)
|
||||||
virtual ~PathSink() {}
|
virtual ~PathSink() = default;
|
||||||
|
|
||||||
/** Move the current point in the path, any figure currently being drawn will
|
/** Move the current point in the path, any figure currently being drawn will
|
||||||
* be considered closed during fill operations, however when stroking the
|
* be considered closed during fill operations, however when stroking the
|
||||||
@@ -894,7 +890,7 @@ class NativeFontResource
|
|||||||
uint32_t aIndex, const uint8_t *aInstanceData,
|
uint32_t aIndex, const uint8_t *aInstanceData,
|
||||||
uint32_t aInstanceDataLength) = 0;
|
uint32_t aInstanceDataLength) = 0;
|
||||||
|
|
||||||
virtual ~NativeFontResource() {}
|
virtual ~NativeFontResource() = default;
|
||||||
};
|
};
|
||||||
|
|
||||||
class DrawTargetCapture;
|
class DrawTargetCapture;
|
||||||
@@ -911,7 +907,7 @@ class DrawTarget : public external::AtomicRefCounted<DrawTarget> {
|
|||||||
: mTransformDirty(false),
|
: mTransformDirty(false),
|
||||||
mPermitSubpixelAA(false),
|
mPermitSubpixelAA(false),
|
||||||
mFormat(SurfaceFormat::UNKNOWN) {}
|
mFormat(SurfaceFormat::UNKNOWN) {}
|
||||||
virtual ~DrawTarget() {}
|
virtual ~DrawTarget() = default;
|
||||||
|
|
||||||
virtual bool IsValid() const { return true; };
|
virtual bool IsValid() const { return true; };
|
||||||
virtual DrawTargetType GetType() const = 0;
|
virtual DrawTargetType GetType() const = 0;
|
||||||
@@ -1519,7 +1515,7 @@ class DrawTarget : public external::AtomicRefCounted<DrawTarget> {
|
|||||||
|
|
||||||
class DrawTargetCapture : public DrawTarget {
|
class DrawTargetCapture : public DrawTarget {
|
||||||
public:
|
public:
|
||||||
virtual bool IsCaptureDT() const override { return true; }
|
bool IsCaptureDT() const override { return true; }
|
||||||
|
|
||||||
virtual bool IsEmpty() const = 0;
|
virtual bool IsEmpty() const = 0;
|
||||||
virtual void Dump() = 0;
|
virtual void Dump() = 0;
|
||||||
@@ -1530,7 +1526,7 @@ class DrawEventRecorder : public RefCounted<DrawEventRecorder> {
|
|||||||
MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(DrawEventRecorder)
|
MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(DrawEventRecorder)
|
||||||
// returns true if there were any items in the recording
|
// returns true if there were any items in the recording
|
||||||
virtual bool Finish() = 0;
|
virtual bool Finish() = 0;
|
||||||
virtual ~DrawEventRecorder() {}
|
virtual ~DrawEventRecorder() = default;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Tile {
|
struct Tile {
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ namespace gfx {
|
|||||||
* A spread N makes each output pixel the maximum value of all source
|
* A spread N makes each output pixel the maximum value of all source
|
||||||
* pixels within a square of side length 2N+1 centered on the output pixel.
|
* pixels within a square of side length 2N+1 centered on the output pixel.
|
||||||
*/
|
*/
|
||||||
class GFX2D_API AlphaBoxBlur {
|
class GFX2D_API AlphaBoxBlur final {
|
||||||
public:
|
public:
|
||||||
/** Constructs a box blur and computes the backing surface size.
|
/** Constructs a box blur and computes the backing surface size.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ class SkConvolutionFilter1D;
|
|||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
namespace gfx {
|
namespace gfx {
|
||||||
|
|
||||||
class ConvolutionFilter {
|
class ConvolutionFilter final {
|
||||||
public:
|
public:
|
||||||
ConvolutionFilter();
|
ConvolutionFilter();
|
||||||
~ConvolutionFilter();
|
~ConvolutionFilter();
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ class CriticalSection {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/// RAII helper.
|
/// RAII helper.
|
||||||
struct CriticalSectionAutoEnter {
|
struct CriticalSectionAutoEnter final {
|
||||||
explicit CriticalSectionAutoEnter(CriticalSection* aSection)
|
explicit CriticalSectionAutoEnter(CriticalSection* aSection)
|
||||||
: mSection(aSection) {
|
: mSection(aSection) {
|
||||||
mSection->Enter();
|
mSection->Enter();
|
||||||
|
|||||||
@@ -25,15 +25,13 @@ class DataSourceSurfaceWrapper final : public DataSourceSurface {
|
|||||||
mSurface->Equals(aOther, aSymmetric);
|
mSurface->Equals(aOther, aSymmetric);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual SurfaceType GetType() const override { return SurfaceType::DATA; }
|
SurfaceType GetType() const override { return SurfaceType::DATA; }
|
||||||
|
|
||||||
virtual uint8_t *GetData() override { return mSurface->GetData(); }
|
uint8_t *GetData() override { return mSurface->GetData(); }
|
||||||
virtual int32_t Stride() override { return mSurface->Stride(); }
|
int32_t Stride() override { return mSurface->Stride(); }
|
||||||
virtual IntSize GetSize() const override { return mSurface->GetSize(); }
|
IntSize GetSize() const override { return mSurface->GetSize(); }
|
||||||
virtual SurfaceFormat GetFormat() const override {
|
SurfaceFormat GetFormat() const override { return mSurface->GetFormat(); }
|
||||||
return mSurface->GetFormat();
|
bool IsValid() const override { return mSurface->IsValid(); }
|
||||||
}
|
|
||||||
virtual bool IsValid() const override { return mSurface->IsValid(); }
|
|
||||||
|
|
||||||
bool Map(MapType aType, MappedSurface *aMappedSurface) override {
|
bool Map(MapType aType, MappedSurface *aMappedSurface) override {
|
||||||
return mSurface->Map(aType, aMappedSurface);
|
return mSurface->Map(aType, aMappedSurface);
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ enum class CommandType : int8_t {
|
|||||||
|
|
||||||
class DrawingCommand {
|
class DrawingCommand {
|
||||||
public:
|
public:
|
||||||
virtual ~DrawingCommand() {}
|
virtual ~DrawingCommand() = default;
|
||||||
|
|
||||||
virtual CommandType GetType() const = 0;
|
virtual CommandType GetType() const = 0;
|
||||||
virtual void ExecuteOnDT(DrawTarget* aDT,
|
virtual void ExecuteOnDT(DrawTarget* aDT,
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ class StrokeOptionsCommand : public DrawingCommand {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual ~StrokeOptionsCommand() {}
|
virtual ~StrokeOptionsCommand() = default;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
StrokeOptions mStrokeOptions;
|
StrokeOptions mStrokeOptions;
|
||||||
@@ -867,8 +867,7 @@ class SetTransformCommand : public DrawingCommand {
|
|||||||
CLONE_INTO(SetTransformCommand)(mTransform);
|
CLONE_INTO(SetTransformCommand)(mTransform);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void ExecuteOnDT(DrawTarget* aDT,
|
void ExecuteOnDT(DrawTarget* aDT, const Matrix* aMatrix) const override {
|
||||||
const Matrix* aMatrix) const override {
|
|
||||||
if (aMatrix) {
|
if (aMatrix) {
|
||||||
aDT->SetTransform(mTransform * (*aMatrix));
|
aDT->SetTransform(mTransform * (*aMatrix));
|
||||||
} else {
|
} else {
|
||||||
@@ -902,8 +901,7 @@ class SetPermitSubpixelAACommand : public DrawingCommand {
|
|||||||
CLONE_INTO(SetPermitSubpixelAACommand)(mPermitSubpixelAA);
|
CLONE_INTO(SetPermitSubpixelAACommand)(mPermitSubpixelAA);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void ExecuteOnDT(DrawTarget* aDT,
|
void ExecuteOnDT(DrawTarget* aDT, const Matrix* aMatrix) const override {
|
||||||
const Matrix* aMatrix) const override {
|
|
||||||
aDT->SetPermitSubpixelAA(mPermitSubpixelAA);
|
aDT->SetPermitSubpixelAA(mPermitSubpixelAA);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -921,7 +919,7 @@ class SetPermitSubpixelAACommand : public DrawingCommand {
|
|||||||
|
|
||||||
class FlushCommand : public DrawingCommand {
|
class FlushCommand : public DrawingCommand {
|
||||||
public:
|
public:
|
||||||
explicit FlushCommand() {}
|
FlushCommand() = default;
|
||||||
|
|
||||||
CommandType GetType() const override { return FlushCommand::Type; }
|
CommandType GetType() const override { return FlushCommand::Type; }
|
||||||
|
|
||||||
|
|||||||
@@ -29,8 +29,8 @@ class DrawEventRecorderPrivate : public DrawEventRecorder {
|
|||||||
MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(DrawEventRecorderPrivate, override)
|
MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(DrawEventRecorderPrivate, override)
|
||||||
|
|
||||||
DrawEventRecorderPrivate();
|
DrawEventRecorderPrivate();
|
||||||
virtual ~DrawEventRecorderPrivate() {}
|
virtual ~DrawEventRecorderPrivate() = default;
|
||||||
virtual bool Finish() override {
|
bool Finish() override {
|
||||||
ClearResources();
|
ClearResources();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -136,7 +136,7 @@ class DrawEventRecorderFile : public DrawEventRecorderPrivate {
|
|||||||
public:
|
public:
|
||||||
MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(DrawEventRecorderFile, override)
|
MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(DrawEventRecorderFile, override)
|
||||||
explicit DrawEventRecorderFile(const char_type* aFilename);
|
explicit DrawEventRecorderFile(const char_type* aFilename);
|
||||||
~DrawEventRecorderFile();
|
virtual ~DrawEventRecorderFile();
|
||||||
|
|
||||||
void RecordEvent(const RecordedEvent& aEvent) override;
|
void RecordEvent(const RecordedEvent& aEvent) override;
|
||||||
|
|
||||||
@@ -211,7 +211,7 @@ class DrawEventRecorderMemory : public DrawEventRecorderPrivate {
|
|||||||
MemStream mIndex;
|
MemStream mIndex;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
~DrawEventRecorderMemory(){};
|
virtual ~DrawEventRecorderMemory(){};
|
||||||
|
|
||||||
private:
|
private:
|
||||||
SerializeResourcesFn mSerializeCallback;
|
SerializeResourcesFn mSerializeCallback;
|
||||||
|
|||||||
@@ -387,7 +387,7 @@ static cairo_surface_t* GetCairoSurfaceForSourceSurface(
|
|||||||
// An RAII class to temporarily clear any device offset set
|
// An RAII class to temporarily clear any device offset set
|
||||||
// on a surface. Note that this does not take a reference to the
|
// on a surface. Note that this does not take a reference to the
|
||||||
// surface.
|
// surface.
|
||||||
class AutoClearDeviceOffset {
|
class AutoClearDeviceOffset final {
|
||||||
public:
|
public:
|
||||||
explicit AutoClearDeviceOffset(SourceSurface* aSurface)
|
explicit AutoClearDeviceOffset(SourceSurface* aSurface)
|
||||||
: mSurface(nullptr), mX(0), mY(0) {
|
: mSurface(nullptr), mX(0), mY(0) {
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ class GradientStopsCairo : public GradientStops {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual ~GradientStopsCairo() {}
|
virtual ~GradientStopsCairo() = default;
|
||||||
|
|
||||||
const std::vector<GradientStop> &GetStops() const { return mStops; }
|
const std::vector<GradientStop> &GetStops() const { return mStops; }
|
||||||
|
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ class DrawingCommand;
|
|||||||
class SourceSurfaceCapture;
|
class SourceSurfaceCapture;
|
||||||
class AlphaBoxBlur;
|
class AlphaBoxBlur;
|
||||||
|
|
||||||
class DrawTargetCaptureImpl : public DrawTargetCapture {
|
class DrawTargetCaptureImpl final : public DrawTargetCapture {
|
||||||
friend class SourceSurfaceCapture;
|
friend class SourceSurfaceCapture;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@@ -30,108 +30,104 @@ class DrawTargetCaptureImpl : public DrawTargetCapture {
|
|||||||
bool Init(const IntSize &aSize, DrawTarget *aRefDT);
|
bool Init(const IntSize &aSize, DrawTarget *aRefDT);
|
||||||
void InitForData(int32_t aStride, size_t aSurfaceAllocationSize);
|
void InitForData(int32_t aStride, size_t aSurfaceAllocationSize);
|
||||||
|
|
||||||
virtual BackendType GetBackendType() const override {
|
BackendType GetBackendType() const override {
|
||||||
return mRefDT->GetBackendType();
|
return mRefDT->GetBackendType();
|
||||||
}
|
}
|
||||||
virtual DrawTargetType GetType() const override { return mRefDT->GetType(); }
|
DrawTargetType GetType() const override { return mRefDT->GetType(); }
|
||||||
virtual bool IsCaptureDT() const override { return true; }
|
bool IsCaptureDT() const override { return true; }
|
||||||
virtual already_AddRefed<SourceSurface> Snapshot() override;
|
already_AddRefed<SourceSurface> Snapshot() override;
|
||||||
virtual already_AddRefed<SourceSurface> IntoLuminanceSource(
|
already_AddRefed<SourceSurface> IntoLuminanceSource(
|
||||||
LuminanceType aLuminanceType, float aOpacity) override;
|
LuminanceType aLuminanceType, float aOpacity) override;
|
||||||
virtual void SetPermitSubpixelAA(bool aPermitSubpixelAA) override;
|
void SetPermitSubpixelAA(bool aPermitSubpixelAA) override;
|
||||||
virtual void DetachAllSnapshots() override;
|
void DetachAllSnapshots() override;
|
||||||
virtual IntSize GetSize() const override { return mSize; }
|
IntSize GetSize() const override { return mSize; }
|
||||||
virtual void Flush() override {}
|
void Flush() override {}
|
||||||
virtual void DrawSurface(SourceSurface *aSurface, const Rect &aDest,
|
void DrawSurface(SourceSurface *aSurface, const Rect &aDest,
|
||||||
const Rect &aSource,
|
const Rect &aSource, const DrawSurfaceOptions &aSurfOptions,
|
||||||
const DrawSurfaceOptions &aSurfOptions,
|
|
||||||
const DrawOptions &aOptions) override;
|
const DrawOptions &aOptions) override;
|
||||||
virtual void DrawFilter(FilterNode *aNode, const Rect &aSourceRect,
|
void DrawFilter(FilterNode *aNode, const Rect &aSourceRect,
|
||||||
const Point &aDestPoint,
|
const Point &aDestPoint,
|
||||||
const DrawOptions &aOptions = DrawOptions()) override;
|
const DrawOptions &aOptions = DrawOptions()) override;
|
||||||
virtual void DrawSurfaceWithShadow(SourceSurface *aSurface,
|
void DrawSurfaceWithShadow(SourceSurface *aSurface, const Point &aDest,
|
||||||
const Point &aDest, const Color &aColor,
|
const Color &aColor, const Point &aOffset,
|
||||||
const Point &aOffset, Float aSigma,
|
Float aSigma, CompositionOp aOperator) override;
|
||||||
CompositionOp aOperator) override;
|
|
||||||
|
|
||||||
virtual void ClearRect(const Rect &aRect) override;
|
void ClearRect(const Rect &aRect) override;
|
||||||
virtual void MaskSurface(
|
void MaskSurface(const Pattern &aSource, SourceSurface *aMask, Point aOffset,
|
||||||
const Pattern &aSource, SourceSurface *aMask, Point aOffset,
|
|
||||||
const DrawOptions &aOptions = DrawOptions()) override;
|
const DrawOptions &aOptions = DrawOptions()) override;
|
||||||
virtual void CopySurface(SourceSurface *aSurface, const IntRect &aSourceRect,
|
void CopySurface(SourceSurface *aSurface, const IntRect &aSourceRect,
|
||||||
const IntPoint &aDestination) override;
|
const IntPoint &aDestination) override;
|
||||||
virtual void CopyRect(const IntRect &aSourceRect,
|
void CopyRect(const IntRect &aSourceRect,
|
||||||
const IntPoint &aDestination) override;
|
const IntPoint &aDestination) override;
|
||||||
|
|
||||||
virtual void FillRect(const Rect &aRect, const Pattern &aPattern,
|
void FillRect(const Rect &aRect, const Pattern &aPattern,
|
||||||
const DrawOptions &aOptions = DrawOptions()) override;
|
const DrawOptions &aOptions = DrawOptions()) override;
|
||||||
virtual void FillRoundedRect(
|
void FillRoundedRect(const RoundedRect &aRect, const Pattern &aPattern,
|
||||||
const RoundedRect &aRect, const Pattern &aPattern,
|
|
||||||
const DrawOptions &aOptions = DrawOptions()) override;
|
const DrawOptions &aOptions = DrawOptions()) override;
|
||||||
virtual void StrokeRect(const Rect &aRect, const Pattern &aPattern,
|
void StrokeRect(const Rect &aRect, const Pattern &aPattern,
|
||||||
const StrokeOptions &aStrokeOptions = StrokeOptions(),
|
const StrokeOptions &aStrokeOptions = StrokeOptions(),
|
||||||
const DrawOptions &aOptions = DrawOptions()) override;
|
const DrawOptions &aOptions = DrawOptions()) override;
|
||||||
virtual void StrokeLine(const Point &aStart, const Point &aEnd,
|
void StrokeLine(const Point &aStart, const Point &aEnd,
|
||||||
const Pattern &aPattern,
|
const Pattern &aPattern,
|
||||||
const StrokeOptions &aStrokeOptions = StrokeOptions(),
|
const StrokeOptions &aStrokeOptions = StrokeOptions(),
|
||||||
const DrawOptions &aOptions = DrawOptions()) override;
|
const DrawOptions &aOptions = DrawOptions()) override;
|
||||||
virtual void Stroke(const Path *aPath, const Pattern &aPattern,
|
void Stroke(const Path *aPath, const Pattern &aPattern,
|
||||||
const StrokeOptions &aStrokeOptions = StrokeOptions(),
|
const StrokeOptions &aStrokeOptions = StrokeOptions(),
|
||||||
const DrawOptions &aOptions = DrawOptions()) override;
|
const DrawOptions &aOptions = DrawOptions()) override;
|
||||||
virtual void Fill(const Path *aPath, const Pattern &aPattern,
|
void Fill(const Path *aPath, const Pattern &aPattern,
|
||||||
const DrawOptions &aOptions = DrawOptions()) override;
|
const DrawOptions &aOptions = DrawOptions()) override;
|
||||||
virtual void FillGlyphs(ScaledFont *aFont, const GlyphBuffer &aBuffer,
|
void FillGlyphs(ScaledFont *aFont, const GlyphBuffer &aBuffer,
|
||||||
const Pattern &aPattern,
|
const Pattern &aPattern,
|
||||||
const DrawOptions &aOptions = DrawOptions()) override;
|
const DrawOptions &aOptions = DrawOptions()) override;
|
||||||
virtual void StrokeGlyphs(
|
void StrokeGlyphs(ScaledFont *aFont, const GlyphBuffer &aBuffer,
|
||||||
ScaledFont *aFont, const GlyphBuffer &aBuffer, const Pattern &aPattern,
|
const Pattern &aPattern,
|
||||||
const StrokeOptions &aStrokeOptions = StrokeOptions(),
|
const StrokeOptions &aStrokeOptions = StrokeOptions(),
|
||||||
const DrawOptions &aOptions = DrawOptions()) override;
|
const DrawOptions &aOptions = DrawOptions()) override;
|
||||||
virtual void Mask(const Pattern &aSource, const Pattern &aMask,
|
void Mask(const Pattern &aSource, const Pattern &aMask,
|
||||||
const DrawOptions &aOptions = DrawOptions()) override;
|
const DrawOptions &aOptions = DrawOptions()) override;
|
||||||
virtual void PushClip(const Path *aPath) override;
|
void PushClip(const Path *aPath) override;
|
||||||
virtual void PushClipRect(const Rect &aRect) override;
|
void PushClipRect(const Rect &aRect) override;
|
||||||
virtual void PopClip() override;
|
void PopClip() override;
|
||||||
virtual void PushLayer(bool aOpaque, Float aOpacity, SourceSurface *aMask,
|
void PushLayer(bool aOpaque, Float aOpacity, SourceSurface *aMask,
|
||||||
const Matrix &aMaskTransform, const IntRect &aBounds,
|
const Matrix &aMaskTransform, const IntRect &aBounds,
|
||||||
bool aCopyBackground) override;
|
bool aCopyBackground) override;
|
||||||
virtual void PopLayer() override;
|
void PopLayer() override;
|
||||||
virtual void Blur(const AlphaBoxBlur &aBlur) override;
|
void Blur(const AlphaBoxBlur &aBlur) override;
|
||||||
virtual void PadEdges(const IntRegion &aRegion) override;
|
void PadEdges(const IntRegion &aRegion) override;
|
||||||
|
|
||||||
virtual void SetTransform(const Matrix &aTransform) override;
|
void SetTransform(const Matrix &aTransform) override;
|
||||||
|
|
||||||
virtual bool SupportsRegionClipping() const override {
|
bool SupportsRegionClipping() const override {
|
||||||
return mRefDT->SupportsRegionClipping();
|
return mRefDT->SupportsRegionClipping();
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual already_AddRefed<SourceSurface> CreateSourceSurfaceFromData(
|
already_AddRefed<SourceSurface> CreateSourceSurfaceFromData(
|
||||||
unsigned char *aData, const IntSize &aSize, int32_t aStride,
|
unsigned char *aData, const IntSize &aSize, int32_t aStride,
|
||||||
SurfaceFormat aFormat) const override {
|
SurfaceFormat aFormat) const override {
|
||||||
return mRefDT->CreateSourceSurfaceFromData(aData, aSize, aStride, aFormat);
|
return mRefDT->CreateSourceSurfaceFromData(aData, aSize, aStride, aFormat);
|
||||||
}
|
}
|
||||||
virtual already_AddRefed<SourceSurface> OptimizeSourceSurface(
|
already_AddRefed<SourceSurface> OptimizeSourceSurface(
|
||||||
SourceSurface *aSurface) const override;
|
SourceSurface *aSurface) const override;
|
||||||
|
|
||||||
virtual already_AddRefed<SourceSurface> CreateSourceSurfaceFromNativeSurface(
|
already_AddRefed<SourceSurface> CreateSourceSurfaceFromNativeSurface(
|
||||||
const NativeSurface &aSurface) const override {
|
const NativeSurface &aSurface) const override {
|
||||||
return mRefDT->CreateSourceSurfaceFromNativeSurface(aSurface);
|
return mRefDT->CreateSourceSurfaceFromNativeSurface(aSurface);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual already_AddRefed<DrawTarget> CreateSimilarDrawTarget(
|
already_AddRefed<DrawTarget> CreateSimilarDrawTarget(
|
||||||
const IntSize &aSize, SurfaceFormat aFormat) const override;
|
const IntSize &aSize, SurfaceFormat aFormat) const override;
|
||||||
virtual RefPtr<DrawTarget> CreateSimilarRasterTarget(
|
RefPtr<DrawTarget> CreateSimilarRasterTarget(
|
||||||
const IntSize &aSize, SurfaceFormat aFormat) const override;
|
const IntSize &aSize, SurfaceFormat aFormat) const override;
|
||||||
|
|
||||||
virtual already_AddRefed<PathBuilder> CreatePathBuilder(
|
already_AddRefed<PathBuilder> CreatePathBuilder(
|
||||||
FillRule aFillRule = FillRule::FILL_WINDING) const override;
|
FillRule aFillRule = FillRule::FILL_WINDING) const override;
|
||||||
|
|
||||||
virtual already_AddRefed<GradientStops> CreateGradientStops(
|
already_AddRefed<GradientStops> CreateGradientStops(
|
||||||
GradientStop *aStops, uint32_t aNumStops,
|
GradientStop *aStops, uint32_t aNumStops,
|
||||||
ExtendMode aExtendMode = ExtendMode::CLAMP) const override {
|
ExtendMode aExtendMode = ExtendMode::CLAMP) const override {
|
||||||
return mRefDT->CreateGradientStops(aStops, aNumStops, aExtendMode);
|
return mRefDT->CreateGradientStops(aStops, aNumStops, aExtendMode);
|
||||||
}
|
}
|
||||||
virtual already_AddRefed<FilterNode> CreateFilter(FilterType aType) override;
|
already_AddRefed<FilterNode> CreateFilter(FilterType aType) override;
|
||||||
|
|
||||||
void ReplayToDrawTarget(DrawTarget *aDT, const Matrix &aTransform);
|
void ReplayToDrawTarget(DrawTarget *aDT, const Matrix &aTransform);
|
||||||
|
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ class DualSurface {
|
|||||||
* case can we be dealing with a 'dual' source (SourceSurfaceDual) and do
|
* case can we be dealing with a 'dual' source (SourceSurfaceDual) and do
|
||||||
* we need to pass separate patterns into our destination DrawTargets.
|
* we need to pass separate patterns into our destination DrawTargets.
|
||||||
*/
|
*/
|
||||||
class DualPattern {
|
class DualPattern final {
|
||||||
public:
|
public:
|
||||||
inline explicit DualPattern(const Pattern &aPattern)
|
inline explicit DualPattern(const Pattern &aPattern)
|
||||||
: mPatternsInitialized(false) {
|
: mPatternsInitialized(false) {
|
||||||
|
|||||||
@@ -69,12 +69,10 @@ class SourceSurfaceRecording : public SourceSurface {
|
|||||||
RecordedSourceSurfaceDestruction(ReferencePtr(this)));
|
RecordedSourceSurfaceDestruction(ReferencePtr(this)));
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual SurfaceType GetType() const override {
|
SurfaceType GetType() const override { return SurfaceType::RECORDING; }
|
||||||
return SurfaceType::RECORDING;
|
IntSize GetSize() const override { return mSize; }
|
||||||
}
|
SurfaceFormat GetFormat() const override { return mFormat; }
|
||||||
virtual IntSize GetSize() const override { return mSize; }
|
already_AddRefed<DataSourceSurface> GetDataSurface() override {
|
||||||
virtual SurfaceFormat GetFormat() const override { return mFormat; }
|
|
||||||
virtual already_AddRefed<DataSourceSurface> GetDataSurface() override {
|
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -109,13 +107,11 @@ class DataSourceSurfaceRecording : public DataSourceSurface {
|
|||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual SurfaceType GetType() const override {
|
SurfaceType GetType() const override { return SurfaceType::RECORDING; }
|
||||||
return SurfaceType::RECORDING;
|
IntSize GetSize() const override { return mSize; }
|
||||||
}
|
int32_t Stride() override { return mStride; }
|
||||||
virtual IntSize GetSize() const override { return mSize; }
|
SurfaceFormat GetFormat() const override { return mFormat; }
|
||||||
virtual int32_t Stride() override { return mStride; }
|
uint8_t *GetData() override { return mData.get(); }
|
||||||
virtual SurfaceFormat GetFormat() const override { return mFormat; }
|
|
||||||
virtual uint8_t *GetData() override { return mData.get(); }
|
|
||||||
|
|
||||||
UniquePtr<uint8_t[]> mData;
|
UniquePtr<uint8_t[]> mData;
|
||||||
IntSize mSize;
|
IntSize mSize;
|
||||||
@@ -132,15 +128,13 @@ class GradientStopsRecording : public GradientStops {
|
|||||||
mRecorder->AddStoredObject(this);
|
mRecorder->AddStoredObject(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
~GradientStopsRecording() {
|
virtual ~GradientStopsRecording() {
|
||||||
mRecorder->RemoveStoredObject(this);
|
mRecorder->RemoveStoredObject(this);
|
||||||
mRecorder->RecordEvent(
|
mRecorder->RecordEvent(
|
||||||
RecordedGradientStopsDestruction(ReferencePtr(this)));
|
RecordedGradientStopsDestruction(ReferencePtr(this)));
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual BackendType GetBackendType() const override {
|
BackendType GetBackendType() const override { return BackendType::RECORDING; }
|
||||||
return BackendType::RECORDING;
|
|
||||||
}
|
|
||||||
|
|
||||||
RefPtr<DrawEventRecorderPrivate> mRecorder;
|
RefPtr<DrawEventRecorderPrivate> mRecorder;
|
||||||
};
|
};
|
||||||
@@ -155,24 +149,24 @@ class FilterNodeRecording : public FilterNode {
|
|||||||
mRecorder->AddStoredObject(this);
|
mRecorder->AddStoredObject(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
~FilterNodeRecording() {
|
virtual ~FilterNodeRecording() {
|
||||||
mRecorder->RemoveStoredObject(this);
|
mRecorder->RemoveStoredObject(this);
|
||||||
mRecorder->RecordEvent(RecordedFilterNodeDestruction(ReferencePtr(this)));
|
mRecorder->RecordEvent(RecordedFilterNodeDestruction(ReferencePtr(this)));
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void SetInput(uint32_t aIndex, SourceSurface *aSurface) override {
|
void SetInput(uint32_t aIndex, SourceSurface *aSurface) override {
|
||||||
EnsureSurfaceStoredRecording(mRecorder, aSurface, "SetInput");
|
EnsureSurfaceStoredRecording(mRecorder, aSurface, "SetInput");
|
||||||
|
|
||||||
mRecorder->RecordEvent(RecordedFilterNodeSetInput(this, aIndex, aSurface));
|
mRecorder->RecordEvent(RecordedFilterNodeSetInput(this, aIndex, aSurface));
|
||||||
}
|
}
|
||||||
virtual void SetInput(uint32_t aIndex, FilterNode *aFilter) override {
|
void SetInput(uint32_t aIndex, FilterNode *aFilter) override {
|
||||||
MOZ_ASSERT(mRecorder->HasStoredObject(aFilter));
|
MOZ_ASSERT(mRecorder->HasStoredObject(aFilter));
|
||||||
|
|
||||||
mRecorder->RecordEvent(RecordedFilterNodeSetInput(this, aIndex, aFilter));
|
mRecorder->RecordEvent(RecordedFilterNodeSetInput(this, aIndex, aFilter));
|
||||||
}
|
}
|
||||||
|
|
||||||
#define FORWARD_SET_ATTRIBUTE(type, argtype) \
|
#define FORWARD_SET_ATTRIBUTE(type, argtype) \
|
||||||
virtual void SetAttribute(uint32_t aIndex, type aValue) override { \
|
void SetAttribute(uint32_t aIndex, type aValue) override { \
|
||||||
mRecorder->RecordEvent(RecordedFilterNodeSetAttribute( \
|
mRecorder->RecordEvent(RecordedFilterNodeSetAttribute( \
|
||||||
this, aIndex, aValue, \
|
this, aIndex, aValue, \
|
||||||
RecordedFilterNodeSetAttribute::ARGTYPE_##argtype)); \
|
RecordedFilterNodeSetAttribute::ARGTYPE_##argtype)); \
|
||||||
@@ -194,15 +188,13 @@ class FilterNodeRecording : public FilterNode {
|
|||||||
|
|
||||||
#undef FORWARD_SET_ATTRIBUTE
|
#undef FORWARD_SET_ATTRIBUTE
|
||||||
|
|
||||||
virtual void SetAttribute(uint32_t aIndex, const Float *aFloat,
|
void SetAttribute(uint32_t aIndex, const Float *aFloat,
|
||||||
uint32_t aSize) override {
|
uint32_t aSize) override {
|
||||||
mRecorder->RecordEvent(
|
mRecorder->RecordEvent(
|
||||||
RecordedFilterNodeSetAttribute(this, aIndex, aFloat, aSize));
|
RecordedFilterNodeSetAttribute(this, aIndex, aFloat, aSize));
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual FilterBackend GetBackendType() override {
|
FilterBackend GetBackendType() override { return FILTER_BACKEND_RECORDING; }
|
||||||
return FILTER_BACKEND_RECORDING;
|
|
||||||
}
|
|
||||||
|
|
||||||
RefPtr<DrawEventRecorderPrivate> mRecorder;
|
RefPtr<DrawEventRecorderPrivate> mRecorder;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -34,126 +34,124 @@ class DrawTargetTiled : public DrawTarget {
|
|||||||
|
|
||||||
bool Init(const TileSet &mTiles);
|
bool Init(const TileSet &mTiles);
|
||||||
|
|
||||||
virtual bool IsTiledDrawTarget() const override { return true; }
|
bool IsTiledDrawTarget() const override { return true; }
|
||||||
|
|
||||||
virtual bool IsCaptureDT() const override {
|
bool IsCaptureDT() const override {
|
||||||
return mTiles[0].mDrawTarget->IsCaptureDT();
|
return mTiles[0].mDrawTarget->IsCaptureDT();
|
||||||
}
|
}
|
||||||
virtual DrawTargetType GetType() const override {
|
DrawTargetType GetType() const override {
|
||||||
return mTiles[0].mDrawTarget->GetType();
|
return mTiles[0].mDrawTarget->GetType();
|
||||||
}
|
}
|
||||||
virtual BackendType GetBackendType() const override {
|
BackendType GetBackendType() const override {
|
||||||
return mTiles[0].mDrawTarget->GetBackendType();
|
return mTiles[0].mDrawTarget->GetBackendType();
|
||||||
}
|
}
|
||||||
virtual already_AddRefed<SourceSurface> Snapshot() override;
|
already_AddRefed<SourceSurface> Snapshot() override;
|
||||||
virtual void DetachAllSnapshots() override;
|
void DetachAllSnapshots() override;
|
||||||
virtual IntSize GetSize() const override {
|
IntSize GetSize() const override {
|
||||||
MOZ_ASSERT(mRect.Width() > 0 && mRect.Height() > 0);
|
MOZ_ASSERT(mRect.Width() > 0 && mRect.Height() > 0);
|
||||||
return IntSize(mRect.XMost(), mRect.YMost());
|
return IntSize(mRect.XMost(), mRect.YMost());
|
||||||
}
|
}
|
||||||
virtual IntRect GetRect() const override { return mRect; }
|
IntRect GetRect() const override { return mRect; }
|
||||||
|
|
||||||
virtual void Flush() override;
|
void Flush() override;
|
||||||
virtual void DrawSurface(SourceSurface *aSurface, const Rect &aDest,
|
void DrawSurface(SourceSurface *aSurface, const Rect &aDest,
|
||||||
const Rect &aSource,
|
const Rect &aSource, const DrawSurfaceOptions &aSurfOptions,
|
||||||
const DrawSurfaceOptions &aSurfOptions,
|
|
||||||
const DrawOptions &aOptions) override;
|
const DrawOptions &aOptions) override;
|
||||||
virtual void DrawFilter(FilterNode *aNode, const Rect &aSourceRect,
|
void DrawFilter(FilterNode *aNode, const Rect &aSourceRect,
|
||||||
const Point &aDestPoint,
|
const Point &aDestPoint,
|
||||||
const DrawOptions &aOptions = DrawOptions()) override;
|
const DrawOptions &aOptions = DrawOptions()) override;
|
||||||
virtual void DrawSurfaceWithShadow(
|
void DrawSurfaceWithShadow(
|
||||||
SourceSurface *aSurface, const Point &aDest, const Color &aColor,
|
SourceSurface *aSurface, const Point &aDest, const Color &aColor,
|
||||||
const Point &aOffset, Float aSigma,
|
const Point &aOffset, Float aSigma,
|
||||||
CompositionOp aOperator) override { /* Not implemented */
|
CompositionOp aOperator) override { /* Not implemented */
|
||||||
MOZ_CRASH("GFX: DrawSurfaceWithShadow");
|
MOZ_CRASH("GFX: DrawSurfaceWithShadow");
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void ClearRect(const Rect &aRect) override;
|
void ClearRect(const Rect &aRect) override;
|
||||||
virtual void MaskSurface(
|
void MaskSurface(const Pattern &aSource, SourceSurface *aMask, Point aOffset,
|
||||||
const Pattern &aSource, SourceSurface *aMask, Point aOffset,
|
|
||||||
const DrawOptions &aOptions = DrawOptions()) override;
|
const DrawOptions &aOptions = DrawOptions()) override;
|
||||||
|
|
||||||
virtual void CopySurface(SourceSurface *aSurface, const IntRect &aSourceRect,
|
void CopySurface(SourceSurface *aSurface, const IntRect &aSourceRect,
|
||||||
const IntPoint &aDestination) override;
|
const IntPoint &aDestination) override;
|
||||||
|
|
||||||
virtual void FillRect(const Rect &aRect, const Pattern &aPattern,
|
void FillRect(const Rect &aRect, const Pattern &aPattern,
|
||||||
const DrawOptions &aOptions = DrawOptions()) override;
|
const DrawOptions &aOptions = DrawOptions()) override;
|
||||||
virtual void StrokeRect(const Rect &aRect, const Pattern &aPattern,
|
void StrokeRect(const Rect &aRect, const Pattern &aPattern,
|
||||||
const StrokeOptions &aStrokeOptions = StrokeOptions(),
|
const StrokeOptions &aStrokeOptions = StrokeOptions(),
|
||||||
const DrawOptions &aOptions = DrawOptions()) override;
|
const DrawOptions &aOptions = DrawOptions()) override;
|
||||||
virtual void StrokeLine(const Point &aStart, const Point &aEnd,
|
void StrokeLine(const Point &aStart, const Point &aEnd,
|
||||||
const Pattern &aPattern,
|
const Pattern &aPattern,
|
||||||
const StrokeOptions &aStrokeOptions = StrokeOptions(),
|
const StrokeOptions &aStrokeOptions = StrokeOptions(),
|
||||||
const DrawOptions &aOptions = DrawOptions()) override;
|
const DrawOptions &aOptions = DrawOptions()) override;
|
||||||
virtual void Stroke(const Path *aPath, const Pattern &aPattern,
|
void Stroke(const Path *aPath, const Pattern &aPattern,
|
||||||
const StrokeOptions &aStrokeOptions = StrokeOptions(),
|
const StrokeOptions &aStrokeOptions = StrokeOptions(),
|
||||||
const DrawOptions &aOptions = DrawOptions()) override;
|
const DrawOptions &aOptions = DrawOptions()) override;
|
||||||
virtual void Fill(const Path *aPath, const Pattern &aPattern,
|
void Fill(const Path *aPath, const Pattern &aPattern,
|
||||||
const DrawOptions &aOptions = DrawOptions()) override;
|
const DrawOptions &aOptions = DrawOptions()) override;
|
||||||
virtual void FillGlyphs(ScaledFont *aFont, const GlyphBuffer &aBuffer,
|
void FillGlyphs(ScaledFont *aFont, const GlyphBuffer &aBuffer,
|
||||||
const Pattern &aPattern,
|
const Pattern &aPattern,
|
||||||
const DrawOptions &aOptions = DrawOptions()) override;
|
const DrawOptions &aOptions = DrawOptions()) override;
|
||||||
virtual void Mask(const Pattern &aSource, const Pattern &aMask,
|
void Mask(const Pattern &aSource, const Pattern &aMask,
|
||||||
const DrawOptions &aOptions = DrawOptions()) override;
|
const DrawOptions &aOptions = DrawOptions()) override;
|
||||||
virtual void PushClip(const Path *aPath) override;
|
void PushClip(const Path *aPath) override;
|
||||||
virtual void PushClipRect(const Rect &aRect) override;
|
void PushClipRect(const Rect &aRect) override;
|
||||||
virtual void PopClip() override;
|
void PopClip() override;
|
||||||
virtual void PushLayer(bool aOpaque, Float aOpacity, SourceSurface *aMask,
|
void PushLayer(bool aOpaque, Float aOpacity, SourceSurface *aMask,
|
||||||
const Matrix &aMaskTransform,
|
const Matrix &aMaskTransform,
|
||||||
const IntRect &aBounds = IntRect(),
|
const IntRect &aBounds = IntRect(),
|
||||||
bool aCopyBackground = false) override;
|
bool aCopyBackground = false) override;
|
||||||
virtual void PushLayerWithBlend(
|
void PushLayerWithBlend(bool aOpaque, Float aOpacity, SourceSurface *aMask,
|
||||||
bool aOpaque, Float aOpacity, SourceSurface *aMask,
|
const Matrix &aMaskTransform,
|
||||||
const Matrix &aMaskTransform, const IntRect &aBounds = IntRect(),
|
const IntRect &aBounds = IntRect(),
|
||||||
bool aCopyBackground = false,
|
bool aCopyBackground = false,
|
||||||
CompositionOp = CompositionOp::OP_OVER) override;
|
CompositionOp = CompositionOp::OP_OVER) override;
|
||||||
virtual void PopLayer() override;
|
void PopLayer() override;
|
||||||
|
|
||||||
virtual void PadEdges(const IntRegion &aRegion) override;
|
void PadEdges(const IntRegion &aRegion) override;
|
||||||
|
|
||||||
virtual void SetTransform(const Matrix &aTransform) override;
|
void SetTransform(const Matrix &aTransform) override;
|
||||||
|
|
||||||
virtual void SetPermitSubpixelAA(bool aPermitSubpixelAA) override;
|
void SetPermitSubpixelAA(bool aPermitSubpixelAA) override;
|
||||||
|
|
||||||
virtual already_AddRefed<SourceSurface> CreateSourceSurfaceFromData(
|
already_AddRefed<SourceSurface> CreateSourceSurfaceFromData(
|
||||||
unsigned char *aData, const IntSize &aSize, int32_t aStride,
|
unsigned char *aData, const IntSize &aSize, int32_t aStride,
|
||||||
SurfaceFormat aFormat) const override {
|
SurfaceFormat aFormat) const override {
|
||||||
return mTiles[0].mDrawTarget->CreateSourceSurfaceFromData(aData, aSize,
|
return mTiles[0].mDrawTarget->CreateSourceSurfaceFromData(aData, aSize,
|
||||||
aStride, aFormat);
|
aStride, aFormat);
|
||||||
}
|
}
|
||||||
virtual already_AddRefed<SourceSurface> OptimizeSourceSurface(
|
already_AddRefed<SourceSurface> OptimizeSourceSurface(
|
||||||
SourceSurface *aSurface) const override {
|
SourceSurface *aSurface) const override {
|
||||||
return mTiles[0].mDrawTarget->OptimizeSourceSurface(aSurface);
|
return mTiles[0].mDrawTarget->OptimizeSourceSurface(aSurface);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual already_AddRefed<SourceSurface> CreateSourceSurfaceFromNativeSurface(
|
already_AddRefed<SourceSurface> CreateSourceSurfaceFromNativeSurface(
|
||||||
const NativeSurface &aSurface) const override {
|
const NativeSurface &aSurface) const override {
|
||||||
return mTiles[0].mDrawTarget->CreateSourceSurfaceFromNativeSurface(
|
return mTiles[0].mDrawTarget->CreateSourceSurfaceFromNativeSurface(
|
||||||
aSurface);
|
aSurface);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual already_AddRefed<DrawTarget> CreateSimilarDrawTarget(
|
already_AddRefed<DrawTarget> CreateSimilarDrawTarget(
|
||||||
const IntSize &aSize, SurfaceFormat aFormat) const override {
|
const IntSize &aSize, SurfaceFormat aFormat) const override {
|
||||||
return mTiles[0].mDrawTarget->CreateSimilarDrawTarget(aSize, aFormat);
|
return mTiles[0].mDrawTarget->CreateSimilarDrawTarget(aSize, aFormat);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual bool CanCreateSimilarDrawTarget(
|
bool CanCreateSimilarDrawTarget(const IntSize &aSize,
|
||||||
const IntSize &aSize, SurfaceFormat aFormat) const override {
|
SurfaceFormat aFormat) const override {
|
||||||
return mTiles[0].mDrawTarget->CanCreateSimilarDrawTarget(aSize, aFormat);
|
return mTiles[0].mDrawTarget->CanCreateSimilarDrawTarget(aSize, aFormat);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual already_AddRefed<PathBuilder> CreatePathBuilder(
|
already_AddRefed<PathBuilder> CreatePathBuilder(
|
||||||
FillRule aFillRule = FillRule::FILL_WINDING) const override {
|
FillRule aFillRule = FillRule::FILL_WINDING) const override {
|
||||||
return mTiles[0].mDrawTarget->CreatePathBuilder(aFillRule);
|
return mTiles[0].mDrawTarget->CreatePathBuilder(aFillRule);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual already_AddRefed<GradientStops> CreateGradientStops(
|
already_AddRefed<GradientStops> CreateGradientStops(
|
||||||
GradientStop *aStops, uint32_t aNumStops,
|
GradientStop *aStops, uint32_t aNumStops,
|
||||||
ExtendMode aExtendMode = ExtendMode::CLAMP) const override {
|
ExtendMode aExtendMode = ExtendMode::CLAMP) const override {
|
||||||
return mTiles[0].mDrawTarget->CreateGradientStops(aStops, aNumStops,
|
return mTiles[0].mDrawTarget->CreateGradientStops(aStops, aNumStops,
|
||||||
aExtendMode);
|
aExtendMode);
|
||||||
}
|
}
|
||||||
virtual already_AddRefed<FilterNode> CreateFilter(FilterType aType) override {
|
already_AddRefed<FilterNode> CreateFilter(FilterType aType) override {
|
||||||
return mTiles[0].mDrawTarget->CreateFilter(aType);
|
return mTiles[0].mDrawTarget->CreateFilter(aType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -185,17 +183,17 @@ class SnapshotTiled : public SourceSurface {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual SurfaceType GetType() const override { return SurfaceType::TILED; }
|
SurfaceType GetType() const override { return SurfaceType::TILED; }
|
||||||
virtual IntSize GetSize() const override {
|
IntSize GetSize() const override {
|
||||||
MOZ_ASSERT(mRect.Width() > 0 && mRect.Height() > 0);
|
MOZ_ASSERT(mRect.Width() > 0 && mRect.Height() > 0);
|
||||||
return IntSize(mRect.XMost(), mRect.YMost());
|
return IntSize(mRect.XMost(), mRect.YMost());
|
||||||
}
|
}
|
||||||
virtual IntRect GetRect() const override { return mRect; }
|
IntRect GetRect() const override { return mRect; }
|
||||||
virtual SurfaceFormat GetFormat() const override {
|
SurfaceFormat GetFormat() const override {
|
||||||
return mSnapshots[0]->GetFormat();
|
return mSnapshots[0]->GetFormat();
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual already_AddRefed<DataSourceSurface> GetDataSurface() override {
|
already_AddRefed<DataSourceSurface> GetDataSurface() override {
|
||||||
RefPtr<DataSourceSurface> surf =
|
RefPtr<DataSourceSurface> surf =
|
||||||
Factory::CreateDataSourceSurface(mRect.Size(), GetFormat());
|
Factory::CreateDataSourceSurface(mRect.Size(), GetFormat());
|
||||||
if (!surf) {
|
if (!surf) {
|
||||||
|
|||||||
@@ -92,14 +92,12 @@ class SourceSurfaceWrapAndRecord : public SourceSurface {
|
|||||||
RecordedSourceSurfaceDestruction(ReferencePtr(this)));
|
RecordedSourceSurfaceDestruction(ReferencePtr(this)));
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual SurfaceType GetType() const override {
|
SurfaceType GetType() const override { return SurfaceType::RECORDING; }
|
||||||
return SurfaceType::RECORDING;
|
IntSize GetSize() const override { return mFinalSurface->GetSize(); }
|
||||||
}
|
SurfaceFormat GetFormat() const override {
|
||||||
virtual IntSize GetSize() const override { return mFinalSurface->GetSize(); }
|
|
||||||
virtual SurfaceFormat GetFormat() const override {
|
|
||||||
return mFinalSurface->GetFormat();
|
return mFinalSurface->GetFormat();
|
||||||
}
|
}
|
||||||
virtual already_AddRefed<DataSourceSurface> GetDataSurface() override {
|
already_AddRefed<DataSourceSurface> GetDataSurface() override {
|
||||||
return mFinalSurface->GetDataSurface();
|
return mFinalSurface->GetDataSurface();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -123,9 +121,7 @@ class GradientStopsWrapAndRecord : public GradientStops {
|
|||||||
RecordedGradientStopsDestruction(ReferencePtr(this)));
|
RecordedGradientStopsDestruction(ReferencePtr(this)));
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual BackendType GetBackendType() const override {
|
BackendType GetBackendType() const override { return BackendType::RECORDING; }
|
||||||
return BackendType::RECORDING;
|
|
||||||
}
|
|
||||||
|
|
||||||
RefPtr<GradientStops> mFinalGradientStops;
|
RefPtr<GradientStops> mFinalGradientStops;
|
||||||
RefPtr<DrawEventRecorderPrivate> mRecorder;
|
RefPtr<DrawEventRecorderPrivate> mRecorder;
|
||||||
@@ -173,13 +169,13 @@ class FilterNodeWrapAndRecord : public FilterNode {
|
|||||||
return static_cast<FilterNodeWrapAndRecord *>(aNode)->mFinalFilterNode;
|
return static_cast<FilterNodeWrapAndRecord *>(aNode)->mFinalFilterNode;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void SetInput(uint32_t aIndex, SourceSurface *aSurface) override {
|
void SetInput(uint32_t aIndex, SourceSurface *aSurface) override {
|
||||||
EnsureSurfaceStored(mRecorder, aSurface, "SetInput");
|
EnsureSurfaceStored(mRecorder, aSurface, "SetInput");
|
||||||
|
|
||||||
mRecorder->RecordEvent(RecordedFilterNodeSetInput(this, aIndex, aSurface));
|
mRecorder->RecordEvent(RecordedFilterNodeSetInput(this, aIndex, aSurface));
|
||||||
mFinalFilterNode->SetInput(aIndex, GetSourceSurface(aSurface));
|
mFinalFilterNode->SetInput(aIndex, GetSourceSurface(aSurface));
|
||||||
}
|
}
|
||||||
virtual void SetInput(uint32_t aIndex, FilterNode *aFilter) override {
|
void SetInput(uint32_t aIndex, FilterNode *aFilter) override {
|
||||||
MOZ_ASSERT(mRecorder->HasStoredObject(aFilter));
|
MOZ_ASSERT(mRecorder->HasStoredObject(aFilter));
|
||||||
|
|
||||||
mRecorder->RecordEvent(RecordedFilterNodeSetInput(this, aIndex, aFilter));
|
mRecorder->RecordEvent(RecordedFilterNodeSetInput(this, aIndex, aFilter));
|
||||||
@@ -187,7 +183,7 @@ class FilterNodeWrapAndRecord : public FilterNode {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#define FORWARD_SET_ATTRIBUTE(type, argtype) \
|
#define FORWARD_SET_ATTRIBUTE(type, argtype) \
|
||||||
virtual void SetAttribute(uint32_t aIndex, type aValue) override { \
|
void SetAttribute(uint32_t aIndex, type aValue) override { \
|
||||||
mRecorder->RecordEvent(RecordedFilterNodeSetAttribute( \
|
mRecorder->RecordEvent(RecordedFilterNodeSetAttribute( \
|
||||||
this, aIndex, aValue, \
|
this, aIndex, aValue, \
|
||||||
RecordedFilterNodeSetAttribute::ARGTYPE_##argtype)); \
|
RecordedFilterNodeSetAttribute::ARGTYPE_##argtype)); \
|
||||||
@@ -217,15 +213,13 @@ class FilterNodeWrapAndRecord : public FilterNode {
|
|||||||
mFinalFilterNode->SetAttribute(aIndex, aFloat, aSize);
|
mFinalFilterNode->SetAttribute(aIndex, aFloat, aSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual FilterBackend GetBackendType() override {
|
FilterBackend GetBackendType() override { return FILTER_BACKEND_RECORDING; }
|
||||||
return FILTER_BACKEND_RECORDING;
|
|
||||||
}
|
|
||||||
|
|
||||||
RefPtr<FilterNode> mFinalFilterNode;
|
RefPtr<FilterNode> mFinalFilterNode;
|
||||||
RefPtr<DrawEventRecorderPrivate> mRecorder;
|
RefPtr<DrawEventRecorderPrivate> mRecorder;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct AdjustedPattern {
|
struct AdjustedPattern final {
|
||||||
explicit AdjustedPattern(const Pattern &aPattern) : mPattern(nullptr) {
|
explicit AdjustedPattern(const Pattern &aPattern) : mPattern(nullptr) {
|
||||||
mOrigPattern = const_cast<Pattern *>(&aPattern);
|
mOrigPattern = const_cast<Pattern *>(&aPattern);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -82,9 +82,9 @@ class CommandBufferBuilder {
|
|||||||
/// Stores multiple commands to be executed sequencially.
|
/// Stores multiple commands to be executed sequencially.
|
||||||
class DrawingJob : public Job {
|
class DrawingJob : public Job {
|
||||||
public:
|
public:
|
||||||
~DrawingJob();
|
virtual ~DrawingJob();
|
||||||
|
|
||||||
virtual JobStatus Run() override;
|
JobStatus Run() override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
DrawingJob(DrawTarget* aTarget, IntPoint aOffset, SyncObject* aStart,
|
DrawingJob(DrawTarget* aTarget, IntPoint aOffset, SyncObject* aStart,
|
||||||
@@ -107,7 +107,7 @@ class DrawingJob : public Job {
|
|||||||
///
|
///
|
||||||
/// The builder is a separate object to ensure that commands are not added to a
|
/// The builder is a separate object to ensure that commands are not added to a
|
||||||
/// submitted DrawingJob.
|
/// submitted DrawingJob.
|
||||||
class DrawingJobBuilder {
|
class DrawingJobBuilder final {
|
||||||
public:
|
public:
|
||||||
DrawingJobBuilder();
|
DrawingJobBuilder();
|
||||||
|
|
||||||
|
|||||||
@@ -23,9 +23,7 @@ class FilterNodeCapture final : public FilterNode {
|
|||||||
explicit FilterNodeCapture(FilterType aType)
|
explicit FilterNodeCapture(FilterType aType)
|
||||||
: mType{aType}, mInputsChanged{true} {}
|
: mType{aType}, mInputsChanged{true} {}
|
||||||
|
|
||||||
virtual FilterBackend GetBackendType() override {
|
FilterBackend GetBackendType() override { return FILTER_BACKEND_CAPTURE; }
|
||||||
return FILTER_BACKEND_CAPTURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
RefPtr<FilterNode> Validate(DrawTarget *aDT);
|
RefPtr<FilterNode> Validate(DrawTarget *aDT);
|
||||||
|
|
||||||
@@ -38,11 +36,11 @@ class FilterNodeCapture final : public FilterNode {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void SetInput(uint32_t aIndex, SourceSurface *aSurface) override {
|
void SetInput(uint32_t aIndex, SourceSurface *aSurface) override {
|
||||||
mInputsChanged = true;
|
mInputsChanged = true;
|
||||||
Replace(aIndex, RefPtr<SourceSurface>(aSurface), mInputs);
|
Replace(aIndex, RefPtr<SourceSurface>(aSurface), mInputs);
|
||||||
}
|
}
|
||||||
virtual void SetInput(uint32_t aIndex, FilterNode *aFilter) override {
|
void SetInput(uint32_t aIndex, FilterNode *aFilter) override {
|
||||||
mInputsChanged = true;
|
mInputsChanged = true;
|
||||||
Replace(aIndex, RefPtr<FilterNode>(aFilter), mInputs);
|
Replace(aIndex, RefPtr<FilterNode>(aFilter), mInputs);
|
||||||
}
|
}
|
||||||
@@ -51,45 +49,45 @@ class FilterNodeCapture final : public FilterNode {
|
|||||||
Variant<uint32_t, Float, Point, Matrix5x4, Point3D, Size, IntSize, Color,
|
Variant<uint32_t, Float, Point, Matrix5x4, Point3D, Size, IntSize, Color,
|
||||||
Rect, IntRect, bool, std::vector<Float>, IntPoint, Matrix>;
|
Rect, IntRect, bool, std::vector<Float>, IntPoint, Matrix>;
|
||||||
|
|
||||||
virtual void SetAttribute(uint32_t aIndex, uint32_t aValue) override {
|
void SetAttribute(uint32_t aIndex, uint32_t aValue) override {
|
||||||
Replace(aIndex, aValue, mAttributes);
|
Replace(aIndex, aValue, mAttributes);
|
||||||
}
|
}
|
||||||
virtual void SetAttribute(uint32_t aIndex, Float aValue) override {
|
void SetAttribute(uint32_t aIndex, Float aValue) override {
|
||||||
Replace(aIndex, aValue, mAttributes);
|
Replace(aIndex, aValue, mAttributes);
|
||||||
}
|
}
|
||||||
virtual void SetAttribute(uint32_t aIndex, const Point &aValue) override {
|
void SetAttribute(uint32_t aIndex, const Point &aValue) override {
|
||||||
Replace(aIndex, aValue, mAttributes);
|
Replace(aIndex, aValue, mAttributes);
|
||||||
}
|
}
|
||||||
virtual void SetAttribute(uint32_t aIndex, const Matrix5x4 &aValue) override {
|
void SetAttribute(uint32_t aIndex, const Matrix5x4 &aValue) override {
|
||||||
Replace(aIndex, aValue, mAttributes);
|
Replace(aIndex, aValue, mAttributes);
|
||||||
}
|
}
|
||||||
virtual void SetAttribute(uint32_t aIndex, const Point3D &aValue) override {
|
void SetAttribute(uint32_t aIndex, const Point3D &aValue) override {
|
||||||
Replace(aIndex, aValue, mAttributes);
|
Replace(aIndex, aValue, mAttributes);
|
||||||
}
|
}
|
||||||
virtual void SetAttribute(uint32_t aIndex, const Size &aValue) override {
|
void SetAttribute(uint32_t aIndex, const Size &aValue) override {
|
||||||
Replace(aIndex, aValue, mAttributes);
|
Replace(aIndex, aValue, mAttributes);
|
||||||
}
|
}
|
||||||
virtual void SetAttribute(uint32_t aIndex, const IntSize &aValue) override {
|
void SetAttribute(uint32_t aIndex, const IntSize &aValue) override {
|
||||||
Replace(aIndex, aValue, mAttributes);
|
Replace(aIndex, aValue, mAttributes);
|
||||||
}
|
}
|
||||||
virtual void SetAttribute(uint32_t aIndex, const Color &aValue) override {
|
void SetAttribute(uint32_t aIndex, const Color &aValue) override {
|
||||||
Replace(aIndex, aValue, mAttributes);
|
Replace(aIndex, aValue, mAttributes);
|
||||||
}
|
}
|
||||||
virtual void SetAttribute(uint32_t aIndex, const Rect &aValue) override {
|
void SetAttribute(uint32_t aIndex, const Rect &aValue) override {
|
||||||
Replace(aIndex, aValue, mAttributes);
|
Replace(aIndex, aValue, mAttributes);
|
||||||
}
|
}
|
||||||
virtual void SetAttribute(uint32_t aIndex, const IntRect &aValue) override {
|
void SetAttribute(uint32_t aIndex, const IntRect &aValue) override {
|
||||||
Replace(aIndex, aValue, mAttributes);
|
Replace(aIndex, aValue, mAttributes);
|
||||||
}
|
}
|
||||||
virtual void SetAttribute(uint32_t aIndex, bool aValue) override {
|
void SetAttribute(uint32_t aIndex, bool aValue) override {
|
||||||
Replace(aIndex, aValue, mAttributes);
|
Replace(aIndex, aValue, mAttributes);
|
||||||
}
|
}
|
||||||
virtual void SetAttribute(uint32_t aIndex, const Float *aValues,
|
virtual void SetAttribute(uint32_t aIndex, const Float *aValues,
|
||||||
uint32_t aSize) override;
|
uint32_t aSize) override;
|
||||||
virtual void SetAttribute(uint32_t aIndex, const IntPoint &aValue) override {
|
void SetAttribute(uint32_t aIndex, const IntPoint &aValue) override {
|
||||||
Replace(aIndex, aValue, mAttributes);
|
Replace(aIndex, aValue, mAttributes);
|
||||||
}
|
}
|
||||||
virtual void SetAttribute(uint32_t aIndex, const Matrix &aValue) override {
|
void SetAttribute(uint32_t aIndex, const Matrix &aValue) override {
|
||||||
Replace(aIndex, aValue, mAttributes);
|
Replace(aIndex, aValue, mAttributes);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -81,14 +81,14 @@ class FilterNodeConvolveD2D1 : public FilterNodeD2D1 {
|
|||||||
MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(FilterNodeConvolveD2D1, override)
|
MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(FilterNodeConvolveD2D1, override)
|
||||||
explicit FilterNodeConvolveD2D1(ID2D1DeviceContext *aDC);
|
explicit FilterNodeConvolveD2D1(ID2D1DeviceContext *aDC);
|
||||||
|
|
||||||
virtual void SetInput(uint32_t aIndex, FilterNode *aFilter) override;
|
void SetInput(uint32_t aIndex, FilterNode *aFilter) override;
|
||||||
|
|
||||||
virtual void SetAttribute(uint32_t aIndex, uint32_t aValue) override;
|
void SetAttribute(uint32_t aIndex, uint32_t aValue) override;
|
||||||
virtual void SetAttribute(uint32_t aIndex, const IntSize &aValue) override;
|
void SetAttribute(uint32_t aIndex, const IntSize &aValue) override;
|
||||||
virtual void SetAttribute(uint32_t aIndex, const IntPoint &aValue) override;
|
void SetAttribute(uint32_t aIndex, const IntPoint &aValue) override;
|
||||||
virtual void SetAttribute(uint32_t aIndex, const IntRect &aValue) override;
|
void SetAttribute(uint32_t aIndex, const IntRect &aValue) override;
|
||||||
|
|
||||||
virtual ID2D1Effect *InputEffect() override;
|
ID2D1Effect *InputEffect() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
using FilterNode::SetAttribute;
|
using FilterNode::SetAttribute;
|
||||||
@@ -109,10 +109,10 @@ class FilterNodeConvolveD2D1 : public FilterNodeD2D1 {
|
|||||||
class FilterNodeOpacityD2D1 : public FilterNodeD2D1 {
|
class FilterNodeOpacityD2D1 : public FilterNodeD2D1 {
|
||||||
public:
|
public:
|
||||||
MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(FilterNodeOpacityD2D1, override)
|
MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(FilterNodeOpacityD2D1, override)
|
||||||
explicit FilterNodeOpacityD2D1(ID2D1Effect *aEffect, FilterType aType)
|
FilterNodeOpacityD2D1(ID2D1Effect *aEffect, FilterType aType)
|
||||||
: FilterNodeD2D1(aEffect, aType) {}
|
: FilterNodeD2D1(aEffect, aType) {}
|
||||||
|
|
||||||
virtual void SetAttribute(uint32_t aIndex, Float aValue) override;
|
void SetAttribute(uint32_t aIndex, Float aValue) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
class FilterNodeExtendInputAdapterD2D1 : public FilterNodeD2D1 {
|
class FilterNodeExtendInputAdapterD2D1 : public FilterNodeD2D1 {
|
||||||
@@ -123,10 +123,8 @@ class FilterNodeExtendInputAdapterD2D1 : public FilterNodeD2D1 {
|
|||||||
FilterNodeD2D1 *aFilterNode,
|
FilterNodeD2D1 *aFilterNode,
|
||||||
FilterType aType);
|
FilterType aType);
|
||||||
|
|
||||||
virtual ID2D1Effect *InputEffect() override {
|
ID2D1Effect *InputEffect() override { return mExtendInputEffect.get(); }
|
||||||
return mExtendInputEffect.get();
|
ID2D1Effect *OutputEffect() override {
|
||||||
}
|
|
||||||
virtual ID2D1Effect *OutputEffect() override {
|
|
||||||
return mWrappedFilterNode->OutputEffect();
|
return mWrappedFilterNode->OutputEffect();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -143,10 +141,8 @@ class FilterNodePremultiplyAdapterD2D1 : public FilterNodeD2D1 {
|
|||||||
FilterNodeD2D1 *aFilterNode,
|
FilterNodeD2D1 *aFilterNode,
|
||||||
FilterType aType);
|
FilterType aType);
|
||||||
|
|
||||||
virtual ID2D1Effect *InputEffect() override {
|
ID2D1Effect *InputEffect() override { return mPrePremultiplyEffect.get(); }
|
||||||
return mPrePremultiplyEffect.get();
|
ID2D1Effect *OutputEffect() override {
|
||||||
}
|
|
||||||
virtual ID2D1Effect *OutputEffect() override {
|
|
||||||
return mPostUnpremultiplyEffect.get();
|
return mPostUnpremultiplyEffect.get();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -49,20 +49,17 @@ class FilterNodeSoftware : public FilterNode,
|
|||||||
void Draw(DrawTarget *aDrawTarget, const Rect &aSourceRect,
|
void Draw(DrawTarget *aDrawTarget, const Rect &aSourceRect,
|
||||||
const Point &aDestPoint, const DrawOptions &aOptions);
|
const Point &aDestPoint, const DrawOptions &aOptions);
|
||||||
|
|
||||||
virtual FilterBackend GetBackendType() override {
|
FilterBackend GetBackendType() override { return FILTER_BACKEND_SOFTWARE; }
|
||||||
return FILTER_BACKEND_SOFTWARE;
|
void SetInput(uint32_t aIndex, SourceSurface *aSurface) override;
|
||||||
}
|
void SetInput(uint32_t aIndex, FilterNode *aFilter) override;
|
||||||
virtual void SetInput(uint32_t aIndex, SourceSurface *aSurface) override;
|
|
||||||
virtual void SetInput(uint32_t aIndex, FilterNode *aFilter) override;
|
|
||||||
|
|
||||||
virtual const char *GetName() { return "Unknown"; }
|
virtual const char *GetName() { return "Unknown"; }
|
||||||
|
|
||||||
virtual void AddInvalidationListener(FilterInvalidationListener *aListener);
|
void AddInvalidationListener(FilterInvalidationListener *aListener);
|
||||||
virtual void RemoveInvalidationListener(
|
void RemoveInvalidationListener(FilterInvalidationListener *aListener);
|
||||||
FilterInvalidationListener *aListener);
|
|
||||||
|
|
||||||
// FilterInvalidationListener implementation
|
// FilterInvalidationListener implementation
|
||||||
virtual void FilterInvalidated(FilterNodeSoftware *aFilter) override;
|
void FilterInvalidated(FilterNodeSoftware *aFilter) override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// The following methods are intended to be overriden by subclasses.
|
// The following methods are intended to be overriden by subclasses.
|
||||||
@@ -231,19 +228,18 @@ class FilterNodeTransformSoftware : public FilterNodeSoftware {
|
|||||||
public:
|
public:
|
||||||
MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(FilterNodeTransformSoftware, override)
|
MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(FilterNodeTransformSoftware, override)
|
||||||
FilterNodeTransformSoftware();
|
FilterNodeTransformSoftware();
|
||||||
virtual const char *GetName() override { return "Transform"; }
|
const char *GetName() override { return "Transform"; }
|
||||||
using FilterNodeSoftware::SetAttribute;
|
using FilterNodeSoftware::SetAttribute;
|
||||||
virtual void SetAttribute(uint32_t aIndex, uint32_t aGraphicsFilter) override;
|
void SetAttribute(uint32_t aIndex, uint32_t aGraphicsFilter) override;
|
||||||
virtual void SetAttribute(uint32_t aIndex, const Matrix &aMatrix) override;
|
void SetAttribute(uint32_t aIndex, const Matrix &aMatrix) override;
|
||||||
virtual IntRect MapRectToSource(const IntRect &aRect, const IntRect &aMax,
|
IntRect MapRectToSource(const IntRect &aRect, const IntRect &aMax,
|
||||||
FilterNode *aSourceNode) override;
|
FilterNode *aSourceNode) override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual already_AddRefed<DataSourceSurface> Render(
|
already_AddRefed<DataSourceSurface> Render(const IntRect &aRect) override;
|
||||||
const IntRect &aRect) override;
|
IntRect GetOutputRectInRect(const IntRect &aRect) override;
|
||||||
virtual IntRect GetOutputRectInRect(const IntRect &aRect) override;
|
int32_t InputIndex(uint32_t aInputEnumIndex) override;
|
||||||
virtual int32_t InputIndex(uint32_t aInputEnumIndex) override;
|
void RequestFromInputsForRect(const IntRect &aRect) override;
|
||||||
virtual void RequestFromInputsForRect(const IntRect &aRect) override;
|
|
||||||
IntRect SourceRectForOutputRect(const IntRect &aRect);
|
IntRect SourceRectForOutputRect(const IntRect &aRect);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@@ -255,18 +251,17 @@ class FilterNodeBlendSoftware : public FilterNodeSoftware {
|
|||||||
public:
|
public:
|
||||||
MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(FilterNodeBlendSoftware, override)
|
MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(FilterNodeBlendSoftware, override)
|
||||||
FilterNodeBlendSoftware();
|
FilterNodeBlendSoftware();
|
||||||
virtual const char *GetName() override { return "Blend"; }
|
const char *GetName() override { return "Blend"; }
|
||||||
using FilterNodeSoftware::SetAttribute;
|
using FilterNodeSoftware::SetAttribute;
|
||||||
virtual void SetAttribute(uint32_t aIndex, uint32_t aBlendMode) override;
|
void SetAttribute(uint32_t aIndex, uint32_t aBlendMode) override;
|
||||||
virtual IntRect MapRectToSource(const IntRect &aRect, const IntRect &aMax,
|
IntRect MapRectToSource(const IntRect &aRect, const IntRect &aMax,
|
||||||
FilterNode *aSourceNode) override;
|
FilterNode *aSourceNode) override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual already_AddRefed<DataSourceSurface> Render(
|
already_AddRefed<DataSourceSurface> Render(const IntRect &aRect) override;
|
||||||
const IntRect &aRect) override;
|
IntRect GetOutputRectInRect(const IntRect &aRect) override;
|
||||||
virtual IntRect GetOutputRectInRect(const IntRect &aRect) override;
|
int32_t InputIndex(uint32_t aInputEnumIndex) override;
|
||||||
virtual int32_t InputIndex(uint32_t aInputEnumIndex) override;
|
void RequestFromInputsForRect(const IntRect &aRect) override;
|
||||||
virtual void RequestFromInputsForRect(const IntRect &aRect) override;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
BlendMode mBlendMode;
|
BlendMode mBlendMode;
|
||||||
@@ -277,17 +272,16 @@ class FilterNodeMorphologySoftware : public FilterNodeSoftware {
|
|||||||
MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(FilterNodeMorphologySoftware,
|
MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(FilterNodeMorphologySoftware,
|
||||||
override)
|
override)
|
||||||
FilterNodeMorphologySoftware();
|
FilterNodeMorphologySoftware();
|
||||||
virtual const char *GetName() override { return "Morphology"; }
|
const char *GetName() override { return "Morphology"; }
|
||||||
using FilterNodeSoftware::SetAttribute;
|
using FilterNodeSoftware::SetAttribute;
|
||||||
virtual void SetAttribute(uint32_t aIndex, const IntSize &aRadii) override;
|
void SetAttribute(uint32_t aIndex, const IntSize &aRadii) override;
|
||||||
virtual void SetAttribute(uint32_t aIndex, uint32_t aOperator) override;
|
void SetAttribute(uint32_t aIndex, uint32_t aOperator) override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual already_AddRefed<DataSourceSurface> Render(
|
already_AddRefed<DataSourceSurface> Render(const IntRect &aRect) override;
|
||||||
const IntRect &aRect) override;
|
IntRect GetOutputRectInRect(const IntRect &aRect) override;
|
||||||
virtual IntRect GetOutputRectInRect(const IntRect &aRect) override;
|
int32_t InputIndex(uint32_t aInputEnumIndex) override;
|
||||||
virtual int32_t InputIndex(uint32_t aInputEnumIndex) override;
|
void RequestFromInputsForRect(const IntRect &aRect) override;
|
||||||
virtual void RequestFromInputsForRect(const IntRect &aRect) override;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
IntSize mRadii;
|
IntSize mRadii;
|
||||||
@@ -298,18 +292,17 @@ class FilterNodeColorMatrixSoftware : public FilterNodeSoftware {
|
|||||||
public:
|
public:
|
||||||
MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(FilterNodeColorMatrixSoftware,
|
MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(FilterNodeColorMatrixSoftware,
|
||||||
override)
|
override)
|
||||||
virtual const char *GetName() override { return "ColorMatrix"; }
|
const char *GetName() override { return "ColorMatrix"; }
|
||||||
using FilterNodeSoftware::SetAttribute;
|
using FilterNodeSoftware::SetAttribute;
|
||||||
virtual void SetAttribute(uint32_t aIndex, const Matrix5x4 &aMatrix) override;
|
void SetAttribute(uint32_t aIndex, const Matrix5x4 &aMatrix) override;
|
||||||
virtual void SetAttribute(uint32_t aIndex, uint32_t aAlphaMode) override;
|
void SetAttribute(uint32_t aIndex, uint32_t aAlphaMode) override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual already_AddRefed<DataSourceSurface> Render(
|
already_AddRefed<DataSourceSurface> Render(const IntRect &aRect) override;
|
||||||
const IntRect &aRect) override;
|
IntRect GetOutputRectInRect(const IntRect &aRect) override;
|
||||||
virtual IntRect GetOutputRectInRect(const IntRect &aRect) override;
|
int32_t InputIndex(uint32_t aInputEnumIndex) override;
|
||||||
virtual int32_t InputIndex(uint32_t aInputEnumIndex) override;
|
void RequestFromInputsForRect(const IntRect &aRect) override;
|
||||||
virtual void RequestFromInputsForRect(const IntRect &aRect) override;
|
IntRect MapRectToSource(const IntRect &aRect, const IntRect &aMax,
|
||||||
virtual IntRect MapRectToSource(const IntRect &aRect, const IntRect &aMax,
|
|
||||||
FilterNode *aSourceNode) override;
|
FilterNode *aSourceNode) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@@ -320,18 +313,16 @@ class FilterNodeColorMatrixSoftware : public FilterNodeSoftware {
|
|||||||
class FilterNodeFloodSoftware : public FilterNodeSoftware {
|
class FilterNodeFloodSoftware : public FilterNodeSoftware {
|
||||||
public:
|
public:
|
||||||
MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(FilterNodeFloodSoftware, override)
|
MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(FilterNodeFloodSoftware, override)
|
||||||
virtual const char *GetName() override { return "Flood"; }
|
const char *GetName() override { return "Flood"; }
|
||||||
using FilterNodeSoftware::SetAttribute;
|
using FilterNodeSoftware::SetAttribute;
|
||||||
virtual void SetAttribute(uint32_t aIndex, const Color &aColor) override;
|
void SetAttribute(uint32_t aIndex, const Color &aColor) override;
|
||||||
virtual IntRect MapRectToSource(const IntRect &aRect, const IntRect &aMax,
|
IntRect MapRectToSource(const IntRect &aRect, const IntRect &aMax,
|
||||||
FilterNode *aSourceNode) override;
|
FilterNode *aSourceNode) override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual already_AddRefed<DataSourceSurface> GetOutput(
|
already_AddRefed<DataSourceSurface> GetOutput(const IntRect &aRect) override;
|
||||||
const IntRect &aRect) override;
|
already_AddRefed<DataSourceSurface> Render(const IntRect &aRect) override;
|
||||||
virtual already_AddRefed<DataSourceSurface> Render(
|
IntRect GetOutputRectInRect(const IntRect &aRect) override;
|
||||||
const IntRect &aRect) override;
|
|
||||||
virtual IntRect GetOutputRectInRect(const IntRect &aRect) override;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Color mColor;
|
Color mColor;
|
||||||
@@ -340,17 +331,15 @@ class FilterNodeFloodSoftware : public FilterNodeSoftware {
|
|||||||
class FilterNodeTileSoftware : public FilterNodeSoftware {
|
class FilterNodeTileSoftware : public FilterNodeSoftware {
|
||||||
public:
|
public:
|
||||||
MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(FilterNodeTileSoftware, override)
|
MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(FilterNodeTileSoftware, override)
|
||||||
virtual const char *GetName() override { return "Tile"; }
|
const char *GetName() override { return "Tile"; }
|
||||||
using FilterNodeSoftware::SetAttribute;
|
using FilterNodeSoftware::SetAttribute;
|
||||||
virtual void SetAttribute(uint32_t aIndex,
|
void SetAttribute(uint32_t aIndex, const IntRect &aSourceRect) override;
|
||||||
const IntRect &aSourceRect) override;
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual already_AddRefed<DataSourceSurface> Render(
|
already_AddRefed<DataSourceSurface> Render(const IntRect &aRect) override;
|
||||||
const IntRect &aRect) override;
|
IntRect GetOutputRectInRect(const IntRect &aRect) override;
|
||||||
virtual IntRect GetOutputRectInRect(const IntRect &aRect) override;
|
int32_t InputIndex(uint32_t aInputEnumIndex) override;
|
||||||
virtual int32_t InputIndex(uint32_t aInputEnumIndex) override;
|
void RequestFromInputsForRect(const IntRect &aRect) override;
|
||||||
virtual void RequestFromInputsForRect(const IntRect &aRect) override;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
IntRect mSourceRect;
|
IntRect mSourceRect;
|
||||||
@@ -366,16 +355,15 @@ class FilterNodeComponentTransferSoftware : public FilterNodeSoftware {
|
|||||||
FilterNodeComponentTransferSoftware();
|
FilterNodeComponentTransferSoftware();
|
||||||
|
|
||||||
using FilterNodeSoftware::SetAttribute;
|
using FilterNodeSoftware::SetAttribute;
|
||||||
virtual void SetAttribute(uint32_t aIndex, bool aDisable) override;
|
void SetAttribute(uint32_t aIndex, bool aDisable) override;
|
||||||
virtual IntRect MapRectToSource(const IntRect &aRect, const IntRect &aMax,
|
IntRect MapRectToSource(const IntRect &aRect, const IntRect &aMax,
|
||||||
FilterNode *aSourceNode) override;
|
FilterNode *aSourceNode) override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual already_AddRefed<DataSourceSurface> Render(
|
already_AddRefed<DataSourceSurface> Render(const IntRect &aRect) override;
|
||||||
const IntRect &aRect) override;
|
IntRect GetOutputRectInRect(const IntRect &aRect) override;
|
||||||
virtual IntRect GetOutputRectInRect(const IntRect &aRect) override;
|
int32_t InputIndex(uint32_t aInputEnumIndex) override;
|
||||||
virtual int32_t InputIndex(uint32_t aInputEnumIndex) override;
|
void RequestFromInputsForRect(const IntRect &aRect) override;
|
||||||
virtual void RequestFromInputsForRect(const IntRect &aRect) override;
|
|
||||||
virtual void GenerateLookupTable(ptrdiff_t aComponent,
|
virtual void GenerateLookupTable(ptrdiff_t aComponent,
|
||||||
uint8_t aTables[4][256], bool aDisabled);
|
uint8_t aTables[4][256], bool aDisabled);
|
||||||
virtual void FillLookupTable(ptrdiff_t aComponent, uint8_t aTable[256]) = 0;
|
virtual void FillLookupTable(ptrdiff_t aComponent, uint8_t aTable[256]) = 0;
|
||||||
@@ -391,14 +379,13 @@ class FilterNodeTableTransferSoftware
|
|||||||
public:
|
public:
|
||||||
MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(FilterNodeTableTransferSoftware,
|
MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(FilterNodeTableTransferSoftware,
|
||||||
override)
|
override)
|
||||||
virtual const char *GetName() override { return "TableTransfer"; }
|
const char *GetName() override { return "TableTransfer"; }
|
||||||
using FilterNodeComponentTransferSoftware::SetAttribute;
|
using FilterNodeComponentTransferSoftware::SetAttribute;
|
||||||
virtual void SetAttribute(uint32_t aIndex, const Float *aFloat,
|
void SetAttribute(uint32_t aIndex, const Float *aFloat,
|
||||||
uint32_t aSize) override;
|
uint32_t aSize) override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void FillLookupTable(ptrdiff_t aComponent,
|
void FillLookupTable(ptrdiff_t aComponent, uint8_t aTable[256]) override;
|
||||||
uint8_t aTable[256]) override;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void FillLookupTableImpl(std::vector<Float> &aTableValues,
|
void FillLookupTableImpl(std::vector<Float> &aTableValues,
|
||||||
@@ -415,14 +402,13 @@ class FilterNodeDiscreteTransferSoftware
|
|||||||
public:
|
public:
|
||||||
MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(FilterNodeDiscreteTransferSoftware,
|
MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(FilterNodeDiscreteTransferSoftware,
|
||||||
override)
|
override)
|
||||||
virtual const char *GetName() override { return "DiscreteTransfer"; }
|
const char *GetName() override { return "DiscreteTransfer"; }
|
||||||
using FilterNodeComponentTransferSoftware::SetAttribute;
|
using FilterNodeComponentTransferSoftware::SetAttribute;
|
||||||
virtual void SetAttribute(uint32_t aIndex, const Float *aFloat,
|
void SetAttribute(uint32_t aIndex, const Float *aFloat,
|
||||||
uint32_t aSize) override;
|
uint32_t aSize) override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void FillLookupTable(ptrdiff_t aComponent,
|
void FillLookupTable(ptrdiff_t aComponent, uint8_t aTable[256]) override;
|
||||||
uint8_t aTable[256]) override;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void FillLookupTableImpl(std::vector<Float> &aTableValues,
|
void FillLookupTableImpl(std::vector<Float> &aTableValues,
|
||||||
@@ -440,13 +426,12 @@ class FilterNodeLinearTransferSoftware
|
|||||||
MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(FilterNodeLinearTransformSoftware,
|
MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(FilterNodeLinearTransformSoftware,
|
||||||
override)
|
override)
|
||||||
FilterNodeLinearTransferSoftware();
|
FilterNodeLinearTransferSoftware();
|
||||||
virtual const char *GetName() override { return "LinearTransfer"; }
|
const char *GetName() override { return "LinearTransfer"; }
|
||||||
using FilterNodeComponentTransferSoftware::SetAttribute;
|
using FilterNodeComponentTransferSoftware::SetAttribute;
|
||||||
virtual void SetAttribute(uint32_t aIndex, Float aValue) override;
|
void SetAttribute(uint32_t aIndex, Float aValue) override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void FillLookupTable(ptrdiff_t aComponent,
|
void FillLookupTable(ptrdiff_t aComponent, uint8_t aTable[256]) override;
|
||||||
uint8_t aTable[256]) override;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void FillLookupTableImpl(Float aSlope, Float aIntercept, uint8_t aTable[256]);
|
void FillLookupTableImpl(Float aSlope, Float aIntercept, uint8_t aTable[256]);
|
||||||
@@ -467,13 +452,12 @@ class FilterNodeGammaTransferSoftware
|
|||||||
MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(FilterNodeGammaTransferSoftware,
|
MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(FilterNodeGammaTransferSoftware,
|
||||||
override)
|
override)
|
||||||
FilterNodeGammaTransferSoftware();
|
FilterNodeGammaTransferSoftware();
|
||||||
virtual const char *GetName() override { return "GammaTransfer"; }
|
const char *GetName() override { return "GammaTransfer"; }
|
||||||
using FilterNodeComponentTransferSoftware::SetAttribute;
|
using FilterNodeComponentTransferSoftware::SetAttribute;
|
||||||
virtual void SetAttribute(uint32_t aIndex, Float aValue) override;
|
void SetAttribute(uint32_t aIndex, Float aValue) override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void FillLookupTable(ptrdiff_t aComponent,
|
void FillLookupTable(ptrdiff_t aComponent, uint8_t aTable[256]) override;
|
||||||
uint8_t aTable[256]) override;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void FillLookupTableImpl(Float aAmplitude, Float aExponent, Float aOffset,
|
void FillLookupTableImpl(Float aAmplitude, Float aExponent, Float aOffset,
|
||||||
@@ -498,29 +482,25 @@ class FilterNodeConvolveMatrixSoftware : public FilterNodeSoftware {
|
|||||||
MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(FilterNodeConvolveMatrixSoftware,
|
MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(FilterNodeConvolveMatrixSoftware,
|
||||||
override)
|
override)
|
||||||
FilterNodeConvolveMatrixSoftware();
|
FilterNodeConvolveMatrixSoftware();
|
||||||
virtual const char *GetName() override { return "ConvolveMatrix"; }
|
const char *GetName() override { return "ConvolveMatrix"; }
|
||||||
using FilterNodeSoftware::SetAttribute;
|
using FilterNodeSoftware::SetAttribute;
|
||||||
virtual void SetAttribute(uint32_t aIndex,
|
void SetAttribute(uint32_t aIndex, const IntSize &aKernelSize) override;
|
||||||
const IntSize &aKernelSize) override;
|
void SetAttribute(uint32_t aIndex, const Float *aMatrix,
|
||||||
virtual void SetAttribute(uint32_t aIndex, const Float *aMatrix,
|
|
||||||
uint32_t aSize) override;
|
uint32_t aSize) override;
|
||||||
virtual void SetAttribute(uint32_t aIndex, Float aValue) override;
|
void SetAttribute(uint32_t aIndex, Float aValue) override;
|
||||||
virtual void SetAttribute(uint32_t aIndex,
|
void SetAttribute(uint32_t aIndex, const Size &aKernelUnitLength) override;
|
||||||
const Size &aKernelUnitLength) override;
|
void SetAttribute(uint32_t aIndex, const IntRect &aSourceRect) override;
|
||||||
virtual void SetAttribute(uint32_t aIndex,
|
void SetAttribute(uint32_t aIndex, const IntPoint &aTarget) override;
|
||||||
const IntRect &aSourceRect) override;
|
void SetAttribute(uint32_t aIndex, uint32_t aEdgeMode) override;
|
||||||
virtual void SetAttribute(uint32_t aIndex, const IntPoint &aTarget) override;
|
void SetAttribute(uint32_t aIndex, bool aPreserveAlpha) override;
|
||||||
virtual void SetAttribute(uint32_t aIndex, uint32_t aEdgeMode) override;
|
IntRect MapRectToSource(const IntRect &aRect, const IntRect &aMax,
|
||||||
virtual void SetAttribute(uint32_t aIndex, bool aPreserveAlpha) override;
|
|
||||||
virtual IntRect MapRectToSource(const IntRect &aRect, const IntRect &aMax,
|
|
||||||
FilterNode *aSourceNode) override;
|
FilterNode *aSourceNode) override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual already_AddRefed<DataSourceSurface> Render(
|
already_AddRefed<DataSourceSurface> Render(const IntRect &aRect) override;
|
||||||
const IntRect &aRect) override;
|
IntRect GetOutputRectInRect(const IntRect &aRect) override;
|
||||||
virtual IntRect GetOutputRectInRect(const IntRect &aRect) override;
|
int32_t InputIndex(uint32_t aInputEnumIndex) override;
|
||||||
virtual int32_t InputIndex(uint32_t aInputEnumIndex) override;
|
void RequestFromInputsForRect(const IntRect &aRect) override;
|
||||||
virtual void RequestFromInputsForRect(const IntRect &aRect) override;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
template <typename CoordType>
|
template <typename CoordType>
|
||||||
@@ -547,19 +527,18 @@ class FilterNodeDisplacementMapSoftware : public FilterNodeSoftware {
|
|||||||
MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(FilterNodeDisplacementMapSoftware,
|
MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(FilterNodeDisplacementMapSoftware,
|
||||||
override)
|
override)
|
||||||
FilterNodeDisplacementMapSoftware();
|
FilterNodeDisplacementMapSoftware();
|
||||||
virtual const char *GetName() override { return "DisplacementMap"; }
|
const char *GetName() override { return "DisplacementMap"; }
|
||||||
using FilterNodeSoftware::SetAttribute;
|
using FilterNodeSoftware::SetAttribute;
|
||||||
virtual void SetAttribute(uint32_t aIndex, Float aScale) override;
|
void SetAttribute(uint32_t aIndex, Float aScale) override;
|
||||||
virtual void SetAttribute(uint32_t aIndex, uint32_t aValue) override;
|
void SetAttribute(uint32_t aIndex, uint32_t aValue) override;
|
||||||
virtual IntRect MapRectToSource(const IntRect &aRect, const IntRect &aMax,
|
IntRect MapRectToSource(const IntRect &aRect, const IntRect &aMax,
|
||||||
FilterNode *aSourceNode) override;
|
FilterNode *aSourceNode) override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual already_AddRefed<DataSourceSurface> Render(
|
already_AddRefed<DataSourceSurface> Render(const IntRect &aRect) override;
|
||||||
const IntRect &aRect) override;
|
IntRect GetOutputRectInRect(const IntRect &aRect) override;
|
||||||
virtual IntRect GetOutputRectInRect(const IntRect &aRect) override;
|
int32_t InputIndex(uint32_t aInputEnumIndex) override;
|
||||||
virtual int32_t InputIndex(uint32_t aInputEnumIndex) override;
|
void RequestFromInputsForRect(const IntRect &aRect) override;
|
||||||
virtual void RequestFromInputsForRect(const IntRect &aRect) override;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
IntRect InflatedSourceOrDestRect(const IntRect &aDestOrSourceRect);
|
IntRect InflatedSourceOrDestRect(const IntRect &aDestOrSourceRect);
|
||||||
@@ -574,21 +553,19 @@ class FilterNodeTurbulenceSoftware : public FilterNodeSoftware {
|
|||||||
MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(FilterNodeTurbulenceSoftware,
|
MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(FilterNodeTurbulenceSoftware,
|
||||||
override)
|
override)
|
||||||
FilterNodeTurbulenceSoftware();
|
FilterNodeTurbulenceSoftware();
|
||||||
virtual const char *GetName() override { return "Turbulence"; }
|
const char *GetName() override { return "Turbulence"; }
|
||||||
using FilterNodeSoftware::SetAttribute;
|
using FilterNodeSoftware::SetAttribute;
|
||||||
virtual void SetAttribute(uint32_t aIndex, const Size &aSize) override;
|
void SetAttribute(uint32_t aIndex, const Size &aSize) override;
|
||||||
virtual void SetAttribute(uint32_t aIndex,
|
void SetAttribute(uint32_t aIndex, const IntRect &aRenderRect) override;
|
||||||
const IntRect &aRenderRect) override;
|
void SetAttribute(uint32_t aIndex, bool aStitchable) override;
|
||||||
virtual void SetAttribute(uint32_t aIndex, bool aStitchable) override;
|
void SetAttribute(uint32_t aIndex, uint32_t aValue) override;
|
||||||
virtual void SetAttribute(uint32_t aIndex, uint32_t aValue) override;
|
IntRect MapRectToSource(const IntRect &aRect, const IntRect &aMax,
|
||||||
virtual IntRect MapRectToSource(const IntRect &aRect, const IntRect &aMax,
|
|
||||||
FilterNode *aSourceNode) override;
|
FilterNode *aSourceNode) override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual already_AddRefed<DataSourceSurface> Render(
|
already_AddRefed<DataSourceSurface> Render(const IntRect &aRect) override;
|
||||||
const IntRect &aRect) override;
|
IntRect GetOutputRectInRect(const IntRect &aRect) override;
|
||||||
virtual IntRect GetOutputRectInRect(const IntRect &aRect) override;
|
int32_t InputIndex(uint32_t aInputEnumIndex) override;
|
||||||
virtual int32_t InputIndex(uint32_t aInputEnumIndex) override;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
IntRect mRenderRect;
|
IntRect mRenderRect;
|
||||||
@@ -604,19 +581,18 @@ class FilterNodeArithmeticCombineSoftware : public FilterNodeSoftware {
|
|||||||
MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(FilterNodeArithmeticCombineSoftware,
|
MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(FilterNodeArithmeticCombineSoftware,
|
||||||
override)
|
override)
|
||||||
FilterNodeArithmeticCombineSoftware();
|
FilterNodeArithmeticCombineSoftware();
|
||||||
virtual const char *GetName() override { return "ArithmeticCombine"; }
|
const char *GetName() override { return "ArithmeticCombine"; }
|
||||||
using FilterNodeSoftware::SetAttribute;
|
using FilterNodeSoftware::SetAttribute;
|
||||||
virtual void SetAttribute(uint32_t aIndex, const Float *aFloat,
|
void SetAttribute(uint32_t aIndex, const Float *aFloat,
|
||||||
uint32_t aSize) override;
|
uint32_t aSize) override;
|
||||||
virtual IntRect MapRectToSource(const IntRect &aRect, const IntRect &aMax,
|
IntRect MapRectToSource(const IntRect &aRect, const IntRect &aMax,
|
||||||
FilterNode *aSourceNode) override;
|
FilterNode *aSourceNode) override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual already_AddRefed<DataSourceSurface> Render(
|
already_AddRefed<DataSourceSurface> Render(const IntRect &aRect) override;
|
||||||
const IntRect &aRect) override;
|
IntRect GetOutputRectInRect(const IntRect &aRect) override;
|
||||||
virtual IntRect GetOutputRectInRect(const IntRect &aRect) override;
|
int32_t InputIndex(uint32_t aInputEnumIndex) override;
|
||||||
virtual int32_t InputIndex(uint32_t aInputEnumIndex) override;
|
void RequestFromInputsForRect(const IntRect &aRect) override;
|
||||||
virtual void RequestFromInputsForRect(const IntRect &aRect) override;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Float mK1;
|
Float mK1;
|
||||||
@@ -629,17 +605,16 @@ class FilterNodeCompositeSoftware : public FilterNodeSoftware {
|
|||||||
public:
|
public:
|
||||||
MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(FilterNodeCompositeSoftware, override)
|
MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(FilterNodeCompositeSoftware, override)
|
||||||
FilterNodeCompositeSoftware();
|
FilterNodeCompositeSoftware();
|
||||||
virtual const char *GetName() override { return "Composite"; }
|
const char *GetName() override { return "Composite"; }
|
||||||
using FilterNodeSoftware::SetAttribute;
|
using FilterNodeSoftware::SetAttribute;
|
||||||
virtual void SetAttribute(uint32_t aIndex, uint32_t aOperator) override;
|
void SetAttribute(uint32_t aIndex, uint32_t aOperator) override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual already_AddRefed<DataSourceSurface> Render(
|
already_AddRefed<DataSourceSurface> Render(const IntRect &aRect) override;
|
||||||
const IntRect &aRect) override;
|
IntRect GetOutputRectInRect(const IntRect &aRect) override;
|
||||||
virtual IntRect GetOutputRectInRect(const IntRect &aRect) override;
|
int32_t InputIndex(uint32_t aInputEnumIndex) override;
|
||||||
virtual int32_t InputIndex(uint32_t aInputEnumIndex) override;
|
void RequestFromInputsForRect(const IntRect &aRect) override;
|
||||||
virtual void RequestFromInputsForRect(const IntRect &aRect) override;
|
IntRect MapRectToSource(const IntRect &aRect, const IntRect &aMax,
|
||||||
virtual IntRect MapRectToSource(const IntRect &aRect, const IntRect &aMax,
|
|
||||||
FilterNode *aSourceNode) override;
|
FilterNode *aSourceNode) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@@ -652,13 +627,12 @@ class FilterNodeBlurXYSoftware : public FilterNodeSoftware {
|
|||||||
public:
|
public:
|
||||||
MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(FilterNodeBlurXYSoftware, override)
|
MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(FilterNodeBlurXYSoftware, override)
|
||||||
protected:
|
protected:
|
||||||
virtual already_AddRefed<DataSourceSurface> Render(
|
already_AddRefed<DataSourceSurface> Render(const IntRect &aRect) override;
|
||||||
const IntRect &aRect) override;
|
IntRect GetOutputRectInRect(const IntRect &aRect) override;
|
||||||
virtual IntRect GetOutputRectInRect(const IntRect &aRect) override;
|
int32_t InputIndex(uint32_t aInputEnumIndex) override;
|
||||||
virtual int32_t InputIndex(uint32_t aInputEnumIndex) override;
|
|
||||||
IntRect InflatedSourceOrDestRect(const IntRect &aDestRect);
|
IntRect InflatedSourceOrDestRect(const IntRect &aDestRect);
|
||||||
virtual void RequestFromInputsForRect(const IntRect &aRect) override;
|
void RequestFromInputsForRect(const IntRect &aRect) override;
|
||||||
virtual IntRect MapRectToSource(const IntRect &aRect, const IntRect &aMax,
|
IntRect MapRectToSource(const IntRect &aRect, const IntRect &aMax,
|
||||||
FilterNode *aSourceNode) override;
|
FilterNode *aSourceNode) override;
|
||||||
|
|
||||||
// Implemented by subclasses.
|
// Implemented by subclasses.
|
||||||
@@ -670,12 +644,12 @@ class FilterNodeGaussianBlurSoftware : public FilterNodeBlurXYSoftware {
|
|||||||
MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(FilterNodeGaussianBlurSoftware,
|
MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(FilterNodeGaussianBlurSoftware,
|
||||||
override)
|
override)
|
||||||
FilterNodeGaussianBlurSoftware();
|
FilterNodeGaussianBlurSoftware();
|
||||||
virtual const char *GetName() override { return "GaussianBlur"; }
|
const char *GetName() override { return "GaussianBlur"; }
|
||||||
using FilterNodeSoftware::SetAttribute;
|
using FilterNodeSoftware::SetAttribute;
|
||||||
virtual void SetAttribute(uint32_t aIndex, Float aStdDeviation) override;
|
void SetAttribute(uint32_t aIndex, Float aStdDeviation) override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual Size StdDeviationXY() override;
|
Size StdDeviationXY() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Float mStdDeviation;
|
Float mStdDeviation;
|
||||||
@@ -686,13 +660,13 @@ class FilterNodeDirectionalBlurSoftware : public FilterNodeBlurXYSoftware {
|
|||||||
MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(FilterNodeDirectionalBlurSoftware,
|
MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(FilterNodeDirectionalBlurSoftware,
|
||||||
override)
|
override)
|
||||||
FilterNodeDirectionalBlurSoftware();
|
FilterNodeDirectionalBlurSoftware();
|
||||||
virtual const char *GetName() override { return "DirectionalBlur"; }
|
const char *GetName() override { return "DirectionalBlur"; }
|
||||||
using FilterNodeSoftware::SetAttribute;
|
using FilterNodeSoftware::SetAttribute;
|
||||||
virtual void SetAttribute(uint32_t aIndex, Float aStdDeviation) override;
|
void SetAttribute(uint32_t aIndex, Float aStdDeviation) override;
|
||||||
virtual void SetAttribute(uint32_t aIndex, uint32_t aBlurDirection) override;
|
void SetAttribute(uint32_t aIndex, uint32_t aBlurDirection) override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual Size StdDeviationXY() override;
|
Size StdDeviationXY() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Float mStdDeviation;
|
Float mStdDeviation;
|
||||||
@@ -702,17 +676,16 @@ class FilterNodeDirectionalBlurSoftware : public FilterNodeBlurXYSoftware {
|
|||||||
class FilterNodeCropSoftware : public FilterNodeSoftware {
|
class FilterNodeCropSoftware : public FilterNodeSoftware {
|
||||||
public:
|
public:
|
||||||
MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(FilterNodeCropSoftware, override)
|
MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(FilterNodeCropSoftware, override)
|
||||||
virtual const char *GetName() override { return "Crop"; }
|
const char *GetName() override { return "Crop"; }
|
||||||
using FilterNodeSoftware::SetAttribute;
|
using FilterNodeSoftware::SetAttribute;
|
||||||
virtual void SetAttribute(uint32_t aIndex, const Rect &aSourceRect) override;
|
void SetAttribute(uint32_t aIndex, const Rect &aSourceRect) override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual already_AddRefed<DataSourceSurface> Render(
|
already_AddRefed<DataSourceSurface> Render(const IntRect &aRect) override;
|
||||||
const IntRect &aRect) override;
|
IntRect GetOutputRectInRect(const IntRect &aRect) override;
|
||||||
virtual IntRect GetOutputRectInRect(const IntRect &aRect) override;
|
int32_t InputIndex(uint32_t aInputEnumIndex) override;
|
||||||
virtual int32_t InputIndex(uint32_t aInputEnumIndex) override;
|
void RequestFromInputsForRect(const IntRect &aRect) override;
|
||||||
virtual void RequestFromInputsForRect(const IntRect &aRect) override;
|
IntRect MapRectToSource(const IntRect &aRect, const IntRect &aMax,
|
||||||
virtual IntRect MapRectToSource(const IntRect &aRect, const IntRect &aMax,
|
|
||||||
FilterNode *aSourceNode) override;
|
FilterNode *aSourceNode) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@@ -723,15 +696,14 @@ class FilterNodePremultiplySoftware : public FilterNodeSoftware {
|
|||||||
public:
|
public:
|
||||||
MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(FilterNodePremultiplySoftware,
|
MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(FilterNodePremultiplySoftware,
|
||||||
override)
|
override)
|
||||||
virtual const char *GetName() override { return "Premultiply"; }
|
const char *GetName() override { return "Premultiply"; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual already_AddRefed<DataSourceSurface> Render(
|
already_AddRefed<DataSourceSurface> Render(const IntRect &aRect) override;
|
||||||
const IntRect &aRect) override;
|
IntRect GetOutputRectInRect(const IntRect &aRect) override;
|
||||||
virtual IntRect GetOutputRectInRect(const IntRect &aRect) override;
|
int32_t InputIndex(uint32_t aInputEnumIndex) override;
|
||||||
virtual int32_t InputIndex(uint32_t aInputEnumIndex) override;
|
void RequestFromInputsForRect(const IntRect &aRect) override;
|
||||||
virtual void RequestFromInputsForRect(const IntRect &aRect) override;
|
IntRect MapRectToSource(const IntRect &aRect, const IntRect &aMax,
|
||||||
virtual IntRect MapRectToSource(const IntRect &aRect, const IntRect &aMax,
|
|
||||||
FilterNode *aSourceNode) override;
|
FilterNode *aSourceNode) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -739,33 +711,31 @@ class FilterNodeUnpremultiplySoftware : public FilterNodeSoftware {
|
|||||||
public:
|
public:
|
||||||
MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(FilterNodeUnpremultiplySoftware,
|
MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(FilterNodeUnpremultiplySoftware,
|
||||||
override)
|
override)
|
||||||
virtual const char *GetName() override { return "Unpremultiply"; }
|
const char *GetName() override { return "Unpremultiply"; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual already_AddRefed<DataSourceSurface> Render(
|
already_AddRefed<DataSourceSurface> Render(const IntRect &aRect) override;
|
||||||
const IntRect &aRect) override;
|
IntRect GetOutputRectInRect(const IntRect &aRect) override;
|
||||||
virtual IntRect GetOutputRectInRect(const IntRect &aRect) override;
|
int32_t InputIndex(uint32_t aInputEnumIndex) override;
|
||||||
virtual int32_t InputIndex(uint32_t aInputEnumIndex) override;
|
void RequestFromInputsForRect(const IntRect &aRect) override;
|
||||||
virtual void RequestFromInputsForRect(const IntRect &aRect) override;
|
IntRect MapRectToSource(const IntRect &aRect, const IntRect &aMax,
|
||||||
virtual IntRect MapRectToSource(const IntRect &aRect, const IntRect &aMax,
|
|
||||||
FilterNode *aSourceNode) override;
|
FilterNode *aSourceNode) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
class FilterNodeOpacitySoftware : public FilterNodeSoftware {
|
class FilterNodeOpacitySoftware : public FilterNodeSoftware {
|
||||||
public:
|
public:
|
||||||
MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(FilterNodeOpacitySoftware, override)
|
MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(FilterNodeOpacitySoftware, override)
|
||||||
virtual const char *GetName() override { return "Opacity"; }
|
const char *GetName() override { return "Opacity"; }
|
||||||
using FilterNodeSoftware::SetAttribute;
|
using FilterNodeSoftware::SetAttribute;
|
||||||
virtual void SetAttribute(uint32_t aIndex, Float aValue) override;
|
void SetAttribute(uint32_t aIndex, Float aValue) override;
|
||||||
virtual IntRect MapRectToSource(const IntRect &aRect, const IntRect &aMax,
|
IntRect MapRectToSource(const IntRect &aRect, const IntRect &aMax,
|
||||||
FilterNode *aSourceNode) override;
|
FilterNode *aSourceNode) override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual already_AddRefed<DataSourceSurface> Render(
|
already_AddRefed<DataSourceSurface> Render(const IntRect &aRect) override;
|
||||||
const IntRect &aRect) override;
|
IntRect GetOutputRectInRect(const IntRect &aRect) override;
|
||||||
virtual IntRect GetOutputRectInRect(const IntRect &aRect) override;
|
int32_t InputIndex(uint32_t aInputEnumIndex) override;
|
||||||
virtual int32_t InputIndex(uint32_t aInputEnumIndex) override;
|
void RequestFromInputsForRect(const IntRect &aRect) override;
|
||||||
virtual void RequestFromInputsForRect(const IntRect &aRect) override;
|
|
||||||
|
|
||||||
Float mValue = 1.0f;
|
Float mValue = 1.0f;
|
||||||
};
|
};
|
||||||
@@ -776,25 +746,24 @@ class FilterNodeLightingSoftware : public FilterNodeSoftware {
|
|||||||
#if defined(MOZILLA_INTERNAL_API) && \
|
#if defined(MOZILLA_INTERNAL_API) && \
|
||||||
(defined(DEBUG) || defined(FORCE_BUILD_REFCNT_LOGGING))
|
(defined(DEBUG) || defined(FORCE_BUILD_REFCNT_LOGGING))
|
||||||
// Helpers for refcounted
|
// Helpers for refcounted
|
||||||
virtual const char *typeName() const override { return mTypeName; }
|
const char *typeName() const override { return mTypeName; }
|
||||||
virtual size_t typeSize() const override { return sizeof(*this); }
|
size_t typeSize() const override { return sizeof(*this); }
|
||||||
#endif
|
#endif
|
||||||
explicit FilterNodeLightingSoftware(const char *aTypeName);
|
explicit FilterNodeLightingSoftware(const char *aTypeName);
|
||||||
virtual const char *GetName() override { return "Lighting"; }
|
const char *GetName() override { return "Lighting"; }
|
||||||
using FilterNodeSoftware::SetAttribute;
|
using FilterNodeSoftware::SetAttribute;
|
||||||
virtual void SetAttribute(uint32_t aIndex, Float) override;
|
void SetAttribute(uint32_t aIndex, Float) override;
|
||||||
virtual void SetAttribute(uint32_t aIndex, const Size &) override;
|
void SetAttribute(uint32_t aIndex, const Size &) override;
|
||||||
virtual void SetAttribute(uint32_t aIndex, const Point3D &) override;
|
void SetAttribute(uint32_t aIndex, const Point3D &) override;
|
||||||
virtual void SetAttribute(uint32_t aIndex, const Color &) override;
|
void SetAttribute(uint32_t aIndex, const Color &) override;
|
||||||
virtual IntRect MapRectToSource(const IntRect &aRect, const IntRect &aMax,
|
IntRect MapRectToSource(const IntRect &aRect, const IntRect &aMax,
|
||||||
FilterNode *aSourceNode) override;
|
FilterNode *aSourceNode) override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual already_AddRefed<DataSourceSurface> Render(
|
already_AddRefed<DataSourceSurface> Render(const IntRect &aRect) override;
|
||||||
const IntRect &aRect) override;
|
IntRect GetOutputRectInRect(const IntRect &aRect) override;
|
||||||
virtual IntRect GetOutputRectInRect(const IntRect &aRect) override;
|
int32_t InputIndex(uint32_t aInputEnumIndex) override;
|
||||||
virtual int32_t InputIndex(uint32_t aInputEnumIndex) override;
|
void RequestFromInputsForRect(const IntRect &aRect) override;
|
||||||
virtual void RequestFromInputsForRect(const IntRect &aRect) override;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
template <typename CoordType>
|
template <typename CoordType>
|
||||||
|
|||||||
@@ -370,7 +370,7 @@ enum OpacityInputs { IN_OPACITY_IN = 0 };
|
|||||||
class FilterNode : public external::AtomicRefCounted<FilterNode> {
|
class FilterNode : public external::AtomicRefCounted<FilterNode> {
|
||||||
public:
|
public:
|
||||||
MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(FilterNode)
|
MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(FilterNode)
|
||||||
virtual ~FilterNode() {}
|
virtual ~FilterNode() = default;
|
||||||
|
|
||||||
virtual FilterBackend GetBackendType() = 0;
|
virtual FilterBackend GetBackendType() = 0;
|
||||||
|
|
||||||
|
|||||||
@@ -12,9 +12,9 @@
|
|||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
namespace gfx {
|
namespace gfx {
|
||||||
|
|
||||||
class AutoRestoreTransform {
|
class AutoRestoreTransform final {
|
||||||
public:
|
public:
|
||||||
AutoRestoreTransform() {}
|
AutoRestoreTransform() = default;
|
||||||
|
|
||||||
explicit AutoRestoreTransform(DrawTarget *aTarget)
|
explicit AutoRestoreTransform(DrawTarget *aTarget)
|
||||||
: mDrawTarget(aTarget), mOldTransform(aTarget->GetTransform()) {}
|
: mDrawTarget(aTarget), mOldTransform(aTarget->GetTransform()) {}
|
||||||
@@ -38,7 +38,7 @@ class AutoRestoreTransform {
|
|||||||
Matrix mOldTransform;
|
Matrix mOldTransform;
|
||||||
};
|
};
|
||||||
|
|
||||||
class AutoPopClips {
|
class AutoPopClips final {
|
||||||
public:
|
public:
|
||||||
explicit AutoPopClips(DrawTarget *aTarget)
|
explicit AutoPopClips(DrawTarget *aTarget)
|
||||||
: mDrawTarget(aTarget), mPushCount(0) {
|
: mDrawTarget(aTarget), mPushCount(0) {
|
||||||
|
|||||||
@@ -867,7 +867,7 @@ class DCCommandSink : public ID2D1CommandSink {
|
|||||||
ID2D1DeviceContext *mCtx;
|
ID2D1DeviceContext *mCtx;
|
||||||
};
|
};
|
||||||
|
|
||||||
class MOZ_STACK_CLASS AutoRestoreFP {
|
class MOZ_STACK_CLASS AutoRestoreFP final {
|
||||||
public:
|
public:
|
||||||
AutoRestoreFP() {
|
AutoRestoreFP() {
|
||||||
// save the current floating point control word
|
// save the current floating point control word
|
||||||
|
|||||||
@@ -142,7 +142,7 @@ class SetEventJob : public Job {
|
|||||||
SyncObject* aCompletion = nullptr,
|
SyncObject* aCompletion = nullptr,
|
||||||
WorkerThread* aPinToWorker = nullptr);
|
WorkerThread* aPinToWorker = nullptr);
|
||||||
|
|
||||||
~SetEventJob();
|
virtual ~SetEventJob();
|
||||||
|
|
||||||
JobStatus Run() override;
|
JobStatus Run() override;
|
||||||
|
|
||||||
@@ -179,7 +179,7 @@ class SyncObject final : public external::AtomicRefCounted<SyncObject> {
|
|||||||
/// using muteces.
|
/// using muteces.
|
||||||
explicit SyncObject(uint32_t aNumPrerequisites = 1);
|
explicit SyncObject(uint32_t aNumPrerequisites = 1);
|
||||||
|
|
||||||
~SyncObject();
|
virtual ~SyncObject();
|
||||||
|
|
||||||
/// Attempt to register a task.
|
/// Attempt to register a task.
|
||||||
///
|
///
|
||||||
@@ -237,7 +237,7 @@ class WorkerThread {
|
|||||||
public:
|
public:
|
||||||
static WorkerThread* Create(MultiThreadedJobQueue* aJobQueue);
|
static WorkerThread* Create(MultiThreadedJobQueue* aJobQueue);
|
||||||
|
|
||||||
virtual ~WorkerThread() {}
|
virtual ~WorkerThread() = default;
|
||||||
|
|
||||||
void Run();
|
void Run();
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ class WorkerThreadPosix : public WorkerThread {
|
|||||||
static_cast<WorkerThread*>(this));
|
static_cast<WorkerThread*>(this));
|
||||||
}
|
}
|
||||||
|
|
||||||
~WorkerThreadPosix() override { pthread_join(mThread, nullptr); }
|
virtual ~WorkerThreadPosix() { pthread_join(mThread, nullptr); }
|
||||||
|
|
||||||
void SetName(const char*) override {
|
void SetName(const char*) override {
|
||||||
// XXX - temporarily disabled, see bug 1209039
|
// XXX - temporarily disabled, see bug 1209039
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ class WorkerThreadWin32 : public WorkerThread {
|
|||||||
static_cast<WorkerThread*>(this), 0, nullptr);
|
static_cast<WorkerThread*>(this), 0, nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
~WorkerThreadWin32() {
|
virtual ~WorkerThreadWin32() {
|
||||||
::WaitForSingleObject(mThread, INFINITE);
|
::WaitForSingleObject(mThread, INFINITE);
|
||||||
::CloseHandle(mThread);
|
::CloseHandle(mThread);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -212,7 +212,7 @@ typedef mozilla::Tuple<int32_t, std::string, double> LoggingRecordEntry;
|
|||||||
typedef std::vector<LoggingRecordEntry> LoggingRecord;
|
typedef std::vector<LoggingRecordEntry> LoggingRecord;
|
||||||
class LogForwarder {
|
class LogForwarder {
|
||||||
public:
|
public:
|
||||||
virtual ~LogForwarder() {}
|
virtual ~LogForwarder() = default;
|
||||||
virtual void Log(const std::string& aString) = 0;
|
virtual void Log(const std::string& aString) = 0;
|
||||||
virtual void CrashAction(LogReason aReason) = 0;
|
virtual void CrashAction(LogReason aReason) = 0;
|
||||||
virtual bool UpdateStringsVector(const std::string& aString) = 0;
|
virtual bool UpdateStringsVector(const std::string& aString) = 0;
|
||||||
@@ -257,7 +257,7 @@ void LogWStr(const wchar_t* aStr, std::stringstream& aOut);
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
template <int L, typename Logger = BasicLogger>
|
template <int L, typename Logger = BasicLogger>
|
||||||
class Log {
|
class Log final {
|
||||||
public:
|
public:
|
||||||
// The default is to have the prefix, have the new line, and for critical
|
// The default is to have the prefix, have the new line, and for critical
|
||||||
// logs assert on each call.
|
// logs assert on each call.
|
||||||
@@ -931,7 +931,7 @@ class TreeLog {
|
|||||||
};
|
};
|
||||||
|
|
||||||
template <int Level = LOG_DEBUG>
|
template <int Level = LOG_DEBUG>
|
||||||
class TreeAutoIndent {
|
class TreeAutoIndent final {
|
||||||
public:
|
public:
|
||||||
explicit TreeAutoIndent(TreeLog<Level>& aTreeLog) : mTreeLog(aTreeLog) {
|
explicit TreeAutoIndent(TreeLog<Level>& aTreeLog) : mTreeLog(aTreeLog) {
|
||||||
mTreeLog.IncreaseIndent();
|
mTreeLog.IncreaseIndent();
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ class NativeFontResourceGDI final : public NativeFontResource {
|
|||||||
static already_AddRefed<NativeFontResourceGDI> Create(uint8_t* aFontData,
|
static already_AddRefed<NativeFontResourceGDI> Create(uint8_t* aFontData,
|
||||||
uint32_t aDataLength);
|
uint32_t aDataLength);
|
||||||
|
|
||||||
~NativeFontResourceGDI();
|
virtual ~NativeFontResourceGDI();
|
||||||
|
|
||||||
already_AddRefed<UnscaledFont> CreateUnscaledFont(
|
already_AddRefed<UnscaledFont> CreateUnscaledFont(
|
||||||
uint32_t aIndex, const uint8_t* aInstanceData,
|
uint32_t aIndex, const uint8_t* aInstanceData,
|
||||||
|
|||||||
@@ -22,20 +22,18 @@ class PathBuilderCairo : public PathBuilder {
|
|||||||
|
|
||||||
explicit PathBuilderCairo(FillRule aFillRule);
|
explicit PathBuilderCairo(FillRule aFillRule);
|
||||||
|
|
||||||
virtual void MoveTo(const Point &aPoint) override;
|
void MoveTo(const Point &aPoint) override;
|
||||||
virtual void LineTo(const Point &aPoint) override;
|
void LineTo(const Point &aPoint) override;
|
||||||
virtual void BezierTo(const Point &aCP1, const Point &aCP2,
|
void BezierTo(const Point &aCP1, const Point &aCP2,
|
||||||
const Point &aCP3) override;
|
const Point &aCP3) override;
|
||||||
virtual void QuadraticBezierTo(const Point &aCP1, const Point &aCP2) override;
|
void QuadraticBezierTo(const Point &aCP1, const Point &aCP2) override;
|
||||||
virtual void Close() override;
|
void Close() override;
|
||||||
virtual void Arc(const Point &aOrigin, float aRadius, float aStartAngle,
|
void Arc(const Point &aOrigin, float aRadius, float aStartAngle,
|
||||||
float aEndAngle, bool aAntiClockwise = false) override;
|
float aEndAngle, bool aAntiClockwise = false) override;
|
||||||
virtual Point CurrentPoint() const override;
|
Point CurrentPoint() const override;
|
||||||
virtual already_AddRefed<Path> Finish() override;
|
already_AddRefed<Path> Finish() override;
|
||||||
|
|
||||||
virtual BackendType GetBackendType() const override {
|
BackendType GetBackendType() const override { return BackendType::CAIRO; }
|
||||||
return BackendType::CAIRO;
|
|
||||||
}
|
|
||||||
|
|
||||||
private: // data
|
private: // data
|
||||||
friend class PathCairo;
|
friend class PathCairo;
|
||||||
@@ -55,33 +53,30 @@ class PathCairo : public Path {
|
|||||||
PathCairo(FillRule aFillRule, std::vector<cairo_path_data_t> &aPathData,
|
PathCairo(FillRule aFillRule, std::vector<cairo_path_data_t> &aPathData,
|
||||||
const Point &aCurrentPoint);
|
const Point &aCurrentPoint);
|
||||||
explicit PathCairo(cairo_t *aContext);
|
explicit PathCairo(cairo_t *aContext);
|
||||||
~PathCairo();
|
virtual ~PathCairo();
|
||||||
|
|
||||||
virtual BackendType GetBackendType() const override {
|
BackendType GetBackendType() const override { return BackendType::CAIRO; }
|
||||||
return BackendType::CAIRO;
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual already_AddRefed<PathBuilder> CopyToBuilder(
|
already_AddRefed<PathBuilder> CopyToBuilder(
|
||||||
FillRule aFillRule) const override;
|
FillRule aFillRule) const override;
|
||||||
virtual already_AddRefed<PathBuilder> TransformedCopyToBuilder(
|
already_AddRefed<PathBuilder> TransformedCopyToBuilder(
|
||||||
const Matrix &aTransform, FillRule aFillRule) const override;
|
const Matrix &aTransform, FillRule aFillRule) const override;
|
||||||
|
|
||||||
virtual bool ContainsPoint(const Point &aPoint,
|
bool ContainsPoint(const Point &aPoint,
|
||||||
const Matrix &aTransform) const override;
|
const Matrix &aTransform) const override;
|
||||||
|
|
||||||
virtual bool StrokeContainsPoint(const StrokeOptions &aStrokeOptions,
|
bool StrokeContainsPoint(const StrokeOptions &aStrokeOptions,
|
||||||
const Point &aPoint,
|
const Point &aPoint,
|
||||||
const Matrix &aTransform) const override;
|
const Matrix &aTransform) const override;
|
||||||
|
|
||||||
virtual Rect GetBounds(const Matrix &aTransform = Matrix()) const override;
|
Rect GetBounds(const Matrix &aTransform = Matrix()) const override;
|
||||||
|
|
||||||
virtual Rect GetStrokedBounds(
|
Rect GetStrokedBounds(const StrokeOptions &aStrokeOptions,
|
||||||
const StrokeOptions &aStrokeOptions,
|
|
||||||
const Matrix &aTransform = Matrix()) const override;
|
const Matrix &aTransform = Matrix()) const override;
|
||||||
|
|
||||||
virtual void StreamToSink(PathSink *aSink) const override;
|
void StreamToSink(PathSink *aSink) const override;
|
||||||
|
|
||||||
virtual FillRule GetFillRule() const override { return mFillRule; }
|
FillRule GetFillRule() const override { return mFillRule; }
|
||||||
|
|
||||||
void SetPathOnContext(cairo_t *aContext) const;
|
void SetPathOnContext(cairo_t *aContext) const;
|
||||||
|
|
||||||
|
|||||||
@@ -23,22 +23,20 @@ class PathBuilderSkia : public PathBuilder {
|
|||||||
FillRule aFillRule);
|
FillRule aFillRule);
|
||||||
explicit PathBuilderSkia(FillRule aFillRule);
|
explicit PathBuilderSkia(FillRule aFillRule);
|
||||||
|
|
||||||
virtual void MoveTo(const Point &aPoint) override;
|
void MoveTo(const Point &aPoint) override;
|
||||||
virtual void LineTo(const Point &aPoint) override;
|
void LineTo(const Point &aPoint) override;
|
||||||
virtual void BezierTo(const Point &aCP1, const Point &aCP2,
|
void BezierTo(const Point &aCP1, const Point &aCP2,
|
||||||
const Point &aCP3) override;
|
const Point &aCP3) override;
|
||||||
virtual void QuadraticBezierTo(const Point &aCP1, const Point &aCP2) override;
|
void QuadraticBezierTo(const Point &aCP1, const Point &aCP2) override;
|
||||||
virtual void Close() override;
|
void Close() override;
|
||||||
virtual void Arc(const Point &aOrigin, float aRadius, float aStartAngle,
|
void Arc(const Point &aOrigin, float aRadius, float aStartAngle,
|
||||||
float aEndAngle, bool aAntiClockwise = false) override;
|
float aEndAngle, bool aAntiClockwise = false) override;
|
||||||
virtual Point CurrentPoint() const override;
|
Point CurrentPoint() const override;
|
||||||
virtual already_AddRefed<Path> Finish() override;
|
already_AddRefed<Path> Finish() override;
|
||||||
|
|
||||||
void AppendPath(const SkPath &aPath);
|
void AppendPath(const SkPath &aPath);
|
||||||
|
|
||||||
virtual BackendType GetBackendType() const override {
|
BackendType GetBackendType() const override { return BackendType::SKIA; }
|
||||||
return BackendType::SKIA;
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void SetFillRule(FillRule aFillRule);
|
void SetFillRule(FillRule aFillRule);
|
||||||
@@ -55,31 +53,28 @@ class PathSkia : public Path {
|
|||||||
mPath.swap(aPath);
|
mPath.swap(aPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual BackendType GetBackendType() const override {
|
BackendType GetBackendType() const override { return BackendType::SKIA; }
|
||||||
return BackendType::SKIA;
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual already_AddRefed<PathBuilder> CopyToBuilder(
|
already_AddRefed<PathBuilder> CopyToBuilder(
|
||||||
FillRule aFillRule) const override;
|
FillRule aFillRule) const override;
|
||||||
virtual already_AddRefed<PathBuilder> TransformedCopyToBuilder(
|
already_AddRefed<PathBuilder> TransformedCopyToBuilder(
|
||||||
const Matrix &aTransform, FillRule aFillRule) const override;
|
const Matrix &aTransform, FillRule aFillRule) const override;
|
||||||
|
|
||||||
virtual bool ContainsPoint(const Point &aPoint,
|
bool ContainsPoint(const Point &aPoint,
|
||||||
const Matrix &aTransform) const override;
|
const Matrix &aTransform) const override;
|
||||||
|
|
||||||
virtual bool StrokeContainsPoint(const StrokeOptions &aStrokeOptions,
|
bool StrokeContainsPoint(const StrokeOptions &aStrokeOptions,
|
||||||
const Point &aPoint,
|
const Point &aPoint,
|
||||||
const Matrix &aTransform) const override;
|
const Matrix &aTransform) const override;
|
||||||
|
|
||||||
virtual Rect GetBounds(const Matrix &aTransform = Matrix()) const override;
|
Rect GetBounds(const Matrix &aTransform = Matrix()) const override;
|
||||||
|
|
||||||
virtual Rect GetStrokedBounds(
|
Rect GetStrokedBounds(const StrokeOptions &aStrokeOptions,
|
||||||
const StrokeOptions &aStrokeOptions,
|
|
||||||
const Matrix &aTransform = Matrix()) const override;
|
const Matrix &aTransform = Matrix()) const override;
|
||||||
|
|
||||||
virtual void StreamToSink(PathSink *aSink) const override;
|
void StreamToSink(PathSink *aSink) const override;
|
||||||
|
|
||||||
virtual FillRule GetFillRule() const override { return mFillRule; }
|
FillRule GetFillRule() const override { return mFillRule; }
|
||||||
|
|
||||||
const SkPath &GetPath() const { return mPath; }
|
const SkPath &GetPath() const { return mPath; }
|
||||||
|
|
||||||
|
|||||||
@@ -25,11 +25,11 @@ namespace gfx {
|
|||||||
* particularly desirable to avoid the overhead of allocating on the
|
* particularly desirable to avoid the overhead of allocating on the
|
||||||
* free-store.
|
* free-store.
|
||||||
*/
|
*/
|
||||||
class GeneralPattern {
|
class GeneralPattern final {
|
||||||
public:
|
public:
|
||||||
explicit GeneralPattern() : mPattern(nullptr) {}
|
explicit GeneralPattern() = default;
|
||||||
|
|
||||||
GeneralPattern(const GeneralPattern &aOther) : mPattern(nullptr) {}
|
GeneralPattern(const GeneralPattern &aOther) {}
|
||||||
|
|
||||||
~GeneralPattern() {
|
~GeneralPattern() {
|
||||||
if (mPattern) {
|
if (mPattern) {
|
||||||
@@ -115,7 +115,7 @@ class GeneralPattern {
|
|||||||
AlignedStorage2<RadialGradientPattern> mRadialGradientPattern;
|
AlignedStorage2<RadialGradientPattern> mRadialGradientPattern;
|
||||||
AlignedStorage2<SurfacePattern> mSurfacePattern;
|
AlignedStorage2<SurfacePattern> mSurfacePattern;
|
||||||
};
|
};
|
||||||
Pattern *mPattern;
|
Pattern *mPattern = nullptr;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace gfx
|
} // namespace gfx
|
||||||
|
|||||||
@@ -157,7 +157,7 @@ class PolygonTyped {
|
|||||||
typedef Point4DTyped<Units> Point4DType;
|
typedef Point4DTyped<Units> Point4DType;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
PolygonTyped() {}
|
PolygonTyped() = default;
|
||||||
|
|
||||||
explicit PolygonTyped(const nsTArray<Point4DType>& aPoints,
|
explicit PolygonTyped(const nsTArray<Point4DType>& aPoints,
|
||||||
const Point4DType& aNormal = DefaultNormal())
|
const Point4DType& aNormal = DefaultNormal())
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ inline std::string StringFromPtr(ReferencePtr aPtr) {
|
|||||||
|
|
||||||
class Translator {
|
class Translator {
|
||||||
public:
|
public:
|
||||||
virtual ~Translator() {}
|
virtual ~Translator() = default;
|
||||||
|
|
||||||
virtual DrawTarget *LookupDrawTarget(ReferencePtr aRefPtr) = 0;
|
virtual DrawTarget *LookupDrawTarget(ReferencePtr aRefPtr) = 0;
|
||||||
virtual Path *LookupPath(ReferencePtr aRefPtr) = 0;
|
virtual Path *LookupPath(ReferencePtr aRefPtr) = 0;
|
||||||
@@ -253,7 +253,7 @@ class RecordedEvent {
|
|||||||
static const uint32_t kTotalEventTypes =
|
static const uint32_t kTotalEventTypes =
|
||||||
RecordedEvent::FILTERNODESETINPUT + 1;
|
RecordedEvent::FILTERNODESETINPUT + 1;
|
||||||
|
|
||||||
virtual ~RecordedEvent() {}
|
virtual ~RecordedEvent() = default;
|
||||||
|
|
||||||
static std::string GetEventName(EventType aType);
|
static std::string GetEventName(EventType aType);
|
||||||
|
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ class RecordedEventDerived : public RecordedEvent {
|
|||||||
template <class Derived>
|
template <class Derived>
|
||||||
class RecordedDrawingEvent : public RecordedEventDerived<Derived> {
|
class RecordedDrawingEvent : public RecordedEventDerived<Derived> {
|
||||||
public:
|
public:
|
||||||
virtual ReferencePtr GetDestinedDT() override { return mDT; }
|
ReferencePtr GetDestinedDT() override { return mDT; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
RecordedDrawingEvent(RecordedEvent::EventType aType, DrawTarget *aTarget)
|
RecordedDrawingEvent(RecordedEvent::EventType aType, DrawTarget *aTarget)
|
||||||
@@ -54,7 +54,7 @@ class RecordedDrawingEvent : public RecordedEventDerived<Derived> {
|
|||||||
template <class S>
|
template <class S>
|
||||||
void Record(S &aStream) const;
|
void Record(S &aStream) const;
|
||||||
|
|
||||||
virtual ReferencePtr GetObjectRef() const override;
|
ReferencePtr GetObjectRef() const override;
|
||||||
|
|
||||||
ReferencePtr mDT;
|
ReferencePtr mDT;
|
||||||
};
|
};
|
||||||
@@ -74,15 +74,15 @@ class RecordedDrawTargetCreation
|
|||||||
mHasExistingData(aHasExistingData),
|
mHasExistingData(aHasExistingData),
|
||||||
mExistingData(aExistingData) {}
|
mExistingData(aExistingData) {}
|
||||||
|
|
||||||
virtual bool PlayEvent(Translator *aTranslator) const override;
|
bool PlayEvent(Translator *aTranslator) const override;
|
||||||
|
|
||||||
template <class S>
|
template <class S>
|
||||||
void Record(S &aStream) const;
|
void Record(S &aStream) const;
|
||||||
virtual void OutputSimpleEventInfo(
|
virtual void OutputSimpleEventInfo(
|
||||||
std::stringstream &aStringStream) const override;
|
std::stringstream &aStringStream) const override;
|
||||||
|
|
||||||
virtual std::string GetName() const override { return "DrawTarget Creation"; }
|
std::string GetName() const override { return "DrawTarget Creation"; }
|
||||||
virtual ReferencePtr GetObjectRef() const override { return mRefPtr; }
|
ReferencePtr GetObjectRef() const override { return mRefPtr; }
|
||||||
|
|
||||||
ReferencePtr mRefPtr;
|
ReferencePtr mRefPtr;
|
||||||
BackendType mBackendType;
|
BackendType mBackendType;
|
||||||
@@ -106,17 +106,14 @@ class RecordedDrawTargetDestruction
|
|||||||
mRefPtr(aRefPtr),
|
mRefPtr(aRefPtr),
|
||||||
mBackendType(BackendType::NONE) {}
|
mBackendType(BackendType::NONE) {}
|
||||||
|
|
||||||
virtual bool PlayEvent(Translator *aTranslator) const override;
|
bool PlayEvent(Translator *aTranslator) const override;
|
||||||
|
|
||||||
template <class S>
|
template <class S>
|
||||||
void Record(S &aStream) const;
|
void Record(S &aStream) const;
|
||||||
virtual void OutputSimpleEventInfo(
|
void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
|
||||||
std::stringstream &aStringStream) const override;
|
|
||||||
|
|
||||||
virtual std::string GetName() const override {
|
std::string GetName() const override { return "DrawTarget Destruction"; }
|
||||||
return "DrawTarget Destruction";
|
ReferencePtr GetObjectRef() const override { return mRefPtr; }
|
||||||
}
|
|
||||||
virtual ReferencePtr GetObjectRef() const override { return mRefPtr; }
|
|
||||||
|
|
||||||
ReferencePtr mRefPtr;
|
ReferencePtr mRefPtr;
|
||||||
|
|
||||||
@@ -139,17 +136,15 @@ class RecordedCreateSimilarDrawTarget
|
|||||||
mSize(aSize),
|
mSize(aSize),
|
||||||
mFormat(aFormat) {}
|
mFormat(aFormat) {}
|
||||||
|
|
||||||
virtual bool PlayEvent(Translator *aTranslator) const override;
|
bool PlayEvent(Translator *aTranslator) const override;
|
||||||
|
|
||||||
template <class S>
|
template <class S>
|
||||||
void Record(S &aStream) const;
|
void Record(S &aStream) const;
|
||||||
virtual void OutputSimpleEventInfo(
|
virtual void OutputSimpleEventInfo(
|
||||||
std::stringstream &aStringStream) const override;
|
std::stringstream &aStringStream) const override;
|
||||||
|
|
||||||
virtual std::string GetName() const override {
|
std::string GetName() const override { return "CreateSimilarDrawTarget"; }
|
||||||
return "CreateSimilarDrawTarget";
|
ReferencePtr GetObjectRef() const override { return mRefPtr; }
|
||||||
}
|
|
||||||
virtual ReferencePtr GetObjectRef() const override { return mRefPtr; }
|
|
||||||
|
|
||||||
ReferencePtr mRefPtr;
|
ReferencePtr mRefPtr;
|
||||||
IntSize mSize;
|
IntSize mSize;
|
||||||
@@ -174,17 +169,15 @@ class RecordedCreateClippedDrawTarget
|
|||||||
mTransform(aTransform),
|
mTransform(aTransform),
|
||||||
mFormat(aFormat) {}
|
mFormat(aFormat) {}
|
||||||
|
|
||||||
virtual bool PlayEvent(Translator *aTranslator) const override;
|
bool PlayEvent(Translator *aTranslator) const override;
|
||||||
|
|
||||||
template <class S>
|
template <class S>
|
||||||
void Record(S &aStream) const;
|
void Record(S &aStream) const;
|
||||||
virtual void OutputSimpleEventInfo(
|
virtual void OutputSimpleEventInfo(
|
||||||
std::stringstream &aStringStream) const override;
|
std::stringstream &aStringStream) const override;
|
||||||
|
|
||||||
virtual std::string GetName() const override {
|
std::string GetName() const override { return "CreateClippedDrawTarget"; }
|
||||||
return "CreateClippedDrawTarget";
|
ReferencePtr GetObjectRef() const override { return mRefPtr; }
|
||||||
}
|
|
||||||
virtual ReferencePtr GetObjectRef() const override { return mRefPtr; }
|
|
||||||
|
|
||||||
ReferencePtr mRefPtr;
|
ReferencePtr mRefPtr;
|
||||||
IntSize mMaxSize;
|
IntSize mMaxSize;
|
||||||
@@ -216,17 +209,17 @@ class RecordedCreateDrawTargetForFilter
|
|||||||
mSourceRect(aSourceRect),
|
mSourceRect(aSourceRect),
|
||||||
mDestPoint(aDestPoint) {}
|
mDestPoint(aDestPoint) {}
|
||||||
|
|
||||||
virtual bool PlayEvent(Translator *aTranslator) const override;
|
bool PlayEvent(Translator *aTranslator) const override;
|
||||||
|
|
||||||
template <class S>
|
template <class S>
|
||||||
void Record(S &aStream) const;
|
void Record(S &aStream) const;
|
||||||
virtual void OutputSimpleEventInfo(
|
virtual void OutputSimpleEventInfo(
|
||||||
std::stringstream &aStringStream) const override;
|
std::stringstream &aStringStream) const override;
|
||||||
|
|
||||||
virtual std::string GetName() const override {
|
std::string GetName() const override {
|
||||||
return "CreateSimilarDrawTargetForFilter";
|
return "CreateSimilarDrawTargetForFilter";
|
||||||
}
|
}
|
||||||
virtual ReferencePtr GetObjectRef() const override { return mRefPtr; }
|
ReferencePtr GetObjectRef() const override { return mRefPtr; }
|
||||||
|
|
||||||
ReferencePtr mRefPtr;
|
ReferencePtr mRefPtr;
|
||||||
IntSize mMaxSize;
|
IntSize mMaxSize;
|
||||||
@@ -254,14 +247,13 @@ class RecordedFillRect : public RecordedDrawingEvent<RecordedFillRect> {
|
|||||||
StorePattern(mPattern, aPattern);
|
StorePattern(mPattern, aPattern);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual bool PlayEvent(Translator *aTranslator) const override;
|
bool PlayEvent(Translator *aTranslator) const override;
|
||||||
|
|
||||||
template <class S>
|
template <class S>
|
||||||
void Record(S &aStream) const;
|
void Record(S &aStream) const;
|
||||||
virtual void OutputSimpleEventInfo(
|
void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
|
||||||
std::stringstream &aStringStream) const override;
|
|
||||||
|
|
||||||
virtual std::string GetName() const override { return "FillRect"; }
|
std::string GetName() const override { return "FillRect"; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
friend class RecordedEvent;
|
friend class RecordedEvent;
|
||||||
@@ -288,14 +280,13 @@ class RecordedStrokeRect : public RecordedDrawingEvent<RecordedStrokeRect> {
|
|||||||
StorePattern(mPattern, aPattern);
|
StorePattern(mPattern, aPattern);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual bool PlayEvent(Translator *aTranslator) const override;
|
bool PlayEvent(Translator *aTranslator) const override;
|
||||||
|
|
||||||
template <class S>
|
template <class S>
|
||||||
void Record(S &aStream) const;
|
void Record(S &aStream) const;
|
||||||
virtual void OutputSimpleEventInfo(
|
void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
|
||||||
std::stringstream &aStringStream) const override;
|
|
||||||
|
|
||||||
virtual std::string GetName() const override { return "StrokeRect"; }
|
std::string GetName() const override { return "StrokeRect"; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
friend class RecordedEvent;
|
friend class RecordedEvent;
|
||||||
@@ -324,14 +315,13 @@ class RecordedStrokeLine : public RecordedDrawingEvent<RecordedStrokeLine> {
|
|||||||
StorePattern(mPattern, aPattern);
|
StorePattern(mPattern, aPattern);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual bool PlayEvent(Translator *aTranslator) const override;
|
bool PlayEvent(Translator *aTranslator) const override;
|
||||||
|
|
||||||
template <class S>
|
template <class S>
|
||||||
void Record(S &aStream) const;
|
void Record(S &aStream) const;
|
||||||
virtual void OutputSimpleEventInfo(
|
void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
|
||||||
std::stringstream &aStringStream) const override;
|
|
||||||
|
|
||||||
virtual std::string GetName() const override { return "StrokeLine"; }
|
std::string GetName() const override { return "StrokeLine"; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
friend class RecordedEvent;
|
friend class RecordedEvent;
|
||||||
@@ -357,14 +347,13 @@ class RecordedFill : public RecordedDrawingEvent<RecordedFill> {
|
|||||||
StorePattern(mPattern, aPattern);
|
StorePattern(mPattern, aPattern);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual bool PlayEvent(Translator *aTranslator) const override;
|
bool PlayEvent(Translator *aTranslator) const override;
|
||||||
|
|
||||||
template <class S>
|
template <class S>
|
||||||
void Record(S &aStream) const;
|
void Record(S &aStream) const;
|
||||||
virtual void OutputSimpleEventInfo(
|
void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
|
||||||
std::stringstream &aStringStream) const override;
|
|
||||||
|
|
||||||
virtual std::string GetName() const override { return "Fill"; }
|
std::string GetName() const override { return "Fill"; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
friend class RecordedEvent;
|
friend class RecordedEvent;
|
||||||
@@ -393,14 +382,13 @@ class RecordedFillGlyphs : public RecordedDrawingEvent<RecordedFillGlyphs> {
|
|||||||
}
|
}
|
||||||
virtual ~RecordedFillGlyphs();
|
virtual ~RecordedFillGlyphs();
|
||||||
|
|
||||||
virtual bool PlayEvent(Translator *aTranslator) const override;
|
bool PlayEvent(Translator *aTranslator) const override;
|
||||||
|
|
||||||
template <class S>
|
template <class S>
|
||||||
void Record(S &aStream) const;
|
void Record(S &aStream) const;
|
||||||
virtual void OutputSimpleEventInfo(
|
void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
|
||||||
std::stringstream &aStringStream) const override;
|
|
||||||
|
|
||||||
virtual std::string GetName() const override { return "FillGlyphs"; }
|
std::string GetName() const override { return "FillGlyphs"; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
friend class RecordedEvent;
|
friend class RecordedEvent;
|
||||||
@@ -427,14 +415,13 @@ class RecordedMask : public RecordedDrawingEvent<RecordedMask> {
|
|||||||
StorePattern(mMask, aMask);
|
StorePattern(mMask, aMask);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual bool PlayEvent(Translator *aTranslator) const override;
|
bool PlayEvent(Translator *aTranslator) const override;
|
||||||
|
|
||||||
template <class S>
|
template <class S>
|
||||||
void Record(S &aStream) const;
|
void Record(S &aStream) const;
|
||||||
virtual void OutputSimpleEventInfo(
|
void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
|
||||||
std::stringstream &aStringStream) const override;
|
|
||||||
|
|
||||||
virtual std::string GetName() const override { return "Mask"; }
|
std::string GetName() const override { return "Mask"; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
friend class RecordedEvent;
|
friend class RecordedEvent;
|
||||||
@@ -460,14 +447,14 @@ class RecordedStroke : public RecordedDrawingEvent<RecordedStroke> {
|
|||||||
StorePattern(mPattern, aPattern);
|
StorePattern(mPattern, aPattern);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual bool PlayEvent(Translator *aTranslator) const override;
|
bool PlayEvent(Translator *aTranslator) const override;
|
||||||
|
|
||||||
template <class S>
|
template <class S>
|
||||||
void Record(S &aStream) const;
|
void Record(S &aStream) const;
|
||||||
virtual void OutputSimpleEventInfo(
|
virtual void OutputSimpleEventInfo(
|
||||||
std::stringstream &aStringStream) const override;
|
std::stringstream &aStringStream) const override;
|
||||||
|
|
||||||
virtual std::string GetName() const override { return "Stroke"; }
|
std::string GetName() const override { return "Stroke"; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
friend class RecordedEvent;
|
friend class RecordedEvent;
|
||||||
@@ -486,14 +473,13 @@ class RecordedClearRect : public RecordedDrawingEvent<RecordedClearRect> {
|
|||||||
RecordedClearRect(DrawTarget *aDT, const Rect &aRect)
|
RecordedClearRect(DrawTarget *aDT, const Rect &aRect)
|
||||||
: RecordedDrawingEvent(CLEARRECT, aDT), mRect(aRect) {}
|
: RecordedDrawingEvent(CLEARRECT, aDT), mRect(aRect) {}
|
||||||
|
|
||||||
virtual bool PlayEvent(Translator *aTranslator) const override;
|
bool PlayEvent(Translator *aTranslator) const override;
|
||||||
|
|
||||||
template <class S>
|
template <class S>
|
||||||
void Record(S &aStream) const;
|
void Record(S &aStream) const;
|
||||||
virtual void OutputSimpleEventInfo(
|
void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
|
||||||
std::stringstream &aStringStream) const override;
|
|
||||||
|
|
||||||
virtual std::string GetName() const override { return "ClearRect"; }
|
std::string GetName() const override { return "ClearRect"; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
friend class RecordedEvent;
|
friend class RecordedEvent;
|
||||||
@@ -513,14 +499,13 @@ class RecordedCopySurface : public RecordedDrawingEvent<RecordedCopySurface> {
|
|||||||
mSourceRect(aSourceRect),
|
mSourceRect(aSourceRect),
|
||||||
mDest(aDest) {}
|
mDest(aDest) {}
|
||||||
|
|
||||||
virtual bool PlayEvent(Translator *aTranslator) const override;
|
bool PlayEvent(Translator *aTranslator) const override;
|
||||||
|
|
||||||
template <class S>
|
template <class S>
|
||||||
void Record(S &aStream) const;
|
void Record(S &aStream) const;
|
||||||
virtual void OutputSimpleEventInfo(
|
void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
|
||||||
std::stringstream &aStringStream) const override;
|
|
||||||
|
|
||||||
virtual std::string GetName() const override { return "CopySurface"; }
|
std::string GetName() const override { return "CopySurface"; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
friend class RecordedEvent;
|
friend class RecordedEvent;
|
||||||
@@ -538,14 +523,13 @@ class RecordedPushClip : public RecordedDrawingEvent<RecordedPushClip> {
|
|||||||
RecordedPushClip(DrawTarget *aDT, ReferencePtr aPath)
|
RecordedPushClip(DrawTarget *aDT, ReferencePtr aPath)
|
||||||
: RecordedDrawingEvent(PUSHCLIP, aDT), mPath(aPath) {}
|
: RecordedDrawingEvent(PUSHCLIP, aDT), mPath(aPath) {}
|
||||||
|
|
||||||
virtual bool PlayEvent(Translator *aTranslator) const override;
|
bool PlayEvent(Translator *aTranslator) const override;
|
||||||
|
|
||||||
template <class S>
|
template <class S>
|
||||||
void Record(S &aStream) const;
|
void Record(S &aStream) const;
|
||||||
virtual void OutputSimpleEventInfo(
|
void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
|
||||||
std::stringstream &aStringStream) const override;
|
|
||||||
|
|
||||||
virtual std::string GetName() const override { return "PushClip"; }
|
std::string GetName() const override { return "PushClip"; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
friend class RecordedEvent;
|
friend class RecordedEvent;
|
||||||
@@ -561,14 +545,13 @@ class RecordedPushClipRect : public RecordedDrawingEvent<RecordedPushClipRect> {
|
|||||||
RecordedPushClipRect(DrawTarget *aDT, const Rect &aRect)
|
RecordedPushClipRect(DrawTarget *aDT, const Rect &aRect)
|
||||||
: RecordedDrawingEvent(PUSHCLIPRECT, aDT), mRect(aRect) {}
|
: RecordedDrawingEvent(PUSHCLIPRECT, aDT), mRect(aRect) {}
|
||||||
|
|
||||||
virtual bool PlayEvent(Translator *aTranslator) const override;
|
bool PlayEvent(Translator *aTranslator) const override;
|
||||||
|
|
||||||
template <class S>
|
template <class S>
|
||||||
void Record(S &aStream) const;
|
void Record(S &aStream) const;
|
||||||
virtual void OutputSimpleEventInfo(
|
void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
|
||||||
std::stringstream &aStringStream) const override;
|
|
||||||
|
|
||||||
virtual std::string GetName() const override { return "PushClipRect"; }
|
std::string GetName() const override { return "PushClipRect"; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
friend class RecordedEvent;
|
friend class RecordedEvent;
|
||||||
@@ -584,14 +567,13 @@ class RecordedPopClip : public RecordedDrawingEvent<RecordedPopClip> {
|
|||||||
MOZ_IMPLICIT RecordedPopClip(DrawTarget *aDT)
|
MOZ_IMPLICIT RecordedPopClip(DrawTarget *aDT)
|
||||||
: RecordedDrawingEvent(POPCLIP, aDT) {}
|
: RecordedDrawingEvent(POPCLIP, aDT) {}
|
||||||
|
|
||||||
virtual bool PlayEvent(Translator *aTranslator) const override;
|
bool PlayEvent(Translator *aTranslator) const override;
|
||||||
|
|
||||||
template <class S>
|
template <class S>
|
||||||
void Record(S &aStream) const;
|
void Record(S &aStream) const;
|
||||||
virtual void OutputSimpleEventInfo(
|
void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
|
||||||
std::stringstream &aStringStream) const override;
|
|
||||||
|
|
||||||
virtual std::string GetName() const override { return "PopClip"; }
|
std::string GetName() const override { return "PopClip"; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
friend class RecordedEvent;
|
friend class RecordedEvent;
|
||||||
@@ -613,14 +595,13 @@ class RecordedPushLayer : public RecordedDrawingEvent<RecordedPushLayer> {
|
|||||||
mBounds(aBounds),
|
mBounds(aBounds),
|
||||||
mCopyBackground(aCopyBackground) {}
|
mCopyBackground(aCopyBackground) {}
|
||||||
|
|
||||||
virtual bool PlayEvent(Translator *aTranslator) const override;
|
bool PlayEvent(Translator *aTranslator) const override;
|
||||||
|
|
||||||
template <class S>
|
template <class S>
|
||||||
void Record(S &aStream) const;
|
void Record(S &aStream) const;
|
||||||
virtual void OutputSimpleEventInfo(
|
void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
|
||||||
std::stringstream &aStringStream) const override;
|
|
||||||
|
|
||||||
virtual std::string GetName() const override { return "PushLayer"; }
|
std::string GetName() const override { return "PushLayer"; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
friend class RecordedEvent;
|
friend class RecordedEvent;
|
||||||
@@ -652,14 +633,14 @@ class RecordedPushLayerWithBlend
|
|||||||
mCopyBackground(aCopyBackground),
|
mCopyBackground(aCopyBackground),
|
||||||
mCompositionOp(aCompositionOp) {}
|
mCompositionOp(aCompositionOp) {}
|
||||||
|
|
||||||
virtual bool PlayEvent(Translator *aTranslator) const override;
|
bool PlayEvent(Translator *aTranslator) const override;
|
||||||
|
|
||||||
template <class S>
|
template <class S>
|
||||||
void Record(S &aStream) const;
|
void Record(S &aStream) const;
|
||||||
virtual void OutputSimpleEventInfo(
|
virtual void OutputSimpleEventInfo(
|
||||||
std::stringstream &aStringStream) const override;
|
std::stringstream &aStringStream) const override;
|
||||||
|
|
||||||
virtual std::string GetName() const override { return "PushLayerWithBlend"; }
|
std::string GetName() const override { return "PushLayerWithBlend"; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
friend class RecordedEvent;
|
friend class RecordedEvent;
|
||||||
@@ -681,14 +662,13 @@ class RecordedPopLayer : public RecordedDrawingEvent<RecordedPopLayer> {
|
|||||||
MOZ_IMPLICIT RecordedPopLayer(DrawTarget *aDT)
|
MOZ_IMPLICIT RecordedPopLayer(DrawTarget *aDT)
|
||||||
: RecordedDrawingEvent(POPLAYER, aDT) {}
|
: RecordedDrawingEvent(POPLAYER, aDT) {}
|
||||||
|
|
||||||
virtual bool PlayEvent(Translator *aTranslator) const override;
|
bool PlayEvent(Translator *aTranslator) const override;
|
||||||
|
|
||||||
template <class S>
|
template <class S>
|
||||||
void Record(S &aStream) const;
|
void Record(S &aStream) const;
|
||||||
virtual void OutputSimpleEventInfo(
|
void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
|
||||||
std::stringstream &aStringStream) const override;
|
|
||||||
|
|
||||||
virtual std::string GetName() const override { return "PopLayer"; }
|
std::string GetName() const override { return "PopLayer"; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
friend class RecordedEvent;
|
friend class RecordedEvent;
|
||||||
@@ -702,14 +682,13 @@ class RecordedSetTransform : public RecordedDrawingEvent<RecordedSetTransform> {
|
|||||||
RecordedSetTransform(DrawTarget *aDT, const Matrix &aTransform)
|
RecordedSetTransform(DrawTarget *aDT, const Matrix &aTransform)
|
||||||
: RecordedDrawingEvent(SETTRANSFORM, aDT), mTransform(aTransform) {}
|
: RecordedDrawingEvent(SETTRANSFORM, aDT), mTransform(aTransform) {}
|
||||||
|
|
||||||
virtual bool PlayEvent(Translator *aTranslator) const override;
|
bool PlayEvent(Translator *aTranslator) const override;
|
||||||
|
|
||||||
template <class S>
|
template <class S>
|
||||||
void Record(S &aStream) const;
|
void Record(S &aStream) const;
|
||||||
virtual void OutputSimpleEventInfo(
|
void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
|
||||||
std::stringstream &aStringStream) const override;
|
|
||||||
|
|
||||||
virtual std::string GetName() const override { return "SetTransform"; }
|
std::string GetName() const override { return "SetTransform"; }
|
||||||
|
|
||||||
Matrix mTransform;
|
Matrix mTransform;
|
||||||
|
|
||||||
@@ -733,14 +712,13 @@ class RecordedDrawSurface : public RecordedDrawingEvent<RecordedDrawSurface> {
|
|||||||
mDSOptions(aDSOptions),
|
mDSOptions(aDSOptions),
|
||||||
mOptions(aOptions) {}
|
mOptions(aOptions) {}
|
||||||
|
|
||||||
virtual bool PlayEvent(Translator *aTranslator) const override;
|
bool PlayEvent(Translator *aTranslator) const override;
|
||||||
|
|
||||||
template <class S>
|
template <class S>
|
||||||
void Record(S &aStream) const;
|
void Record(S &aStream) const;
|
||||||
virtual void OutputSimpleEventInfo(
|
void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
|
||||||
std::stringstream &aStringStream) const override;
|
|
||||||
|
|
||||||
virtual std::string GetName() const override { return "DrawSurface"; }
|
std::string GetName() const override { return "DrawSurface"; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
friend class RecordedEvent;
|
friend class RecordedEvent;
|
||||||
@@ -767,16 +745,13 @@ class RecordedDrawDependentSurface
|
|||||||
mDSOptions(aDSOptions),
|
mDSOptions(aDSOptions),
|
||||||
mOptions(aOptions) {}
|
mOptions(aOptions) {}
|
||||||
|
|
||||||
virtual bool PlayEvent(Translator *aTranslator) const override;
|
bool PlayEvent(Translator *aTranslator) const override;
|
||||||
|
|
||||||
template <class S>
|
template <class S>
|
||||||
void Record(S &aStream) const;
|
void Record(S &aStream) const;
|
||||||
virtual void OutputSimpleEventInfo(
|
void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
|
||||||
std::stringstream &aStringStream) const override;
|
|
||||||
|
|
||||||
virtual std::string GetName() const override {
|
std::string GetName() const override { return "DrawDependentSurface"; }
|
||||||
return "DrawDependentSurface";
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
friend class RecordedEvent;
|
friend class RecordedEvent;
|
||||||
@@ -805,16 +780,13 @@ class RecordedDrawSurfaceWithShadow
|
|||||||
mSigma(aSigma),
|
mSigma(aSigma),
|
||||||
mOp(aOp) {}
|
mOp(aOp) {}
|
||||||
|
|
||||||
virtual bool PlayEvent(Translator *aTranslator) const override;
|
bool PlayEvent(Translator *aTranslator) const override;
|
||||||
|
|
||||||
template <class S>
|
template <class S>
|
||||||
void Record(S &aStream) const;
|
void Record(S &aStream) const;
|
||||||
virtual void OutputSimpleEventInfo(
|
void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
|
||||||
std::stringstream &aStringStream) const override;
|
|
||||||
|
|
||||||
virtual std::string GetName() const override {
|
std::string GetName() const override { return "DrawSurfaceWithShadow"; }
|
||||||
return "DrawSurfaceWithShadow";
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
friend class RecordedEvent;
|
friend class RecordedEvent;
|
||||||
@@ -841,14 +813,13 @@ class RecordedDrawFilter : public RecordedDrawingEvent<RecordedDrawFilter> {
|
|||||||
mDestPoint(aDestPoint),
|
mDestPoint(aDestPoint),
|
||||||
mOptions(aOptions) {}
|
mOptions(aOptions) {}
|
||||||
|
|
||||||
virtual bool PlayEvent(Translator *aTranslator) const override;
|
bool PlayEvent(Translator *aTranslator) const override;
|
||||||
|
|
||||||
template <class S>
|
template <class S>
|
||||||
void Record(S &aStream) const;
|
void Record(S &aStream) const;
|
||||||
virtual void OutputSimpleEventInfo(
|
void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
|
||||||
std::stringstream &aStringStream) const override;
|
|
||||||
|
|
||||||
virtual std::string GetName() const override { return "DrawFilter"; }
|
std::string GetName() const override { return "DrawFilter"; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
friend class RecordedEvent;
|
friend class RecordedEvent;
|
||||||
@@ -867,15 +838,14 @@ class RecordedPathCreation : public RecordedEventDerived<RecordedPathCreation> {
|
|||||||
MOZ_IMPLICIT RecordedPathCreation(PathRecording *aPath);
|
MOZ_IMPLICIT RecordedPathCreation(PathRecording *aPath);
|
||||||
~RecordedPathCreation();
|
~RecordedPathCreation();
|
||||||
|
|
||||||
virtual bool PlayEvent(Translator *aTranslator) const override;
|
bool PlayEvent(Translator *aTranslator) const override;
|
||||||
|
|
||||||
template <class S>
|
template <class S>
|
||||||
void Record(S &aStream) const;
|
void Record(S &aStream) const;
|
||||||
virtual void OutputSimpleEventInfo(
|
void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
|
||||||
std::stringstream &aStringStream) const override;
|
|
||||||
|
|
||||||
virtual std::string GetName() const override { return "Path Creation"; }
|
std::string GetName() const override { return "Path Creation"; }
|
||||||
virtual ReferencePtr GetObjectRef() const override { return mRefPtr; }
|
ReferencePtr GetObjectRef() const override { return mRefPtr; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
friend class RecordedEvent;
|
friend class RecordedEvent;
|
||||||
@@ -894,15 +864,14 @@ class RecordedPathDestruction
|
|||||||
MOZ_IMPLICIT RecordedPathDestruction(PathRecording *aPath)
|
MOZ_IMPLICIT RecordedPathDestruction(PathRecording *aPath)
|
||||||
: RecordedEventDerived(PATHDESTRUCTION), mRefPtr(aPath) {}
|
: RecordedEventDerived(PATHDESTRUCTION), mRefPtr(aPath) {}
|
||||||
|
|
||||||
virtual bool PlayEvent(Translator *aTranslator) const override;
|
bool PlayEvent(Translator *aTranslator) const override;
|
||||||
|
|
||||||
template <class S>
|
template <class S>
|
||||||
void Record(S &aStream) const;
|
void Record(S &aStream) const;
|
||||||
virtual void OutputSimpleEventInfo(
|
void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
|
||||||
std::stringstream &aStringStream) const override;
|
|
||||||
|
|
||||||
virtual std::string GetName() const override { return "Path Destruction"; }
|
std::string GetName() const override { return "Path Destruction"; }
|
||||||
virtual ReferencePtr GetObjectRef() const override { return mRefPtr; }
|
ReferencePtr GetObjectRef() const override { return mRefPtr; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
friend class RecordedEvent;
|
friend class RecordedEvent;
|
||||||
@@ -929,17 +898,14 @@ class RecordedSourceSurfaceCreation
|
|||||||
|
|
||||||
~RecordedSourceSurfaceCreation();
|
~RecordedSourceSurfaceCreation();
|
||||||
|
|
||||||
virtual bool PlayEvent(Translator *aTranslator) const override;
|
bool PlayEvent(Translator *aTranslator) const override;
|
||||||
|
|
||||||
template <class S>
|
template <class S>
|
||||||
void Record(S &aStream) const;
|
void Record(S &aStream) const;
|
||||||
virtual void OutputSimpleEventInfo(
|
void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
|
||||||
std::stringstream &aStringStream) const override;
|
|
||||||
|
|
||||||
virtual std::string GetName() const override {
|
std::string GetName() const override { return "SourceSurface Creation"; }
|
||||||
return "SourceSurface Creation";
|
ReferencePtr GetObjectRef() const override { return mRefPtr; }
|
||||||
}
|
|
||||||
virtual ReferencePtr GetObjectRef() const override { return mRefPtr; }
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
friend class RecordedEvent;
|
friend class RecordedEvent;
|
||||||
@@ -961,17 +927,14 @@ class RecordedSourceSurfaceDestruction
|
|||||||
MOZ_IMPLICIT RecordedSourceSurfaceDestruction(ReferencePtr aRefPtr)
|
MOZ_IMPLICIT RecordedSourceSurfaceDestruction(ReferencePtr aRefPtr)
|
||||||
: RecordedEventDerived(SOURCESURFACEDESTRUCTION), mRefPtr(aRefPtr) {}
|
: RecordedEventDerived(SOURCESURFACEDESTRUCTION), mRefPtr(aRefPtr) {}
|
||||||
|
|
||||||
virtual bool PlayEvent(Translator *aTranslator) const override;
|
bool PlayEvent(Translator *aTranslator) const override;
|
||||||
|
|
||||||
template <class S>
|
template <class S>
|
||||||
void Record(S &aStream) const;
|
void Record(S &aStream) const;
|
||||||
virtual void OutputSimpleEventInfo(
|
void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
|
||||||
std::stringstream &aStringStream) const override;
|
|
||||||
|
|
||||||
virtual std::string GetName() const override {
|
std::string GetName() const override { return "SourceSurface Destruction"; }
|
||||||
return "SourceSurface Destruction";
|
ReferencePtr GetObjectRef() const override { return mRefPtr; }
|
||||||
}
|
|
||||||
virtual ReferencePtr GetObjectRef() const override { return mRefPtr; }
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
friend class RecordedEvent;
|
friend class RecordedEvent;
|
||||||
@@ -1023,15 +986,14 @@ class RecordedFilterNodeCreation
|
|||||||
|
|
||||||
~RecordedFilterNodeCreation();
|
~RecordedFilterNodeCreation();
|
||||||
|
|
||||||
virtual bool PlayEvent(Translator *aTranslator) const override;
|
bool PlayEvent(Translator *aTranslator) const override;
|
||||||
|
|
||||||
template <class S>
|
template <class S>
|
||||||
void Record(S &aStream) const;
|
void Record(S &aStream) const;
|
||||||
virtual void OutputSimpleEventInfo(
|
void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
|
||||||
std::stringstream &aStringStream) const override;
|
|
||||||
|
|
||||||
virtual std::string GetName() const override { return "FilterNode Creation"; }
|
std::string GetName() const override { return "FilterNode Creation"; }
|
||||||
virtual ReferencePtr GetObjectRef() const override { return mRefPtr; }
|
ReferencePtr GetObjectRef() const override { return mRefPtr; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
friend class RecordedEvent;
|
friend class RecordedEvent;
|
||||||
@@ -1049,17 +1011,14 @@ class RecordedFilterNodeDestruction
|
|||||||
MOZ_IMPLICIT RecordedFilterNodeDestruction(ReferencePtr aRefPtr)
|
MOZ_IMPLICIT RecordedFilterNodeDestruction(ReferencePtr aRefPtr)
|
||||||
: RecordedEventDerived(FILTERNODEDESTRUCTION), mRefPtr(aRefPtr) {}
|
: RecordedEventDerived(FILTERNODEDESTRUCTION), mRefPtr(aRefPtr) {}
|
||||||
|
|
||||||
virtual bool PlayEvent(Translator *aTranslator) const override;
|
bool PlayEvent(Translator *aTranslator) const override;
|
||||||
|
|
||||||
template <class S>
|
template <class S>
|
||||||
void Record(S &aStream) const;
|
void Record(S &aStream) const;
|
||||||
virtual void OutputSimpleEventInfo(
|
void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
|
||||||
std::stringstream &aStringStream) const override;
|
|
||||||
|
|
||||||
virtual std::string GetName() const override {
|
std::string GetName() const override { return "FilterNode Destruction"; }
|
||||||
return "FilterNode Destruction";
|
ReferencePtr GetObjectRef() const override { return mRefPtr; }
|
||||||
}
|
|
||||||
virtual ReferencePtr GetObjectRef() const override { return mRefPtr; }
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
friend class RecordedEvent;
|
friend class RecordedEvent;
|
||||||
@@ -1084,17 +1043,14 @@ class RecordedGradientStopsCreation
|
|||||||
|
|
||||||
~RecordedGradientStopsCreation();
|
~RecordedGradientStopsCreation();
|
||||||
|
|
||||||
virtual bool PlayEvent(Translator *aTranslator) const override;
|
bool PlayEvent(Translator *aTranslator) const override;
|
||||||
|
|
||||||
template <class S>
|
template <class S>
|
||||||
void Record(S &aStream) const;
|
void Record(S &aStream) const;
|
||||||
virtual void OutputSimpleEventInfo(
|
void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
|
||||||
std::stringstream &aStringStream) const override;
|
|
||||||
|
|
||||||
virtual std::string GetName() const override {
|
std::string GetName() const override { return "GradientStops Creation"; }
|
||||||
return "GradientStops Creation";
|
ReferencePtr GetObjectRef() const override { return mRefPtr; }
|
||||||
}
|
|
||||||
virtual ReferencePtr GetObjectRef() const override { return mRefPtr; }
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
friend class RecordedEvent;
|
friend class RecordedEvent;
|
||||||
@@ -1115,17 +1071,14 @@ class RecordedGradientStopsDestruction
|
|||||||
MOZ_IMPLICIT RecordedGradientStopsDestruction(ReferencePtr aRefPtr)
|
MOZ_IMPLICIT RecordedGradientStopsDestruction(ReferencePtr aRefPtr)
|
||||||
: RecordedEventDerived(GRADIENTSTOPSDESTRUCTION), mRefPtr(aRefPtr) {}
|
: RecordedEventDerived(GRADIENTSTOPSDESTRUCTION), mRefPtr(aRefPtr) {}
|
||||||
|
|
||||||
virtual bool PlayEvent(Translator *aTranslator) const override;
|
bool PlayEvent(Translator *aTranslator) const override;
|
||||||
|
|
||||||
template <class S>
|
template <class S>
|
||||||
void Record(S &aStream) const;
|
void Record(S &aStream) const;
|
||||||
virtual void OutputSimpleEventInfo(
|
void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
|
||||||
std::stringstream &aStringStream) const override;
|
|
||||||
|
|
||||||
virtual std::string GetName() const override {
|
std::string GetName() const override { return "GradientStops Destruction"; }
|
||||||
return "GradientStops Destruction";
|
ReferencePtr GetObjectRef() const override { return mRefPtr; }
|
||||||
}
|
|
||||||
virtual ReferencePtr GetObjectRef() const override { return mRefPtr; }
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
friend class RecordedEvent;
|
friend class RecordedEvent;
|
||||||
@@ -1141,15 +1094,14 @@ class RecordedSnapshot : public RecordedEventDerived<RecordedSnapshot> {
|
|||||||
RecordedSnapshot(ReferencePtr aRefPtr, DrawTarget *aDT)
|
RecordedSnapshot(ReferencePtr aRefPtr, DrawTarget *aDT)
|
||||||
: RecordedEventDerived(SNAPSHOT), mRefPtr(aRefPtr), mDT(aDT) {}
|
: RecordedEventDerived(SNAPSHOT), mRefPtr(aRefPtr), mDT(aDT) {}
|
||||||
|
|
||||||
virtual bool PlayEvent(Translator *aTranslator) const override;
|
bool PlayEvent(Translator *aTranslator) const override;
|
||||||
|
|
||||||
template <class S>
|
template <class S>
|
||||||
void Record(S &aStream) const;
|
void Record(S &aStream) const;
|
||||||
virtual void OutputSimpleEventInfo(
|
void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
|
||||||
std::stringstream &aStringStream) const override;
|
|
||||||
|
|
||||||
virtual std::string GetName() const override { return "Snapshot"; }
|
std::string GetName() const override { return "Snapshot"; }
|
||||||
virtual ReferencePtr GetObjectRef() const override { return mRefPtr; }
|
ReferencePtr GetObjectRef() const override { return mRefPtr; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
friend class RecordedEvent;
|
friend class RecordedEvent;
|
||||||
@@ -1172,15 +1124,14 @@ class RecordedIntoLuminanceSource
|
|||||||
mLuminanceType(aLuminanceType),
|
mLuminanceType(aLuminanceType),
|
||||||
mOpacity(aOpacity) {}
|
mOpacity(aOpacity) {}
|
||||||
|
|
||||||
virtual bool PlayEvent(Translator *aTranslator) const override;
|
bool PlayEvent(Translator *aTranslator) const override;
|
||||||
|
|
||||||
template <class S>
|
template <class S>
|
||||||
void Record(S &aStream) const;
|
void Record(S &aStream) const;
|
||||||
virtual void OutputSimpleEventInfo(
|
void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
|
||||||
std::stringstream &aStringStream) const override;
|
|
||||||
|
|
||||||
virtual std::string GetName() const override { return "IntoLuminanceSource"; }
|
std::string GetName() const override { return "IntoLuminanceSource"; }
|
||||||
virtual ReferencePtr GetObjectRef() const override { return mRefPtr; }
|
ReferencePtr GetObjectRef() const override { return mRefPtr; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
friend class RecordedEvent;
|
friend class RecordedEvent;
|
||||||
@@ -1211,19 +1162,18 @@ class RecordedFontData : public RecordedEventDerived<RecordedFontData> {
|
|||||||
aUnscaledFont->GetFontFileData(&FontDataProc, this) && mData;
|
aUnscaledFont->GetFontFileData(&FontDataProc, this) && mData;
|
||||||
}
|
}
|
||||||
|
|
||||||
~RecordedFontData();
|
virtual ~RecordedFontData();
|
||||||
|
|
||||||
bool IsValid() const { return mGetFontFileDataSucceeded; }
|
bool IsValid() const { return mGetFontFileDataSucceeded; }
|
||||||
|
|
||||||
virtual bool PlayEvent(Translator *aTranslator) const override;
|
bool PlayEvent(Translator *aTranslator) const override;
|
||||||
|
|
||||||
template <class S>
|
template <class S>
|
||||||
void Record(S &aStream) const;
|
void Record(S &aStream) const;
|
||||||
virtual void OutputSimpleEventInfo(
|
void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
|
||||||
std::stringstream &aStringStream) const override;
|
|
||||||
|
|
||||||
virtual std::string GetName() const override { return "Font Data"; }
|
std::string GetName() const override { return "Font Data"; }
|
||||||
virtual ReferencePtr GetObjectRef() const override { return nullptr; };
|
ReferencePtr GetObjectRef() const override { return nullptr; };
|
||||||
|
|
||||||
void SetFontData(const uint8_t *aData, uint32_t aSize, uint32_t aIndex);
|
void SetFontData(const uint8_t *aData, uint32_t aSize, uint32_t aIndex);
|
||||||
|
|
||||||
@@ -1259,19 +1209,18 @@ class RecordedFontDescriptor
|
|||||||
mHasDesc = aUnscaledFont->GetFontDescriptor(FontDescCb, this);
|
mHasDesc = aUnscaledFont->GetFontDescriptor(FontDescCb, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
~RecordedFontDescriptor();
|
virtual ~RecordedFontDescriptor();
|
||||||
|
|
||||||
bool IsValid() const { return mHasDesc; }
|
bool IsValid() const { return mHasDesc; }
|
||||||
|
|
||||||
virtual bool PlayEvent(Translator *aTranslator) const override;
|
bool PlayEvent(Translator *aTranslator) const override;
|
||||||
|
|
||||||
template <class S>
|
template <class S>
|
||||||
void Record(S &aStream) const;
|
void Record(S &aStream) const;
|
||||||
virtual void OutputSimpleEventInfo(
|
void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
|
||||||
std::stringstream &aStringStream) const override;
|
|
||||||
|
|
||||||
virtual std::string GetName() const override { return "Font Desc"; }
|
std::string GetName() const override { return "Font Desc"; }
|
||||||
virtual ReferencePtr GetObjectRef() const override { return mRefPtr; }
|
ReferencePtr GetObjectRef() const override { return mRefPtr; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
friend class RecordedEvent;
|
friend class RecordedEvent;
|
||||||
@@ -1308,17 +1257,14 @@ class RecordedUnscaledFontCreation
|
|||||||
aUnscaledFont->GetFontInstanceData(FontInstanceDataProc, this);
|
aUnscaledFont->GetFontInstanceData(FontInstanceDataProc, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual bool PlayEvent(Translator *aTranslator) const override;
|
bool PlayEvent(Translator *aTranslator) const override;
|
||||||
|
|
||||||
template <class S>
|
template <class S>
|
||||||
void Record(S &aStream) const;
|
void Record(S &aStream) const;
|
||||||
virtual void OutputSimpleEventInfo(
|
void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
|
||||||
std::stringstream &aStringStream) const override;
|
|
||||||
|
|
||||||
virtual std::string GetName() const override {
|
std::string GetName() const override { return "UnscaledFont Creation"; }
|
||||||
return "UnscaledFont Creation";
|
ReferencePtr GetObjectRef() const override { return mRefPtr; }
|
||||||
}
|
|
||||||
virtual ReferencePtr GetObjectRef() const override { return mRefPtr; }
|
|
||||||
|
|
||||||
void SetFontInstanceData(const uint8_t *aData, uint32_t aSize);
|
void SetFontInstanceData(const uint8_t *aData, uint32_t aSize);
|
||||||
|
|
||||||
@@ -1340,16 +1286,13 @@ class RecordedUnscaledFontDestruction
|
|||||||
MOZ_IMPLICIT RecordedUnscaledFontDestruction(ReferencePtr aRefPtr)
|
MOZ_IMPLICIT RecordedUnscaledFontDestruction(ReferencePtr aRefPtr)
|
||||||
: RecordedEventDerived(UNSCALEDFONTDESTRUCTION), mRefPtr(aRefPtr) {}
|
: RecordedEventDerived(UNSCALEDFONTDESTRUCTION), mRefPtr(aRefPtr) {}
|
||||||
|
|
||||||
virtual bool PlayEvent(Translator *aTranslator) const override;
|
bool PlayEvent(Translator *aTranslator) const override;
|
||||||
template <class S>
|
template <class S>
|
||||||
void Record(S &aStream) const;
|
void Record(S &aStream) const;
|
||||||
virtual void OutputSimpleEventInfo(
|
void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
|
||||||
std::stringstream &aStringStream) const override;
|
|
||||||
|
|
||||||
virtual std::string GetName() const override {
|
std::string GetName() const override { return "UnscaledFont Destruction"; }
|
||||||
return "UnscaledFont Destruction";
|
ReferencePtr GetObjectRef() const override { return mRefPtr; }
|
||||||
}
|
|
||||||
virtual ReferencePtr GetObjectRef() const override { return mRefPtr; }
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
friend class RecordedEvent;
|
friend class RecordedEvent;
|
||||||
@@ -1381,15 +1324,14 @@ class RecordedScaledFontCreation
|
|||||||
aScaledFont->GetFontInstanceData(FontInstanceDataProc, this);
|
aScaledFont->GetFontInstanceData(FontInstanceDataProc, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual bool PlayEvent(Translator *aTranslator) const override;
|
bool PlayEvent(Translator *aTranslator) const override;
|
||||||
|
|
||||||
template <class S>
|
template <class S>
|
||||||
void Record(S &aStream) const;
|
void Record(S &aStream) const;
|
||||||
virtual void OutputSimpleEventInfo(
|
void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
|
||||||
std::stringstream &aStringStream) const override;
|
|
||||||
|
|
||||||
virtual std::string GetName() const override { return "ScaledFont Creation"; }
|
std::string GetName() const override { return "ScaledFont Creation"; }
|
||||||
virtual ReferencePtr GetObjectRef() const override { return mRefPtr; }
|
ReferencePtr GetObjectRef() const override { return mRefPtr; }
|
||||||
|
|
||||||
void SetFontInstanceData(const uint8_t *aData, uint32_t aSize,
|
void SetFontInstanceData(const uint8_t *aData, uint32_t aSize,
|
||||||
const FontVariation *aVariations,
|
const FontVariation *aVariations,
|
||||||
@@ -1414,17 +1356,14 @@ class RecordedScaledFontDestruction
|
|||||||
MOZ_IMPLICIT RecordedScaledFontDestruction(ReferencePtr aRefPtr)
|
MOZ_IMPLICIT RecordedScaledFontDestruction(ReferencePtr aRefPtr)
|
||||||
: RecordedEventDerived(SCALEDFONTDESTRUCTION), mRefPtr(aRefPtr) {}
|
: RecordedEventDerived(SCALEDFONTDESTRUCTION), mRefPtr(aRefPtr) {}
|
||||||
|
|
||||||
virtual bool PlayEvent(Translator *aTranslator) const override;
|
bool PlayEvent(Translator *aTranslator) const override;
|
||||||
|
|
||||||
template <class S>
|
template <class S>
|
||||||
void Record(S &aStream) const;
|
void Record(S &aStream) const;
|
||||||
virtual void OutputSimpleEventInfo(
|
void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
|
||||||
std::stringstream &aStringStream) const override;
|
|
||||||
|
|
||||||
virtual std::string GetName() const override {
|
std::string GetName() const override { return "ScaledFont Destruction"; }
|
||||||
return "ScaledFont Destruction";
|
ReferencePtr GetObjectRef() const override { return mRefPtr; }
|
||||||
}
|
|
||||||
virtual ReferencePtr GetObjectRef() const override { return mRefPtr; }
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
friend class RecordedEvent;
|
friend class RecordedEvent;
|
||||||
@@ -1448,14 +1387,13 @@ class RecordedMaskSurface : public RecordedDrawingEvent<RecordedMaskSurface> {
|
|||||||
StorePattern(mPattern, aPattern);
|
StorePattern(mPattern, aPattern);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual bool PlayEvent(Translator *aTranslator) const override;
|
bool PlayEvent(Translator *aTranslator) const override;
|
||||||
|
|
||||||
template <class S>
|
template <class S>
|
||||||
void Record(S &aStream) const;
|
void Record(S &aStream) const;
|
||||||
virtual void OutputSimpleEventInfo(
|
void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
|
||||||
std::stringstream &aStringStream) const override;
|
|
||||||
|
|
||||||
virtual std::string GetName() const override { return "MaskSurface"; }
|
std::string GetName() const override { return "MaskSurface"; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
friend class RecordedEvent;
|
friend class RecordedEvent;
|
||||||
@@ -1510,14 +1448,13 @@ class RecordedFilterNodeSetAttribute
|
|||||||
memcpy(&mPayload.front(), aFloat, sizeof(Float) * aSize);
|
memcpy(&mPayload.front(), aFloat, sizeof(Float) * aSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual bool PlayEvent(Translator *aTranslator) const override;
|
bool PlayEvent(Translator *aTranslator) const override;
|
||||||
template <class S>
|
template <class S>
|
||||||
void Record(S &aStream) const;
|
void Record(S &aStream) const;
|
||||||
virtual void OutputSimpleEventInfo(
|
void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
|
||||||
std::stringstream &aStringStream) const override;
|
|
||||||
|
|
||||||
virtual std::string GetName() const override { return "SetAttribute"; }
|
std::string GetName() const override { return "SetAttribute"; }
|
||||||
virtual ReferencePtr GetObjectRef() const override { return mNode; }
|
ReferencePtr GetObjectRef() const override { return mNode; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
friend class RecordedEvent;
|
friend class RecordedEvent;
|
||||||
@@ -1551,14 +1488,13 @@ class RecordedFilterNodeSetInput
|
|||||||
mInputFilter(nullptr),
|
mInputFilter(nullptr),
|
||||||
mInputSurface(aInputSurface) {}
|
mInputSurface(aInputSurface) {}
|
||||||
|
|
||||||
virtual bool PlayEvent(Translator *aTranslator) const override;
|
bool PlayEvent(Translator *aTranslator) const override;
|
||||||
template <class S>
|
template <class S>
|
||||||
void Record(S &aStream) const;
|
void Record(S &aStream) const;
|
||||||
virtual void OutputSimpleEventInfo(
|
void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
|
||||||
std::stringstream &aStringStream) const override;
|
|
||||||
|
|
||||||
virtual std::string GetName() const override { return "SetInput"; }
|
std::string GetName() const override { return "SetInput"; }
|
||||||
virtual ReferencePtr GetObjectRef() const override { return mNode; }
|
ReferencePtr GetObjectRef() const override { return mNode; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
friend class RecordedEvent;
|
friend class RecordedEvent;
|
||||||
|
|||||||
@@ -358,16 +358,16 @@ Maybe<Rect> UnionMaybeRects(const Maybe<Rect>& a, const Maybe<Rect>& b) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
struct RectCornerRadii {
|
struct RectCornerRadii final {
|
||||||
Size radii[eCornerCount];
|
Size radii[eCornerCount];
|
||||||
|
|
||||||
RectCornerRadii() {}
|
RectCornerRadii() = default;
|
||||||
|
|
||||||
explicit RectCornerRadii(Float radius) {
|
explicit RectCornerRadii(Float radius) {
|
||||||
NS_FOR_CSS_FULL_CORNERS(i) { radii[i].SizeTo(radius, radius); }
|
NS_FOR_CSS_FULL_CORNERS(i) { radii[i].SizeTo(radius, radius); }
|
||||||
}
|
}
|
||||||
|
|
||||||
explicit RectCornerRadii(Float radiusX, Float radiusY) {
|
RectCornerRadii(Float radiusX, Float radiusY) {
|
||||||
NS_FOR_CSS_FULL_CORNERS(i) { radii[i].SizeTo(radiusX, radiusY); }
|
NS_FOR_CSS_FULL_CORNERS(i) { radii[i].SizeTo(radiusX, radiusY); }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ namespace gfx {
|
|||||||
// Simple helper class to automatically release a CFObject when it goes out
|
// Simple helper class to automatically release a CFObject when it goes out
|
||||||
// of scope.
|
// of scope.
|
||||||
template <class T>
|
template <class T>
|
||||||
class AutoRelease {
|
class AutoRelease final {
|
||||||
public:
|
public:
|
||||||
explicit AutoRelease(T aObject) : mObject(aObject) {}
|
explicit AutoRelease(T aObject) : mObject(aObject) {}
|
||||||
|
|
||||||
@@ -230,7 +230,7 @@ static int maxPow2LessThan(int a) {
|
|||||||
return shift;
|
return shift;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct writeBuf {
|
struct writeBuf final {
|
||||||
explicit writeBuf(int size) {
|
explicit writeBuf(int size) {
|
||||||
this->data = new unsigned char[size];
|
this->data = new unsigned char[size];
|
||||||
this->offset = 0;
|
this->offset = 0;
|
||||||
|
|||||||
@@ -28,10 +28,10 @@ class SourceSurfaceCairo : public SourceSurface {
|
|||||||
DrawTargetCairo* aDrawTarget = nullptr);
|
DrawTargetCairo* aDrawTarget = nullptr);
|
||||||
virtual ~SourceSurfaceCairo();
|
virtual ~SourceSurfaceCairo();
|
||||||
|
|
||||||
virtual SurfaceType GetType() const override { return SurfaceType::CAIRO; }
|
SurfaceType GetType() const override { return SurfaceType::CAIRO; }
|
||||||
virtual IntSize GetSize() const override;
|
IntSize GetSize() const override;
|
||||||
virtual SurfaceFormat GetFormat() const override;
|
SurfaceFormat GetFormat() const override;
|
||||||
virtual already_AddRefed<DataSourceSurface> GetDataSurface() override;
|
already_AddRefed<DataSourceSurface> GetDataSurface() override;
|
||||||
|
|
||||||
cairo_surface_t* GetSurface() const;
|
cairo_surface_t* GetSurface() const;
|
||||||
|
|
||||||
@@ -52,14 +52,12 @@ class DataSourceSurfaceCairo : public DataSourceSurface {
|
|||||||
|
|
||||||
explicit DataSourceSurfaceCairo(cairo_surface_t* imageSurf);
|
explicit DataSourceSurfaceCairo(cairo_surface_t* imageSurf);
|
||||||
virtual ~DataSourceSurfaceCairo();
|
virtual ~DataSourceSurfaceCairo();
|
||||||
virtual unsigned char* GetData() override;
|
unsigned char* GetData() override;
|
||||||
virtual int32_t Stride() override;
|
int32_t Stride() override;
|
||||||
|
|
||||||
virtual SurfaceType GetType() const override {
|
SurfaceType GetType() const override { return SurfaceType::CAIRO_IMAGE; }
|
||||||
return SurfaceType::CAIRO_IMAGE;
|
IntSize GetSize() const override;
|
||||||
}
|
SurfaceFormat GetFormat() const override;
|
||||||
virtual IntSize GetSize() const override;
|
|
||||||
virtual SurfaceFormat GetFormat() const override;
|
|
||||||
|
|
||||||
cairo_surface_t* GetSurface() const;
|
cairo_surface_t* GetSurface() const;
|
||||||
|
|
||||||
|
|||||||
@@ -23,11 +23,11 @@ class SourceSurfaceCapture : public SourceSurface {
|
|||||||
MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(SourceSurfaceCapture, override)
|
MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(SourceSurfaceCapture, override)
|
||||||
|
|
||||||
explicit SourceSurfaceCapture(DrawTargetCaptureImpl* aOwner);
|
explicit SourceSurfaceCapture(DrawTargetCaptureImpl* aOwner);
|
||||||
explicit SourceSurfaceCapture(DrawTargetCaptureImpl* aOwner,
|
SourceSurfaceCapture(DrawTargetCaptureImpl* aOwner,
|
||||||
LuminanceType aLuminanceType, float aOpacity);
|
LuminanceType aLuminanceType, float aOpacity);
|
||||||
explicit SourceSurfaceCapture(DrawTargetCaptureImpl* aOwner,
|
SourceSurfaceCapture(DrawTargetCaptureImpl* aOwner,
|
||||||
SourceSurface* aSurfToOptimize);
|
SourceSurface* aSurfToOptimize);
|
||||||
~SourceSurfaceCapture();
|
virtual ~SourceSurfaceCapture();
|
||||||
|
|
||||||
SurfaceType GetType() const override { return SurfaceType::CAPTURE; }
|
SurfaceType GetType() const override { return SurfaceType::CAPTURE; }
|
||||||
IntSize GetSize() const override { return mSize; }
|
IntSize GetSize() const override { return mSize; }
|
||||||
|
|||||||
@@ -27,13 +27,11 @@ class SourceSurfaceD2D1 : public SourceSurface {
|
|||||||
DrawTargetD2D1 *aDT = nullptr);
|
DrawTargetD2D1 *aDT = nullptr);
|
||||||
~SourceSurfaceD2D1();
|
~SourceSurfaceD2D1();
|
||||||
|
|
||||||
virtual SurfaceType GetType() const override {
|
SurfaceType GetType() const override { return SurfaceType::D2D1_1_IMAGE; }
|
||||||
return SurfaceType::D2D1_1_IMAGE;
|
IntSize GetSize() const override { return mSize; }
|
||||||
}
|
SurfaceFormat GetFormat() const override { return mFormat; }
|
||||||
virtual IntSize GetSize() const override { return mSize; }
|
bool IsValid() const override;
|
||||||
virtual SurfaceFormat GetFormat() const override { return mFormat; }
|
already_AddRefed<DataSourceSurface> GetDataSurface() override;
|
||||||
virtual bool IsValid() const override;
|
|
||||||
virtual already_AddRefed<DataSourceSurface> GetDataSurface() override;
|
|
||||||
|
|
||||||
ID2D1Image *GetImage() { return mImage; }
|
ID2D1Image *GetImage() { return mImage; }
|
||||||
|
|
||||||
@@ -77,14 +75,14 @@ class DataSourceSurfaceD2D1 : public DataSourceSurface {
|
|||||||
DataSourceSurfaceD2D1(ID2D1Bitmap1 *aMappableBitmap, SurfaceFormat aFormat);
|
DataSourceSurfaceD2D1(ID2D1Bitmap1 *aMappableBitmap, SurfaceFormat aFormat);
|
||||||
~DataSourceSurfaceD2D1();
|
~DataSourceSurfaceD2D1();
|
||||||
|
|
||||||
virtual SurfaceType GetType() const override { return SurfaceType::DATA; }
|
SurfaceType GetType() const override { return SurfaceType::DATA; }
|
||||||
virtual IntSize GetSize() const override;
|
IntSize GetSize() const override;
|
||||||
virtual SurfaceFormat GetFormat() const override { return mFormat; }
|
SurfaceFormat GetFormat() const override { return mFormat; }
|
||||||
virtual bool IsValid() const override { return !!mBitmap; }
|
bool IsValid() const override { return !!mBitmap; }
|
||||||
virtual uint8_t *GetData() override;
|
uint8_t *GetData() override;
|
||||||
virtual int32_t Stride() override;
|
int32_t Stride() override;
|
||||||
virtual bool Map(MapType, MappedSurface *aMappedSurface) override;
|
bool Map(MapType, MappedSurface *aMappedSurface) override;
|
||||||
virtual void Unmap() override;
|
void Unmap() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
friend class SourceSurfaceD2DTarget;
|
friend class SourceSurfaceD2DTarget;
|
||||||
|
|||||||
@@ -25,11 +25,11 @@ class SourceSurfaceSkia : public DataSourceSurface {
|
|||||||
MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(DataSourceSurfaceSkia, override)
|
MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(DataSourceSurfaceSkia, override)
|
||||||
|
|
||||||
SourceSurfaceSkia();
|
SourceSurfaceSkia();
|
||||||
~SourceSurfaceSkia();
|
virtual ~SourceSurfaceSkia();
|
||||||
|
|
||||||
virtual SurfaceType GetType() const override { return SurfaceType::SKIA; }
|
SurfaceType GetType() const override { return SurfaceType::SKIA; }
|
||||||
virtual IntSize GetSize() const override;
|
IntSize GetSize() const override;
|
||||||
virtual SurfaceFormat GetFormat() const override;
|
SurfaceFormat GetFormat() const override;
|
||||||
|
|
||||||
// This is only ever called by the DT destructor, which can only ever happen
|
// This is only ever called by the DT destructor, which can only ever happen
|
||||||
// from one place at a time. Therefore it doesn't need to hold the ChangeMutex
|
// from one place at a time. Therefore it doesn't need to hold the ChangeMutex
|
||||||
@@ -49,16 +49,16 @@ class SourceSurfaceSkia : public DataSourceSurface {
|
|||||||
SurfaceFormat aFormat = SurfaceFormat::UNKNOWN,
|
SurfaceFormat aFormat = SurfaceFormat::UNKNOWN,
|
||||||
DrawTargetSkia* aOwner = nullptr);
|
DrawTargetSkia* aOwner = nullptr);
|
||||||
|
|
||||||
virtual uint8_t* GetData() override;
|
uint8_t* GetData() override;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The caller is responsible for ensuring aMappedSurface is not null.
|
* The caller is responsible for ensuring aMappedSurface is not null.
|
||||||
*/
|
*/
|
||||||
virtual bool Map(MapType, MappedSurface* aMappedSurface) override;
|
bool Map(MapType, MappedSurface* aMappedSurface) override;
|
||||||
|
|
||||||
virtual void Unmap() override;
|
void Unmap() override;
|
||||||
|
|
||||||
virtual int32_t Stride() override { return mStride; }
|
int32_t Stride() override { return mStride; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
friend class DrawTargetSkia;
|
friend class DrawTargetSkia;
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
template <class T, size_t size>
|
template <class T, size_t size>
|
||||||
class StackArray {
|
class StackArray final {
|
||||||
public:
|
public:
|
||||||
explicit StackArray(size_t count) {
|
explicit StackArray(size_t count) {
|
||||||
if (count > size) {
|
if (count > size) {
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ static inline Float Distance(Point aA, Point aB) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, int alignment = 16>
|
template <typename T, int alignment = 16>
|
||||||
struct AlignedArray {
|
struct AlignedArray final {
|
||||||
typedef T value_type;
|
typedef T value_type;
|
||||||
|
|
||||||
AlignedArray() : mPtr(nullptr), mStorage(nullptr), mCount(0) {}
|
AlignedArray() : mPtr(nullptr), mStorage(nullptr), mCount(0) {}
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ class UnscaledFontFreeType : public UnscaledFont {
|
|||||||
mOwnsFace(false),
|
mOwnsFace(false),
|
||||||
mIndex(0),
|
mIndex(0),
|
||||||
mNativeFontResource(aNativeFontResource) {}
|
mNativeFontResource(aNativeFontResource) {}
|
||||||
~UnscaledFontFreeType() {
|
virtual ~UnscaledFontFreeType() {
|
||||||
if (mOwnsFace) {
|
if (mOwnsFace) {
|
||||||
Factory::ReleaseFTFace(mFace);
|
Factory::ReleaseFTFace(mFace);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ class UnscaledFontMac final : public UnscaledFont {
|
|||||||
: mFont(aFont), mIsDataFont(aIsDataFont), mNeedsCairo(aNeedsCairo) {
|
: mFont(aFont), mIsDataFont(aIsDataFont), mNeedsCairo(aNeedsCairo) {
|
||||||
CFRetain(mFont);
|
CFRetain(mFont);
|
||||||
}
|
}
|
||||||
~UnscaledFontMac() { CFRelease(mFont); }
|
virtual ~UnscaledFontMac() { CFRelease(mFont); }
|
||||||
|
|
||||||
FontType GetType() const override { return FontType::MAC; }
|
FontType GetType() const override { return FontType::MAC; }
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
namespace gl {
|
namespace gl {
|
||||||
|
|
||||||
class AndroidNativeWindow {
|
class AndroidNativeWindow final {
|
||||||
public:
|
public:
|
||||||
AndroidNativeWindow() : mNativeWindow(nullptr) {}
|
AndroidNativeWindow() : mNativeWindow(nullptr) {}
|
||||||
|
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ void AndroidSurfaceTexture::GetTransformMatrix(
|
|||||||
env->ReleaseFloatArrayElements(jarray.Get(), array, 0);
|
env->ReleaseFloatArrayElements(jarray.Get(), array, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
class SharedGL {
|
class SharedGL final {
|
||||||
public:
|
public:
|
||||||
NS_INLINE_DECL_THREADSAFE_REFCOUNTING(SharedGL);
|
NS_INLINE_DECL_THREADSAFE_REFCOUNTING(SharedGL);
|
||||||
|
|
||||||
|
|||||||
@@ -33,11 +33,9 @@ class GLContextGLX : public GLContext {
|
|||||||
ScopedXFree<GLXFBConfig>* const out_scopedConfigArr,
|
ScopedXFree<GLXFBConfig>* const out_scopedConfigArr,
|
||||||
GLXFBConfig* const out_config, int* const out_visid, bool aWebRender);
|
GLXFBConfig* const out_config, int* const out_visid, bool aWebRender);
|
||||||
|
|
||||||
~GLContextGLX() override;
|
virtual ~GLContextGLX();
|
||||||
|
|
||||||
virtual GLContextType GetContextType() const override {
|
GLContextType GetContextType() const override { return GLContextType::GLX; }
|
||||||
return GLContextType::GLX;
|
|
||||||
}
|
|
||||||
|
|
||||||
static GLContextGLX* Cast(GLContext* gl) {
|
static GLContextGLX* Cast(GLContext* gl) {
|
||||||
MOZ_ASSERT(gl->GetContextType() == GLContextType::GLX);
|
MOZ_ASSERT(gl->GetContextType() == GLContextType::GLX);
|
||||||
@@ -46,17 +44,17 @@ class GLContextGLX : public GLContext {
|
|||||||
|
|
||||||
bool Init() override;
|
bool Init() override;
|
||||||
|
|
||||||
virtual bool MakeCurrentImpl() const override;
|
bool MakeCurrentImpl() const override;
|
||||||
|
|
||||||
virtual bool IsCurrentImpl() const override;
|
bool IsCurrentImpl() const override;
|
||||||
|
|
||||||
Maybe<SymbolLoader> GetSymbolLoader() const override;
|
Maybe<SymbolLoader> GetSymbolLoader() const override;
|
||||||
|
|
||||||
virtual bool IsDoubleBuffered() const override;
|
bool IsDoubleBuffered() const override;
|
||||||
|
|
||||||
virtual bool SwapBuffers() override;
|
bool SwapBuffers() override;
|
||||||
|
|
||||||
virtual void GetWSIInfo(nsCString* const out) const override;
|
void GetWSIInfo(nsCString* const out) const override;
|
||||||
|
|
||||||
// Overrides the current GLXDrawable backing the context and makes the
|
// Overrides the current GLXDrawable backing the context and makes the
|
||||||
// context current.
|
// context current.
|
||||||
|
|||||||
@@ -177,16 +177,15 @@ class BasicTextureImage : public TextureImage {
|
|||||||
GLContext* aContext,
|
GLContext* aContext,
|
||||||
TextureImage::Flags aFlags = TextureImage::NoFlags);
|
TextureImage::Flags aFlags = TextureImage::NoFlags);
|
||||||
|
|
||||||
virtual void BindTexture(GLenum aTextureUnit) override;
|
void BindTexture(GLenum aTextureUnit) override;
|
||||||
|
|
||||||
virtual bool DirectUpdate(
|
bool DirectUpdate(gfx::DataSourceSurface* aSurf, const nsIntRegion& aRegion,
|
||||||
gfx::DataSourceSurface* aSurf, const nsIntRegion& aRegion,
|
|
||||||
const gfx::IntPoint& aFrom = gfx::IntPoint(0, 0)) override;
|
const gfx::IntPoint& aFrom = gfx::IntPoint(0, 0)) override;
|
||||||
virtual GLuint GetTextureID() override { return mTexture; }
|
GLuint GetTextureID() override { return mTexture; }
|
||||||
|
|
||||||
virtual void MarkValid() override { mTextureState = Valid; }
|
void MarkValid() override { mTextureState = Valid; }
|
||||||
|
|
||||||
virtual void Resize(const gfx::IntSize& aSize) override;
|
void Resize(const gfx::IntSize& aSize) override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
GLuint mTexture;
|
GLuint mTexture;
|
||||||
@@ -205,25 +204,24 @@ class TiledTextureImage final : public TextureImage {
|
|||||||
GLContext* aGL, gfx::IntSize aSize, TextureImage::ContentType,
|
GLContext* aGL, gfx::IntSize aSize, TextureImage::ContentType,
|
||||||
TextureImage::Flags aFlags = TextureImage::NoFlags,
|
TextureImage::Flags aFlags = TextureImage::NoFlags,
|
||||||
TextureImage::ImageFormat aImageFormat = gfx::SurfaceFormat::UNKNOWN);
|
TextureImage::ImageFormat aImageFormat = gfx::SurfaceFormat::UNKNOWN);
|
||||||
~TiledTextureImage();
|
virtual ~TiledTextureImage();
|
||||||
void DumpDiv();
|
void DumpDiv();
|
||||||
virtual void Resize(const gfx::IntSize& aSize) override;
|
void Resize(const gfx::IntSize& aSize) override;
|
||||||
virtual uint32_t GetTileCount() override;
|
uint32_t GetTileCount() override;
|
||||||
virtual void BeginBigImageIteration() override;
|
void BeginBigImageIteration() override;
|
||||||
virtual bool NextTile() override;
|
bool NextTile() override;
|
||||||
virtual void SetIterationCallback(BigImageIterationCallback aCallback,
|
void SetIterationCallback(BigImageIterationCallback aCallback,
|
||||||
void* aCallbackData) override;
|
void* aCallbackData) override;
|
||||||
virtual gfx::IntRect GetTileRect() override;
|
gfx::IntRect GetTileRect() override;
|
||||||
virtual GLuint GetTextureID() override {
|
GLuint GetTextureID() override {
|
||||||
return mImages[mCurrentImage]->GetTextureID();
|
return mImages[mCurrentImage]->GetTextureID();
|
||||||
}
|
}
|
||||||
virtual bool DirectUpdate(
|
bool DirectUpdate(gfx::DataSourceSurface* aSurf, const nsIntRegion& aRegion,
|
||||||
gfx::DataSourceSurface* aSurf, const nsIntRegion& aRegion,
|
|
||||||
const gfx::IntPoint& aFrom = gfx::IntPoint(0, 0)) override;
|
const gfx::IntPoint& aFrom = gfx::IntPoint(0, 0)) override;
|
||||||
virtual void BindTexture(GLenum) override;
|
void BindTexture(GLenum) override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual gfx::IntRect GetSrcTileRect() override;
|
gfx::IntRect GetSrcTileRect() override;
|
||||||
|
|
||||||
unsigned int mCurrentImage;
|
unsigned int mCurrentImage;
|
||||||
BigImageIterationCallback mIterationCallback;
|
BigImageIterationCallback mIterationCallback;
|
||||||
|
|||||||
@@ -288,7 +288,7 @@ class SurfaceFactory : public SupportsWeakPtr<SurfaceFactory> {
|
|||||||
bool Recycle(layers::SharedSurfaceTextureClient* texClient);
|
bool Recycle(layers::SharedSurfaceTextureClient* texClient);
|
||||||
};
|
};
|
||||||
|
|
||||||
class ScopedReadbackFB {
|
class ScopedReadbackFB final {
|
||||||
GLContext* const mGL;
|
GLContext* const mGL;
|
||||||
ScopedBindFramebuffer mAutoFB;
|
ScopedBindFramebuffer mAutoFB;
|
||||||
GLuint mTempFB = 0;
|
GLuint mTempFB = 0;
|
||||||
|
|||||||
@@ -49,25 +49,25 @@ class SharedSurface_D3D11Interop : public SharedSurface {
|
|||||||
HANDLE dxgiHandle);
|
HANDLE dxgiHandle);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
virtual ~SharedSurface_D3D11Interop() override;
|
virtual ~SharedSurface_D3D11Interop();
|
||||||
|
|
||||||
virtual void LockProdImpl() override {}
|
void LockProdImpl() override {}
|
||||||
virtual void UnlockProdImpl() override {}
|
void UnlockProdImpl() override {}
|
||||||
|
|
||||||
virtual void ProducerAcquireImpl() override;
|
void ProducerAcquireImpl() override;
|
||||||
virtual void ProducerReleaseImpl() override;
|
void ProducerReleaseImpl() override;
|
||||||
|
|
||||||
virtual GLuint ProdRenderbuffer() override {
|
GLuint ProdRenderbuffer() override {
|
||||||
MOZ_ASSERT(!mProdTex);
|
MOZ_ASSERT(!mProdTex);
|
||||||
return mInteropRB;
|
return mInteropRB;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual GLuint ProdTexture() override {
|
GLuint ProdTexture() override {
|
||||||
MOZ_ASSERT(mProdTex);
|
MOZ_ASSERT(mProdTex);
|
||||||
return mProdTex;
|
return mProdTex;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual bool ToSurfaceDescriptor(
|
bool ToSurfaceDescriptor(
|
||||||
layers::SurfaceDescriptor* const out_descriptor) override;
|
layers::SurfaceDescriptor* const out_descriptor) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -86,11 +86,10 @@ class SurfaceFactory_D3D11Interop : public SurfaceFactory {
|
|||||||
DXInterop2Device* interop);
|
DXInterop2Device* interop);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
virtual ~SurfaceFactory_D3D11Interop() override;
|
virtual ~SurfaceFactory_D3D11Interop();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual UniquePtr<SharedSurface> CreateShared(
|
UniquePtr<SharedSurface> CreateShared(const gfx::IntSize& size) override {
|
||||||
const gfx::IntSize& size) override {
|
|
||||||
bool hasAlpha = mReadCaps.alpha;
|
bool hasAlpha = mReadCaps.alpha;
|
||||||
return SharedSurface_D3D11Interop::Create(mInterop, mGL, size, hasAlpha);
|
return SharedSurface_D3D11Interop::Create(mInterop, mGL, size, hasAlpha);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ class CompositorOptions {
|
|||||||
mUseAdvancedLayers(false),
|
mUseAdvancedLayers(false),
|
||||||
mInitiallyPaused(false) {}
|
mInitiallyPaused(false) {}
|
||||||
|
|
||||||
explicit CompositorOptions(bool aUseAPZ, bool aUseWebRender)
|
CompositorOptions(bool aUseAPZ, bool aUseWebRender)
|
||||||
: mUseAPZ(aUseAPZ),
|
: mUseAPZ(aUseAPZ),
|
||||||
mUseWebRender(aUseWebRender),
|
mUseWebRender(aUseWebRender),
|
||||||
mUseAdvancedLayers(false),
|
mUseAdvancedLayers(false),
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ class CrossProcessPaint;
|
|||||||
/**
|
/**
|
||||||
* A fragment of a paint of a cross process document tree.
|
* A fragment of a paint of a cross process document tree.
|
||||||
*/
|
*/
|
||||||
class PaintFragment {
|
class PaintFragment final {
|
||||||
public:
|
public:
|
||||||
/// Initializes an empty PaintFragment
|
/// Initializes an empty PaintFragment
|
||||||
PaintFragment() = default;
|
PaintFragment() = default;
|
||||||
@@ -74,7 +74,7 @@ class PaintFragment {
|
|||||||
/**
|
/**
|
||||||
* An object for painting a cross process document tree.
|
* An object for painting a cross process document tree.
|
||||||
*/
|
*/
|
||||||
class CrossProcessPaint {
|
class CrossProcessPaint final {
|
||||||
NS_INLINE_DECL_REFCOUNTING(CrossProcessPaint);
|
NS_INLINE_DECL_REFCOUNTING(CrossProcessPaint);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ class GPUChild final : public PGPUChild, public gfxVarReceiver {
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
explicit GPUChild(GPUProcessHost* aHost);
|
explicit GPUChild(GPUProcessHost* aHost);
|
||||||
~GPUChild();
|
virtual ~GPUChild();
|
||||||
|
|
||||||
void Init();
|
void Init();
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ namespace gfx {
|
|||||||
class GPUProcessImpl final : public ipc::ProcessChild {
|
class GPUProcessImpl final : public ipc::ProcessChild {
|
||||||
public:
|
public:
|
||||||
explicit GPUProcessImpl(ProcessId aParentPid);
|
explicit GPUProcessImpl(ProcessId aParentPid);
|
||||||
~GPUProcessImpl();
|
virtual ~GPUProcessImpl();
|
||||||
|
|
||||||
bool Init(int aArgc, char* aArgv[]) override;
|
bool Init(int aArgc, char* aArgv[]) override;
|
||||||
void CleanUp() override;
|
void CleanUp() override;
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ namespace gfx {
|
|||||||
|
|
||||||
class GPUProcessListener {
|
class GPUProcessListener {
|
||||||
public:
|
public:
|
||||||
virtual ~GPUProcessListener() {}
|
virtual ~GPUProcessListener() = default;
|
||||||
|
|
||||||
// Called when the compositor has died and the rendering stack must be
|
// Called when the compositor has died and the rendering stack must be
|
||||||
// recreated.
|
// recreated.
|
||||||
|
|||||||
@@ -248,7 +248,7 @@ class GPUProcessManager final : public GPUProcessHost::Listener {
|
|||||||
explicit Observer(GPUProcessManager* aManager);
|
explicit Observer(GPUProcessManager* aManager);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
~Observer() {}
|
virtual ~Observer() = default;
|
||||||
|
|
||||||
GPUProcessManager* mManager;
|
GPUProcessManager* mManager;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ class RemoteCompositorSession final : public CompositorSession {
|
|||||||
CompositorWidgetDelegate* aWidgetDelegate,
|
CompositorWidgetDelegate* aWidgetDelegate,
|
||||||
APZCTreeManagerChild* aAPZ,
|
APZCTreeManagerChild* aAPZ,
|
||||||
const LayersId& aRootLayerTreeId);
|
const LayersId& aRootLayerTreeId);
|
||||||
~RemoteCompositorSession() override;
|
virtual ~RemoteCompositorSession();
|
||||||
|
|
||||||
CompositorBridgeParent* GetInProcessBridge() const override;
|
CompositorBridgeParent* GetInProcessBridge() const override;
|
||||||
void SetContentController(GeckoContentController* aController) override;
|
void SetContentController(GeckoContentController* aController) override;
|
||||||
|
|||||||
@@ -32,11 +32,11 @@ class VsyncBridgeChild final : public PVsyncBridgeChild {
|
|||||||
|
|
||||||
void NotifyVsync(const VsyncEvent& aVsync, const layers::LayersId& aLayersId);
|
void NotifyVsync(const VsyncEvent& aVsync, const layers::LayersId& aLayersId);
|
||||||
|
|
||||||
virtual void HandleFatalError(const char* aMsg) const override;
|
void HandleFatalError(const char* aMsg) const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
VsyncBridgeChild(RefPtr<VsyncIOThreadHolder>, const uint64_t& aProcessToken);
|
VsyncBridgeChild(RefPtr<VsyncIOThreadHolder>, const uint64_t& aProcessToken);
|
||||||
~VsyncBridgeChild();
|
virtual ~VsyncBridgeChild();
|
||||||
|
|
||||||
void Open(Endpoint<PVsyncBridgeChild>&& aEndpoint);
|
void Open(Endpoint<PVsyncBridgeChild>&& aEndpoint);
|
||||||
|
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ struct AnimationTransform {
|
|||||||
TransformData mData;
|
TransformData mData;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct AnimatedValue {
|
struct AnimatedValue final {
|
||||||
enum { TRANSFORM, OPACITY, COLOR, NONE } mType{NONE};
|
enum { TRANSFORM, OPACITY, COLOR, NONE } mType{NONE};
|
||||||
|
|
||||||
union {
|
union {
|
||||||
@@ -110,6 +110,9 @@ struct AnimatedValue {
|
|||||||
explicit AnimatedValue(nscolor aValue)
|
explicit AnimatedValue(nscolor aValue)
|
||||||
: mType(AnimatedValue::COLOR), mColor(aValue) {}
|
: mType(AnimatedValue::COLOR), mColor(aValue) {}
|
||||||
|
|
||||||
|
// Can't use = default as AnimatedValue contains a union and has a variant
|
||||||
|
// member with non-trivial destructor.
|
||||||
|
// Otherwise a Deleted implicitly-declared destructor error will occur.
|
||||||
~AnimatedValue() {}
|
~AnimatedValue() {}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ class AxisPhysicsMSDModel : public AxisPhysicsModel {
|
|||||||
double aInitialVelocity, double aSpringConstant,
|
double aInitialVelocity, double aSpringConstant,
|
||||||
double aDampingRatio);
|
double aDampingRatio);
|
||||||
|
|
||||||
~AxisPhysicsMSDModel();
|
virtual ~AxisPhysicsMSDModel();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the raw destination of this axis at this moment.
|
* Gets the raw destination of this axis at this moment.
|
||||||
@@ -41,7 +41,7 @@ class AxisPhysicsMSDModel : public AxisPhysicsModel {
|
|||||||
bool IsFinished(double aSmallestVisibleIncrement);
|
bool IsFinished(double aSmallestVisibleIncrement);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual double Acceleration(const State &aState) override;
|
double Acceleration(const State &aState) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ namespace layers {
|
|||||||
class AxisPhysicsModel {
|
class AxisPhysicsModel {
|
||||||
public:
|
public:
|
||||||
AxisPhysicsModel(double aInitialPosition, double aInitialVelocity);
|
AxisPhysicsModel(double aInitialPosition, double aInitialVelocity);
|
||||||
~AxisPhysicsModel();
|
virtual ~AxisPhysicsModel();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Advance the physics simulation.
|
* Advance the physics simulation.
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ struct BSPTreeNode {
|
|||||||
* https://en.wikipedia.org/wiki/Binary_space_partitioning
|
* https://en.wikipedia.org/wiki/Binary_space_partitioning
|
||||||
* ftp://ftp.sgi.com/other/bspfaq/faq/bspfaq.html
|
* ftp://ftp.sgi.com/other/bspfaq/faq/bspfaq.html
|
||||||
*/
|
*/
|
||||||
class BSPTree {
|
class BSPTree final {
|
||||||
public:
|
public:
|
||||||
/**
|
/**
|
||||||
* The constructor modifies layers in the given list.
|
* The constructor modifies layers in the given list.
|
||||||
|
|||||||
@@ -36,22 +36,22 @@ class BufferTextureData : public TextureData {
|
|||||||
gfx::ColorDepth aColorDepth, gfx::YUVColorSpace aYUVColorSpace,
|
gfx::ColorDepth aColorDepth, gfx::YUVColorSpace aYUVColorSpace,
|
||||||
TextureFlags aTextureFlags);
|
TextureFlags aTextureFlags);
|
||||||
|
|
||||||
virtual bool Lock(OpenMode aMode) override { return true; }
|
bool Lock(OpenMode aMode) override { return true; }
|
||||||
|
|
||||||
virtual void Unlock() override {}
|
void Unlock() override {}
|
||||||
|
|
||||||
virtual void FillInfo(TextureData::Info& aInfo) const override;
|
void FillInfo(TextureData::Info& aInfo) const override;
|
||||||
|
|
||||||
virtual already_AddRefed<gfx::DrawTarget> BorrowDrawTarget() override;
|
already_AddRefed<gfx::DrawTarget> BorrowDrawTarget() override;
|
||||||
|
|
||||||
virtual bool BorrowMappedData(MappedTextureData& aMap) override;
|
bool BorrowMappedData(MappedTextureData& aMap) override;
|
||||||
|
|
||||||
virtual bool BorrowMappedYCbCrData(MappedYCbCrTextureData& aMap) override;
|
bool BorrowMappedYCbCrData(MappedYCbCrTextureData& aMap) override;
|
||||||
|
|
||||||
// use TextureClient's default implementation
|
// use TextureClient's default implementation
|
||||||
virtual bool UpdateFromSurface(gfx::SourceSurface* aSurface) override;
|
bool UpdateFromSurface(gfx::SourceSurface* aSurface) override;
|
||||||
|
|
||||||
virtual BufferTextureData* AsBufferTextureData() override { return this; }
|
BufferTextureData* AsBufferTextureData() override { return this; }
|
||||||
|
|
||||||
// Don't use this.
|
// Don't use this.
|
||||||
void SetDescriptor(BufferDescriptor&& aDesc);
|
void SetDescriptor(BufferDescriptor&& aDesc);
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ class RecordedFrame {
|
|||||||
TimeStamp GetTimeStamp() { return mTimeStamp; }
|
TimeStamp GetTimeStamp() { return mTimeStamp; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual ~RecordedFrame() {}
|
virtual ~RecordedFrame() = default;
|
||||||
RecordedFrame(const TimeStamp& aTimeStamp) : mTimeStamp(aTimeStamp) {}
|
RecordedFrame(const TimeStamp& aTimeStamp) : mTimeStamp(aTimeStamp) {}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|||||||
@@ -186,7 +186,7 @@ class Compositor : public TextureSourceProvider {
|
|||||||
CompositorBridgeParent* aParent = nullptr);
|
CompositorBridgeParent* aParent = nullptr);
|
||||||
|
|
||||||
virtual bool Initialize(nsCString* const out_failureReason) = 0;
|
virtual bool Initialize(nsCString* const out_failureReason) = 0;
|
||||||
virtual void Destroy() override;
|
void Destroy() override;
|
||||||
bool IsDestroyed() const { return mIsDestroyed; }
|
bool IsDestroyed() const { return mIsDestroyed; }
|
||||||
|
|
||||||
virtual void DetachWidget() { mWidget = nullptr; }
|
virtual void DetachWidget() { mWidget = nullptr; }
|
||||||
@@ -471,7 +471,7 @@ class Compositor : public TextureSourceProvider {
|
|||||||
virtual CompositorD3D11* AsCompositorD3D11() { return nullptr; }
|
virtual CompositorD3D11* AsCompositorD3D11() { return nullptr; }
|
||||||
virtual BasicCompositor* AsBasicCompositor() { return nullptr; }
|
virtual BasicCompositor* AsBasicCompositor() { return nullptr; }
|
||||||
|
|
||||||
virtual Compositor* AsCompositor() override { return this; }
|
Compositor* AsCompositor() override { return this; }
|
||||||
|
|
||||||
TimeStamp GetLastCompositionEndTime() const override {
|
TimeStamp GetLastCompositionEndTime() const override {
|
||||||
return mLastCompositionEndTime;
|
return mLastCompositionEndTime;
|
||||||
@@ -518,7 +518,7 @@ class Compositor : public TextureSourceProvider {
|
|||||||
// A stale Compositor has no CompositorBridgeParent; it will not process
|
// A stale Compositor has no CompositorBridgeParent; it will not process
|
||||||
// frames and should not be used.
|
// frames and should not be used.
|
||||||
void SetInvalid();
|
void SetInvalid();
|
||||||
virtual bool IsValid() const override;
|
bool IsValid() const override;
|
||||||
CompositorBridgeParent* GetCompositorBridgeParent() const { return mParent; }
|
CompositorBridgeParent* GetCompositorBridgeParent() const { return mParent; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
@@ -636,7 +636,7 @@ class AsyncReadbackBuffer {
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
explicit AsyncReadbackBuffer(const gfx::IntSize& aSize) : mSize(aSize) {}
|
explicit AsyncReadbackBuffer(const gfx::IntSize& aSize) : mSize(aSize) {}
|
||||||
virtual ~AsyncReadbackBuffer() {}
|
virtual ~AsyncReadbackBuffer() = default;
|
||||||
|
|
||||||
gfx::IntSize mSize;
|
gfx::IntSize mSize;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -19,15 +19,14 @@ namespace layers {
|
|||||||
|
|
||||||
class D3D11RecycleAllocator : public TextureClientRecycleAllocator {
|
class D3D11RecycleAllocator : public TextureClientRecycleAllocator {
|
||||||
public:
|
public:
|
||||||
explicit D3D11RecycleAllocator(KnowsCompositor* aAllocator,
|
D3D11RecycleAllocator(KnowsCompositor* aAllocator, ID3D11Device* aDevice)
|
||||||
ID3D11Device* aDevice)
|
|
||||||
: TextureClientRecycleAllocator(aAllocator), mDevice(aDevice) {}
|
: TextureClientRecycleAllocator(aAllocator), mDevice(aDevice) {}
|
||||||
|
|
||||||
already_AddRefed<TextureClient> CreateOrRecycleClient(
|
already_AddRefed<TextureClient> CreateOrRecycleClient(
|
||||||
gfx::SurfaceFormat aFormat, const gfx::IntSize& aSize);
|
gfx::SurfaceFormat aFormat, const gfx::IntSize& aSize);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual already_AddRefed<TextureClient> Allocate(
|
already_AddRefed<TextureClient> Allocate(
|
||||||
gfx::SurfaceFormat aFormat, gfx::IntSize aSize, BackendSelector aSelector,
|
gfx::SurfaceFormat aFormat, gfx::IntSize aSize, BackendSelector aSelector,
|
||||||
TextureFlags aTextureFlags, TextureAllocationFlags aAllocFlags) override;
|
TextureFlags aTextureFlags, TextureAllocationFlags aAllocFlags) override;
|
||||||
|
|
||||||
@@ -46,7 +45,7 @@ class D3D11ShareHandleImage final : public Image {
|
|||||||
public:
|
public:
|
||||||
D3D11ShareHandleImage(const gfx::IntSize& aSize, const gfx::IntRect& aRect,
|
D3D11ShareHandleImage(const gfx::IntSize& aSize, const gfx::IntRect& aRect,
|
||||||
const GUID& aSourceFormat);
|
const GUID& aSourceFormat);
|
||||||
virtual ~D3D11ShareHandleImage() {}
|
virtual ~D3D11ShareHandleImage() = default;
|
||||||
|
|
||||||
bool AllocateTexture(D3D11RecycleAllocator* aAllocator,
|
bool AllocateTexture(D3D11RecycleAllocator* aAllocator,
|
||||||
ID3D11Device* aDevice);
|
ID3D11Device* aDevice);
|
||||||
|
|||||||
@@ -270,7 +270,7 @@ already_AddRefed<SourceSurface> D3D11YCbCrImage::GetAsSourceSurface() {
|
|||||||
return surface.forget();
|
return surface.forget();
|
||||||
}
|
}
|
||||||
|
|
||||||
class AutoCheckLockD3D11Texture {
|
class AutoCheckLockD3D11Texture final {
|
||||||
public:
|
public:
|
||||||
explicit AutoCheckLockD3D11Texture(ID3D11Texture2D* aTexture)
|
explicit AutoCheckLockD3D11Texture(ID3D11Texture2D* aTexture)
|
||||||
: mIsLocked(false) {
|
: mIsLocked(false) {
|
||||||
|
|||||||
@@ -19,15 +19,14 @@ class TextureClient;
|
|||||||
|
|
||||||
class D3D9RecycleAllocator : public TextureClientRecycleAllocator {
|
class D3D9RecycleAllocator : public TextureClientRecycleAllocator {
|
||||||
public:
|
public:
|
||||||
explicit D3D9RecycleAllocator(KnowsCompositor* aAllocator,
|
D3D9RecycleAllocator(KnowsCompositor* aAllocator, IDirect3DDevice9* aDevice)
|
||||||
IDirect3DDevice9* aDevice)
|
|
||||||
: TextureClientRecycleAllocator(aAllocator), mDevice(aDevice) {}
|
: TextureClientRecycleAllocator(aAllocator), mDevice(aDevice) {}
|
||||||
|
|
||||||
already_AddRefed<TextureClient> CreateOrRecycleClient(
|
already_AddRefed<TextureClient> CreateOrRecycleClient(
|
||||||
gfx::SurfaceFormat aFormat, const gfx::IntSize& aSize);
|
gfx::SurfaceFormat aFormat, const gfx::IntSize& aSize);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual already_AddRefed<TextureClient> Allocate(
|
already_AddRefed<TextureClient> Allocate(
|
||||||
gfx::SurfaceFormat aFormat, gfx::IntSize aSize, BackendSelector aSelector,
|
gfx::SurfaceFormat aFormat, gfx::IntSize aSize, BackendSelector aSelector,
|
||||||
TextureFlags aTextureFlags, TextureAllocationFlags aAllocFlags) override;
|
TextureFlags aTextureFlags, TextureAllocationFlags aAllocFlags) override;
|
||||||
|
|
||||||
@@ -46,17 +45,17 @@ class DXGID3D9TextureData : public TextureData {
|
|||||||
TextureFlags aFlags,
|
TextureFlags aFlags,
|
||||||
IDirect3DDevice9* aDevice);
|
IDirect3DDevice9* aDevice);
|
||||||
|
|
||||||
~DXGID3D9TextureData();
|
virtual ~DXGID3D9TextureData();
|
||||||
|
|
||||||
virtual void FillInfo(TextureData::Info& aInfo) const override;
|
void FillInfo(TextureData::Info& aInfo) const override;
|
||||||
|
|
||||||
virtual bool Lock(OpenMode) override { return true; }
|
bool Lock(OpenMode) override { return true; }
|
||||||
|
|
||||||
virtual void Unlock() override {}
|
void Unlock() override {}
|
||||||
|
|
||||||
virtual bool Serialize(SurfaceDescriptor& aOutDescriptor) override;
|
bool Serialize(SurfaceDescriptor& aOutDescriptor) override;
|
||||||
|
|
||||||
virtual void Deallocate(LayersIPCChannel* aAllocator) override {}
|
void Deallocate(LayersIPCChannel* aAllocator) override {}
|
||||||
|
|
||||||
IDirect3DDevice9* GetD3D9Device() { return mDevice; }
|
IDirect3DDevice9* GetD3D9Device() { return mDevice; }
|
||||||
IDirect3DTexture9* GetD3D9Texture() { return mTexture; }
|
IDirect3DTexture9* GetD3D9Texture() { return mTexture; }
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ struct Effect {
|
|||||||
virtual void PrintInfo(std::stringstream& aStream, const char* aPrefix) = 0;
|
virtual void PrintInfo(std::stringstream& aStream, const char* aPrefix) = 0;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual ~Effect() {}
|
virtual ~Effect() = default;
|
||||||
};
|
};
|
||||||
|
|
||||||
// Render from a texture
|
// Render from a texture
|
||||||
@@ -66,10 +66,9 @@ struct TexturedEffect : public Effect {
|
|||||||
mPremultiplied(aPremultiplied),
|
mPremultiplied(aPremultiplied),
|
||||||
mSamplingFilter(aSamplingFilter) {}
|
mSamplingFilter(aSamplingFilter) {}
|
||||||
|
|
||||||
virtual TexturedEffect* AsTexturedEffect() override { return this; }
|
TexturedEffect* AsTexturedEffect() override { return this; }
|
||||||
virtual const char* Name() = 0;
|
virtual const char* Name() = 0;
|
||||||
virtual void PrintInfo(std::stringstream& aStream,
|
void PrintInfo(std::stringstream& aStream, const char* aPrefix) override;
|
||||||
const char* aPrefix) override;
|
|
||||||
|
|
||||||
gfx::Rect mTextureCoords;
|
gfx::Rect mTextureCoords;
|
||||||
TextureSource* mTexture;
|
TextureSource* mTexture;
|
||||||
@@ -86,8 +85,7 @@ struct EffectMask : public Effect {
|
|||||||
mSize(aSize),
|
mSize(aSize),
|
||||||
mMaskTransform(aMaskTransform) {}
|
mMaskTransform(aMaskTransform) {}
|
||||||
|
|
||||||
virtual void PrintInfo(std::stringstream& aStream,
|
void PrintInfo(std::stringstream& aStream, const char* aPrefix) override;
|
||||||
const char* aPrefix) override;
|
|
||||||
|
|
||||||
TextureSource* mMaskTexture;
|
TextureSource* mMaskTexture;
|
||||||
gfx::IntSize mSize;
|
gfx::IntSize mSize;
|
||||||
@@ -99,8 +97,7 @@ struct EffectBlendMode : public Effect {
|
|||||||
: Effect(EffectTypes::BLEND_MODE), mBlendMode(aBlendMode) {}
|
: Effect(EffectTypes::BLEND_MODE), mBlendMode(aBlendMode) {}
|
||||||
|
|
||||||
virtual const char* Name() { return "EffectBlendMode"; }
|
virtual const char* Name() { return "EffectBlendMode"; }
|
||||||
virtual void PrintInfo(std::stringstream& aStream,
|
void PrintInfo(std::stringstream& aStream, const char* aPrefix) override;
|
||||||
const char* aPrefix) override;
|
|
||||||
|
|
||||||
gfx::CompositionOp mBlendMode;
|
gfx::CompositionOp mBlendMode;
|
||||||
};
|
};
|
||||||
@@ -112,9 +109,8 @@ struct EffectRenderTarget : public TexturedEffect {
|
|||||||
gfx::SamplingFilter::LINEAR),
|
gfx::SamplingFilter::LINEAR),
|
||||||
mRenderTarget(aRenderTarget) {}
|
mRenderTarget(aRenderTarget) {}
|
||||||
|
|
||||||
virtual const char* Name() override { return "EffectRenderTarget"; }
|
const char* Name() override { return "EffectRenderTarget"; }
|
||||||
virtual void PrintInfo(std::stringstream& aStream,
|
void PrintInfo(std::stringstream& aStream, const char* aPrefix) override;
|
||||||
const char* aPrefix) override;
|
|
||||||
|
|
||||||
RefPtr<CompositingRenderTarget> mRenderTarget;
|
RefPtr<CompositingRenderTarget> mRenderTarget;
|
||||||
|
|
||||||
@@ -129,9 +125,7 @@ struct EffectColorMatrix : public Effect {
|
|||||||
explicit EffectColorMatrix(gfx::Matrix5x4 aMatrix)
|
explicit EffectColorMatrix(gfx::Matrix5x4 aMatrix)
|
||||||
: Effect(EffectTypes::COLOR_MATRIX), mColorMatrix(aMatrix) {}
|
: Effect(EffectTypes::COLOR_MATRIX), mColorMatrix(aMatrix) {}
|
||||||
|
|
||||||
virtual const char* Name() { return "EffectColorMatrix"; }
|
void PrintInfo(std::stringstream& aStream, const char* aPrefix) override;
|
||||||
virtual void PrintInfo(std::stringstream& aStream,
|
|
||||||
const char* aPrefix) override;
|
|
||||||
const gfx::Matrix5x4 mColorMatrix;
|
const gfx::Matrix5x4 mColorMatrix;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -141,7 +135,7 @@ struct EffectRGB : public TexturedEffect {
|
|||||||
: TexturedEffect(EffectTypes::RGB, aTexture, aPremultiplied,
|
: TexturedEffect(EffectTypes::RGB, aTexture, aPremultiplied,
|
||||||
aSamplingFilter) {}
|
aSamplingFilter) {}
|
||||||
|
|
||||||
virtual const char* Name() override { return "EffectRGB"; }
|
const char* Name() override { return "EffectRGB"; }
|
||||||
};
|
};
|
||||||
|
|
||||||
struct EffectYCbCr : public TexturedEffect {
|
struct EffectYCbCr : public TexturedEffect {
|
||||||
@@ -151,7 +145,7 @@ struct EffectYCbCr : public TexturedEffect {
|
|||||||
mYUVColorSpace(aYUVColorSpace),
|
mYUVColorSpace(aYUVColorSpace),
|
||||||
mColorDepth(aColorDepth) {}
|
mColorDepth(aColorDepth) {}
|
||||||
|
|
||||||
virtual const char* Name() override { return "EffectYCbCr"; }
|
const char* Name() override { return "EffectYCbCr"; }
|
||||||
|
|
||||||
gfx::YUVColorSpace mYUVColorSpace;
|
gfx::YUVColorSpace mYUVColorSpace;
|
||||||
gfx::ColorDepth mColorDepth;
|
gfx::ColorDepth mColorDepth;
|
||||||
@@ -164,7 +158,7 @@ struct EffectNV12 : public EffectYCbCr {
|
|||||||
mType = EffectTypes::NV12;
|
mType = EffectTypes::NV12;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual const char* Name() override { return "EffectNV12"; }
|
const char* Name() override { return "EffectNV12"; }
|
||||||
};
|
};
|
||||||
|
|
||||||
struct EffectComponentAlpha : public TexturedEffect {
|
struct EffectComponentAlpha : public TexturedEffect {
|
||||||
@@ -175,7 +169,7 @@ struct EffectComponentAlpha : public TexturedEffect {
|
|||||||
mOnBlack(aOnBlack),
|
mOnBlack(aOnBlack),
|
||||||
mOnWhite(aOnWhite) {}
|
mOnWhite(aOnWhite) {}
|
||||||
|
|
||||||
virtual const char* Name() override { return "EffectComponentAlpha"; }
|
const char* Name() override { return "EffectComponentAlpha"; }
|
||||||
|
|
||||||
TextureSource* mOnBlack;
|
TextureSource* mOnBlack;
|
||||||
TextureSource* mOnWhite;
|
TextureSource* mOnWhite;
|
||||||
@@ -185,8 +179,7 @@ struct EffectSolidColor : public Effect {
|
|||||||
explicit EffectSolidColor(const gfx::Color& aColor)
|
explicit EffectSolidColor(const gfx::Color& aColor)
|
||||||
: Effect(EffectTypes::SOLID_COLOR), mColor(aColor) {}
|
: Effect(EffectTypes::SOLID_COLOR), mColor(aColor) {}
|
||||||
|
|
||||||
virtual void PrintInfo(std::stringstream& aStream,
|
void PrintInfo(std::stringstream& aStream, const char* aPrefix) override;
|
||||||
const char* aPrefix) override;
|
|
||||||
|
|
||||||
gfx::Color mColor;
|
gfx::Color mColor;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ class GPUVideoImage final : public Image {
|
|||||||
ImageBridgeChild::GetSingleton().get());
|
ImageBridgeChild::GetSingleton().get());
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual ~GPUVideoImage() {}
|
virtual ~GPUVideoImage() = default;
|
||||||
|
|
||||||
gfx::IntSize GetSize() const override { return mSize; }
|
gfx::IntSize GetSize() const override { return mSize; }
|
||||||
|
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ class ParentActor : public Protocol {
|
|||||||
|
|
||||||
typedef ipc::IProtocol::ActorDestroyReason Why;
|
typedef ipc::IProtocol::ActorDestroyReason Why;
|
||||||
|
|
||||||
virtual void ActorDestroy(Why) override { DestroyIfNeeded(); }
|
void ActorDestroy(Why) override { DestroyIfNeeded(); }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void DestroyIfNeeded() {
|
void DestroyIfNeeded() {
|
||||||
|
|||||||
@@ -161,7 +161,7 @@ class D3D11YCbCrRecycleAllocator;
|
|||||||
class SurfaceDescriptorBuffer;
|
class SurfaceDescriptorBuffer;
|
||||||
|
|
||||||
struct ImageBackendData {
|
struct ImageBackendData {
|
||||||
virtual ~ImageBackendData() {}
|
virtual ~ImageBackendData() = default;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
ImageBackendData() {}
|
ImageBackendData() {}
|
||||||
@@ -244,7 +244,7 @@ class Image {
|
|||||||
: mImplData(aImplData), mSerial(++sSerialCounter), mFormat(aFormat) {}
|
: mImplData(aImplData), mSerial(++sSerialCounter), mFormat(aFormat) {}
|
||||||
|
|
||||||
// Protected destructor, to discourage deletion outside of Release():
|
// Protected destructor, to discourage deletion outside of Release():
|
||||||
virtual ~Image() {}
|
virtual ~Image() = default;
|
||||||
|
|
||||||
mozilla::EnumeratedArray<mozilla::layers::LayersBackend,
|
mozilla::EnumeratedArray<mozilla::layers::LayersBackend,
|
||||||
mozilla::layers::LayersBackend::LAYERS_LAST,
|
mozilla::layers::LayersBackend::LAYERS_LAST,
|
||||||
@@ -317,7 +317,7 @@ class ImageFactory {
|
|||||||
friend class ImageContainer;
|
friend class ImageContainer;
|
||||||
|
|
||||||
ImageFactory() {}
|
ImageFactory() {}
|
||||||
virtual ~ImageFactory() {}
|
virtual ~ImageFactory() = default;
|
||||||
|
|
||||||
virtual RefPtr<PlanarYCbCrImage> CreatePlanarYCbCrImage(
|
virtual RefPtr<PlanarYCbCrImage> CreatePlanarYCbCrImage(
|
||||||
const gfx::IntSize& aScaleHint, BufferRecycleBin* aRecycleBin);
|
const gfx::IntSize& aScaleHint, BufferRecycleBin* aRecycleBin);
|
||||||
@@ -802,7 +802,7 @@ class PlanarYCbCrImage : public Image {
|
|||||||
|
|
||||||
enum { MAX_DIMENSION = 16384 };
|
enum { MAX_DIMENSION = 16384 };
|
||||||
|
|
||||||
virtual ~PlanarYCbCrImage() {}
|
virtual ~PlanarYCbCrImage() = default;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This makes a copy of the data buffers, in order to support functioning
|
* This makes a copy of the data buffers, in order to support functioning
|
||||||
|
|||||||
@@ -66,22 +66,20 @@ class ImageLayer : public Layer {
|
|||||||
|
|
||||||
MOZ_LAYER_DECL_NAME("ImageLayer", TYPE_IMAGE)
|
MOZ_LAYER_DECL_NAME("ImageLayer", TYPE_IMAGE)
|
||||||
|
|
||||||
virtual void ComputeEffectiveTransforms(
|
void ComputeEffectiveTransforms(
|
||||||
const gfx::Matrix4x4& aTransformToSurface) override;
|
const gfx::Matrix4x4& aTransformToSurface) override;
|
||||||
|
|
||||||
virtual const gfx::Matrix4x4& GetEffectiveTransformForBuffer()
|
const gfx::Matrix4x4& GetEffectiveTransformForBuffer() const override {
|
||||||
const override {
|
|
||||||
return mEffectiveTransformForBuffer;
|
return mEffectiveTransformForBuffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual ImageLayer* AsImageLayer() override { return this; }
|
ImageLayer* AsImageLayer() override { return this; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
ImageLayer(LayerManager* aManager, void* aImplData);
|
ImageLayer(LayerManager* aManager, void* aImplData);
|
||||||
~ImageLayer();
|
virtual ~ImageLayer();
|
||||||
virtual void PrintInfo(std::stringstream& aStream,
|
void PrintInfo(std::stringstream& aStream, const char* aPrefix) override;
|
||||||
const char* aPrefix) override;
|
void DumpPacket(layerscope::LayersPacket* aPacket,
|
||||||
virtual void DumpPacket(layerscope::LayersPacket* aPacket,
|
|
||||||
const void* aParent) override;
|
const void* aParent) override;
|
||||||
|
|
||||||
RefPtr<ImageContainer> mContainer;
|
RefPtr<ImageContainer> mContainer;
|
||||||
|
|||||||
@@ -120,7 +120,7 @@ namespace layers {
|
|||||||
* alternative of making mIndex a int32_t that can store -1, but then having
|
* alternative of making mIndex a int32_t that can store -1, but then having
|
||||||
* to cast to uint32_t all over the place.
|
* to cast to uint32_t all over the place.
|
||||||
*/
|
*/
|
||||||
class MOZ_STACK_CLASS LayerMetricsWrapper {
|
class MOZ_STACK_CLASS LayerMetricsWrapper final {
|
||||||
public:
|
public:
|
||||||
enum StartAt {
|
enum StartAt {
|
||||||
TOP,
|
TOP,
|
||||||
|
|||||||
@@ -147,7 +147,7 @@ class LayerScopeWebSocketManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
virtual ~SocketListener() {}
|
virtual ~SocketListener() = default;
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -380,7 +380,7 @@ class DebugGLData : public LinkedListElement<DebugGLData> {
|
|||||||
public:
|
public:
|
||||||
explicit DebugGLData(Packet::DataType aDataType) : mDataType(aDataType) {}
|
explicit DebugGLData(Packet::DataType aDataType) : mDataType(aDataType) {}
|
||||||
|
|
||||||
virtual ~DebugGLData() {}
|
virtual ~DebugGLData() = default;
|
||||||
|
|
||||||
virtual bool Write() = 0;
|
virtual bool Write() = 0;
|
||||||
|
|
||||||
@@ -405,7 +405,7 @@ class DebugGLFrameStatusData final : public DebugGLData {
|
|||||||
explicit DebugGLFrameStatusData(Packet::DataType aDataType)
|
explicit DebugGLFrameStatusData(Packet::DataType aDataType)
|
||||||
: DebugGLData(aDataType), mFrameStamp(0) {}
|
: DebugGLData(aDataType), mFrameStamp(0) {}
|
||||||
|
|
||||||
virtual bool Write() override {
|
bool Write() override {
|
||||||
Packet packet;
|
Packet packet;
|
||||||
packet.set_type(mDataType);
|
packet.set_type(mDataType);
|
||||||
|
|
||||||
@@ -441,7 +441,7 @@ class DebugGLTextureData final : public DebugGLData {
|
|||||||
pack(img);
|
pack(img);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual bool Write() override { return WriteToStream(*mPacket); }
|
bool Write() override { return WriteToStream(*mPacket); }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void pack(DataSourceSurface* aImage) {
|
void pack(DataSourceSurface* aImage) {
|
||||||
@@ -507,7 +507,7 @@ class DebugGLColorData final : public DebugGLData {
|
|||||||
mColor(color.ToABGR()),
|
mColor(color.ToABGR()),
|
||||||
mSize(width, height) {}
|
mSize(width, height) {}
|
||||||
|
|
||||||
virtual bool Write() override {
|
bool Write() override {
|
||||||
Packet packet;
|
Packet packet;
|
||||||
packet.set_type(mDataType);
|
packet.set_type(mDataType);
|
||||||
|
|
||||||
@@ -531,7 +531,7 @@ class DebugGLLayersData final : public DebugGLData {
|
|||||||
explicit DebugGLLayersData(UniquePtr<Packet> aPacket)
|
explicit DebugGLLayersData(UniquePtr<Packet> aPacket)
|
||||||
: DebugGLData(Packet::LAYERS), mPacket(std::move(aPacket)) {}
|
: DebugGLData(Packet::LAYERS), mPacket(std::move(aPacket)) {}
|
||||||
|
|
||||||
virtual bool Write() override {
|
bool Write() override {
|
||||||
mPacket->set_type(mDataType);
|
mPacket->set_type(mDataType);
|
||||||
return WriteToStream(*mPacket);
|
return WriteToStream(*mPacket);
|
||||||
}
|
}
|
||||||
@@ -548,7 +548,7 @@ class DebugGLMetaData final : public DebugGLData {
|
|||||||
explicit DebugGLMetaData(Packet::DataType aDataType)
|
explicit DebugGLMetaData(Packet::DataType aDataType)
|
||||||
: DebugGLData(aDataType), mComposedByHwc(false) {}
|
: DebugGLData(aDataType), mComposedByHwc(false) {}
|
||||||
|
|
||||||
virtual bool Write() override {
|
bool Write() override {
|
||||||
Packet packet;
|
Packet packet;
|
||||||
packet.set_type(mDataType);
|
packet.set_type(mDataType);
|
||||||
|
|
||||||
@@ -581,7 +581,7 @@ class DebugGLDrawData final : public DebugGLData {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual bool Write() override {
|
bool Write() override {
|
||||||
Packet packet;
|
Packet packet;
|
||||||
packet.set_type(mDataType);
|
packet.set_type(mDataType);
|
||||||
|
|
||||||
@@ -640,7 +640,7 @@ class DebugDataSender {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
virtual ~AppendTask() {}
|
virtual ~AppendTask() = default;
|
||||||
|
|
||||||
DebugGLData* mData;
|
DebugGLData* mData;
|
||||||
// Keep a strong reference to DebugDataSender to prevent this object
|
// Keep a strong reference to DebugDataSender to prevent this object
|
||||||
@@ -661,7 +661,7 @@ class DebugDataSender {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
virtual ~ClearTask() {}
|
virtual ~ClearTask() = default;
|
||||||
|
|
||||||
RefPtr<DebugDataSender> mHost;
|
RefPtr<DebugDataSender> mHost;
|
||||||
};
|
};
|
||||||
@@ -691,7 +691,7 @@ class DebugDataSender {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
virtual ~SendTask() {}
|
virtual ~SendTask() = default;
|
||||||
|
|
||||||
RefPtr<DebugDataSender> mHost;
|
RefPtr<DebugDataSender> mHost;
|
||||||
};
|
};
|
||||||
@@ -707,7 +707,7 @@ class DebugDataSender {
|
|||||||
void Send() { mThread->Dispatch(new SendTask(this), NS_DISPATCH_NORMAL); }
|
void Send() { mThread->Dispatch(new SendTask(this), NS_DISPATCH_NORMAL); }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual ~DebugDataSender() {}
|
virtual ~DebugDataSender() = default;
|
||||||
void RemoveData() {
|
void RemoveData() {
|
||||||
MOZ_ASSERT(mThread->SerialEventTarget()->IsOnCurrentThread());
|
MOZ_ASSERT(mThread->SerialEventTarget()->IsOnCurrentThread());
|
||||||
if (mList.isEmpty()) return;
|
if (mList.isEmpty()) return;
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ class LayerScope {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// Perform BeginFrame and EndFrame automatically
|
// Perform BeginFrame and EndFrame automatically
|
||||||
class LayerScopeAutoFrame {
|
class LayerScopeAutoFrame final {
|
||||||
public:
|
public:
|
||||||
explicit LayerScopeAutoFrame(int64_t aFrameStamp);
|
explicit LayerScopeAutoFrame(int64_t aFrameStamp);
|
||||||
~LayerScopeAutoFrame();
|
~LayerScopeAutoFrame();
|
||||||
|
|||||||
@@ -173,7 +173,7 @@ struct LayerPropertiesBase : public LayerProperties {
|
|||||||
mUseClipRect(false) {
|
mUseClipRect(false) {
|
||||||
MOZ_COUNT_CTOR(LayerPropertiesBase);
|
MOZ_COUNT_CTOR(LayerPropertiesBase);
|
||||||
}
|
}
|
||||||
~LayerPropertiesBase() override { MOZ_COUNT_DTOR(LayerPropertiesBase); }
|
virtual ~LayerPropertiesBase() { MOZ_COUNT_DTOR(LayerPropertiesBase); }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
LayerPropertiesBase(const LayerPropertiesBase& a) = delete;
|
LayerPropertiesBase(const LayerPropertiesBase& a) = delete;
|
||||||
|
|||||||
@@ -33,13 +33,13 @@ typedef void (*NotifySubDocInvalidationFunc)(ContainerLayer* aLayer,
|
|||||||
*/
|
*/
|
||||||
struct LayerProperties {
|
struct LayerProperties {
|
||||||
protected:
|
protected:
|
||||||
LayerProperties() {}
|
LayerProperties() = default;
|
||||||
|
|
||||||
LayerProperties(const LayerProperties& a) = delete;
|
LayerProperties(const LayerProperties& a) = delete;
|
||||||
LayerProperties& operator=(const LayerProperties& a) = delete;
|
LayerProperties& operator=(const LayerProperties& a) = delete;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
virtual ~LayerProperties() {}
|
virtual ~LayerProperties() = default;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Copies the current layer tree properties into
|
* Copies the current layer tree properties into
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ namespace layers {
|
|||||||
*/
|
*/
|
||||||
class LayerUserData {
|
class LayerUserData {
|
||||||
public:
|
public:
|
||||||
virtual ~LayerUserData() {}
|
virtual ~LayerUserData() = default;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace layers
|
} // namespace layers
|
||||||
|
|||||||
@@ -113,8 +113,8 @@ class LayersPacket;
|
|||||||
} // namespace layerscope
|
} // namespace layerscope
|
||||||
|
|
||||||
#define MOZ_LAYER_DECL_NAME(n, e) \
|
#define MOZ_LAYER_DECL_NAME(n, e) \
|
||||||
virtual const char* Name() const override { return n; } \
|
const char* Name() const override { return n; } \
|
||||||
virtual LayerType GetType() const override { return e; } \
|
LayerType GetType() const override { return e; } \
|
||||||
static LayerType Type() { return e; }
|
static LayerType Type() { return e; }
|
||||||
|
|
||||||
// Defined in LayerUserData.h; please include that file instead.
|
// Defined in LayerUserData.h; please include that file instead.
|
||||||
@@ -754,7 +754,7 @@ class LayerManager : public FrameRecorder {
|
|||||||
nsIntRegion mRegionToClear;
|
nsIntRegion mRegionToClear;
|
||||||
|
|
||||||
// Protected destructor, to discourage deletion outside of Release():
|
// Protected destructor, to discourage deletion outside of Release():
|
||||||
virtual ~LayerManager() {}
|
virtual ~LayerManager() = default;
|
||||||
|
|
||||||
// Print interesting information about this into aStreamo. Internally
|
// Print interesting information about this into aStreamo. Internally
|
||||||
// used to implement Dump*() and Log*().
|
// used to implement Dump*() and Log*().
|
||||||
@@ -2059,11 +2059,11 @@ class PaintedLayer : public Layer {
|
|||||||
mInvalidRegion.SetEmpty();
|
mInvalidRegion.SetEmpty();
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual PaintedLayer* AsPaintedLayer() override { return this; }
|
PaintedLayer* AsPaintedLayer() override { return this; }
|
||||||
|
|
||||||
MOZ_LAYER_DECL_NAME("PaintedLayer", TYPE_PAINTED)
|
MOZ_LAYER_DECL_NAME("PaintedLayer", TYPE_PAINTED)
|
||||||
|
|
||||||
virtual void ComputeEffectiveTransforms(
|
void ComputeEffectiveTransforms(
|
||||||
const gfx::Matrix4x4& aTransformToSurface) override {
|
const gfx::Matrix4x4& aTransformToSurface) override {
|
||||||
gfx::Matrix4x4 idealTransform = GetLocalTransform() * aTransformToSurface;
|
gfx::Matrix4x4 idealTransform = GetLocalTransform() * aTransformToSurface;
|
||||||
gfx::Matrix residual;
|
gfx::Matrix residual;
|
||||||
@@ -2128,10 +2128,9 @@ class PaintedLayer : public Layer {
|
|||||||
mUsedForReadback(false),
|
mUsedForReadback(false),
|
||||||
mAllowResidualTranslation(false) {}
|
mAllowResidualTranslation(false) {}
|
||||||
|
|
||||||
virtual void PrintInfo(std::stringstream& aStream,
|
void PrintInfo(std::stringstream& aStream, const char* aPrefix) override;
|
||||||
const char* aPrefix) override;
|
|
||||||
|
|
||||||
virtual void DumpPacket(layerscope::LayersPacket* aPacket,
|
void DumpPacket(layerscope::LayersPacket* aPacket,
|
||||||
const void* aParent) override;
|
const void* aParent) override;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -2192,7 +2191,7 @@ class PaintedLayer : public Layer {
|
|||||||
*/
|
*/
|
||||||
class ContainerLayer : public Layer {
|
class ContainerLayer : public Layer {
|
||||||
public:
|
public:
|
||||||
~ContainerLayer();
|
virtual ~ContainerLayer();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* CONSTRUCTION PHASE ONLY
|
* CONSTRUCTION PHASE ONLY
|
||||||
@@ -2251,7 +2250,7 @@ class ContainerLayer : public Layer {
|
|||||||
Mutated();
|
Mutated();
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void FillSpecificAttributes(SpecificLayerAttributes& aAttrs) override;
|
void FillSpecificAttributes(SpecificLayerAttributes& aAttrs) override;
|
||||||
|
|
||||||
enum class SortMode {
|
enum class SortMode {
|
||||||
WITH_GEOMETRY,
|
WITH_GEOMETRY,
|
||||||
@@ -2260,14 +2259,12 @@ class ContainerLayer : public Layer {
|
|||||||
|
|
||||||
nsTArray<LayerPolygon> SortChildrenBy3DZOrder(SortMode aSortMode);
|
nsTArray<LayerPolygon> SortChildrenBy3DZOrder(SortMode aSortMode);
|
||||||
|
|
||||||
virtual ContainerLayer* AsContainerLayer() override { return this; }
|
ContainerLayer* AsContainerLayer() override { return this; }
|
||||||
virtual const ContainerLayer* AsContainerLayer() const override {
|
const ContainerLayer* AsContainerLayer() const override { return this; }
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
// These getters can be used anytime.
|
// These getters can be used anytime.
|
||||||
virtual Layer* GetFirstChild() const override { return mFirstChild; }
|
Layer* GetFirstChild() const override { return mFirstChild; }
|
||||||
virtual Layer* GetLastChild() const override { return mLastChild; }
|
Layer* GetLastChild() const override { return mLastChild; }
|
||||||
float GetPreXScale() const { return mPreXScale; }
|
float GetPreXScale() const { return mPreXScale; }
|
||||||
float GetPreYScale() const { return mPreYScale; }
|
float GetPreYScale() const { return mPreYScale; }
|
||||||
float GetInheritedXScale() const { return mInheritedXScale; }
|
float GetInheritedXScale() const { return mInheritedXScale; }
|
||||||
@@ -2282,7 +2279,7 @@ class ContainerLayer : public Layer {
|
|||||||
* container is backend-specific. ComputeEffectiveTransforms must also set
|
* container is backend-specific. ComputeEffectiveTransforms must also set
|
||||||
* mUseIntermediateSurface.
|
* mUseIntermediateSurface.
|
||||||
*/
|
*/
|
||||||
virtual void ComputeEffectiveTransforms(
|
void ComputeEffectiveTransforms(
|
||||||
const gfx::Matrix4x4& aTransformToSurface) override = 0;
|
const gfx::Matrix4x4& aTransformToSurface) override = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -2427,7 +2424,7 @@ class ContainerLayer : public Layer {
|
|||||||
*/
|
*/
|
||||||
class ColorLayer : public Layer {
|
class ColorLayer : public Layer {
|
||||||
public:
|
public:
|
||||||
virtual ColorLayer* AsColorLayer() override { return this; }
|
ColorLayer* AsColorLayer() override { return this; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* CONSTRUCTION PHASE ONLY
|
* CONSTRUCTION PHASE ONLY
|
||||||
@@ -2455,7 +2452,7 @@ class ColorLayer : public Layer {
|
|||||||
|
|
||||||
MOZ_LAYER_DECL_NAME("ColorLayer", TYPE_COLOR)
|
MOZ_LAYER_DECL_NAME("ColorLayer", TYPE_COLOR)
|
||||||
|
|
||||||
virtual void ComputeEffectiveTransforms(
|
void ComputeEffectiveTransforms(
|
||||||
const gfx::Matrix4x4& aTransformToSurface) override {
|
const gfx::Matrix4x4& aTransformToSurface) override {
|
||||||
gfx::Matrix4x4 idealTransform = GetLocalTransform() * aTransformToSurface;
|
gfx::Matrix4x4 idealTransform = GetLocalTransform() * aTransformToSurface;
|
||||||
mEffectiveTransform = SnapTransformTranslation(idealTransform, nullptr);
|
mEffectiveTransform = SnapTransformTranslation(idealTransform, nullptr);
|
||||||
@@ -2466,10 +2463,9 @@ class ColorLayer : public Layer {
|
|||||||
ColorLayer(LayerManager* aManager, void* aImplData)
|
ColorLayer(LayerManager* aManager, void* aImplData)
|
||||||
: Layer(aManager, aImplData), mColor() {}
|
: Layer(aManager, aImplData), mColor() {}
|
||||||
|
|
||||||
virtual void PrintInfo(std::stringstream& aStream,
|
void PrintInfo(std::stringstream& aStream, const char* aPrefix) override;
|
||||||
const char* aPrefix) override;
|
|
||||||
|
|
||||||
virtual void DumpPacket(layerscope::LayersPacket* aPacket,
|
void DumpPacket(layerscope::LayersPacket* aPacket,
|
||||||
const void* aParent) override;
|
const void* aParent) override;
|
||||||
|
|
||||||
gfx::IntRect mBounds;
|
gfx::IntRect mBounds;
|
||||||
@@ -2490,7 +2486,7 @@ class CanvasLayer : public Layer {
|
|||||||
public:
|
public:
|
||||||
void SetBounds(gfx::IntRect aBounds) { mBounds = aBounds; }
|
void SetBounds(gfx::IntRect aBounds) { mBounds = aBounds; }
|
||||||
|
|
||||||
virtual CanvasLayer* AsCanvasLayer() override { return this; }
|
CanvasLayer* AsCanvasLayer() override { return this; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Notify this CanvasLayer that the canvas surface contents have
|
* Notify this CanvasLayer that the canvas surface contents have
|
||||||
@@ -2540,7 +2536,7 @@ class CanvasLayer : public Layer {
|
|||||||
|
|
||||||
MOZ_LAYER_DECL_NAME("CanvasLayer", TYPE_CANVAS)
|
MOZ_LAYER_DECL_NAME("CanvasLayer", TYPE_CANVAS)
|
||||||
|
|
||||||
virtual void ComputeEffectiveTransforms(
|
void ComputeEffectiveTransforms(
|
||||||
const gfx::Matrix4x4& aTransformToSurface) override {
|
const gfx::Matrix4x4& aTransformToSurface) override {
|
||||||
// Snap our local transform first, and snap the inherited transform as well.
|
// Snap our local transform first, and snap the inherited transform as well.
|
||||||
// This makes our snapping equivalent to what would happen if our content
|
// This makes our snapping equivalent to what would happen if our content
|
||||||
@@ -2558,10 +2554,9 @@ class CanvasLayer : public Layer {
|
|||||||
CanvasLayer(LayerManager* aManager, void* aImplData);
|
CanvasLayer(LayerManager* aManager, void* aImplData);
|
||||||
virtual ~CanvasLayer();
|
virtual ~CanvasLayer();
|
||||||
|
|
||||||
virtual void PrintInfo(std::stringstream& aStream,
|
void PrintInfo(std::stringstream& aStream, const char* aPrefix) override;
|
||||||
const char* aPrefix) override;
|
|
||||||
|
|
||||||
virtual void DumpPacket(layerscope::LayersPacket* aPacket,
|
void DumpPacket(layerscope::LayersPacket* aPacket,
|
||||||
const void* aParent) override;
|
const void* aParent) override;
|
||||||
|
|
||||||
virtual CanvasRenderer* CreateCanvasRendererInternal() = 0;
|
virtual CanvasRenderer* CreateCanvasRendererInternal() = 0;
|
||||||
@@ -2596,17 +2591,17 @@ class RefLayer : public ContainerLayer {
|
|||||||
friend class LayerManager;
|
friend class LayerManager;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
virtual bool InsertAfter(Layer* aChild, Layer* aAfter) override {
|
bool InsertAfter(Layer* aChild, Layer* aAfter) override {
|
||||||
MOZ_CRASH("GFX: RefLayer");
|
MOZ_CRASH("GFX: RefLayer");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual bool RemoveChild(Layer* aChild) override {
|
bool RemoveChild(Layer* aChild) override {
|
||||||
MOZ_CRASH("GFX: RefLayer");
|
MOZ_CRASH("GFX: RefLayer");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual bool RepositionChild(Layer* aChild, Layer* aAfter) override {
|
bool RepositionChild(Layer* aChild, Layer* aAfter) override {
|
||||||
MOZ_CRASH("GFX: RefLayer");
|
MOZ_CRASH("GFX: RefLayer");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -2677,14 +2672,14 @@ class RefLayer : public ContainerLayer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// These getters can be used anytime.
|
// These getters can be used anytime.
|
||||||
virtual RefLayer* AsRefLayer() override { return this; }
|
RefLayer* AsRefLayer() override { return this; }
|
||||||
|
|
||||||
virtual LayersId GetReferentId() { return mId; }
|
virtual LayersId GetReferentId() { return mId; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* DRAWING PHASE ONLY
|
* DRAWING PHASE ONLY
|
||||||
*/
|
*/
|
||||||
virtual void FillSpecificAttributes(SpecificLayerAttributes& aAttrs) override;
|
void FillSpecificAttributes(SpecificLayerAttributes& aAttrs) override;
|
||||||
|
|
||||||
MOZ_LAYER_DECL_NAME("RefLayer", TYPE_REF)
|
MOZ_LAYER_DECL_NAME("RefLayer", TYPE_REF)
|
||||||
|
|
||||||
@@ -2694,10 +2689,9 @@ class RefLayer : public ContainerLayer {
|
|||||||
mId{0},
|
mId{0},
|
||||||
mEventRegionsOverride(EventRegionsOverride::NoOverride) {}
|
mEventRegionsOverride(EventRegionsOverride::NoOverride) {}
|
||||||
|
|
||||||
virtual void PrintInfo(std::stringstream& aStream,
|
void PrintInfo(std::stringstream& aStream, const char* aPrefix) override;
|
||||||
const char* aPrefix) override;
|
|
||||||
|
|
||||||
virtual void DumpPacket(layerscope::LayersPacket* aPacket,
|
void DumpPacket(layerscope::LayersPacket* aPacket,
|
||||||
const void* aParent) override;
|
const void* aParent) override;
|
||||||
|
|
||||||
// 0 is a special value that means "no ID".
|
// 0 is a special value that means "no ID".
|
||||||
|
|||||||
@@ -365,7 +365,7 @@ typedef Maybe<LayerRect> MaybeLayerRect;
|
|||||||
// This is used to communicate Layers across IPC channels. The Handle is valid
|
// This is used to communicate Layers across IPC channels. The Handle is valid
|
||||||
// for layers in the same PLayerTransaction. Handles are created by
|
// for layers in the same PLayerTransaction. Handles are created by
|
||||||
// ClientLayerManager, and are cached in LayerTransactionParent on first use.
|
// ClientLayerManager, and are cached in LayerTransactionParent on first use.
|
||||||
class LayerHandle {
|
class LayerHandle final {
|
||||||
friend struct IPC::ParamTraits<mozilla::layers::LayerHandle>;
|
friend struct IPC::ParamTraits<mozilla::layers::LayerHandle>;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@@ -387,7 +387,7 @@ class LayerHandle {
|
|||||||
// valid for layers in the same PLayerTransaction or PImageBridge. Handles are
|
// valid for layers in the same PLayerTransaction or PImageBridge. Handles are
|
||||||
// created by ClientLayerManager or ImageBridgeChild, and are cached in the
|
// created by ClientLayerManager or ImageBridgeChild, and are cached in the
|
||||||
// parent side on first use.
|
// parent side on first use.
|
||||||
class CompositableHandle {
|
class CompositableHandle final {
|
||||||
friend struct IPC::ParamTraits<mozilla::layers::CompositableHandle>;
|
friend struct IPC::ParamTraits<mozilla::layers::CompositableHandle>;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ class PersistentBufferProvider : public RefCounted<PersistentBufferProvider> {
|
|||||||
public:
|
public:
|
||||||
MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(PersistentBufferProvider)
|
MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(PersistentBufferProvider)
|
||||||
|
|
||||||
virtual ~PersistentBufferProvider() {}
|
virtual ~PersistentBufferProvider() = default;
|
||||||
|
|
||||||
virtual LayersBackend GetType() { return LayersBackend::LAYERS_NONE; }
|
virtual LayersBackend GetType() { return LayersBackend::LAYERS_NONE; }
|
||||||
|
|
||||||
@@ -95,29 +95,26 @@ class PersistentBufferProviderBasic : public PersistentBufferProvider {
|
|||||||
|
|
||||||
explicit PersistentBufferProviderBasic(gfx::DrawTarget* aTarget);
|
explicit PersistentBufferProviderBasic(gfx::DrawTarget* aTarget);
|
||||||
|
|
||||||
virtual LayersBackend GetType() override {
|
LayersBackend GetType() override { return LayersBackend::LAYERS_BASIC; }
|
||||||
return LayersBackend::LAYERS_BASIC;
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual already_AddRefed<gfx::DrawTarget> BorrowDrawTarget(
|
already_AddRefed<gfx::DrawTarget> BorrowDrawTarget(
|
||||||
const gfx::IntRect& aPersistedRect) override;
|
const gfx::IntRect& aPersistedRect) override;
|
||||||
|
|
||||||
virtual bool ReturnDrawTarget(already_AddRefed<gfx::DrawTarget> aDT) override;
|
bool ReturnDrawTarget(already_AddRefed<gfx::DrawTarget> aDT) override;
|
||||||
|
|
||||||
virtual already_AddRefed<gfx::SourceSurface> BorrowSnapshot() override;
|
already_AddRefed<gfx::SourceSurface> BorrowSnapshot() override;
|
||||||
|
|
||||||
virtual void ReturnSnapshot(
|
void ReturnSnapshot(already_AddRefed<gfx::SourceSurface> aSnapshot) override;
|
||||||
already_AddRefed<gfx::SourceSurface> aSnapshot) override;
|
|
||||||
|
|
||||||
virtual bool PreservesDrawingState() const override { return true; }
|
bool PreservesDrawingState() const override { return true; }
|
||||||
|
|
||||||
virtual void OnShutdown() override { Destroy(); }
|
void OnShutdown() override { Destroy(); }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void Destroy();
|
void Destroy();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
~PersistentBufferProviderBasic();
|
virtual ~PersistentBufferProviderBasic();
|
||||||
|
|
||||||
RefPtr<gfx::DrawTarget> mDrawTarget;
|
RefPtr<gfx::DrawTarget> mDrawTarget;
|
||||||
RefPtr<gfx::SourceSurface> mSnapshot;
|
RefPtr<gfx::SourceSurface> mSnapshot;
|
||||||
@@ -137,29 +134,28 @@ class PersistentBufferProviderShared : public PersistentBufferProvider,
|
|||||||
gfx::IntSize aSize, gfx::SurfaceFormat aFormat,
|
gfx::IntSize aSize, gfx::SurfaceFormat aFormat,
|
||||||
KnowsCompositor* aKnowsCompositor);
|
KnowsCompositor* aKnowsCompositor);
|
||||||
|
|
||||||
virtual LayersBackend GetType() override;
|
LayersBackend GetType() override;
|
||||||
|
|
||||||
virtual already_AddRefed<gfx::DrawTarget> BorrowDrawTarget(
|
already_AddRefed<gfx::DrawTarget> BorrowDrawTarget(
|
||||||
const gfx::IntRect& aPersistedRect) override;
|
const gfx::IntRect& aPersistedRect) override;
|
||||||
|
|
||||||
virtual bool ReturnDrawTarget(already_AddRefed<gfx::DrawTarget> aDT) override;
|
bool ReturnDrawTarget(already_AddRefed<gfx::DrawTarget> aDT) override;
|
||||||
|
|
||||||
virtual already_AddRefed<gfx::SourceSurface> BorrowSnapshot() override;
|
already_AddRefed<gfx::SourceSurface> BorrowSnapshot() override;
|
||||||
|
|
||||||
virtual void ReturnSnapshot(
|
void ReturnSnapshot(already_AddRefed<gfx::SourceSurface> aSnapshot) override;
|
||||||
already_AddRefed<gfx::SourceSurface> aSnapshot) override;
|
|
||||||
|
|
||||||
virtual TextureClient* GetTextureClient() override;
|
TextureClient* GetTextureClient() override;
|
||||||
|
|
||||||
virtual void NotifyInactive() override;
|
void NotifyInactive() override;
|
||||||
|
|
||||||
virtual void OnShutdown() override { Destroy(); }
|
void OnShutdown() override { Destroy(); }
|
||||||
|
|
||||||
virtual bool SetKnowsCompositor(KnowsCompositor* aKnowsCompositor) override;
|
bool SetKnowsCompositor(KnowsCompositor* aKnowsCompositor) override;
|
||||||
|
|
||||||
virtual void ClearCachedResources() override;
|
void ClearCachedResources() override;
|
||||||
|
|
||||||
virtual bool PreservesDrawingState() const override { return false; }
|
bool PreservesDrawingState() const override { return false; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
PersistentBufferProviderShared(gfx::IntSize aSize, gfx::SurfaceFormat aFormat,
|
PersistentBufferProviderShared(gfx::IntSize aSize, gfx::SurfaceFormat aFormat,
|
||||||
@@ -186,7 +182,7 @@ class PersistentBufferProviderShared : public PersistentBufferProvider,
|
|||||||
RefPtr<gfx::SourceSurface> mSnapshot;
|
RefPtr<gfx::SourceSurface> mSnapshot;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct AutoReturnSnapshot {
|
struct AutoReturnSnapshot final {
|
||||||
PersistentBufferProvider* mBufferProvider;
|
PersistentBufferProvider* mBufferProvider;
|
||||||
RefPtr<gfx::SourceSurface>* mSnapshot;
|
RefPtr<gfx::SourceSurface>* mSnapshot;
|
||||||
|
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ class LayersPacket;
|
|||||||
class ReadbackSink {
|
class ReadbackSink {
|
||||||
public:
|
public:
|
||||||
ReadbackSink() {}
|
ReadbackSink() {}
|
||||||
virtual ~ReadbackSink() {}
|
virtual ~ReadbackSink() = default;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sends an update to indicate that the background is currently unknown.
|
* Sends an update to indicate that the background is currently unknown.
|
||||||
|
|||||||
@@ -279,7 +279,7 @@ class SourceSurfaceSharedData final : public DataSourceSurface {
|
|||||||
private:
|
private:
|
||||||
friend class SourceSurfaceSharedDataWrapper;
|
friend class SourceSurfaceSharedDataWrapper;
|
||||||
|
|
||||||
~SourceSurfaceSharedData() override {}
|
virtual ~SourceSurfaceSharedData() = default;
|
||||||
|
|
||||||
void LockHandle() {
|
void LockHandle() {
|
||||||
MutexAutoLock lock(mMutex);
|
MutexAutoLock lock(mMutex);
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ class SourceSurfaceVolatileData : public DataSourceSurface {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
~SourceSurfaceVolatileData() override {}
|
virtual ~SourceSurfaceVolatileData() = default;
|
||||||
|
|
||||||
Mutex mMutex;
|
Mutex mMutex;
|
||||||
int32_t mStride;
|
int32_t mStride;
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ typedef uintptr_t SyncHandle;
|
|||||||
class SyncObjectHost : public RefCounted<SyncObjectHost> {
|
class SyncObjectHost : public RefCounted<SyncObjectHost> {
|
||||||
public:
|
public:
|
||||||
MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(SyncObjectHost)
|
MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(SyncObjectHost)
|
||||||
virtual ~SyncObjectHost() {}
|
virtual ~SyncObjectHost() = default;
|
||||||
|
|
||||||
static already_AddRefed<SyncObjectHost> CreateSyncObjectHost(
|
static already_AddRefed<SyncObjectHost> CreateSyncObjectHost(
|
||||||
#ifdef XP_WIN
|
#ifdef XP_WIN
|
||||||
@@ -45,7 +45,7 @@ class SyncObjectHost : public RefCounted<SyncObjectHost> {
|
|||||||
class SyncObjectClient : public external::AtomicRefCounted<SyncObjectClient> {
|
class SyncObjectClient : public external::AtomicRefCounted<SyncObjectClient> {
|
||||||
public:
|
public:
|
||||||
MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(SyncObjectClient)
|
MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(SyncObjectClient)
|
||||||
virtual ~SyncObjectClient() {}
|
virtual ~SyncObjectClient() = default;
|
||||||
|
|
||||||
static already_AddRefed<SyncObjectClient> CreateSyncObjectClient(
|
static already_AddRefed<SyncObjectClient> CreateSyncObjectClient(
|
||||||
SyncHandle aHandle
|
SyncHandle aHandle
|
||||||
|
|||||||
@@ -18,13 +18,13 @@ namespace layers {
|
|||||||
|
|
||||||
class DIBTextureData : public TextureData {
|
class DIBTextureData : public TextureData {
|
||||||
public:
|
public:
|
||||||
virtual bool Lock(OpenMode) override { return true; }
|
bool Lock(OpenMode) override { return true; }
|
||||||
|
|
||||||
virtual void Unlock() override {}
|
void Unlock() override {}
|
||||||
|
|
||||||
virtual void FillInfo(TextureData::Info& aInfo) const override;
|
void FillInfo(TextureData::Info& aInfo) const override;
|
||||||
|
|
||||||
virtual already_AddRefed<gfx::DrawTarget> BorrowDrawTarget() override;
|
already_AddRefed<gfx::DrawTarget> BorrowDrawTarget() override;
|
||||||
|
|
||||||
static DIBTextureData* Create(gfx::IntSize aSize, gfx::SurfaceFormat aFormat,
|
static DIBTextureData* Create(gfx::IntSize aSize, gfx::SurfaceFormat aFormat,
|
||||||
LayersIPCChannel* aAllocator);
|
LayersIPCChannel* aAllocator);
|
||||||
@@ -52,25 +52,22 @@ class TextureHostDirectUpload : public TextureHost {
|
|||||||
gfx::IntSize aSize)
|
gfx::IntSize aSize)
|
||||||
: TextureHost(aFlags), mFormat(aFormat), mSize(aSize), mIsLocked(false) {}
|
: TextureHost(aFlags), mFormat(aFormat), mSize(aSize), mIsLocked(false) {}
|
||||||
|
|
||||||
virtual void DeallocateDeviceData() override;
|
void DeallocateDeviceData() override;
|
||||||
|
|
||||||
virtual void SetTextureSourceProvider(
|
void SetTextureSourceProvider(TextureSourceProvider* aProvider) override;
|
||||||
TextureSourceProvider* aProvider) override;
|
|
||||||
|
|
||||||
virtual gfx::SurfaceFormat GetFormat() const override { return mFormat; }
|
gfx::SurfaceFormat GetFormat() const override { return mFormat; }
|
||||||
|
|
||||||
virtual gfx::IntSize GetSize() const override { return mSize; }
|
gfx::IntSize GetSize() const override { return mSize; }
|
||||||
|
|
||||||
virtual bool Lock() override;
|
bool Lock() override;
|
||||||
|
|
||||||
virtual void Unlock() override;
|
void Unlock() override;
|
||||||
|
|
||||||
virtual bool HasIntermediateBuffer() const { return true; }
|
bool HasIntermediateBuffer() const { return true; }
|
||||||
|
|
||||||
virtual bool BindTextureSource(
|
bool BindTextureSource(CompositableTextureSourceRef& aTexture) override;
|
||||||
CompositableTextureSourceRef& aTexture) override;
|
bool AcquireTextureSource(CompositableTextureSourceRef& aTexture) override;
|
||||||
virtual bool AcquireTextureSource(
|
|
||||||
CompositableTextureSourceRef& aTexture) override;
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
RefPtr<TextureSourceProvider> mProvider;
|
RefPtr<TextureSourceProvider> mProvider;
|
||||||
@@ -84,12 +81,12 @@ class DIBTextureHost : public TextureHostDirectUpload {
|
|||||||
public:
|
public:
|
||||||
DIBTextureHost(TextureFlags aFlags, const SurfaceDescriptorDIB& aDescriptor);
|
DIBTextureHost(TextureFlags aFlags, const SurfaceDescriptorDIB& aDescriptor);
|
||||||
|
|
||||||
virtual already_AddRefed<gfx::DataSourceSurface> GetAsSurface() override {
|
already_AddRefed<gfx::DataSourceSurface> GetAsSurface() override {
|
||||||
return nullptr; // TODO: cf bug 872568
|
return nullptr; // TODO: cf bug 872568
|
||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void UpdatedInternal(const nsIntRegion* aRegion = nullptr) override;
|
void UpdatedInternal(const nsIntRegion* aRegion = nullptr) override;
|
||||||
|
|
||||||
RefPtr<gfxWindowsSurface> mSurface;
|
RefPtr<gfxWindowsSurface> mSurface;
|
||||||
};
|
};
|
||||||
@@ -100,7 +97,7 @@ class TextureHostFileMapping : public TextureHostDirectUpload {
|
|||||||
const SurfaceDescriptorFileMapping& aDescriptor);
|
const SurfaceDescriptorFileMapping& aDescriptor);
|
||||||
~TextureHostFileMapping();
|
~TextureHostFileMapping();
|
||||||
|
|
||||||
virtual already_AddRefed<gfx::DataSourceSurface> GetAsSurface() override {
|
already_AddRefed<gfx::DataSourceSurface> GetAsSurface() override {
|
||||||
MOZ_CRASH("GFX: TextureHostFileMapping::GetAsSurface not implemented");
|
MOZ_CRASH("GFX: TextureHostFileMapping::GetAsSurface not implemented");
|
||||||
// Not implemented! It would be tricky to keep track of the
|
// Not implemented! It would be tricky to keep track of the
|
||||||
// scope of the file mapping. We could do this through UserData
|
// scope of the file mapping. We could do this through UserData
|
||||||
@@ -108,7 +105,7 @@ class TextureHostFileMapping : public TextureHostDirectUpload {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void UpdatedInternal(const nsIntRegion* aRegion = nullptr) override;
|
void UpdatedInternal(const nsIntRegion* aRegion = nullptr) override;
|
||||||
|
|
||||||
HANDLE mFileMapping;
|
HANDLE mFileMapping;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -105,7 +105,7 @@ class TextureSourceProvider {
|
|||||||
virtual bool IsValid() const = 0;
|
virtual bool IsValid() const = 0;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
class MOZ_STACK_CLASS AutoReadUnlockTextures {
|
class MOZ_STACK_CLASS AutoReadUnlockTextures final {
|
||||||
public:
|
public:
|
||||||
explicit AutoReadUnlockTextures(TextureSourceProvider* aProvider)
|
explicit AutoReadUnlockTextures(TextureSourceProvider* aProvider)
|
||||||
: mProvider(aProvider) {}
|
: mProvider(aProvider) {}
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ namespace layers {
|
|||||||
|
|
||||||
class TransactionIdAllocator {
|
class TransactionIdAllocator {
|
||||||
protected:
|
protected:
|
||||||
virtual ~TransactionIdAllocator() {}
|
virtual ~TransactionIdAllocator() = default;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
NS_INLINE_DECL_REFCOUNTING(TransactionIdAllocator)
|
NS_INLINE_DECL_REFCOUNTING(TransactionIdAllocator)
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ class APZInputBridge {
|
|||||||
virtual void UpdateWheelTransaction(LayoutDeviceIntPoint aRefPoint,
|
virtual void UpdateWheelTransaction(LayoutDeviceIntPoint aRefPoint,
|
||||||
EventMessage aEventMessage) = 0;
|
EventMessage aEventMessage) = 0;
|
||||||
|
|
||||||
virtual ~APZInputBridge() {}
|
virtual ~APZInputBridge() = default;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace layers
|
} // namespace layers
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ class CompositorController {
|
|||||||
virtual void ScheduleShowAllPluginWindows() = 0;
|
virtual void ScheduleShowAllPluginWindows() = 0;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual ~CompositorController() {}
|
virtual ~CompositorController() = default;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace layers
|
} // namespace layers
|
||||||
|
|||||||
@@ -209,7 +209,7 @@ class GeckoContentController {
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
// Protected destructor, to discourage deletion outside of Release():
|
// Protected destructor, to discourage deletion outside of Release():
|
||||||
virtual ~GeckoContentController() {}
|
virtual ~GeckoContentController() = default;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace layers
|
} // namespace layers
|
||||||
|
|||||||
@@ -135,7 +135,7 @@ class IAPZCTreeManager {
|
|||||||
protected:
|
protected:
|
||||||
// Discourage destruction outside of decref
|
// Discourage destruction outside of decref
|
||||||
|
|
||||||
virtual ~IAPZCTreeManager() {}
|
virtual ~IAPZCTreeManager() = default;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace layers
|
} // namespace layers
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ class MetricsSharingController {
|
|||||||
uint32_t aApzcId) = 0;
|
uint32_t aApzcId) = 0;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual ~MetricsSharingController() {}
|
virtual ~MetricsSharingController() = default;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace layers
|
} // namespace layers
|
||||||
|
|||||||
@@ -106,7 +106,7 @@ inline AsyncTransformMatrix CompleteAsyncTransform(
|
|||||||
aMatrix, PixelCastJustification::MultipleAsyncTransforms);
|
aMatrix, PixelCastJustification::MultipleAsyncTransforms);
|
||||||
}
|
}
|
||||||
|
|
||||||
struct TargetConfirmationFlags {
|
struct TargetConfirmationFlags final {
|
||||||
explicit TargetConfirmationFlags(bool aTargetConfirmed)
|
explicit TargetConfirmationFlags(bool aTargetConfirmed)
|
||||||
: mTargetConfirmed(aTargetConfirmed),
|
: mTargetConfirmed(aTargetConfirmed),
|
||||||
mRequiresTargetConfirmation(false) {}
|
mRequiresTargetConfirmation(false) {}
|
||||||
|
|||||||
@@ -548,7 +548,7 @@ TimeStamp AsyncPanZoomController::GetFrameTime() const {
|
|||||||
return treeManagerLocal ? treeManagerLocal->GetFrameTime() : TimeStamp::Now();
|
return treeManagerLocal ? treeManagerLocal->GetFrameTime() : TimeStamp::Now();
|
||||||
}
|
}
|
||||||
|
|
||||||
class MOZ_STACK_CLASS StateChangeNotificationBlocker {
|
class MOZ_STACK_CLASS StateChangeNotificationBlocker final {
|
||||||
public:
|
public:
|
||||||
explicit StateChangeNotificationBlocker(AsyncPanZoomController* aApzc)
|
explicit StateChangeNotificationBlocker(AsyncPanZoomController* aApzc)
|
||||||
: mApzc(aApzc) {
|
: mApzc(aApzc) {
|
||||||
@@ -581,7 +581,7 @@ class MOZ_STACK_CLASS StateChangeNotificationBlocker {
|
|||||||
* the async layout viewport offset, since modifying the async scroll offset
|
* the async layout viewport offset, since modifying the async scroll offset
|
||||||
* may result in the layout viewport moving as well).
|
* may result in the layout viewport moving as well).
|
||||||
*/
|
*/
|
||||||
class MOZ_RAII AutoApplyAsyncTestAttributes {
|
class MOZ_RAII AutoApplyAsyncTestAttributes final {
|
||||||
public:
|
public:
|
||||||
explicit AutoApplyAsyncTestAttributes(const AsyncPanZoomController*);
|
explicit AutoApplyAsyncTestAttributes(const AsyncPanZoomController*);
|
||||||
~AutoApplyAsyncTestAttributes();
|
~AutoApplyAsyncTestAttributes();
|
||||||
|
|||||||
@@ -47,9 +47,8 @@ class MOZ_STACK_CLASS APZAutoDirWheelDeltaAdjuster final
|
|||||||
* IsHorizontalContentRightToLeft() in
|
* IsHorizontalContentRightToLeft() in
|
||||||
* the base class AutoDirWheelDeltaAdjuster.
|
* the base class AutoDirWheelDeltaAdjuster.
|
||||||
*/
|
*/
|
||||||
explicit APZAutoDirWheelDeltaAdjuster(double& aDeltaX, double& aDeltaY,
|
APZAutoDirWheelDeltaAdjuster(double& aDeltaX, double& aDeltaY,
|
||||||
const AxisX& aAxisX,
|
const AxisX& aAxisX, const AxisY& aAxisY,
|
||||||
const AxisY& aAxisY,
|
|
||||||
bool aIsHorizontalContentRightToLeft)
|
bool aIsHorizontalContentRightToLeft)
|
||||||
: AutoDirWheelDeltaAdjuster(aDeltaX, aDeltaY),
|
: AutoDirWheelDeltaAdjuster(aDeltaX, aDeltaY),
|
||||||
mAxisX(aAxisX),
|
mAxisX(aAxisX),
|
||||||
|
|||||||
@@ -344,39 +344,35 @@ class Axis {
|
|||||||
class AxisX : public Axis {
|
class AxisX : public Axis {
|
||||||
public:
|
public:
|
||||||
explicit AxisX(AsyncPanZoomController* mAsyncPanZoomController);
|
explicit AxisX(AsyncPanZoomController* mAsyncPanZoomController);
|
||||||
virtual ParentLayerCoord GetPointOffset(
|
ParentLayerCoord GetPointOffset(
|
||||||
const ParentLayerPoint& aPoint) const override;
|
const ParentLayerPoint& aPoint) const override;
|
||||||
virtual ParentLayerCoord GetRectLength(
|
ParentLayerCoord GetRectLength(const ParentLayerRect& aRect) const override;
|
||||||
const ParentLayerRect& aRect) const override;
|
ParentLayerCoord GetRectOffset(const ParentLayerRect& aRect) const override;
|
||||||
virtual ParentLayerCoord GetRectOffset(
|
CSSToParentLayerScale GetScaleForAxis(
|
||||||
const ParentLayerRect& aRect) const override;
|
|
||||||
virtual CSSToParentLayerScale GetScaleForAxis(
|
|
||||||
const CSSToParentLayerScale2D& aScale) const override;
|
const CSSToParentLayerScale2D& aScale) const override;
|
||||||
virtual ScreenPoint MakePoint(ScreenCoord aCoord) const override;
|
ScreenPoint MakePoint(ScreenCoord aCoord) const override;
|
||||||
virtual const char* Name() const override;
|
const char* Name() const override;
|
||||||
bool CanScrollTo(Side aSide) const;
|
bool CanScrollTo(Side aSide) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
virtual OverscrollBehavior GetOverscrollBehavior() const override;
|
OverscrollBehavior GetOverscrollBehavior() const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
class AxisY : public Axis {
|
class AxisY : public Axis {
|
||||||
public:
|
public:
|
||||||
explicit AxisY(AsyncPanZoomController* mAsyncPanZoomController);
|
explicit AxisY(AsyncPanZoomController* mAsyncPanZoomController);
|
||||||
virtual ParentLayerCoord GetPointOffset(
|
ParentLayerCoord GetPointOffset(
|
||||||
const ParentLayerPoint& aPoint) const override;
|
const ParentLayerPoint& aPoint) const override;
|
||||||
virtual ParentLayerCoord GetRectLength(
|
ParentLayerCoord GetRectLength(const ParentLayerRect& aRect) const override;
|
||||||
const ParentLayerRect& aRect) const override;
|
ParentLayerCoord GetRectOffset(const ParentLayerRect& aRect) const override;
|
||||||
virtual ParentLayerCoord GetRectOffset(
|
CSSToParentLayerScale GetScaleForAxis(
|
||||||
const ParentLayerRect& aRect) const override;
|
|
||||||
virtual CSSToParentLayerScale GetScaleForAxis(
|
|
||||||
const CSSToParentLayerScale2D& aScale) const override;
|
const CSSToParentLayerScale2D& aScale) const override;
|
||||||
virtual ScreenPoint MakePoint(ScreenCoord aCoord) const override;
|
ScreenPoint MakePoint(ScreenCoord aCoord) const override;
|
||||||
virtual const char* Name() const override;
|
const char* Name() const override;
|
||||||
bool CanScrollTo(Side aSide) const;
|
bool CanScrollTo(Side aSide) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
virtual OverscrollBehavior GetOverscrollBehavior() const override;
|
OverscrollBehavior GetOverscrollBehavior() const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace layers
|
} // namespace layers
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ namespace layers {
|
|||||||
* information about the severity of the checkerboarding so as to allow
|
* information about the severity of the checkerboarding so as to allow
|
||||||
* prioritizing the debugging of some checkerboarding events over others.
|
* prioritizing the debugging of some checkerboarding events over others.
|
||||||
*/
|
*/
|
||||||
class CheckerboardEvent {
|
class CheckerboardEvent final {
|
||||||
public:
|
public:
|
||||||
// clang-format off
|
// clang-format off
|
||||||
MOZ_DEFINE_ENUM_AT_CLASS_SCOPE(
|
MOZ_DEFINE_ENUM_AT_CLASS_SCOPE(
|
||||||
|
|||||||
@@ -221,7 +221,7 @@ class HitTestingTreeNode {
|
|||||||
* Clear() being called, it unlocks the underlying node at which point it can
|
* Clear() being called, it unlocks the underlying node at which point it can
|
||||||
* be recycled or freed.
|
* be recycled or freed.
|
||||||
*/
|
*/
|
||||||
class MOZ_RAII HitTestingTreeNodeAutoLock {
|
class MOZ_RAII HitTestingTreeNodeAutoLock final {
|
||||||
public:
|
public:
|
||||||
HitTestingTreeNodeAutoLock();
|
HitTestingTreeNodeAutoLock();
|
||||||
HitTestingTreeNodeAutoLock(const HitTestingTreeNodeAutoLock&) = delete;
|
HitTestingTreeNodeAutoLock(const HitTestingTreeNodeAutoLock&) = delete;
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ class InputBlockState : public RefCounted<InputBlockState> {
|
|||||||
eConfirmed
|
eConfirmed
|
||||||
};
|
};
|
||||||
|
|
||||||
explicit InputBlockState(const RefPtr<AsyncPanZoomController>& aTargetApzc,
|
InputBlockState(const RefPtr<AsyncPanZoomController>& aTargetApzc,
|
||||||
TargetConfirmationFlags aFlags);
|
TargetConfirmationFlags aFlags);
|
||||||
virtual ~InputBlockState() = default;
|
virtual ~InputBlockState() = default;
|
||||||
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user