mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-27 21:00:50 +00:00
Bug 1229473 - Don't use composite colors for border sizes > 10000px because it's too slow. r=tn
This commit is contained in:
parent
d5b52bdab1
commit
e6364c3ff6
@ -32,6 +32,8 @@
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::gfx;
|
||||
|
||||
#define MAX_COMPOSITE_BORDER_WIDTH LayoutDeviceIntCoord(10000)
|
||||
|
||||
/**
|
||||
* nsCSSRendering::PaintBorder
|
||||
* nsCSSRendering::PaintOutline
|
||||
@ -1373,9 +1375,16 @@ nsCSSBorderRenderer::DrawBorderSides(int aSides)
|
||||
// color is used for the remainder of the border's size. Just
|
||||
// hand off to another function to do all that.
|
||||
if (compositeColors) {
|
||||
DrawBorderSidesCompositeColors(aSides, compositeColors);
|
||||
return;
|
||||
}
|
||||
Float maxBorderWidth(0);
|
||||
NS_FOR_CSS_SIDES (i) {
|
||||
maxBorderWidth = std::max(maxBorderWidth, mBorderWidths[i]);
|
||||
}
|
||||
if (maxBorderWidth <= MAX_COMPOSITE_BORDER_WIDTH) {
|
||||
DrawBorderSidesCompositeColors(aSides, compositeColors);
|
||||
return;
|
||||
}
|
||||
NS_WARNING("DrawBorderSides: too large border width for composite colors");
|
||||
}
|
||||
|
||||
// We're not doing compositeColors, so we can calculate the
|
||||
// borderColorStyle based on the specified style. The
|
||||
|
Loading…
x
Reference in New Issue
Block a user