Bug 753058. Add SAMPLE_LABELS for shadows. r=ehsan

This will make this things more obvious on the profile.
This commit is contained in:
Jeff Muizelaar 2012-05-08 18:10:02 -04:00
parent 32dd55e67c
commit 7644fad8f2
2 changed files with 3 additions and 0 deletions

View File

@ -1632,6 +1632,7 @@ nsDisplayBoxShadowOuter::Paint(nsDisplayListBuilder* aBuilder,
nsAutoTArray<nsRect,10> rects;
ComputeDisjointRectangles(mVisibleRegion, &rects);
SAMPLE_LABEL("nsDisplayBoxShadowOuter", "Paint");
for (PRUint32 i = 0; i < rects.Length(); ++i) {
aCtx->PushState();
aCtx->IntersectClip(rects[i]);
@ -1684,6 +1685,7 @@ nsDisplayBoxShadowInner::Paint(nsDisplayListBuilder* aBuilder,
nsAutoTArray<nsRect,10> rects;
ComputeDisjointRectangles(mVisibleRegion, &rects);
SAMPLE_LABEL("nsDisplayBoxShadowInner", "Paint");
for (PRUint32 i = 0; i < rects.Length(); ++i) {
aCtx->PushState();
aCtx->IntersectClip(rects[i]);

View File

@ -5089,6 +5089,7 @@ nsTextFrame::PaintOneShadow(PRUint32 aOffset, PRUint32 aLength,
const nsCharClipDisplayItem::ClipEdges& aClipEdges,
nscoord aLeftSideOffset)
{
SAMPLE_LABEL("nsTextFrame", "PaintOneShadow");
gfxPoint shadowOffset(aShadowDetails->mXOffset, aShadowDetails->mYOffset);
nscoord blurRadius = NS_MAX(aShadowDetails->mRadius, 0);