From f347fe6bd895a2eaccec418992da8ee80e36ef5e Mon Sep 17 00:00:00 2001 From: "roc+%cs.cmu.edu" Date: Thu, 6 Oct 2005 17:47:59 +0000 Subject: [PATCH] Bug 282750. Don't worry about over-complex opaque regions when we want to add a rect that will cover the entire region (and thus simplify it). r+sr=bzbarsky git-svn-id: svn://10.0.0.236/trunk@181714 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/view/src/nsViewManager.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mozilla/view/src/nsViewManager.cpp b/mozilla/view/src/nsViewManager.cpp index 19850e6a146..f2d1781ec7e 100644 --- a/mozilla/view/src/nsViewManager.cpp +++ b/mozilla/view/src/nsViewManager.cpp @@ -4002,8 +4002,10 @@ void nsViewManager::OptimizeDisplayList(const nsVoidArray* aDisplayList, const n } else { element->mBounds = tmpRgn.GetBounds(); + PRBool tooComplex = aOpaqueRegion.GetNumRects() > MAX_OPAQUE_REGION_COMPLEXITY && + !element->mBounds.Contains(aOpaqueRegion.GetBounds()); // See whether we should add this view's bounds to aOpaqueRegion - if (aOpaqueRegion.GetNumRects() <= MAX_OPAQUE_REGION_COMPLEXITY && + if (!tooComplex && // a view is opaque if it is neither transparent nor transluscent (!(element->mFlags & (VIEW_TRANSPARENT | VIEW_TRANSLUCENT)) // also, treat it as opaque if it's drawn onto a uniform background