mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1159409 - (Part 1-) - Remove Init() from the Image interface. r=tn
This commit is contained in:
parent
4f252fcf6a
commit
bf46701f2d
@ -24,12 +24,6 @@ namespace image {
|
||||
|
||||
// Inherited methods from Image.
|
||||
|
||||
nsresult
|
||||
DynamicImage::Init(const char* aMimeType, uint32_t aFlags)
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
already_AddRefed<ProgressTracker>
|
||||
DynamicImage::GetProgressTracker()
|
||||
{
|
||||
|
@ -31,8 +31,6 @@ public:
|
||||
}
|
||||
|
||||
// Inherited methods from Image.
|
||||
virtual nsresult Init(const char* aMimeType, uint32_t aFlags) override;
|
||||
|
||||
virtual already_AddRefed<ProgressTracker> GetProgressTracker() override;
|
||||
virtual size_t SizeOfSourceWithComputedFallback(
|
||||
MallocSizeOf aMallocSizeOf) const override;
|
||||
|
@ -173,15 +173,6 @@ public:
|
||||
static const uint32_t INIT_FLAG_TRANSIENT = 0x8;
|
||||
static const uint32_t INIT_FLAG_DOWNSCALE_DURING_DECODE = 0x10;
|
||||
|
||||
/**
|
||||
* Creates a new image container.
|
||||
*
|
||||
* @param aMimeType The mimetype of the image.
|
||||
* @param aFlags Initialization flags of the INIT_FLAG_* variety.
|
||||
*/
|
||||
virtual nsresult Init(const char* aMimeType,
|
||||
uint32_t aFlags) = 0;
|
||||
|
||||
virtual already_AddRefed<ProgressTracker> GetProgressTracker() = 0;
|
||||
virtual void SetProgressTracker(ProgressTracker* aProgressTracker) {}
|
||||
|
||||
|
@ -21,12 +21,6 @@ namespace image {
|
||||
|
||||
// Inherited methods from Image.
|
||||
|
||||
nsresult
|
||||
ImageWrapper::Init(const char* aMimeType, uint32_t aFlags)
|
||||
{
|
||||
return mInnerImage->Init(aMimeType, aFlags);
|
||||
}
|
||||
|
||||
already_AddRefed<ProgressTracker>
|
||||
ImageWrapper::GetProgressTracker()
|
||||
{
|
||||
|
@ -22,8 +22,6 @@ public:
|
||||
NS_DECL_IMGICONTAINER
|
||||
|
||||
// Inherited methods from Image.
|
||||
virtual nsresult Init(const char* aMimeType, uint32_t aFlags) override;
|
||||
|
||||
virtual already_AddRefed<ProgressTracker> GetProgressTracker() override;
|
||||
|
||||
virtual size_t
|
||||
|
@ -166,9 +166,6 @@ public:
|
||||
virtual nsresult StopAnimation() override;
|
||||
|
||||
// Methods inherited from Image
|
||||
nsresult Init(const char* aMimeType,
|
||||
uint32_t aFlags) override;
|
||||
|
||||
virtual void OnSurfaceDiscarded() override;
|
||||
|
||||
// Raster-specific methods
|
||||
@ -288,6 +285,8 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
nsresult Init(const char* aMimeType, uint32_t aFlags);
|
||||
|
||||
DrawResult DrawWithPreDownscaleIfNeeded(DrawableFrameRef&& aFrameRef,
|
||||
gfxContext* aContext,
|
||||
const nsIntSize& aSize,
|
||||
|
@ -34,9 +34,6 @@ public:
|
||||
// (no public constructor - use ImageFactory)
|
||||
|
||||
// Methods inherited from Image
|
||||
nsresult Init(const char* aMimeType,
|
||||
uint32_t aFlags) override;
|
||||
|
||||
virtual size_t SizeOfSourceWithComputedFallback(MallocSizeOf aMallocSizeOf)
|
||||
const override;
|
||||
virtual void CollectSizeOfSurfaces(nsTArray<SurfaceMemoryCounter>& aCounters,
|
||||
@ -84,6 +81,8 @@ protected:
|
||||
void Show(gfxDrawable* aDrawable, const SVGDrawingParameters& aParams);
|
||||
|
||||
private:
|
||||
nsresult Init(const char* aMimeType, uint32_t aFlags);
|
||||
|
||||
/**
|
||||
* In catastrophic circumstances like a GPU driver crash, we may lose our
|
||||
* surfaces even if they're locked. RecoverFromLossOfSurfaces discards all
|
||||
|
Loading…
Reference in New Issue
Block a user