1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
8 #include "LayersLogging.h" // for AppendToString
10 #include "nsPrintfCString.h" // for nsPrintfCString
11 #include "nsString.h" // for nsAutoCString
13 using namespace mozilla::layers
;
15 void TexturedEffect::PrintInfo(std::stringstream
& aStream
,
16 const char* aPrefix
) {
18 aStream
<< nsPrintfCString("%s (0x%p)", Name(), this).get();
19 AppendToString(aStream
, mTextureCoords
, " [texture-coords=", "]");
22 aStream
<< " [premultiplied]";
24 aStream
<< " [not-premultiplied]";
27 AppendToString(aStream
, mSamplingFilter
, " [filter=", "]");
30 void EffectMask::PrintInfo(std::stringstream
& aStream
, const char* aPrefix
) {
32 aStream
<< nsPrintfCString("EffectMask (0x%p)", this).get();
33 AppendToString(aStream
, mSize
, " [size=", "]");
34 AppendToString(aStream
, mMaskTransform
, " [mask-transform=", "]");
37 void EffectRenderTarget::PrintInfo(std::stringstream
& aStream
,
38 const char* aPrefix
) {
39 TexturedEffect::PrintInfo(aStream
, aPrefix
);
40 aStream
<< nsPrintfCString(" [render-target=%p]", mRenderTarget
.get()).get();
43 void EffectSolidColor::PrintInfo(std::stringstream
& aStream
,
44 const char* aPrefix
) {
46 aStream
<< nsPrintfCString("EffectSolidColor (0x%p) [color=%x]", this,
51 void EffectBlendMode::PrintInfo(std::stringstream
& aStream
,
52 const char* aPrefix
) {
54 aStream
<< nsPrintfCString("EffectBlendMode (0x%p) [blendmode=%i]", this,
59 void EffectColorMatrix::PrintInfo(std::stringstream
& aStream
,
60 const char* aPrefix
) {
62 aStream
<< nsPrintfCString("EffectColorMatrix (0x%p)", this).get();
63 AppendToString(aStream
, mColorMatrix
, " [matrix=", "]");