michael@0: /* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #include "Effects.h" michael@0: #include "LayersLogging.h" // for AppendToString michael@0: #include "nsAString.h" michael@0: #include "nsPrintfCString.h" // for nsPrintfCString michael@0: #include "nsString.h" // for nsAutoCString michael@0: michael@0: using namespace mozilla::layers; michael@0: michael@0: void michael@0: TexturedEffect::PrintInfo(nsACString& aTo, const char* aPrefix) michael@0: { michael@0: aTo += aPrefix; michael@0: aTo += nsPrintfCString("%s (0x%p)", Name(), this); michael@0: AppendToString(aTo, mTextureCoords, " [texture-coords=", "]"); michael@0: michael@0: if (mPremultiplied) { michael@0: aTo += " [premultiplied]"; michael@0: } else { michael@0: aTo += " [not-premultiplied]"; michael@0: } michael@0: michael@0: AppendToString(aTo, mFilter, " [filter=", "]"); michael@0: } michael@0: michael@0: void michael@0: EffectMask::PrintInfo(nsACString& aTo, const char* aPrefix) michael@0: { michael@0: aTo += aPrefix; michael@0: aTo += nsPrintfCString("EffectMask (0x%p)", this); michael@0: AppendToString(aTo, mSize, " [size=", "]"); michael@0: AppendToString(aTo, mMaskTransform, " [mask-transform=", "]"); michael@0: michael@0: if (mIs3D) { michael@0: aTo += " [is-3d]"; michael@0: } michael@0: } michael@0: michael@0: void michael@0: EffectRenderTarget::PrintInfo(nsACString& aTo, const char* aPrefix) michael@0: { michael@0: TexturedEffect::PrintInfo(aTo, aPrefix); michael@0: aTo += nsPrintfCString(" [render-target=%p]", mRenderTarget.get()); michael@0: } michael@0: michael@0: void michael@0: EffectSolidColor::PrintInfo(nsACString& aTo, const char* aPrefix) michael@0: { michael@0: aTo += aPrefix; michael@0: aTo += nsPrintfCString("EffectSolidColor (0x%p) [color=%x]", this, mColor.ToABGR()); michael@0: } michael@0: