зеркало из https://github.com/mozilla/pjs.git
Improve RenderTrace. r=debug
--HG-- extra : rebase_source : a01b6e678bca01848fe124b839c0e5433866fa58
This commit is contained in:
Родитель
9ee6103a9f
Коммит
fdc9fcd883
|
@ -97,6 +97,20 @@ void RenderTraceInvalidateEnd(Layer *aLayer, const char *aColor) {
|
|||
RenderTraceInvalidateStart(aLayer, aColor, nsIntRect());
|
||||
}
|
||||
|
||||
void renderTraceEventStart(const char *aComment, const char *aColor) {
|
||||
printf_stderr("%s RENDERTRACE %u fillrect #%s 0 0 10 10\n",
|
||||
aComment, (int)PR_IntervalNow(), aColor);
|
||||
}
|
||||
|
||||
void renderTraceEventEnd(const char *aComment, const char *aColor) {
|
||||
printf_stderr("%s RENDERTRACE %u fillrect #%s 0 0 0 0\n",
|
||||
aComment, (int)PR_IntervalNow(), aColor);
|
||||
}
|
||||
|
||||
void renderTraceEventEnd(const char *aColor) {
|
||||
renderTraceEventEnd("", aColor);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -42,10 +42,10 @@
|
|||
// For the front end see: https://github.com/staktrace/rendertrace
|
||||
|
||||
// Uncomment this line to enable RENDERTRACE
|
||||
#define MOZ_RENDERTRACE
|
||||
//#define MOZ_RENDERTRACE
|
||||
|
||||
#ifndef GFX_RENDERTRACE_H
|
||||
//#define GFX_RENDERTRACE_H
|
||||
#define GFX_RENDERTRACE_H
|
||||
|
||||
#include "gfx3DMatrix.h"
|
||||
#include "nsRect.h"
|
||||
|
@ -60,6 +60,10 @@ void RenderTraceLayers(Layer *aLayer, const char *aColor, const gfx3DMatrix aRoo
|
|||
void RenderTraceInvalidateStart(Layer *aLayer, const char *aColor, const nsIntRect aRect);
|
||||
void RenderTraceInvalidateEnd(Layer *aLayer, const char *aColor);
|
||||
|
||||
void renderTraceEventStart(const char *aComment, const char *aColor);
|
||||
void renderTraceEventEnd(const char *aComment, const char *aColor);
|
||||
void renderTraceEventEnd(const char *aColor);
|
||||
|
||||
#ifndef MOZ_RENDERTRACE
|
||||
inline void RenderTraceLayers(Layer *aLayer, const char *aColor, const gfx3DMatrix aRootTransform, bool aReset)
|
||||
{}
|
||||
|
@ -70,6 +74,15 @@ inline void RenderTraceInvalidateStart(Layer *aLayer, const char *aColor, const
|
|||
inline void RenderTraceInvalidateEnd(Layer *aLayer, const char *aColor)
|
||||
{}
|
||||
|
||||
inline void renderTraceEventStart(const char *aComment, const char *aColor)
|
||||
{}
|
||||
|
||||
inline void renderTraceEventEnd(const char *aComment, const char *aColor)
|
||||
{}
|
||||
|
||||
inline void renderTraceEventEnd(const char *aColor)
|
||||
{}
|
||||
|
||||
#endif // MOZ_RENDERTRACE
|
||||
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче