No bug. Put drawing onto its own logging facility.

This commit is contained in:
blizzard%redhat.com 2002-11-13 12:41:49 +00:00
parent c1f4cb20c0
commit deff9dd762
3 changed files with 21 additions and 16 deletions

View File

@ -59,6 +59,7 @@ static PLHashTable *sCountHashTable = nsnull;
PRLogModuleInfo *gWidgetLog = nsnull;
PRLogModuleInfo *gWidgetFocusLog = nsnull;
PRLogModuleInfo *gWidgetIMLog = nsnull;
PRLogModuleInfo *gWidgetDrawLog = nsnull;
#endif
static gboolean event_processor_callback (GIOChannel *source,
@ -92,6 +93,8 @@ nsAppShell::nsAppShell(void)
gWidgetFocusLog = PR_NewLogModule("WidgetFocus");
if (!gWidgetIMLog)
gWidgetIMLog = PR_NewLogModule("WidgetIM");
if (!gWidgetDrawLog)
gWidgetDrawLog = PR_NewLogModule("WidgetDraw");
#endif
}

View File

@ -53,12 +53,14 @@
extern PRLogModuleInfo *gWidgetLog;
extern PRLogModuleInfo *gWidgetFocusLog;
extern PRLogModuleInfo *gWidgetIMLog;
extern PRLogModuleInfo *gWidgetDrawLog;
#endif /* MOZ_LOGGING */
#define LOG(args) PR_LOG(gWidgetLog, 4, args)
#define LOGFOCUS(args) PR_LOG(gWidgetFocusLog, 4, args);
#define LOGIM(args) PR_LOG(gWidgetIMLog, 4, args);
#define LOGFOCUS(args) PR_LOG(gWidgetFocusLog, 4, args)
#define LOGIM(args) PR_LOG(gWidgetIMLog, 4, args)
#define LOGDRAW(args) PR_LOG(gWidgetDrawLog, 4, args)
class nsCommonWidget : public nsBaseWidget {
public:

View File

@ -745,7 +745,7 @@ nsWindow::Invalidate(PRBool aIsSynchronous)
rect.width = mBounds.width;
rect.height = mBounds.height;
LOG(("Invalidate (all) [%p]: %d %d %d %d\n", (void *)this,
LOGDRAW(("Invalidate (all) [%p]: %d %d %d %d\n", (void *)this,
rect.x, rect.y, rect.width, rect.height));
gdk_window_invalidate_rect(mDrawingarea->inner_window,
@ -767,7 +767,7 @@ nsWindow::Invalidate(const nsRect &aRect,
rect.width = aRect.width;
rect.height = aRect.height;
LOG(("Invalidate (rect) [%p]: %d %d %d %d\n", (void *)this,
LOGDRAW(("Invalidate (rect) [%p]: %d %d %d %d\n", (void *)this,
rect.x, rect.y, rect.width, rect.height));
gdk_window_invalidate_rect(mDrawingarea->inner_window,
@ -789,14 +789,14 @@ nsWindow::InvalidateRegion(const nsIRegion* aRegion,
GdkRectangle rect;
gdk_region_get_clipbox(region, &rect);
LOG(("Invalidate (region) [%p]: %d %d %d %d\n", (void *)this,
LOGDRAW(("Invalidate (region) [%p]: %d %d %d %d\n", (void *)this,
rect.x, rect.y, rect.width, rect.height));
gdk_window_invalidate_region(mDrawingarea->inner_window,
region, TRUE);
}
else {
LOG(("Invalidate (region) [%p] with empty region\n",
LOGDRAW(("Invalidate (region) [%p] with empty region\n",
(void *)this));
}
@ -1140,7 +1140,7 @@ nsWindow::OnExposeEvent(GtkWidget *aWidget, GdkEventExpose *aEvent)
if (aEvent->window != mDrawingarea->inner_window)
return FALSE;
LOG(("sending expose event [%p] %p 0x%lx\n\t%d %d %d %d\n",
LOGDRAW(("sending expose event [%p] %p 0x%lx\n\t%d %d %d %d\n",
(void *)this,
(void *)aEvent->window,
GDK_WINDOW_XWINDOW(aEvent->window),