mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-23 10:15:41 +00:00
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. --HG-- extra : rebase_source : 39ab84c17f8b4b482383464b2b8e0552369fb94c
This commit is contained in:
parent
1f1671ee48
commit
7a64b26887
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user