Changed Scroll() to check if the scrolled view has the

NS_VIEW_PUBLIC_FLAG_DONT_BITBLT flag set


git-svn-id: svn://10.0.0.236/trunk@29086 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
troy%netscape.com
1999-04-24 22:49:28 +00:00
parent ce61fc1510
commit be9de6ec14
2 changed files with 17 additions and 8 deletions

View File

@@ -1707,22 +1707,30 @@ NS_IMETHODIMP nsScrollingView :: ScrollByPages(PRInt32 aNumPages)
return NS_OK;
}
PRBool nsScrollingView :: CannotBitBlt(nsIView* aScrolledView)
{
PRBool trans;
float opacity;
PRUint32 scrolledViewFlags;
HasTransparency(trans);
GetOpacity(opacity);
aScrolledView->GetViewFlags(&scrolledViewFlags);
return ((trans || opacity) && !(mScrollProperties & NS_SCROLL_PROPERTY_ALWAYS_BLIT)) ||
(mScrollProperties & NS_SCROLL_PROPERTY_NEVER_BLIT) ||
(scrolledViewFlags & NS_VIEW_PUBLIC_FLAG_DONT_BITBLT);
}
void nsScrollingView :: Scroll(nsIView *aScrolledView, PRInt32 aDx, PRInt32 aDy, float scale, PRUint32 aUpdateFlags)
{
if ((aDx != 0) || (aDy != 0))
{
nsIWidget *clipWidget;
PRBool trans;
float opacity;
mClipView->GetWidget(clipWidget);
HasTransparency(trans);
GetOpacity(opacity);
if ((nsnull == clipWidget) ||
((trans || opacity) && !(mScrollProperties & NS_SCROLL_PROPERTY_ALWAYS_BLIT)) ||
(mScrollProperties & NS_SCROLL_PROPERTY_NEVER_BLIT))
if ((nsnull == clipWidget) || CannotBitBlt(aScrolledView))
{
// XXX Repainting is really slow. The widget's Scroll() member function
// needs an argument that specifies whether child widgets are scrolled,

View File

@@ -108,6 +108,7 @@ protected:
void AdjustChildWidgets(nsScrollingView *aScrolling, nsIView *aView, nscoord aDx, nscoord aDy, float aScale);
void UpdateScrollControls(PRBool aPaint);
void Scroll(nsIView *aScrolledView, PRInt32 aDx, PRInt32 aDy, float scale, PRUint32 aUpdateFlags);
PRBool CannotBitBlt(nsIView* aScrolledView);
protected: