mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-26 23:23:33 +00:00
Bug 1006123, part 1: Revert bug 929513's imagelib changes to go back to using double-based gfxSize (instead of float-based gfx::Size) in RasterImage. r=seth
This commit is contained in:
parent
b5369087ad
commit
bdc7c67bb6
@ -182,7 +182,7 @@ DiscardingEnabled()
|
||||
class ScaleRequest
|
||||
{
|
||||
public:
|
||||
ScaleRequest(RasterImage* aImage, const gfx::Size& aScale, imgFrame* aSrcFrame)
|
||||
ScaleRequest(RasterImage* aImage, const gfxSize& aScale, imgFrame* aSrcFrame)
|
||||
: scale(aScale)
|
||||
, dstLocked(false)
|
||||
, done(false)
|
||||
@ -276,7 +276,7 @@ public:
|
||||
nsRefPtr<gfxImageSurface> dstSurface;
|
||||
|
||||
// Below are the values that may be touched on the scaling thread.
|
||||
gfx::Size scale;
|
||||
gfxSize scale;
|
||||
uint8_t* srcData;
|
||||
uint8_t* dstData;
|
||||
nsIntRect srcRect;
|
||||
@ -327,7 +327,7 @@ private: /* members */
|
||||
class ScaleRunner : public nsRunnable
|
||||
{
|
||||
public:
|
||||
ScaleRunner(RasterImage* aImage, const gfx::Size& aScale, imgFrame* aSrcFrame)
|
||||
ScaleRunner(RasterImage* aImage, const gfxSize& aScale, imgFrame* aSrcFrame)
|
||||
{
|
||||
nsAutoPtr<ScaleRequest> request(new ScaleRequest(aImage, aScale, aSrcFrame));
|
||||
|
||||
@ -2510,7 +2510,7 @@ RasterImage::SyncDecode()
|
||||
}
|
||||
|
||||
bool
|
||||
RasterImage::CanQualityScale(const gfx::Size& scale)
|
||||
RasterImage::CanQualityScale(const gfxSize& scale)
|
||||
{
|
||||
// If target size is 1:1 with original, don't scale.
|
||||
if (scale.width == 1.0 && scale.height == 1.0)
|
||||
@ -2528,7 +2528,7 @@ RasterImage::CanQualityScale(const gfx::Size& scale)
|
||||
|
||||
bool
|
||||
RasterImage::CanScale(GraphicsFilter aFilter,
|
||||
gfx::Size aScale, uint32_t aFlags)
|
||||
gfxSize aScale, uint32_t aFlags)
|
||||
{
|
||||
// The high-quality scaler requires Skia.
|
||||
#ifdef MOZ_ENABLE_SKIA
|
||||
@ -2604,7 +2604,7 @@ RasterImage::DrawWithPreDownscaleIfNeeded(imgFrame *aFrame,
|
||||
gfxMatrix userSpaceToImageSpace = aUserSpaceToImageSpace;
|
||||
gfxMatrix imageSpaceToUserSpace = aUserSpaceToImageSpace;
|
||||
imageSpaceToUserSpace.Invert();
|
||||
gfx::Size scale = ToSize(imageSpaceToUserSpace.ScaleFactors(true));
|
||||
gfxSize scale = imageSpaceToUserSpace.ScaleFactors(true);
|
||||
nsIntRect subimage = aSubimage;
|
||||
nsRefPtr<gfxASurface> surf;
|
||||
|
||||
|
@ -733,8 +733,8 @@ private: // data
|
||||
bool IsDecodeFinished();
|
||||
TimeStamp mDrawStartTime;
|
||||
|
||||
inline bool CanQualityScale(const gfx::Size& scale);
|
||||
inline bool CanScale(GraphicsFilter aFilter, gfx::Size aScale, uint32_t aFlags);
|
||||
inline bool CanQualityScale(const gfxSize& scale);
|
||||
inline bool CanScale(GraphicsFilter aFilter, gfxSize aScale, uint32_t aFlags);
|
||||
|
||||
struct ScaleResult
|
||||
{
|
||||
@ -742,7 +742,7 @@ private: // data
|
||||
: status(SCALE_INVALID)
|
||||
{}
|
||||
|
||||
gfx::Size scale;
|
||||
gfxSize scale;
|
||||
nsAutoPtr<imgFrame> frame;
|
||||
ScaleStatus status;
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user