|
1 /* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
|
2 /* This Source Code Form is subject to the terms of the Mozilla Public |
|
3 * License, v. 2.0. If a copy of the MPL was not distributed with this |
|
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
|
5 |
|
6 #include "Effects.h" |
|
7 #include "LayersLogging.h" // for AppendToString |
|
8 #include "nsAString.h" |
|
9 #include "nsPrintfCString.h" // for nsPrintfCString |
|
10 #include "nsString.h" // for nsAutoCString |
|
11 |
|
12 using namespace mozilla::layers; |
|
13 |
|
14 void |
|
15 TexturedEffect::PrintInfo(nsACString& aTo, const char* aPrefix) |
|
16 { |
|
17 aTo += aPrefix; |
|
18 aTo += nsPrintfCString("%s (0x%p)", Name(), this); |
|
19 AppendToString(aTo, mTextureCoords, " [texture-coords=", "]"); |
|
20 |
|
21 if (mPremultiplied) { |
|
22 aTo += " [premultiplied]"; |
|
23 } else { |
|
24 aTo += " [not-premultiplied]"; |
|
25 } |
|
26 |
|
27 AppendToString(aTo, mFilter, " [filter=", "]"); |
|
28 } |
|
29 |
|
30 void |
|
31 EffectMask::PrintInfo(nsACString& aTo, const char* aPrefix) |
|
32 { |
|
33 aTo += aPrefix; |
|
34 aTo += nsPrintfCString("EffectMask (0x%p)", this); |
|
35 AppendToString(aTo, mSize, " [size=", "]"); |
|
36 AppendToString(aTo, mMaskTransform, " [mask-transform=", "]"); |
|
37 |
|
38 if (mIs3D) { |
|
39 aTo += " [is-3d]"; |
|
40 } |
|
41 } |
|
42 |
|
43 void |
|
44 EffectRenderTarget::PrintInfo(nsACString& aTo, const char* aPrefix) |
|
45 { |
|
46 TexturedEffect::PrintInfo(aTo, aPrefix); |
|
47 aTo += nsPrintfCString(" [render-target=%p]", mRenderTarget.get()); |
|
48 } |
|
49 |
|
50 void |
|
51 EffectSolidColor::PrintInfo(nsACString& aTo, const char* aPrefix) |
|
52 { |
|
53 aTo += aPrefix; |
|
54 aTo += nsPrintfCString("EffectSolidColor (0x%p) [color=%x]", this, mColor.ToABGR()); |
|
55 } |
|
56 |