mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1082530, part 5 - remove the variant of Moz2D's UserToDevicePixelSnapped that takes a Matrix argument instead of a DrawTarget argument. r=mattwoodrow
This commit is contained in:
parent
71c5fdb910
commit
bf1e0353fb
@ -197,10 +197,14 @@ extern UserDataKey sDisablePixelSnapping;
|
||||
* stroke width then the edges of the stroke will be antialiased (assuming an
|
||||
* AntialiasMode that does antialiasing).
|
||||
*/
|
||||
inline bool UserToDevicePixelSnapped(Rect& aRect, const Matrix& aTransform,
|
||||
inline bool UserToDevicePixelSnapped(Rect& aRect, const DrawTarget& aDrawTarget,
|
||||
bool aAllowScaleOr90DegreeRotate = false)
|
||||
{
|
||||
Matrix mat = aTransform;
|
||||
if (aDrawTarget.GetUserData(&sDisablePixelSnapping)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Matrix mat = aDrawTarget.GetTransform();
|
||||
|
||||
const Float epsilon = 0.0000001f;
|
||||
#define WITHIN_E(a,b) (fabs((a)-(b)) < epsilon)
|
||||
@ -235,15 +239,6 @@ inline bool UserToDevicePixelSnapped(Rect& aRect, const Matrix& aTransform,
|
||||
return false;
|
||||
}
|
||||
|
||||
inline bool UserToDevicePixelSnapped(Rect& aRect, const DrawTarget& aDrawTarget,
|
||||
bool aIgnoreScale = false)
|
||||
{
|
||||
if (aDrawTarget.GetUserData(&sDisablePixelSnapping)) {
|
||||
return false;
|
||||
}
|
||||
return UserToDevicePixelSnapped(aRect, aDrawTarget.GetTransform());
|
||||
}
|
||||
|
||||
/**
|
||||
* This function has the same behavior as UserToDevicePixelSnapped except that
|
||||
* aRect is not transformed to device space.
|
||||
|
Loading…
Reference in New Issue
Block a user