Fix one shutdown crash

--HG--
extra : rebase_source : dd71617cbabf7848565ab609362964037fbac01a
This commit is contained in:
Benoit Girard 2012-02-15 11:29:14 -05:00
parent 0f322866b3
commit 84a8e6d4c5
3 changed files with 7 additions and 1 deletions

View File

@ -72,6 +72,7 @@ CompositorChild::Destroy()
static_cast<ShadowLayersChild*>(ManagedPLayersChild()[0]);
layers->Destroy();
}
printf_stderr("Destroy compositor\n");
SendStop();
}

View File

@ -78,6 +78,7 @@ CompositorParent::Destroy()
bool
CompositorParent::RecvStop()
{
printf_stderr("Stop composition\n");
mPaused = true;
Destroy();
return true;
@ -93,6 +94,7 @@ CompositorParent::ScheduleRenderOnCompositorThread(::base::Thread &aCompositorTh
void
CompositorParent::PauseComposition()
{
printf_stderr("Pause composition\n");
if (!mPaused) {
mPaused = true;

View File

@ -218,6 +218,9 @@ nsWindow::~nsWindow()
mRootAccessible = nsnull;
#endif
ALOG("nsWindow %p destructor", (void*)this);
AndroidBridge::Bridge()->SetCompositorParent(NULL, NULL);
}
bool
@ -1152,7 +1155,7 @@ nsWindow::DrawTo(gfxASurface *targetSurface, const nsIntRect &invalidRect)
}
case LayerManager::LAYERS_OPENGL: {
__android_log_print(ANDROID_LOG_ERROR, "Gecko", "### Basic layers drawing");
__android_log_print(ANDROID_LOG_ERROR, "Gecko", "### OGL layers drawing");
static_cast<mozilla::layers::LayerManagerOGL*>(GetLayerManager(nsnull))->
SetClippingRegion(nsIntRegion(boundsRect));