From d1b254f231fd172d75a194e54c7e23506b132249 Mon Sep 17 00:00:00 2001 From: "Carsten \"Tomcat\" Book" Date: Fri, 20 Sep 2013 11:09:49 +0200 Subject: [PATCH] Backed out changeset 64c58cb9c49b (bug 918078) for bustage --- gfx/layers/composite/TextureHost.cpp | 20 ++++++-------------- gfx/layers/composite/TextureHost.h | 12 +++++++++++- 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/gfx/layers/composite/TextureHost.cpp b/gfx/layers/composite/TextureHost.cpp index 9e06d00ed160..77b060563942 100644 --- a/gfx/layers/composite/TextureHost.cpp +++ b/gfx/layers/composite/TextureHost.cpp @@ -161,20 +161,6 @@ TextureHost::~TextureHost() { } -#ifdef MOZ_LAYERS_HAVE_LOG - -void -TextureHost::PrintInfo(nsACString& aTo, const char* aPrefix) -{ - aTo += aPrefix; - aTo += nsPrintfCString("%s (0x%p)", Name(), this); - AppendToString(aTo, GetSize(), " [size=", "]"); - AppendToString(aTo, GetFormat(), " [format=", "]"); - AppendToString(aTo, mFlags, " [flags=", "]"); -} - -#endif - void TextureSource::SetCompositableQuirks(CompositableQuirks* aQuirks) { mQuirks = aQuirks; @@ -245,6 +231,12 @@ DeprecatedTextureHost::SwapTextures(const SurfaceDescriptor& aImage, } #ifdef MOZ_LAYERS_HAVE_LOG +void +TextureSource::PrintInfo(nsACString& aTo, const char* aPrefix) +{ + aTo += aPrefix; + aTo += nsPrintfCString("UnknownTextureSource (0x%p)", this); +} void DeprecatedTextureHost::PrintInfo(nsACString& aTo, const char* aPrefix) diff --git a/gfx/layers/composite/TextureHost.h b/gfx/layers/composite/TextureHost.h index ea183733888d..497b084704bf 100644 --- a/gfx/layers/composite/TextureHost.h +++ b/gfx/layers/composite/TextureHost.h @@ -120,6 +120,10 @@ public: virtual void SetCompositableQuirks(CompositableQuirks* aQuirks); +#ifdef MOZ_LAYERS_HAVE_LOG + virtual void PrintInfo(nsACString& aTo, const char* aPrefix); +#endif + protected: RefPtr mQuirks; }; @@ -385,7 +389,13 @@ public: virtual void SetCompositableQuirks(CompositableQuirks* aQuirks); #ifdef MOZ_LAYERS_HAVE_LOG - virtual void PrintInfo(nsACString& aTo, const char* aPrefix); + virtual void PrintInfo(nsACString& aTo, const char* aPrefix) + { + RefPtr source = GetTextureSources(); + if (source) { + source->PrintInfo(aTo, aPrefix); + } + } #endif protected: