Bug 594087. Avoid trying to sync acceleration state with top level windows. r=vlad

This fixes the continual reinitialization on platforms like OS X and Linux.
* * *
Revert unintentional changes.
This commit is contained in:
Jeff Muizelaar 2010-09-07 18:20:47 -04:00
parent 1ef839a9f7
commit 6441a6182a
6 changed files with 0 additions and 51 deletions

View File

@ -299,8 +299,6 @@ public:
virtual nsIWidget* GetParent(void);
virtual float GetDPI();
LayerManager* GetLayerManager();
NS_IMETHOD ConstrainPosition(PRBool aAllowSlop,
PRInt32 *aX, PRInt32 *aY);
NS_IMETHOD Move(PRInt32 aX, PRInt32 aY);

View File

@ -976,17 +976,6 @@ nsChildView::GetDPI()
return 96.0;
}
LayerManager*
nsChildView::GetLayerManager()
{
nsCocoaWindow* window = GetXULWindowWidget();
if (window && window->GetAcceleratedRendering() != mUseAcceleratedRendering) {
mLayerManager = NULL;
mUseAcceleratedRendering = window->GetAcceleratedRendering();
}
return nsBaseWidget::GetLayerManager();
}
NS_IMETHODIMP nsChildView::Enable(PRBool aState)
{
return NS_OK;

View File

@ -6471,25 +6471,6 @@ nsWindow::GetSurfaceForGdkDrawable(GdkDrawable* aDrawable,
}
#endif
mozilla::layers::LayerManager*
nsWindow::GetLayerManager()
{
GtkWidget *topWidget;
GetToplevelWidget(&topWidget);
nsWindow *topWindow = get_window_for_gtk_widget(topWidget);
if (!topWindow) {
return nsBaseWidget::GetLayerManager();
}
if (mUseAcceleratedRendering != topWindow->GetAcceleratedRendering()) {
mLayerManager = NULL;
mUseAcceleratedRendering = topWindow->GetAcceleratedRendering();
}
return nsBaseWidget::GetLayerManager();
}
// return the gfxASurface for rendering to this widget
gfxASurface*
nsWindow::GetThebesSurface()

View File

@ -328,7 +328,6 @@ public:
nsresult UpdateTranslucentWindowAlphaInternal(const nsIntRect& aRect,
PRUint8* aAlphas, PRInt32 aStride);
virtual LayerManager* GetLayerManager();
gfxASurface *GetThebesSurface();
static already_AddRefed<gfxASurface> GetSurfaceForGdkDrawable(GdkDrawable* aDrawable,

View File

@ -2452,23 +2452,6 @@ nsWindow::SetAcceleratedRendering(PRBool aEnabled)
return NS_OK;
}
mozilla::layers::LayerManager*
nsWindow::GetLayerManager()
{
nsWindow *topWindow = static_cast<nsWindow*>(GetTopLevelWidget());
if (!topWindow)
return nsBaseWidget::GetLayerManager();
if (mUseAcceleratedRendering != topWindow->GetAcceleratedRendering()
&& IsAcceleratedQView(static_cast<QGraphicsView*>(GetViewWidget()))) {
mLayerManager = NULL;
mUseAcceleratedRendering = topWindow->GetAcceleratedRendering();
}
return nsBaseWidget::GetLayerManager();
}
// return the gfxASurface for rendering to this widget
gfxASurface*
nsWindow::GetThebesSurface()

View File

@ -315,7 +315,6 @@ protected:
void ThemeChanged(void);
virtual LayerManager* GetLayerManager();
gfxASurface* GetThebesSurface();
private: