Bug 911730 - Only dump layer tree(using MOZ_LAYERS_HAVE_LOG). r=mattwoodrow

This commit is contained in:
Jerry Shih 2013-09-12 11:08:50 -04:00
parent 0676c24d11
commit 6580e8a8f7
3 changed files with 6 additions and 2 deletions

View File

@ -1173,9 +1173,13 @@ Layer::Dump(FILE* aFile, const char* aPrefix, bool aDumpHtml)
fprintf(aFile, ">");
}
DumpSelf(aFile, aPrefix);
#ifdef MOZ_DUMP_PAINTING
if (AsLayerComposite() && AsLayerComposite()->GetCompositableHost()) {
AsLayerComposite()->GetCompositableHost()->Dump(aFile, aPrefix, aDumpHtml);
}
#endif
if (aDumpHtml) {
fprintf(aFile, "</a>");
}

View File

@ -106,7 +106,7 @@ CanvasLayerComposite::RenderLayer(const nsIntPoint& aOffset,
CompositableHost*
CanvasLayerComposite::GetCompositableHost()
{
if (mImageHost->IsAttached()) {
if ( mImageHost && mImageHost->IsAttached()) {
return mImageHost.get();
}

View File

@ -158,7 +158,7 @@ ThebesLayerComposite::RenderLayer(const nsIntPoint& aOffset,
CompositableHost*
ThebesLayerComposite::GetCompositableHost()
{
if (mBuffer->IsAttached()) {
if ( mBuffer && mBuffer->IsAttached()) {
return mBuffer.get();
}