mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-05 12:05:22 +00:00
Bug 745864. Add SAMPLE_LABELs to layout code. r=roc, a=joe
--HG-- extra : rebase_source : d826780c34692d333442b6bf563791b53bf3aa3d
This commit is contained in:
parent
d997f288c1
commit
aca6f7c82d
@ -1432,6 +1432,7 @@ void
|
|||||||
ContainerState::ProcessDisplayItems(const nsDisplayList& aList,
|
ContainerState::ProcessDisplayItems(const nsDisplayList& aList,
|
||||||
FrameLayerBuilder::Clip& aClip)
|
FrameLayerBuilder::Clip& aClip)
|
||||||
{
|
{
|
||||||
|
SAMPLE_LABEL("ContainerState", "ProcessDisplayItems");
|
||||||
for (nsDisplayItem* item = aList.GetBottom(); item; item = item->GetAbove()) {
|
for (nsDisplayItem* item = aList.GetBottom(); item; item = item->GetAbove()) {
|
||||||
nsDisplayItem::Type type = item->GetType();
|
nsDisplayItem::Type type = item->GetType();
|
||||||
if (type == nsDisplayItem::TYPE_CLIP ||
|
if (type == nsDisplayItem::TYPE_CLIP ||
|
||||||
|
@ -82,7 +82,7 @@
|
|||||||
#include "nsSVGEffects.h"
|
#include "nsSVGEffects.h"
|
||||||
#include "nsSVGIntegrationUtils.h"
|
#include "nsSVGIntegrationUtils.h"
|
||||||
#include "gfxDrawable.h"
|
#include "gfxDrawable.h"
|
||||||
|
#include "sampler.h"
|
||||||
#include "nsCSSRenderingBorders.h"
|
#include "nsCSSRenderingBorders.h"
|
||||||
|
|
||||||
using namespace mozilla;
|
using namespace mozilla;
|
||||||
@ -501,6 +501,7 @@ nsCSSRendering::PaintBorder(nsPresContext* aPresContext,
|
|||||||
nsStyleContext* aStyleContext,
|
nsStyleContext* aStyleContext,
|
||||||
PRIntn aSkipSides)
|
PRIntn aSkipSides)
|
||||||
{
|
{
|
||||||
|
SAMPLE_LABEL("nsCSSRendering", "PaintBorder");
|
||||||
nsStyleContext *styleIfVisited = aStyleContext->GetStyleIfVisited();
|
nsStyleContext *styleIfVisited = aStyleContext->GetStyleIfVisited();
|
||||||
const nsStyleBorder *styleBorder = aStyleContext->GetStyleBorder();
|
const nsStyleBorder *styleBorder = aStyleContext->GetStyleBorder();
|
||||||
// Don't check RelevantLinkVisited here, since we want to take the
|
// Don't check RelevantLinkVisited here, since we want to take the
|
||||||
@ -1458,6 +1459,7 @@ nsCSSRendering::PaintBackground(nsPresContext* aPresContext,
|
|||||||
PRUint32 aFlags,
|
PRUint32 aFlags,
|
||||||
nsRect* aBGClipRect)
|
nsRect* aBGClipRect)
|
||||||
{
|
{
|
||||||
|
SAMPLE_LABEL("nsCSSRendering", "PaintBackground");
|
||||||
NS_PRECONDITION(aForFrame,
|
NS_PRECONDITION(aForFrame,
|
||||||
"Frame is expected to be provided to PaintBackground");
|
"Frame is expected to be provided to PaintBackground");
|
||||||
|
|
||||||
@ -1966,6 +1968,7 @@ nsCSSRendering::PaintGradient(nsPresContext* aPresContext,
|
|||||||
const nsRect& aOneCellArea,
|
const nsRect& aOneCellArea,
|
||||||
const nsRect& aFillArea)
|
const nsRect& aFillArea)
|
||||||
{
|
{
|
||||||
|
SAMPLE_LABEL("nsCSSRendering", "PaintGradient");
|
||||||
if (aOneCellArea.IsEmpty())
|
if (aOneCellArea.IsEmpty())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -62,6 +62,7 @@
|
|||||||
#include "nsLayoutUtils.h"
|
#include "nsLayoutUtils.h"
|
||||||
#include "nsINameSpaceManager.h"
|
#include "nsINameSpaceManager.h"
|
||||||
#include "nsBlockFrame.h"
|
#include "nsBlockFrame.h"
|
||||||
|
#include "sampler.h"
|
||||||
|
|
||||||
#include "gfxContext.h"
|
#include "gfxContext.h"
|
||||||
|
|
||||||
@ -1570,6 +1571,7 @@ nsCSSBorderRenderer::DrawBorders()
|
|||||||
DrawBorderSides(SIDE_BITS_ALL);
|
DrawBorderSides(SIDE_BITS_ALL);
|
||||||
SN("---------------- (1)");
|
SN("---------------- (1)");
|
||||||
} else {
|
} else {
|
||||||
|
SAMPLE_LABEL("nsCSSBorderRenderer", "DrawBorders::multipass");
|
||||||
/* We have more than one pass to go. Draw the corners separately from the sides. */
|
/* We have more than one pass to go. Draw the corners separately from the sides. */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -66,6 +66,7 @@
|
|||||||
#include "nsViewportFrame.h"
|
#include "nsViewportFrame.h"
|
||||||
#include "nsSVGEffects.h"
|
#include "nsSVGEffects.h"
|
||||||
#include "nsSVGClipPathFrame.h"
|
#include "nsSVGClipPathFrame.h"
|
||||||
|
#include "sampler.h"
|
||||||
|
|
||||||
#include "mozilla/StandardInteger.h"
|
#include "mozilla/StandardInteger.h"
|
||||||
|
|
||||||
@ -431,6 +432,7 @@ nsDisplayList::GetBounds(nsDisplayListBuilder* aBuilder) const {
|
|||||||
bool
|
bool
|
||||||
nsDisplayList::ComputeVisibilityForRoot(nsDisplayListBuilder* aBuilder,
|
nsDisplayList::ComputeVisibilityForRoot(nsDisplayListBuilder* aBuilder,
|
||||||
nsRegion* aVisibleRegion) {
|
nsRegion* aVisibleRegion) {
|
||||||
|
SAMPLE_LABEL("nsDisplayList", "ComputeVisibilityForRoot");
|
||||||
nsRegion r;
|
nsRegion r;
|
||||||
r.And(*aVisibleRegion, GetBounds(aBuilder));
|
r.And(*aVisibleRegion, GetBounds(aBuilder));
|
||||||
return ComputeVisibilityForSublist(aBuilder, aVisibleRegion, r.GetBounds(), r.GetBounds());
|
return ComputeVisibilityForSublist(aBuilder, aVisibleRegion, r.GetBounds(), r.GetBounds());
|
||||||
@ -549,6 +551,7 @@ nsDisplayList::ComputeVisibilityForSublist(nsDisplayListBuilder* aBuilder,
|
|||||||
void nsDisplayList::PaintRoot(nsDisplayListBuilder* aBuilder,
|
void nsDisplayList::PaintRoot(nsDisplayListBuilder* aBuilder,
|
||||||
nsRenderingContext* aCtx,
|
nsRenderingContext* aCtx,
|
||||||
PRUint32 aFlags) const {
|
PRUint32 aFlags) const {
|
||||||
|
SAMPLE_LABEL("nsDisplayList", "PaintRoot");
|
||||||
PaintForFrame(aBuilder, aCtx, aBuilder->ReferenceFrame(), aFlags);
|
PaintForFrame(aBuilder, aCtx, aBuilder->ReferenceFrame(), aFlags);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1406,6 +1406,7 @@ nsLayoutUtils::GetFrameForPoint(nsIFrame* aFrame, nsPoint aPt,
|
|||||||
bool aShouldIgnoreSuppression,
|
bool aShouldIgnoreSuppression,
|
||||||
bool aIgnoreRootScrollFrame)
|
bool aIgnoreRootScrollFrame)
|
||||||
{
|
{
|
||||||
|
SAMPLE_LABEL("nsLayoutUtils", "GetFrameForPoint");
|
||||||
nsresult rv;
|
nsresult rv;
|
||||||
nsAutoTArray<nsIFrame*,8> outFrames;
|
nsAutoTArray<nsIFrame*,8> outFrames;
|
||||||
rv = GetFramesForArea(aFrame, nsRect(aPt, nsSize(1, 1)), outFrames,
|
rv = GetFramesForArea(aFrame, nsRect(aPt, nsSize(1, 1)), outFrames,
|
||||||
@ -1420,6 +1421,7 @@ nsLayoutUtils::GetFramesForArea(nsIFrame* aFrame, const nsRect& aRect,
|
|||||||
bool aShouldIgnoreSuppression,
|
bool aShouldIgnoreSuppression,
|
||||||
bool aIgnoreRootScrollFrame)
|
bool aIgnoreRootScrollFrame)
|
||||||
{
|
{
|
||||||
|
SAMPLE_LABEL("nsLayoutUtils","GetFramesForArea");
|
||||||
nsDisplayListBuilder builder(aFrame, nsDisplayListBuilder::EVENT_DELIVERY,
|
nsDisplayListBuilder builder(aFrame, nsDisplayListBuilder::EVENT_DELIVERY,
|
||||||
false);
|
false);
|
||||||
nsDisplayList list;
|
nsDisplayList list;
|
||||||
@ -1560,6 +1562,7 @@ nsLayoutUtils::PaintFrame(nsRenderingContext* aRenderingContext, nsIFrame* aFram
|
|||||||
const nsRegion& aDirtyRegion, nscolor aBackstop,
|
const nsRegion& aDirtyRegion, nscolor aBackstop,
|
||||||
PRUint32 aFlags)
|
PRUint32 aFlags)
|
||||||
{
|
{
|
||||||
|
SAMPLE_LABEL("nsLayoutUtils","PaintFrame");
|
||||||
if (aFlags & PAINT_WIDGET_LAYERS) {
|
if (aFlags & PAINT_WIDGET_LAYERS) {
|
||||||
nsIView* view = aFrame->GetView();
|
nsIView* view = aFrame->GetView();
|
||||||
if (!(view && view->GetWidget() && GetDisplayRootFrame(aFrame) == aFrame)) {
|
if (!(view && view->GetWidget() && GetDisplayRootFrame(aFrame) == aFrame)) {
|
||||||
@ -1666,9 +1669,10 @@ nsLayoutUtils::PaintFrame(nsRenderingContext* aRenderingContext, nsIFrame* aFram
|
|||||||
|
|
||||||
nsRect dirtyRect = visibleRegion.GetBounds();
|
nsRect dirtyRect = visibleRegion.GetBounds();
|
||||||
builder.EnterPresShell(aFrame, dirtyRect);
|
builder.EnterPresShell(aFrame, dirtyRect);
|
||||||
|
{
|
||||||
|
SAMPLE_LABEL("nsLayoutUtils","PaintFrame::BuildDisplayList");
|
||||||
rv = aFrame->BuildDisplayListForStackingContext(&builder, dirtyRect, &list);
|
rv = aFrame->BuildDisplayListForStackingContext(&builder, dirtyRect, &list);
|
||||||
|
}
|
||||||
const bool paintAllContinuations = aFlags & PAINT_ALL_CONTINUATIONS;
|
const bool paintAllContinuations = aFlags & PAINT_ALL_CONTINUATIONS;
|
||||||
NS_ASSERTION(!paintAllContinuations || !aFrame->GetPrevContinuation(),
|
NS_ASSERTION(!paintAllContinuations || !aFrame->GetPrevContinuation(),
|
||||||
"If painting all continuations, the frame must be "
|
"If painting all continuations, the frame must be "
|
||||||
@ -1689,6 +1693,7 @@ nsLayoutUtils::PaintFrame(nsRenderingContext* aRenderingContext, nsIFrame* aFram
|
|||||||
nsIFrame* page = aFrame;
|
nsIFrame* page = aFrame;
|
||||||
nscoord y = aFrame->GetSize().height;
|
nscoord y = aFrame->GetSize().height;
|
||||||
while ((page = GetNextPage(page)) != nsnull) {
|
while ((page = GetNextPage(page)) != nsnull) {
|
||||||
|
SAMPLE_LABEL("nsLayoutUtils","PaintFrame::BuildDisplayListForExtraPage");
|
||||||
rv = BuildDisplayListForExtraPage(&builder, page, y, &list);
|
rv = BuildDisplayListForExtraPage(&builder, page, y, &list);
|
||||||
if (NS_FAILED(rv))
|
if (NS_FAILED(rv))
|
||||||
break;
|
break;
|
||||||
@ -1700,6 +1705,7 @@ nsLayoutUtils::PaintFrame(nsRenderingContext* aRenderingContext, nsIFrame* aFram
|
|||||||
nsIFrame* currentFrame = aFrame;
|
nsIFrame* currentFrame = aFrame;
|
||||||
while (NS_SUCCEEDED(rv) &&
|
while (NS_SUCCEEDED(rv) &&
|
||||||
(currentFrame = currentFrame->GetNextContinuation()) != nsnull) {
|
(currentFrame = currentFrame->GetNextContinuation()) != nsnull) {
|
||||||
|
SAMPLE_LABEL("nsLayoutUtils","PaintFrame::ContinuationsBuildDisplayList");
|
||||||
nsRect frameDirty = dirtyRect - builder.ToReferenceFrame(currentFrame);
|
nsRect frameDirty = dirtyRect - builder.ToReferenceFrame(currentFrame);
|
||||||
rv = currentFrame->BuildDisplayListForStackingContext(&builder,
|
rv = currentFrame->BuildDisplayListForStackingContext(&builder,
|
||||||
frameDirty, &list);
|
frameDirty, &list);
|
||||||
|
@ -118,6 +118,8 @@
|
|||||||
#include "mozilla/Util.h" // for DebugOnly
|
#include "mozilla/Util.h" // for DebugOnly
|
||||||
#include "mozilla/LookAndFeel.h"
|
#include "mozilla/LookAndFeel.h"
|
||||||
|
|
||||||
|
#include "sampler.h"
|
||||||
|
|
||||||
#ifdef NS_DEBUG
|
#ifdef NS_DEBUG
|
||||||
#undef NOISY_BLINK
|
#undef NOISY_BLINK
|
||||||
#undef NOISY_REFLOW
|
#undef NOISY_REFLOW
|
||||||
@ -4417,6 +4419,7 @@ public:
|
|||||||
void
|
void
|
||||||
nsDisplayText::Paint(nsDisplayListBuilder* aBuilder,
|
nsDisplayText::Paint(nsDisplayListBuilder* aBuilder,
|
||||||
nsRenderingContext* aCtx) {
|
nsRenderingContext* aCtx) {
|
||||||
|
SAMPLE_LABEL("nsDisplayText", "Paint");
|
||||||
// Add 1 pixel of dirty area around mVisibleRect to allow us to paint
|
// Add 1 pixel of dirty area around mVisibleRect to allow us to paint
|
||||||
// antialiased pixels beyond the measured text extents.
|
// antialiased pixels beyond the measured text extents.
|
||||||
// This is temporary until we do this in the actual calculation of text extents.
|
// This is temporary until we do this in the actual calculation of text extents.
|
||||||
|
@ -49,6 +49,7 @@
|
|||||||
#include "FrameLayerBuilder.h"
|
#include "FrameLayerBuilder.h"
|
||||||
#include "nsSubDocumentFrame.h"
|
#include "nsSubDocumentFrame.h"
|
||||||
#include "nsAbsoluteContainingBlock.h"
|
#include "nsAbsoluteContainingBlock.h"
|
||||||
|
#include "sampler.h"
|
||||||
|
|
||||||
using namespace mozilla;
|
using namespace mozilla;
|
||||||
|
|
||||||
@ -91,6 +92,7 @@ ViewportFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||||||
const nsRect& aDirtyRect,
|
const nsRect& aDirtyRect,
|
||||||
const nsDisplayListSet& aLists)
|
const nsDisplayListSet& aLists)
|
||||||
{
|
{
|
||||||
|
SAMPLE_LABEL("ViewportFrame", "BuildDisplayList");
|
||||||
nsIFrame* kid = mFrames.FirstChild();
|
nsIFrame* kid = mFrames.FirstChild();
|
||||||
if (!kid)
|
if (!kid)
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
|
Loading…
Reference in New Issue
Block a user