Add basic DrawTargetCapture logging ability (bug 1435938, r=bas)

MozReview-Commit-ID: LhbC4mWub6k

--HG--
extra : histedit_source : 3dd4ae3ce007aa326c1d47f018770df1e9b982e1%2C4cf1db87b1cd9e879a90351f086711d24216d7b5
This commit is contained in:
Ryan Hunt 2018-02-05 22:00:45 -06:00
Родитель 7667673e64
Коммит 4a4b48772d
8 изменённых файлов: 418 добавлений и 1 удалений

Просмотреть файл

@ -1464,6 +1464,8 @@ class DrawTargetCapture : public DrawTarget
public: public:
virtual bool IsCaptureDT() const override { return true; } virtual bool IsCaptureDT() const override { return true; }
virtual void Dump() = 0;
/** /**
* Returns true if the recording only contains FillGlyph calls with * Returns true if the recording only contains FillGlyph calls with
* a single font and color. Returns the list of Glyphs along with * a single font and color. Returns the list of Glyphs along with

Просмотреть файл

@ -12,6 +12,7 @@
#include <vector> #include <vector>
#include "DrawCommand.h" #include "DrawCommand.h"
#include "Logging.h"
namespace mozilla { namespace mozilla {
namespace gfx { namespace gfx {
@ -87,6 +88,15 @@ public:
uint8_t* mEnd; uint8_t* mEnd;
}; };
void Log(TreeLog& aStream)
{
for (iterator iter(*this); !iter.Done(); iter.Next()) {
DrawingCommand* cmd = iter.Get();
cmd->Log(aStream);
aStream << "\n";
}
}
private: private:
CaptureCommandList(const CaptureCommandList& aOther) = delete; CaptureCommandList(const CaptureCommandList& aOther) = delete;
void operator =(const CaptureCommandList& aOther) = delete; void operator =(const CaptureCommandList& aOther) = delete;

Просмотреть файл

@ -14,6 +14,7 @@
#include "Filters.h" #include "Filters.h"
#include <vector> #include <vector>
#include "FilterNodeCapture.h" #include "FilterNodeCapture.h"
#include "Logging.h"
namespace mozilla { namespace mozilla {
namespace gfx { namespace gfx {
@ -55,6 +56,7 @@ public:
virtual void ExecuteOnDT(DrawTarget* aDT, const Matrix* aTransform = nullptr) const = 0; virtual void ExecuteOnDT(DrawTarget* aDT, const Matrix* aTransform = nullptr) const = 0;
virtual bool GetAffectedRect(Rect& aDeviceRect, const Matrix& aTransform) const { return false; } virtual bool GetAffectedRect(Rect& aDeviceRect, const Matrix& aTransform) const { return false; }
virtual void CloneInto(CaptureCommandList* aList) = 0; virtual void CloneInto(CaptureCommandList* aList) = 0;
virtual void Log(TreeLog& aLog) const = 0;
CommandType GetType() { return mType; } CommandType GetType() { return mType; }

Просмотреть файл

@ -16,6 +16,7 @@
#include "CaptureCommandList.h" #include "CaptureCommandList.h"
#include "DrawCommand.h" #include "DrawCommand.h"
#include "FilterNodeCapture.h" #include "FilterNodeCapture.h"
#include "Logging.h"
namespace mozilla { namespace mozilla {
namespace gfx { namespace gfx {
@ -81,6 +82,16 @@ public:
reinterpret_cast<Pattern*>(mPattern)->~Pattern(); reinterpret_cast<Pattern*>(mPattern)->~Pattern();
} }
Pattern* Get()
{
return reinterpret_cast<Pattern*>(mPattern);
}
const Pattern* Get() const
{
return reinterpret_cast<const Pattern*>(mPattern);
}
operator Pattern&() operator Pattern&()
{ {
return *reinterpret_cast<Pattern*>(mPattern); return *reinterpret_cast<Pattern*>(mPattern);
@ -135,6 +146,16 @@ public:
aDT->DrawSurface(mSurface, mDest, mSource, mSurfOptions, mOptions); aDT->DrawSurface(mSurface, mDest, mSource, mSurfOptions, mOptions);
} }
void Log(TreeLog& aStream) const override
{
aStream << "[DrawSurface surf=" << mSurface;
aStream << " dest=" << mDest;
aStream << " src=" << mSource;
aStream << " surfOpt=" << mSurfOptions;
aStream << " opt=" << mOptions;
aStream << "]";
}
static const bool AffectsSnapshot = true; static const bool AffectsSnapshot = true;
static const CommandType Type = CommandType::DRAWSURFACE; static const CommandType Type = CommandType::DRAWSURFACE;
@ -175,6 +196,17 @@ public:
aDT->DrawSurfaceWithShadow(mSurface, mDest, mColor, mOffset, mSigma, mOperator); aDT->DrawSurfaceWithShadow(mSurface, mDest, mColor, mOffset, mSigma, mOperator);
} }
void Log(TreeLog& aStream) const override
{
aStream << "[DrawSurfaceWithShadow surf=" << mSurface;
aStream << " dest=" << mDest;
aStream << " color=" << mColor;
aStream << " offset=" << mOffset;
aStream << " sigma=" << mSigma;
aStream << " op=" << mOperator;
aStream << "]";
}
static const bool AffectsSnapshot = true; static const bool AffectsSnapshot = true;
static const CommandType Type = CommandType::DRAWSURFACEWITHSHADOW; static const CommandType Type = CommandType::DRAWSURFACEWITHSHADOW;
@ -212,6 +244,15 @@ public:
aDT->DrawFilter(filter, mSourceRect, mDestPoint, mOptions); aDT->DrawFilter(filter, mSourceRect, mDestPoint, mOptions);
} }
void Log(TreeLog& aStream) const override
{
aStream << "[DrawFilter surf=" << mFilter;
aStream << " src=" << mSourceRect;
aStream << " dest=" << mDestPoint;
aStream << " opt=" << mOptions;
aStream << "]";
}
static const bool AffectsSnapshot = true; static const bool AffectsSnapshot = true;
static const CommandType Type = CommandType::DRAWFILTER; static const CommandType Type = CommandType::DRAWFILTER;
@ -241,6 +282,11 @@ public:
aDT->ClearRect(mRect); aDT->ClearRect(mRect);
} }
void Log(TreeLog& aStream) const override
{
aStream << "[ClearRect rect=" << mRect << "]";
}
static const bool AffectsSnapshot = true; static const bool AffectsSnapshot = true;
static const CommandType Type = CommandType::CLEARRECT; static const CommandType Type = CommandType::CLEARRECT;
@ -276,6 +322,14 @@ public:
aDT->CopySurface(mSurface, mSourceRect, IntPoint(uint32_t(dest.x), uint32_t(dest.y))); aDT->CopySurface(mSurface, mSourceRect, IntPoint(uint32_t(dest.x), uint32_t(dest.y)));
} }
void Log(TreeLog& aStream) const override
{
aStream << "[CopySurface surf=" << mSurface;
aStream << " src=" << mSourceRect;
aStream << " dest=" << mDestination;
aStream << "]";
}
static const bool AffectsSnapshot = true; static const bool AffectsSnapshot = true;
static const CommandType Type = CommandType::COPYSURFACE; static const CommandType Type = CommandType::COPYSURFACE;
@ -314,6 +368,14 @@ public:
return true; return true;
} }
void Log(TreeLog& aStream) const override
{
aStream << "[FillRect rect=" << mRect;
aStream << " pattern=" << mPattern.Get();
aStream << " opt=" << mOptions;
aStream << "]";
}
static const bool AffectsSnapshot = true; static const bool AffectsSnapshot = true;
static const CommandType Type = CommandType::FILLRECT; static const CommandType Type = CommandType::FILLRECT;
@ -347,6 +409,14 @@ public:
aDT->StrokeRect(mRect, mPattern, mStrokeOptions, mOptions); aDT->StrokeRect(mRect, mPattern, mStrokeOptions, mOptions);
} }
void Log(TreeLog& aStream) const override
{
aStream << "[StrokeRect rect=" << mRect;
aStream << " pattern=" << mPattern.Get();
aStream << " opt=" << mOptions;
aStream << "]";
}
static const bool AffectsSnapshot = true; static const bool AffectsSnapshot = true;
static const CommandType Type = CommandType::STROKERECT; static const CommandType Type = CommandType::STROKERECT;
@ -382,6 +452,15 @@ public:
aDT->StrokeLine(mStart, mEnd, mPattern, mStrokeOptions, mOptions); aDT->StrokeLine(mStart, mEnd, mPattern, mStrokeOptions, mOptions);
} }
void Log(TreeLog& aStream) const override
{
aStream << "[StrokeLine start=" << mStart;
aStream << " end=" << mEnd;
aStream << " pattern=" << mPattern.Get();
aStream << " opt=" << mOptions;
aStream << "]";
}
static const bool AffectsSnapshot = true; static const bool AffectsSnapshot = true;
static const CommandType Type = CommandType::STROKELINE; static const CommandType Type = CommandType::STROKELINE;
@ -421,6 +500,14 @@ public:
return true; return true;
} }
void Log(TreeLog& aStream) const override
{
aStream << "[FillCommand path=" << mPath;
aStream << " pattern=" << mPattern.Get();
aStream << " opt=" << mOptions;
aStream << "]";
}
static const bool AffectsSnapshot = true; static const bool AffectsSnapshot = true;
static const CommandType Type = CommandType::FILL; static const CommandType Type = CommandType::FILL;
@ -501,6 +588,14 @@ public:
return true; return true;
} }
void Log(TreeLog& aStream) const override
{
aStream << "[Stroke path=" << mPath;
aStream << " pattern=" << mPattern.Get();
aStream << " opt=" << mOptions;
aStream << "]";
}
static const bool AffectsSnapshot = true; static const bool AffectsSnapshot = true;
static const CommandType Type = CommandType::STROKE; static const CommandType Type = CommandType::STROKE;
@ -544,6 +639,15 @@ public:
aDT->FillGlyphs(mFont, buf, mPattern, mOptions); aDT->FillGlyphs(mFont, buf, mPattern, mOptions);
} }
void Log(TreeLog& aStream) const override
{
aStream << "[FillGlyphs font=" << mFont;
aStream << " glyphCount=" << mGlyphs.size();
aStream << " pattern=" << mPattern.Get();
aStream << " opt=" << mOptions;
aStream << "]";
}
static const bool AffectsSnapshot = true; static const bool AffectsSnapshot = true;
static const CommandType Type = CommandType::FILLGLYPHS; static const CommandType Type = CommandType::FILLGLYPHS;
@ -589,6 +693,15 @@ public:
aDT->StrokeGlyphs(mFont, buf, mPattern, mStrokeOptions, mOptions); aDT->StrokeGlyphs(mFont, buf, mPattern, mStrokeOptions, mOptions);
} }
void Log(TreeLog& aStream) const override
{
aStream << "[StrokeGlyphs font=" << mFont;
aStream << " glyphCount=" << mGlyphs.size();
aStream << " pattern=" << mPattern.Get();
aStream << " opt=" << mOptions;
aStream << "]";
}
static const bool AffectsSnapshot = true; static const bool AffectsSnapshot = true;
static const CommandType Type = CommandType::STROKEGLYPHS; static const CommandType Type = CommandType::STROKEGLYPHS;
@ -622,6 +735,14 @@ public:
aDT->Mask(mSource, mMask, mOptions); aDT->Mask(mSource, mMask, mOptions);
} }
void Log(TreeLog& aStream) const override
{
aStream << "[Mask source=" << mSource.Get();
aStream << " mask=" << mMask.Get();
aStream << " opt=" << mOptions;
aStream << "]";
}
static const bool AffectsSnapshot = true; static const bool AffectsSnapshot = true;
static const CommandType Type = CommandType::MASK; static const CommandType Type = CommandType::MASK;
@ -656,6 +777,15 @@ public:
aDT->MaskSurface(mSource, mMask, mOffset, mOptions); aDT->MaskSurface(mSource, mMask, mOffset, mOptions);
} }
void Log(TreeLog& aStream) const override
{
aStream << "[Mask source=" << mSource.Get();
aStream << " mask=" << mMask;
aStream << " offset=" << &mOffset;
aStream << " opt=" << mOptions;
aStream << "]";
}
static const bool AffectsSnapshot = true; static const bool AffectsSnapshot = true;
static const CommandType Type = CommandType::MASKSURFACE; static const CommandType Type = CommandType::MASKSURFACE;
@ -685,6 +815,11 @@ public:
aDT->PushClip(mPath); aDT->PushClip(mPath);
} }
void Log(TreeLog& aStream) const override
{
aStream << "[PushClip path=" << mPath << "]";
}
static const bool AffectsSnapshot = false; static const bool AffectsSnapshot = false;
static const CommandType Type = CommandType::PUSHCLIP; static const CommandType Type = CommandType::PUSHCLIP;
@ -711,6 +846,11 @@ public:
aDT->PushClipRect(mRect); aDT->PushClipRect(mRect);
} }
void Log(TreeLog& aStream) const override
{
aStream << "[PushClipRect rect=" << mRect << "]";
}
static const bool AffectsSnapshot = false; static const bool AffectsSnapshot = false;
static const CommandType Type = CommandType::PUSHCLIPRECT; static const CommandType Type = CommandType::PUSHCLIPRECT;
@ -748,6 +888,17 @@ public:
mMaskTransform, mBounds, mCopyBackground); mMaskTransform, mBounds, mCopyBackground);
} }
void Log(TreeLog& aStream) const override
{
aStream << "[PushLayer opaque=" << mOpaque;
aStream << " opacity=" << mOpacity;
aStream << " mask=" << mMask;
aStream << " maskTransform=" << mMaskTransform;
aStream << " bounds=" << mBounds;
aStream << " copyBackground=" << mCopyBackground;
aStream << "]";
}
static const bool AffectsSnapshot = false; static const bool AffectsSnapshot = false;
static const CommandType Type = CommandType::PUSHLAYER; static const CommandType Type = CommandType::PUSHLAYER;
@ -778,6 +929,11 @@ public:
aDT->PopClip(); aDT->PopClip();
} }
void Log(TreeLog& aStream) const override
{
aStream << "[PopClip]";
}
static const bool AffectsSnapshot = false; static const bool AffectsSnapshot = false;
static const CommandType Type = CommandType::POPCLIP; static const CommandType Type = CommandType::POPCLIP;
}; };
@ -800,6 +956,11 @@ public:
aDT->PopLayer(); aDT->PopLayer();
} }
void Log(TreeLog& aStream) const override
{
aStream << "[PopLayer]";
}
static const bool AffectsSnapshot = true; static const bool AffectsSnapshot = true;
static const CommandType Type = CommandType::POPLAYER; static const CommandType Type = CommandType::POPLAYER;
}; };
@ -828,6 +989,11 @@ public:
} }
} }
void Log(TreeLog& aStream) const override
{
aStream << "[SetTransform transform=" << mTransform << "]";
}
static const bool AffectsSnapshot = false; static const bool AffectsSnapshot = false;
static const CommandType Type = CommandType::SETTRANSFORM; static const CommandType Type = CommandType::SETTRANSFORM;
@ -855,6 +1021,11 @@ public:
aDT->SetPermitSubpixelAA(mPermitSubpixelAA); aDT->SetPermitSubpixelAA(mPermitSubpixelAA);
} }
void Log(TreeLog& aStream) const override
{
aStream << "[SetPermitSubpixelAA permitSubpixelAA=" << mPermitSubpixelAA << "]";
}
static const bool AffectsSnapshot = false; static const bool AffectsSnapshot = false;
static const CommandType Type = CommandType::SETPERMITSUBPIXELAA; static const CommandType Type = CommandType::SETPERMITSUBPIXELAA;
@ -880,6 +1051,11 @@ public:
aDT->Flush(); aDT->Flush();
} }
void Log(TreeLog& aStream) const override
{
aStream << "[Flush]";
}
static const bool AffectsSnapshot = false; static const bool AffectsSnapshot = false;
static const CommandType Type = CommandType::FLUSH; static const CommandType Type = CommandType::FLUSH;
}; };
@ -902,6 +1078,11 @@ public:
aDT->Blur(mBlur); aDT->Blur(mBlur);
} }
void Log(TreeLog& aStream) const override
{
aStream << "[Blur]";
}
static const bool AffectsSnapshot = true; static const bool AffectsSnapshot = true;
static const CommandType Type = CommandType::BLUR; static const CommandType Type = CommandType::BLUR;

Просмотреть файл

@ -443,5 +443,15 @@ DrawTargetCaptureImpl::CreateFilter(FilterType aType)
} }
} }
void
DrawTargetCaptureImpl::Dump()
{
TreeLog output;
output << "DrawTargetCapture(" << (void*)(this) << ")\n";
TreeAutoIndent indent(output);
mCommands.Log(output);
output << "\n";
}
} // namespace gfx } // namespace gfx
} // namespace mozilla } // namespace mozilla

Просмотреть файл

@ -149,6 +149,8 @@ public:
bool ContainsOnlyColoredGlyphs(RefPtr<ScaledFont>& aScaledFont, Color& aColor, std::vector<Glyph>& aGlyphs) override; bool ContainsOnlyColoredGlyphs(RefPtr<ScaledFont>& aScaledFont, Color& aColor, std::vector<Glyph>& aGlyphs) override;
void Dump() override;
protected: protected:
virtual ~DrawTargetCaptureImpl(); virtual ~DrawTargetCaptureImpl();

Просмотреть файл

@ -20,6 +20,7 @@
#if defined(MOZ_WIDGET_ANDROID) #if defined(MOZ_WIDGET_ANDROID)
#include "nsDebug.h" #include "nsDebug.h"
#endif #endif
#include "2D.h"
#include "Point.h" #include "Point.h"
#include "BaseRect.h" #include "BaseRect.h"
#include "Matrix.h" #include "Matrix.h"
@ -357,6 +358,12 @@ public:
} }
return *this; return *this;
} }
Log &operator <<(const Color& aColor) {
if (MOZ_UNLIKELY(LogIt())) {
mMessage << "Color(" << aColor.r << ", " << aColor.g << ", " << aColor.b << ", " << aColor.a << ")";
}
return *this;
}
template <typename T, typename Sub, typename Coord> template <typename T, typename Sub, typename Coord>
Log &operator <<(const BasePoint<T, Sub, Coord>& aPoint) { Log &operator <<(const BasePoint<T, Sub, Coord>& aPoint) {
if (MOZ_UNLIKELY(LogIt())) { if (MOZ_UNLIKELY(LogIt())) {
@ -394,6 +401,205 @@ public:
return *this; return *this;
} }
Log &operator<<(const SourceSurface* aSurface) {
if (MOZ_UNLIKELY(LogIt())) {
mMessage << "SourceSurface(" << (void*)(aSurface) << ")";
}
return *this;
}
Log &operator<<(const Path* aPath) {
if (MOZ_UNLIKELY(LogIt())) {
mMessage << "Path(" << (void*)(aPath) << ")";
}
return *this;
}
Log &operator<<(const Pattern* aPattern) {
if (MOZ_UNLIKELY(LogIt())) {
mMessage << "Pattern(" << (void*)(aPattern) << ")";
}
return *this;
}
Log &operator<<(const ScaledFont* aFont) {
if (MOZ_UNLIKELY(LogIt())) {
mMessage << "ScaledFont(" << (void*)(aFont) << ")";
}
return *this;
}
Log &operator<<(const FilterNode* aFilter) {
if (MOZ_UNLIKELY(LogIt())) {
mMessage << "FilterNode(" << (void*)(aFilter) << ")";
}
return *this;
}
Log &operator<<(const DrawOptions& aOptions) {
if (MOZ_UNLIKELY(LogIt())) {
mMessage << "DrawOptions(" << aOptions.mAlpha << ", ";
(*this) << aOptions.mCompositionOp;
mMessage << ", ";
(*this) << aOptions.mAntialiasMode;
mMessage << ")";
}
return *this;
}
Log &operator<<(const DrawSurfaceOptions& aOptions) {
if (MOZ_UNLIKELY(LogIt())) {
mMessage << "DrawSurfaceOptions(";
(*this) << aOptions.mSamplingFilter;
mMessage << ", ";
(*this) << aOptions.mSamplingBounds;
mMessage << ")";
}
return *this;
}
Log& operator<<(SamplingBounds aBounds) {
if (MOZ_UNLIKELY(LogIt())) {
switch(aBounds) {
case SamplingBounds::UNBOUNDED:
mMessage << "SamplingBounds::UNBOUNDED";
break;
case SamplingBounds::BOUNDED:
mMessage << "SamplingBounds::BOUNDED";
break;
default:
mMessage << "Invalid SamplingBounds (" << (int)aBounds << ")";
break;
}
}
return *this;
}
Log& operator<<(SamplingFilter aFilter) {
if (MOZ_UNLIKELY(LogIt())) {
switch(aFilter) {
case SamplingFilter::GOOD:
mMessage << "SamplingFilter::GOOD";
break;
case SamplingFilter::LINEAR:
mMessage << "SamplingFilter::LINEAR";
break;
case SamplingFilter::POINT:
mMessage << "SamplingFilter::POINT";
break;
default:
mMessage << "Invalid SamplingFilter (" << (int)aFilter << ")";
break;
}
}
return *this;
}
Log& operator<<(AntialiasMode aMode) {
if (MOZ_UNLIKELY(LogIt())) {
switch(aMode) {
case AntialiasMode::NONE:
mMessage << "AntialiasMode::NONE";
break;
case AntialiasMode::GRAY:
mMessage << "AntialiasMode::GRAY";
break;
case AntialiasMode::SUBPIXEL:
mMessage << "AntialiasMode::SUBPIXEL";
break;
case AntialiasMode::DEFAULT:
mMessage << "AntialiasMode::DEFAULT";
break;
default:
mMessage << "Invalid AntialiasMode (" << (int)aMode << ")";
break;
}
}
return *this;
}
Log& operator<<(CompositionOp aOp) {
if (MOZ_UNLIKELY(LogIt())) {
switch(aOp) {
case CompositionOp::OP_OVER:
mMessage << "CompositionOp::OP_OVER";
break;
case CompositionOp::OP_ADD:
mMessage << "CompositionOp::OP_ADD";
break;
case CompositionOp::OP_ATOP:
mMessage << "CompositionOp::OP_ATOP";
break;
case CompositionOp::OP_OUT:
mMessage << "CompositionOp::OP_OUT";
break;
case CompositionOp::OP_IN:
mMessage << "CompositionOp::OP_IN";
break;
case CompositionOp::OP_SOURCE:
mMessage << "CompositionOp::OP_SOURCE";
break;
case CompositionOp::OP_DEST_IN:
mMessage << "CompositionOp::OP_DEST_IN";
break;
case CompositionOp::OP_DEST_OUT:
mMessage << "CompositionOp::OP_DEST_OUT";
break;
case CompositionOp::OP_DEST_OVER:
mMessage << "CompositionOp::OP_DEST_OVER";
break;
case CompositionOp::OP_DEST_ATOP:
mMessage << "CompositionOp::OP_DEST_ATOP";
break;
case CompositionOp::OP_XOR:
mMessage << "CompositionOp::OP_XOR";
break;
case CompositionOp::OP_MULTIPLY:
mMessage << "CompositionOp::OP_MULTIPLY";
break;
case CompositionOp::OP_SCREEN:
mMessage << "CompositionOp::OP_SCREEN";
break;
case CompositionOp::OP_OVERLAY:
mMessage << "CompositionOp::OP_OVERLAY";
break;
case CompositionOp::OP_DARKEN:
mMessage << "CompositionOp::OP_DARKEN";
break;
case CompositionOp::OP_LIGHTEN:
mMessage << "CompositionOp::OP_LIGHTEN";
break;
case CompositionOp::OP_COLOR_DODGE:
mMessage << "CompositionOp::OP_COLOR_DODGE";
break;
case CompositionOp::OP_COLOR_BURN:
mMessage << "CompositionOp::OP_COLOR_BURN";
break;
case CompositionOp::OP_HARD_LIGHT:
mMessage << "CompositionOp::OP_HARD_LIGHT";
break;
case CompositionOp::OP_SOFT_LIGHT:
mMessage << "CompositionOp::OP_SOFT_LIGHT";
break;
case CompositionOp::OP_DIFFERENCE:
mMessage << "CompositionOp::OP_DIFFERENCE";
break;
case CompositionOp::OP_EXCLUSION:
mMessage << "CompositionOp::OP_EXCLUSION";
break;
case CompositionOp::OP_HUE:
mMessage << "CompositionOp::OP_HUE";
break;
case CompositionOp::OP_SATURATION:
mMessage << "CompositionOp::OP_SATURATION";
break;
case CompositionOp::OP_COLOR:
mMessage << "CompositionOp::OP_COLOR";
break;
case CompositionOp::OP_LUMINOSITY:
mMessage << "CompositionOp::OP_LUMINOSITY";
break;
case CompositionOp::OP_COUNT:
mMessage << "CompositionOp::OP_COUNT";
break;
default:
mMessage << "Invalid CompositionOp (" << (int)aOp << ")";
break;
}
}
return *this;
}
Log& operator<<(SurfaceFormat aFormat) { Log& operator<<(SurfaceFormat aFormat) {
if (MOZ_UNLIKELY(LogIt())) { if (MOZ_UNLIKELY(LogIt())) {
switch(aFormat) { switch(aFormat) {
@ -637,7 +843,10 @@ public:
return *this; return *this;
} }
if (mStartOfLine) { if (mStartOfLine) {
mLog << '[' << mPrefix << "] " << std::string(mDepth * INDENT_PER_LEVEL, ' '); if (!mPrefix.empty()) {
mLog << '[' << mPrefix << "] ";
}
mLog << std::string(mDepth * INDENT_PER_LEVEL, ' ');
mStartOfLine = false; mStartOfLine = false;
} }
mLog << aObject; mLog << aObject;

Просмотреть файл

@ -389,6 +389,7 @@ opaque-types = [
"mozilla::dom::Optional", "mozilla::dom::Optional",
"mozilla::dom::OwningNodeOrString_Value", "mozilla::dom::OwningNodeOrString_Value",
"mozilla::dom::Nullable", "mozilla::dom::Nullable",
"mozilla::external::AtomicRefCounted",
"RefPtr_Proxy", "RefPtr_Proxy",
"RefPtr_Proxy_member_function", "RefPtr_Proxy_member_function",
"nsAutoPtr_Proxy", "nsAutoPtr_Proxy",