Bug 898228 - Avoid wasted work in gfxContext::ClipContainsRect(). r=bas

This commit is contained in:
Po-Chun Chang 2013-08-12 08:51:45 -04:00
parent 5a49929cfc
commit 6baaeb6ea1

View File

@ -1233,6 +1233,7 @@ gfxContext::ClipContainsRect(const gfxRect& aRect)
for (int i = mStateStack.Length() - 2; i > 0; i--) {
if (mStateStack[i].clipWasReset) {
lastReset = i;
break;
}
}
@ -2074,6 +2075,7 @@ gfxContext::PushClipsToDT(DrawTarget *aDT)
for (int i = mStateStack.Length() - 2; i > 0; i--) {
if (mStateStack[i].clipWasReset) {
lastReset = i;
break;
}
}
@ -2185,6 +2187,7 @@ gfxContext::GetAzureDeviceSpaceClipBounds()
for (int i = mStateStack.Length() - 1; i > 0; i--) {
if (mStateStack[i].clipWasReset) {
lastReset = i;
break;
}
}