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
Родитель 3de9556dba
Коммит 75aaa3a595
3 изменённых файлов: 21 добавлений и 16 удалений

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

@ -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
}

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

@ -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:

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

@ -745,8 +745,8 @@ nsWindow::Invalidate(PRBool aIsSynchronous)
rect.width = mBounds.width;
rect.height = mBounds.height;
LOG(("Invalidate (all) [%p]: %d %d %d %d\n", (void *)this,
rect.x, rect.y, rect.width, rect.height));
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,
&rect, TRUE);
@ -767,8 +767,8 @@ nsWindow::Invalidate(const nsRect &aRect,
rect.width = aRect.width;
rect.height = aRect.height;
LOG(("Invalidate (rect) [%p]: %d %d %d %d\n", (void *)this,
rect.x, rect.y, rect.width, rect.height));
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,
&rect, TRUE);
@ -789,15 +789,15 @@ nsWindow::InvalidateRegion(const nsIRegion* aRegion,
GdkRectangle rect;
gdk_region_get_clipbox(region, &rect);
LOG(("Invalidate (region) [%p]: %d %d %d %d\n", (void *)this,
rect.x, rect.y, rect.width, rect.height));
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",
(void *)this));
LOGDRAW(("Invalidate (region) [%p] with empty region\n",
(void *)this));
}
return NS_OK;
@ -1140,12 +1140,12 @@ 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",
(void *)this,
(void *)aEvent->window,
GDK_WINDOW_XWINDOW(aEvent->window),
aEvent->area.x, aEvent->area.y,
aEvent->area.width, aEvent->area.height));
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),
aEvent->area.x, aEvent->area.y,
aEvent->area.width, aEvent->area.height));
// ok, send out the paint event
// XXX figure out the region/rect stuff!