Bug 1404077 - Remove unnecessary gfxContext::Save/Load in nsTreeBodyFrame::PaintCell.
Between this pair of gfxContext::Save/Load, only the draw calls of the
DrawTarget are called. Since draw calls do not alter the content of a AureState,
we should just remove this pair of Save/Load.
MozReview-Commit-ID: BexjGJkO77E
--- a/layout/xul/tree/nsTreeBodyFrame.cpp
+++ b/layout/xul/tree/nsTreeBodyFrame.cpp
@@ -3313,18 +3313,16 @@ nsTreeBodyFrame::PaintCell(int32_t
nsRect twistyRect(aCellRect);
GetTwistyRect(aRowIndex, aColumn, imageSize, twistyRect, aPresContext,
twistyContext);
nsMargin twistyMargin;
twistyContext->StyleMargin()->GetMargin(twistyMargin);
twistyRect.Inflate(twistyMargin);
- aRenderingContext.Save();
-
const nsStyleBorder* borderStyle = lineContext->StyleBorder();
// Resolve currentcolor values against the treeline context
nscolor color = lineContext->StyleColor()->
CalcComplexColor(borderStyle->mBorderLeftColor);
ColorPattern colorPatt(ToDeviceColor(color));
uint8_t style = borderStyle->GetBorderStyle(eSideLeft);
StrokeOptions strokeOptions;
@@ -3378,18 +3376,16 @@ nsTreeBodyFrame::PaintCell(int32_t
}
int32_t parent;
if (NS_FAILED(mView->GetParentIndex(currentParent, &parent)) || parent < 0)
break;
currentParent = parent;
srcX -= mIndentation;
}
-
- aRenderingContext.Restore();
}
// Always leave space for the twisty.
nsRect twistyRect(currX, cellRect.y, remainingWidth, cellRect.height);
result &= PaintTwisty(aRowIndex, aColumn, twistyRect, aPresContext,
aRenderingContext, aDirtyRect, remainingWidth,
currX);
}