зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1342571 - fix MaxStrokeExtents to account for partial pixel coverage properly. r=mstange
MozReview-Commit-ID: DS25AJKoVYo
This commit is contained in:
Родитель
4dfd1b6ac1
Коммит
cebf845be0
|
@ -372,6 +372,11 @@ PathExtentsToMaxStrokeExtents(const StrokeOptions &aStrokeOptions,
|
|||
double dx = styleExpansionFactor * hypot(aTransform._11, aTransform._21);
|
||||
double dy = styleExpansionFactor * hypot(aTransform._22, aTransform._12);
|
||||
|
||||
// Even if the stroke only partially covers a pixel, it must still render to
|
||||
// full pixels. Round up to compensate for this.
|
||||
dx = ceil(dx);
|
||||
dy = ceil(dy);
|
||||
|
||||
Rect result = aRect;
|
||||
result.Inflate(dx, dy);
|
||||
return result;
|
||||
|
|
|
@ -270,6 +270,12 @@ MaxStrokeExtents(const StrokeOptions& aStrokeOptions,
|
|||
|
||||
double dx = styleExpansionFactor * hypot(aTransform._11, aTransform._21);
|
||||
double dy = styleExpansionFactor * hypot(aTransform._22, aTransform._12);
|
||||
|
||||
// Even if the stroke only partially covers a pixel, it must still render to
|
||||
// full pixels. Round up to compensate for this.
|
||||
dx = ceil(dx);
|
||||
dy = ceil(dy);
|
||||
|
||||
return Margin(dy, dx, dy, dx);
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче