Bug 703484 - Part 1b: Disable Basic Layers OMTC on OS X because it crashes. r=bgirard

This commit is contained in:
Ali Juma 2012-06-13 15:53:11 -04:00
parent 48bb82e1e3
commit b57d6a338b
3 changed files with 10 additions and 1 deletions

View File

@ -416,6 +416,7 @@ public:
NS_IMETHOD DispatchEvent(nsGUIEvent* event, nsEventStatus & aStatus);
virtual bool GetShouldAccelerate();
virtual bool UseOffMainThreadCompositing();
NS_IMETHOD SetCursor(nsCursor aCursor);
NS_IMETHOD SetCursor(imgIContainer* aCursor, PRUint32 aHotspotX, PRUint32 aHotspotY);

View File

@ -1399,6 +1399,14 @@ nsChildView::GetShouldAccelerate()
return nsBaseWidget::GetShouldAccelerate();
}
bool
nsChildView::UseOffMainThreadCompositing()
{
// OMTC doesn't work with Basic Layers on OS X right now. Once it works, we'll
// still want to disable it for certain kinds of windows (e.g. popups).
return nsBaseWidget::UseOffMainThreadCompositing() && GetShouldAccelerate();
}
inline PRUint16 COLOR8TOCOLOR16(PRUint8 color8)
{
// return (color8 == 0xFF ? 0xFFFF : (color8 << 8));

View File

@ -209,7 +209,7 @@ public:
nsWindowType GetWindowType() { return mWindowType; }
static bool UseOffMainThreadCompositing();
virtual bool UseOffMainThreadCompositing();
protected:
virtual void ResolveIconName(const nsAString &aIconName,