/src/mozilla-central/gfx/layers/Effects.cpp
Line | Count | Source (jump to first uncovered line) |
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/. */ |
6 | | |
7 | | #include "Effects.h" |
8 | | #include "LayersLogging.h" // for AppendToString |
9 | | #include "nsAString.h" |
10 | | #include "nsPrintfCString.h" // for nsPrintfCString |
11 | | #include "nsString.h" // for nsAutoCString |
12 | | |
13 | | using namespace mozilla::layers; |
14 | | |
15 | | void |
16 | | TexturedEffect::PrintInfo(std::stringstream& aStream, const char* aPrefix) |
17 | 0 | { |
18 | 0 | aStream << aPrefix; |
19 | 0 | aStream << nsPrintfCString("%s (0x%p)", Name(), this).get(); |
20 | 0 | AppendToString(aStream, mTextureCoords, " [texture-coords=", "]"); |
21 | 0 |
|
22 | 0 | if (mPremultiplied) { |
23 | 0 | aStream << " [premultiplied]"; |
24 | 0 | } else { |
25 | 0 | aStream << " [not-premultiplied]"; |
26 | 0 | } |
27 | 0 |
|
28 | 0 | AppendToString(aStream, mSamplingFilter, " [filter=", "]"); |
29 | 0 | } |
30 | | |
31 | | void |
32 | | EffectMask::PrintInfo(std::stringstream& aStream, const char* aPrefix) |
33 | 0 | { |
34 | 0 | aStream << aPrefix; |
35 | 0 | aStream << nsPrintfCString("EffectMask (0x%p)", this).get(); |
36 | 0 | AppendToString(aStream, mSize, " [size=", "]"); |
37 | 0 | AppendToString(aStream, mMaskTransform, " [mask-transform=", "]"); |
38 | 0 | } |
39 | | |
40 | | void |
41 | | EffectRenderTarget::PrintInfo(std::stringstream& aStream, const char* aPrefix) |
42 | 0 | { |
43 | 0 | TexturedEffect::PrintInfo(aStream, aPrefix); |
44 | 0 | aStream << nsPrintfCString(" [render-target=%p]", mRenderTarget.get()).get(); |
45 | 0 | } |
46 | | |
47 | | void |
48 | | EffectSolidColor::PrintInfo(std::stringstream& aStream, const char* aPrefix) |
49 | 0 | { |
50 | 0 | aStream << aPrefix; |
51 | 0 | aStream << nsPrintfCString("EffectSolidColor (0x%p) [color=%x]", this, mColor.ToABGR()).get(); |
52 | 0 | } |
53 | | |
54 | | void |
55 | | EffectBlendMode::PrintInfo(std::stringstream& aStream, const char* aPrefix) |
56 | 0 | { |
57 | 0 | aStream << aPrefix; |
58 | 0 | aStream << nsPrintfCString("EffectBlendMode (0x%p) [blendmode=%i]", this, (int)mBlendMode).get(); |
59 | 0 | } |
60 | | |
61 | | void |
62 | | EffectColorMatrix::PrintInfo(std::stringstream& aStream, const char* aPrefix) |
63 | 0 | { |
64 | 0 | aStream << aPrefix; |
65 | 0 | aStream << nsPrintfCString("EffectColorMatrix (0x%p)", this).get(); |
66 | 0 | AppendToString(aStream, mColorMatrix, " [matrix=", "]"); |
67 | 0 | } |
68 | | |