mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1104266 - Avoid needless temporary nsACString. r=mattwoodrow
This commit is contained in:
parent
9bc95683df
commit
d7b95978c4
@ -1949,11 +1949,13 @@ nsDisplaySolidColor::Paint(nsDisplayListBuilder* aBuilder,
|
||||
|
||||
#ifdef MOZ_DUMP_PAINTING
|
||||
void
|
||||
nsDisplaySolidColor::WriteDebugInfo(nsACString& aTo)
|
||||
nsDisplaySolidColor::WriteDebugInfo(std::stringstream& aStream)
|
||||
{
|
||||
aTo += nsPrintfCString(" (rgba %d,%d,%d,%d)",
|
||||
NS_GET_R(mColor), NS_GET_G(mColor),
|
||||
NS_GET_B(mColor), NS_GET_A(mColor));
|
||||
aStream << " (rgba "
|
||||
<< (int)NS_GET_R(mColor) << ","
|
||||
<< (int)NS_GET_G(mColor) << ","
|
||||
<< (int)NS_GET_B(mColor) << ","
|
||||
<< (int)NS_GET_A(mColor) << ")";
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -2663,9 +2665,9 @@ nsDisplayThemedBackground::~nsDisplayThemedBackground()
|
||||
|
||||
#ifdef MOZ_DUMP_PAINTING
|
||||
void
|
||||
nsDisplayThemedBackground::WriteDebugInfo(nsACString& aTo)
|
||||
nsDisplayThemedBackground::WriteDebugInfo(std::stringstream& aStream)
|
||||
{
|
||||
aTo += nsPrintfCString(" (themed, appearance:%d)", mAppearance);
|
||||
aStream << " (themed, appearance:" << (int)mAppearance << ")";
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -2868,11 +2870,10 @@ nsDisplayBackgroundColor::HitTest(nsDisplayListBuilder* aBuilder,
|
||||
|
||||
#ifdef MOZ_DUMP_PAINTING
|
||||
void
|
||||
nsDisplayBackgroundColor::WriteDebugInfo(nsACString& aTo)
|
||||
nsDisplayBackgroundColor::WriteDebugInfo(std::stringstream& aStream)
|
||||
{
|
||||
aTo += nsPrintfCString(" (rgba %f,%f,%f,%f)",
|
||||
mColor.r, mColor.g,
|
||||
mColor.b, mColor.a);
|
||||
aStream << " (rgba " << mColor.r << "," << mColor.g << ","
|
||||
<< mColor.b << "," << mColor.a << ")";
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -3678,9 +3679,9 @@ bool nsDisplayOpacity::TryMerge(nsDisplayListBuilder* aBuilder, nsDisplayItem* a
|
||||
|
||||
#ifdef MOZ_DUMP_PAINTING
|
||||
void
|
||||
nsDisplayOpacity::WriteDebugInfo(nsACString& aTo)
|
||||
nsDisplayOpacity::WriteDebugInfo(std::stringstream& aStream)
|
||||
{
|
||||
aTo += nsPrintfCString(" (opacity %f)", mOpacity);
|
||||
aStream << " (opacity " << mOpacity << ")";
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -4443,10 +4444,10 @@ nsDisplayScrollLayer::GetScrollLayerCount()
|
||||
|
||||
#ifdef MOZ_DUMP_PAINTING
|
||||
void
|
||||
nsDisplayScrollLayer::WriteDebugInfo(nsACString& aTo)
|
||||
nsDisplayScrollLayer::WriteDebugInfo(std::stringstream& aStream)
|
||||
{
|
||||
aTo += nsPrintfCString(" (scrollframe %p scrolledframe %p)",
|
||||
mScrollFrame, mScrolledFrame);
|
||||
aStream << " (scrollframe " << mScrollFrame
|
||||
<< " scrolledFrame " << mScrolledFrame << ")";
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -5631,11 +5632,9 @@ bool nsDisplayTransform::UntransformVisibleRect(nsDisplayListBuilder* aBuilder,
|
||||
|
||||
#ifdef MOZ_DUMP_PAINTING
|
||||
void
|
||||
nsDisplayTransform::WriteDebugInfo(nsACString& aTo)
|
||||
nsDisplayTransform::WriteDebugInfo(std::stringstream& aStream)
|
||||
{
|
||||
std::stringstream ss;
|
||||
AppendToString(ss, GetTransform());
|
||||
aTo += ss.str().c_str();
|
||||
AppendToString(aStream, GetTransform());
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -1345,7 +1345,7 @@ public:
|
||||
*/
|
||||
virtual const char* Name() = 0;
|
||||
|
||||
virtual void WriteDebugInfo(nsACString& aTo) {}
|
||||
virtual void WriteDebugInfo(std::stringstream& aStream) {}
|
||||
#endif
|
||||
|
||||
nsDisplayItem* GetAbove() { return mAbove; }
|
||||
@ -2165,7 +2165,7 @@ public:
|
||||
}
|
||||
|
||||
#ifdef MOZ_DUMP_PAINTING
|
||||
virtual void WriteDebugInfo(nsACString& aTo) MOZ_OVERRIDE;
|
||||
virtual void WriteDebugInfo(std::stringstream& aStream) MOZ_OVERRIDE;
|
||||
#endif
|
||||
|
||||
NS_DISPLAY_DECL_NAME("SolidColor", TYPE_SOLID_COLOR)
|
||||
@ -2326,7 +2326,7 @@ public:
|
||||
nsRegion* aInvalidRegion) MOZ_OVERRIDE;
|
||||
|
||||
#ifdef MOZ_DUMP_PAINTING
|
||||
virtual void WriteDebugInfo(nsACString& aTo) MOZ_OVERRIDE;
|
||||
virtual void WriteDebugInfo(std::stringstream& aStream) MOZ_OVERRIDE;
|
||||
#endif
|
||||
protected:
|
||||
nsRect GetBoundsInternal();
|
||||
@ -2389,7 +2389,7 @@ public:
|
||||
|
||||
NS_DISPLAY_DECL_NAME("BackgroundColor", TYPE_BACKGROUND_COLOR)
|
||||
#ifdef MOZ_DUMP_PAINTING
|
||||
virtual void WriteDebugInfo(nsACString& aTo) MOZ_OVERRIDE;
|
||||
virtual void WriteDebugInfo(std::stringstream& aStream) MOZ_OVERRIDE;
|
||||
#endif
|
||||
|
||||
protected:
|
||||
@ -2834,7 +2834,7 @@ public:
|
||||
bool NeedsActiveLayer(nsDisplayListBuilder* aBuilder);
|
||||
NS_DISPLAY_DECL_NAME("Opacity", TYPE_OPACITY)
|
||||
#ifdef MOZ_DUMP_PAINTING
|
||||
virtual void WriteDebugInfo(nsACString& aTo) MOZ_OVERRIDE;
|
||||
virtual void WriteDebugInfo(std::stringstream& aStream) MOZ_OVERRIDE;
|
||||
#endif
|
||||
|
||||
bool CanUseAsyncAnimations(nsDisplayListBuilder* aBuilder) MOZ_OVERRIDE;
|
||||
@ -3132,7 +3132,7 @@ public:
|
||||
virtual nsIFrame* GetScrolledFrame() { return mScrolledFrame; }
|
||||
|
||||
#ifdef MOZ_DUMP_PAINTING
|
||||
virtual void WriteDebugInfo(nsACString& aTo) MOZ_OVERRIDE;
|
||||
virtual void WriteDebugInfo(std::stringstream& aStream) MOZ_OVERRIDE;
|
||||
#endif
|
||||
|
||||
bool IsDisplayPortOpaque() { return mDisplayPortContentsOpaque; }
|
||||
@ -3543,7 +3543,7 @@ public:
|
||||
bool ShouldPrerender(nsDisplayListBuilder* aBuilder);
|
||||
|
||||
#ifdef MOZ_DUMP_PAINTING
|
||||
virtual void WriteDebugInfo(nsACString& aTo) MOZ_OVERRIDE;
|
||||
virtual void WriteDebugInfo(std::stringstream& aStream) MOZ_OVERRIDE;
|
||||
#endif
|
||||
|
||||
private:
|
||||
|
@ -191,9 +191,7 @@ PrintDisplayItemTo(nsDisplayListBuilder* aBuilder, nsDisplayItem* aItem,
|
||||
}
|
||||
|
||||
// Display item specific debug info
|
||||
nsCString itemStr;
|
||||
aItem->WriteDebugInfo(itemStr);
|
||||
aStream << itemStr.get();
|
||||
aItem->WriteDebugInfo(aStream);
|
||||
|
||||
if (aDumpHtml && aItem->Painted()) {
|
||||
aStream << "</a>";
|
||||
|
@ -286,11 +286,13 @@ nsDisplayCanvasBackgroundColor::Paint(nsDisplayListBuilder* aBuilder,
|
||||
|
||||
#ifdef MOZ_DUMP_PAINTING
|
||||
void
|
||||
nsDisplayCanvasBackgroundColor::WriteDebugInfo(nsACString& aTo)
|
||||
nsDisplayCanvasBackgroundColor::WriteDebugInfo(std::stringstream& aStream)
|
||||
{
|
||||
aTo += nsPrintfCString(" (rgba %d,%d,%d,%d)",
|
||||
NS_GET_R(mColor), NS_GET_G(mColor),
|
||||
NS_GET_B(mColor), NS_GET_A(mColor));
|
||||
aStream << " (rgba "
|
||||
<< (int)NS_GET_R(mColor) << ","
|
||||
<< (int)NS_GET_G(mColor) << ","
|
||||
<< (int)NS_GET_B(mColor) << ","
|
||||
<< (int)NS_GET_A(mColor) << ")";
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -214,7 +214,7 @@ public:
|
||||
|
||||
NS_DISPLAY_DECL_NAME("CanvasBackgroundColor", TYPE_CANVAS_BACKGROUND_COLOR)
|
||||
#ifdef MOZ_DUMP_PAINTING
|
||||
virtual void WriteDebugInfo(nsACString& aTo) MOZ_OVERRIDE;
|
||||
virtual void WriteDebugInfo(std::stringstream& aStream) MOZ_OVERRIDE;
|
||||
#endif
|
||||
|
||||
private:
|
||||
|
Loading…
Reference in New Issue
Block a user