mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-04-02 12:32:55 +00:00
Bug 596493 - Disable acceleration on all transparent windows on OS X. r=mstange a=b
This commit is contained in:
parent
e0ceecd56e
commit
2945acde21
@ -325,6 +325,7 @@ public:
|
|||||||
NS_IMETHOD DispatchEvent(nsGUIEvent* event, nsEventStatus & aStatus);
|
NS_IMETHOD DispatchEvent(nsGUIEvent* event, nsEventStatus & aStatus);
|
||||||
|
|
||||||
NS_IMETHOD Update();
|
NS_IMETHOD Update();
|
||||||
|
virtual PRBool GetShouldAccelerate();
|
||||||
|
|
||||||
NS_IMETHOD SetCursor(nsCursor aCursor);
|
NS_IMETHOD SetCursor(nsCursor aCursor);
|
||||||
NS_IMETHOD SetCursor(imgIContainer* aCursor, PRUint32 aHotspotX, PRUint32 aHotspotY);
|
NS_IMETHOD SetCursor(imgIContainer* aCursor, PRUint32 aHotspotX, PRUint32 aHotspotY);
|
||||||
|
@ -1689,6 +1689,16 @@ NS_IMETHODIMP nsChildView::Invalidate(const nsIntRect &aRect, PRBool aIsSynchron
|
|||||||
NS_OBJC_END_TRY_ABORT_BLOCK_NSRESULT;
|
NS_OBJC_END_TRY_ABORT_BLOCK_NSRESULT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
PRBool
|
||||||
|
nsChildView::GetShouldAccelerate()
|
||||||
|
{
|
||||||
|
// Don't use OpenGL for transparent windows.
|
||||||
|
if (!mView || ![[mView window] isOpaque])
|
||||||
|
return PR_FALSE;
|
||||||
|
|
||||||
|
return nsBaseWidget::GetShouldAccelerate();
|
||||||
|
}
|
||||||
|
|
||||||
inline PRUint16 COLOR8TOCOLOR16(PRUint8 color8)
|
inline PRUint16 COLOR8TOCOLOR16(PRUint8 color8)
|
||||||
{
|
{
|
||||||
// return (color8 == 0xFF ? 0xFFFF : (color8 << 8));
|
// return (color8 == 0xFF ? 0xFFFF : (color8 << 8));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user