Bug 1237902 (part 1) - Remove unneeded gfxContext ops in DrawTableBorderSegment(). r=roc.

We change the color and anti-aliasing on the gfxContext but never do anything
with it while those values are changed.
This commit is contained in:
Nicholas Nethercote 2016-01-07 20:16:37 -08:00
parent 46f0b531b6
commit 61beecdc3b

View File

@ -3891,12 +3891,6 @@ nsCSSRendering::DrawTableBorderSegment(nsRenderingContext& aContext,
aEndBevelOffset = 0;
}
gfxContext *ctx = aContext.ThebesContext();
AntialiasMode oldMode = ctx->CurrentAntialiasMode();
ctx->SetAntialiasMode(AntialiasMode::NONE);
ctx->SetColor(Color::FromABGR(aBorderColor));
DrawTarget& drawTarget = *aContext.GetDrawTarget();
switch (aBorderStyle) {
@ -3978,8 +3972,6 @@ nsCSSRendering::DrawTableBorderSegment(nsRenderingContext& aContext,
nscolor bevelColor = MakeBevelColor(ridgeGrooveSide, ridgeGroove,
aBGColor->mBackgroundColor,
aBorderColor);
// XXXbz is this SetColor call still needed?
ctx->SetColor(Color::FromABGR(bevelColor));
nsRect rect(aBorder);
nscoord half;
if (horizontal) { // top, bottom
@ -4019,8 +4011,6 @@ nsCSSRendering::DrawTableBorderSegment(nsRenderingContext& aContext,
// background color, but I don't care.
bevelColor = MakeBevelColor(ridgeGrooveSide, ridgeGroove,
aBGColor->mBackgroundColor, aBorderColor);
// XXXbz is this SetColor call still needed?
ctx->SetColor(Color::FromABGR(bevelColor));
if (horizontal) {
rect.y = rect.y + half;
rect.height = aBorder.height - half;
@ -4142,8 +4132,6 @@ nsCSSRendering::DrawTableBorderSegment(nsRenderingContext& aContext,
NS_ASSERTION(false, "Unexpected 'auto' table border");
break;
}
ctx->SetAntialiasMode(oldMode);
}
// End table border-collapsing section