Fix for bug #12751. Optimized PaintBorder() so if the dirty rect is completely
inside of the border rect, then we don't paint anything. This speed up incremental painting git-svn-id: svn://10.0.0.236/trunk@45026 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -1410,9 +1410,17 @@ void nsCSSRendering::PaintBorder(nsIPresContext& aPresContext,
|
||||
if (0 == border.bottom) aSkipSides |= (1 << NS_SIDE_BOTTOM);
|
||||
if (0 == border.left) aSkipSides |= (1 << NS_SIDE_LEFT);
|
||||
|
||||
// XXX These are misnamed. Why is it that 'outside' is inside of
|
||||
// 'inside' (it's produced by deflating)?
|
||||
nsRect inside(aBorderArea);
|
||||
nsRect outside(inside);
|
||||
outside.Deflate(border);
|
||||
|
||||
// If the dirty rect is completely inside the border area (e.g., only the
|
||||
// content is being painted), then we can skip out now
|
||||
if (outside.Contains(aDirtyRect)) {
|
||||
return;
|
||||
}
|
||||
|
||||
//see if any sides are dotted or dashed
|
||||
for (cnt = 0; cnt < 4; cnt++) {
|
||||
|
||||
Reference in New Issue
Block a user