зеркало из https://github.com/mozilla/pjs.git
Make nsPresContext implement the nsITimeRecorder interface. This interface is used by the pres shell to tell the pres context to stop the stopwatch that measures time spent in style resolution.
This commit is contained in:
Родитель
70f342ee82
Коммит
04cc0030fb
|
@ -1021,4 +1021,31 @@ nsPresContext::GetEventStateManager(nsIEventStateManager** aManager)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
// nsITimeRecorder implementation
|
||||
|
||||
#ifdef RAPTOR_PERF_METRICS
|
||||
NS_IMETHODIMP
|
||||
nsPresContext::ResetTimer(PRUint32 aTimerID)
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsPresContext::StartTimer(PRUint32 aTimerID)
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsPresContext::StopTimer(PRUint32 aTimerID)
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsPresContext::PrintTimer(PRUint32 aTimerID)
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
#endif
|
|
@ -22,6 +22,10 @@ DEFINES=-D_IMPL_NS_LAYOUT -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
|
||||
|
||||
|
||||
CPPSRCS = \
|
||||
nsCommentNode.cpp \
|
||||
|
|
|
@ -1021,4 +1021,31 @@ nsPresContext::GetEventStateManager(nsIEventStateManager** aManager)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
// nsITimeRecorder implementation
|
||||
|
||||
#ifdef RAPTOR_PERF_METRICS
|
||||
NS_IMETHODIMP
|
||||
nsPresContext::ResetTimer(PRUint32 aTimerID)
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsPresContext::StartTimer(PRUint32 aTimerID)
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsPresContext::StopTimer(PRUint32 aTimerID)
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsPresContext::PrintTimer(PRUint32 aTimerID)
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
#endif
|
|
@ -28,10 +28,18 @@
|
|||
#include "nsIPref.h"
|
||||
#include "nsIURL.h"
|
||||
#include "nsIEventStateManager.h"
|
||||
#ifdef RAPTOR_PERF_METRICS
|
||||
#include "nsITimeRecorder.h"
|
||||
|
||||
#define NS_TIMER_STYLE_RESOLUTION 1
|
||||
#endif
|
||||
|
||||
// Base class for concrete presentation context classes
|
||||
class nsPresContext : public nsIPresContext {
|
||||
class nsPresContext : public nsIPresContext
|
||||
#ifdef RAPTOR_PERF_METRICS
|
||||
, public nsITimeRecorder
|
||||
#endif
|
||||
{
|
||||
public:
|
||||
NS_DECL_AND_IMPL_ZEROING_OPERATOR_NEW
|
||||
|
||||
|
@ -115,6 +123,10 @@ public:
|
|||
NS_IMETHOD GetDeviceContext(nsIDeviceContext** aResult) const;
|
||||
NS_IMETHOD GetEventStateManager(nsIEventStateManager** aManager);
|
||||
|
||||
#ifdef RAPTOR_PERF_METRICS
|
||||
NS_DECL_NSITIMERECORDER
|
||||
#endif
|
||||
|
||||
protected:
|
||||
nsPresContext();
|
||||
virtual ~nsPresContext();
|
||||
|
|
Загрузка…
Ссылка в новой задаче