зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1389010, part 2 - Move an early return in nsCSSBorderRenderer::DrawBorders up to avoid unnecessary work. r=dholbert
MozReview-Commit-ID: AfuBCfYs3S1
This commit is contained in:
Родитель
90da60023d
Коммит
4c063580b8
|
@ -3214,6 +3214,14 @@ nsCSSBorderRenderer::DrawBorders()
|
|||
return;
|
||||
}
|
||||
|
||||
bool allBordersSameWidth = AllBordersSameWidth();
|
||||
|
||||
if (allBordersSameWidth && mBorderWidths[0] == 0.0) {
|
||||
// Some of the allBordersSameWidth codepaths depend on the border
|
||||
// width being greater than zero.
|
||||
return;
|
||||
}
|
||||
|
||||
AutoRestoreTransform autoRestoreTransform;
|
||||
Matrix mat = mDrawTarget->GetTransform();
|
||||
|
||||
|
@ -3241,14 +3249,6 @@ nsCSSBorderRenderer::DrawBorders()
|
|||
mInnerRect.Round();
|
||||
}
|
||||
|
||||
bool allBordersSameWidth = AllBordersSameWidth();
|
||||
|
||||
if (allBordersSameWidth && mBorderWidths[0] == 0.0) {
|
||||
// Some of the allBordersSameWidth codepaths depend on the border
|
||||
// width being greater than zero.
|
||||
return;
|
||||
}
|
||||
|
||||
// Initial values only used when the border colors/widths are all the same:
|
||||
ColorPattern color(ToDeviceColor(mBorderColors[eSideTop]));
|
||||
StrokeOptions strokeOptions(mBorderWidths[eSideTop]); // stroke width
|
||||
|
|
Загрузка…
Ссылка в новой задаче