Start of instrumentation of the presshell to calculate timing data for the reflow process.

This commit is contained in:
nisheeth%netscape.com 1999-09-15 00:43:53 +00:00
Родитель 8130ca728b
Коммит 313baf741f
3 изменённых файлов: 23 добавлений и 2 удалений

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

@ -63,6 +63,7 @@
#include "nsIFrameManager.h"
#include "nsISupportsPrimitives.h"
#include "nsILayoutHistoryState.h"
#include "stopwatch.h"
// Drag & Drop, Clipboard
#include "nsWidgetsCID.h"
@ -305,6 +306,12 @@ private:
nsIFrame* GetCurrentEventFrame();
void PushCurrentEventFrame();
void PopCurrentEventFrame();
#ifdef RAPTOR_PERF_METRICS
Stopwatch mReflowWatch; // Used for measuring time spent in reflow
Stopwatch mFrameCreationWatch; // Used for measuring time spent in frame creation
#endif
};
#ifdef NS_DEBUG
@ -833,6 +840,7 @@ PresShell::InitialReflow(nscoord aWidth, nscoord aHeight)
}
if (nsnull != mRootFrame) {
NS_RESET_AND_START_STOPWATCH(mReflowWatch)
// Kick off a top-down reflow
NS_FRAME_LOG(NS_FRAME_TRACE_CALLS,
("enter nsPresShell::InitialReflow: %d,%d", aWidth, aHeight));
@ -870,6 +878,7 @@ PresShell::InitialReflow(nscoord aWidth, nscoord aHeight)
}
NS_IF_RELEASE(rcx);
NS_FRAME_LOG(NS_FRAME_TRACE_CALLS, ("exit nsPresShell::InitialReflow"));
NS_STOP_STOPWATCH(mReflowWatch)
}
ExitReflowLock();

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

@ -24,6 +24,9 @@ DEFINES=-D_IMPL_NS_HTML -DWIN32_LEAN_AND_MEAN
!if defined(XP_NEW_SELECTION)
DEFINES = $(DEFINES) -DXP_NEW_SELECTION
!endif
!if defined(MOZ_PERF)
DEFINES = $(DEFINES) -DRAPTOR_PERF_METRICS
!endif
EXPORTS = \
nsIHTMLContent.h \

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

@ -63,6 +63,7 @@
#include "nsIFrameManager.h"
#include "nsISupportsPrimitives.h"
#include "nsILayoutHistoryState.h"
#include "stopwatch.h"
// Drag & Drop, Clipboard
#include "nsWidgetsCID.h"
@ -305,6 +306,12 @@ private:
nsIFrame* GetCurrentEventFrame();
void PushCurrentEventFrame();
void PopCurrentEventFrame();
#ifdef RAPTOR_PERF_METRICS
Stopwatch mReflowWatch; // Used for measuring time spent in reflow
Stopwatch mFrameCreationWatch; // Used for measuring time spent in frame creation
#endif
};
#ifdef NS_DEBUG
@ -833,6 +840,7 @@ PresShell::InitialReflow(nscoord aWidth, nscoord aHeight)
}
if (nsnull != mRootFrame) {
NS_RESET_AND_START_STOPWATCH(mReflowWatch)
// Kick off a top-down reflow
NS_FRAME_LOG(NS_FRAME_TRACE_CALLS,
("enter nsPresShell::InitialReflow: %d,%d", aWidth, aHeight));
@ -870,6 +878,7 @@ PresShell::InitialReflow(nscoord aWidth, nscoord aHeight)
}
NS_IF_RELEASE(rcx);
NS_FRAME_LOG(NS_FRAME_TRACE_CALLS, ("exit nsPresShell::InitialReflow"));
NS_STOP_STOPWATCH(mReflowWatch)
}
ExitReflowLock();