зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1773384 - Change the type of Downscaler::mScale to MatrixScalesDouble. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D149380
This commit is contained in:
Родитель
f6d593afa9
Коммит
08ea6a8367
|
@ -82,8 +82,9 @@ nsresult Downscaler::BeginFrame(const nsIntSize& aOriginalSize,
|
|||
aHasAlpha);
|
||||
|
||||
mOriginalSize = aOriginalSize;
|
||||
mScale = gfxSize(double(mOriginalSize.width) / mTargetSize.width,
|
||||
double(mOriginalSize.height) / mTargetSize.height);
|
||||
mScale = gfx::MatrixScalesDouble(
|
||||
double(mOriginalSize.width) / mTargetSize.width,
|
||||
double(mOriginalSize.height) / mTargetSize.height);
|
||||
mOutputBuffer = aOutputBuffer;
|
||||
mHasAlpha = aHasAlpha;
|
||||
mFlipVertically = aFlipVertically;
|
||||
|
@ -244,7 +245,7 @@ DownscalerInvalidRect Downscaler::TakeInvalidRect() {
|
|||
|
||||
// Compute the original size invalid rect.
|
||||
invalidRect.mOriginalSizeRect = invalidRect.mTargetSizeRect;
|
||||
invalidRect.mOriginalSizeRect.ScaleRoundOut(mScale.width, mScale.height);
|
||||
invalidRect.mOriginalSizeRect.ScaleRoundOut(mScale.xScale, mScale.yScale);
|
||||
|
||||
return invalidRect;
|
||||
}
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
#include "gfxPoint.h"
|
||||
#include "nsRect.h"
|
||||
#include "mozilla/gfx/ConvolutionFilter.h"
|
||||
#include "mozilla/gfx/Matrix.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace image {
|
||||
|
@ -55,7 +56,7 @@ class Downscaler {
|
|||
const nsIntSize FrameSize() const {
|
||||
return nsIntSize(mFrameRect.Width(), mFrameRect.Height());
|
||||
}
|
||||
const gfxSize& Scale() const { return mScale; }
|
||||
const gfx::MatrixScalesDouble& Scale() const { return mScale; }
|
||||
|
||||
/**
|
||||
* Begins a new frame and reinitializes the Downscaler.
|
||||
|
@ -118,7 +119,7 @@ class Downscaler {
|
|||
nsIntSize mOriginalSize;
|
||||
nsIntSize mTargetSize;
|
||||
nsIntRect mFrameRect;
|
||||
gfxSize mScale;
|
||||
gfx::MatrixScalesDouble mScale;
|
||||
|
||||
uint8_t* mOutputBuffer;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче