зеркало из https://github.com/mozilla/gecko-dev.git
Add calls to reset and print the stopwatch maintained by the styleset for tracking style resolution time.
This commit is contained in:
Родитель
3685df8b69
Коммит
ba965a8d79
|
@ -1147,7 +1147,15 @@ PresShell::EndUpdate(nsIDocument *aDocument)
|
|||
|
||||
NS_IMETHODIMP
|
||||
PresShell::BeginLoad(nsIDocument *aDocument)
|
||||
{
|
||||
{
|
||||
#ifdef RAPTOR_PERF_METRICS
|
||||
// Reset style resolution stopwatch maintained by style set
|
||||
nsresult rv = NS_OK;
|
||||
nsCOMPtr<nsITimeRecorder> watch = do_QueryInterface(mStyleSet, &rv);
|
||||
if (NS_SUCCEEDED(rv) && watch) {
|
||||
watch->ResetTimer(NS_TIMER_STYLE_RESOLUTION);
|
||||
}
|
||||
#endif
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -1155,13 +1163,20 @@ NS_IMETHODIMP
|
|||
PresShell::EndLoad(nsIDocument *aDocument)
|
||||
{
|
||||
#ifdef RAPTOR_PERF_METRICS
|
||||
// NRA Dump reflow, style resolution and frame construction times here.
|
||||
// Dump reflow, style resolution and frame construction times here.
|
||||
printf("Reflow time: ");
|
||||
mReflowWatch.Print();
|
||||
printf("\n");
|
||||
printf("Frame construction plus style resolution time: ");
|
||||
mFrameCreationWatch.Print();
|
||||
printf("\n");
|
||||
|
||||
// Print style resolution stopwatch maintained by style set
|
||||
nsresult rv = NS_OK;
|
||||
nsCOMPtr<nsITimeRecorder> watch = do_QueryInterface(mStyleSet, &rv);
|
||||
if (NS_SUCCEEDED(rv) && watch) {
|
||||
watch->PrintTimer(NS_TIMER_STYLE_RESOLUTION);
|
||||
}
|
||||
#endif
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
|
@ -1147,7 +1147,15 @@ PresShell::EndUpdate(nsIDocument *aDocument)
|
|||
|
||||
NS_IMETHODIMP
|
||||
PresShell::BeginLoad(nsIDocument *aDocument)
|
||||
{
|
||||
{
|
||||
#ifdef RAPTOR_PERF_METRICS
|
||||
// Reset style resolution stopwatch maintained by style set
|
||||
nsresult rv = NS_OK;
|
||||
nsCOMPtr<nsITimeRecorder> watch = do_QueryInterface(mStyleSet, &rv);
|
||||
if (NS_SUCCEEDED(rv) && watch) {
|
||||
watch->ResetTimer(NS_TIMER_STYLE_RESOLUTION);
|
||||
}
|
||||
#endif
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -1155,13 +1163,20 @@ NS_IMETHODIMP
|
|||
PresShell::EndLoad(nsIDocument *aDocument)
|
||||
{
|
||||
#ifdef RAPTOR_PERF_METRICS
|
||||
// NRA Dump reflow, style resolution and frame construction times here.
|
||||
// Dump reflow, style resolution and frame construction times here.
|
||||
printf("Reflow time: ");
|
||||
mReflowWatch.Print();
|
||||
printf("\n");
|
||||
printf("Frame construction plus style resolution time: ");
|
||||
mFrameCreationWatch.Print();
|
||||
printf("\n");
|
||||
|
||||
// Print style resolution stopwatch maintained by style set
|
||||
nsresult rv = NS_OK;
|
||||
nsCOMPtr<nsITimeRecorder> watch = do_QueryInterface(mStyleSet, &rv);
|
||||
if (NS_SUCCEEDED(rv) && watch) {
|
||||
watch->PrintTimer(NS_TIMER_STYLE_RESOLUTION);
|
||||
}
|
||||
#endif
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче