mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-23 04:26:50 +03:00
update framebuffer toolkit logging to use a ctagory
This commit is contained in:
parent
3faaf00ca3
commit
2b0a5ef2e7
@ -21,12 +21,6 @@
|
|||||||
|
|
||||||
#include "netsurf/types.h"
|
#include "netsurf/types.h"
|
||||||
|
|
||||||
#ifdef FBTK_LOGGING
|
|
||||||
#define FBTK_LOG(x) LOG(x)
|
|
||||||
#else
|
|
||||||
#define FBTK_LOG(x)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define FB_SCROLL_COLOUR 0xFFAAAAAA
|
#define FB_SCROLL_COLOUR 0xFFAAAAAA
|
||||||
#define FB_FRAME_COLOUR 0xFFDDDDDD
|
#define FB_FRAME_COLOUR 0xFFDDDDDD
|
||||||
#define FB_COLOUR_BLACK 0xFF000000
|
#define FB_COLOUR_BLACK 0xFF000000
|
||||||
|
@ -53,7 +53,7 @@ dump_tk_tree(fbtk_widget_t *widget)
|
|||||||
int indent = 0;
|
int indent = 0;
|
||||||
|
|
||||||
while (widget != NULL) {
|
while (widget != NULL) {
|
||||||
NSLOG(netsurf, INFO, "%*s%p", indent, "", widget);
|
NSLOG(fbtk, DEBUG, "%*s%p", indent, "", widget);
|
||||||
if (widget->first_child != NULL) {
|
if (widget->first_child != NULL) {
|
||||||
widget = widget->first_child;
|
widget = widget->first_child;
|
||||||
indent += 6;
|
indent += 6;
|
||||||
@ -100,11 +100,13 @@ fbtk_request_redraw(fbtk_widget_t *widget)
|
|||||||
widget->redraw.width = widget->width;
|
widget->redraw.width = widget->width;
|
||||||
widget->redraw.height = widget->height;
|
widget->redraw.height = widget->height;
|
||||||
|
|
||||||
#ifdef FBTK_LOGGING
|
NSLOG(fbtk, DEBUG,
|
||||||
NSLOG(netsurf, INFO, "redrawing %p %d,%d %d,%d", widget,
|
"redrawing %p %d,%d %d,%d",
|
||||||
widget->redraw.x, widget->redraw.y, widget->redraw.width,
|
widget,
|
||||||
|
widget->redraw.x,
|
||||||
|
widget->redraw.y,
|
||||||
|
widget->redraw.width,
|
||||||
widget->redraw.height);
|
widget->redraw.height);
|
||||||
#endif
|
|
||||||
|
|
||||||
cwidget = widget->last_child;
|
cwidget = widget->last_child;
|
||||||
while (cwidget != NULL) {
|
while (cwidget != NULL) {
|
||||||
@ -134,9 +136,11 @@ fbtk_set_mapping(fbtk_widget_t *widget, bool map)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** swap the widget given with the next sibling.
|
|
||||||
*
|
/**
|
||||||
* Swap a sibling widget with the next deepest in the hierachy
|
* Swap a sibling widget with the next deepest in the hierachy
|
||||||
|
*
|
||||||
|
* \param lw The widget to swap
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
swap_siblings(fbtk_widget_t *lw)
|
swap_siblings(fbtk_widget_t *lw)
|
||||||
@ -403,7 +407,6 @@ fbtk_set_ptr(fbtk_widget_t *widget, fbtk_callback_info *cbi)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* internally exported function documented in widget.h */
|
/* internally exported function documented in widget.h */
|
||||||
fbtk_widget_t *
|
fbtk_widget_t *
|
||||||
fbtk_get_root_widget(fbtk_widget_t *widget)
|
fbtk_get_root_widget(fbtk_widget_t *widget)
|
||||||
@ -436,6 +439,7 @@ fbtk_get_absx(fbtk_widget_t *widget)
|
|||||||
return x;
|
return x;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* exported function documented in fbtk.h */
|
/* exported function documented in fbtk.h */
|
||||||
int
|
int
|
||||||
fbtk_get_absy(fbtk_widget_t *widget)
|
fbtk_get_absy(fbtk_widget_t *widget)
|
||||||
@ -450,6 +454,7 @@ fbtk_get_absy(fbtk_widget_t *widget)
|
|||||||
return y;
|
return y;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* exported function documented in fbtk.h */
|
/* exported function documented in fbtk.h */
|
||||||
int
|
int
|
||||||
fbtk_get_height(fbtk_widget_t *widget)
|
fbtk_get_height(fbtk_widget_t *widget)
|
||||||
@ -554,10 +559,7 @@ fbtk_widget_new(fbtk_widget_t *parent,
|
|||||||
if (neww == NULL)
|
if (neww == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
#ifdef FBTK_LOGGING
|
NSLOG(fbtk, DEBUG, "creating %p %d,%d %d,%d", neww, x, y, width, height);
|
||||||
NSLOG(netsurf, INFO, "creating %p %d,%d %d,%d", neww, x, y, width,
|
|
||||||
height);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* make new window fit inside parent */
|
/* make new window fit inside parent */
|
||||||
if (width == 0) {
|
if (width == 0) {
|
||||||
@ -578,10 +580,8 @@ fbtk_widget_new(fbtk_widget_t *parent,
|
|||||||
height = parent->height - y;
|
height = parent->height - y;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef FBTK_LOGGING
|
NSLOG(fbtk, DEBUG, "using %p %d,%d %d,%d", neww, x, y, width, height);
|
||||||
NSLOG(netsurf, INFO, "using %p %d,%d %d,%d", neww, x, y, width,
|
|
||||||
height);
|
|
||||||
#endif
|
|
||||||
/* set values */
|
/* set values */
|
||||||
neww->type = type;
|
neww->type = type;
|
||||||
neww->x = x;
|
neww->x = x;
|
||||||
@ -639,10 +639,12 @@ do_redraw(nsfb_t *nsfb, fbtk_widget_t *widget)
|
|||||||
plot_ctx.x1 = plot_ctx.x0 + widget->redraw.width;
|
plot_ctx.x1 = plot_ctx.x0 + widget->redraw.width;
|
||||||
plot_ctx.y1 = plot_ctx.y0 + widget->redraw.height;
|
plot_ctx.y1 = plot_ctx.y0 + widget->redraw.height;
|
||||||
|
|
||||||
#ifdef FBTK_LOGGING
|
NSLOG(fbtk, DEBUG,
|
||||||
NSLOG(netsurf, INFO, "clipping %p %d,%d %d,%d", widget,
|
"clipping %p %d,%d %d,%d",
|
||||||
plot_ctx.x0, plot_ctx.y0, plot_ctx.x1, plot_ctx.y1);
|
widget,
|
||||||
#endif
|
plot_ctx.x0, plot_ctx.y0,
|
||||||
|
plot_ctx.x1, plot_ctx.y1);
|
||||||
|
|
||||||
if (nsfb_plot_set_clip(nsfb, &plot_ctx) == true) {
|
if (nsfb_plot_set_clip(nsfb, &plot_ctx) == true) {
|
||||||
fbtk_post_callback(widget, FBTK_CBT_REDRAW);
|
fbtk_post_callback(widget, FBTK_CBT_REDRAW);
|
||||||
}
|
}
|
||||||
|
@ -96,6 +96,7 @@ NSLOG_DEFINE_CATEGORY(llcache, "Low level cache");
|
|||||||
NSLOG_DEFINE_CATEGORY(fetch, "objet fetching");
|
NSLOG_DEFINE_CATEGORY(fetch, "objet fetching");
|
||||||
NSLOG_DEFINE_CATEGORY(plot, "rendering system");
|
NSLOG_DEFINE_CATEGORY(plot, "rendering system");
|
||||||
NSLOG_DEFINE_CATEGORY(schedule, "scheduler");
|
NSLOG_DEFINE_CATEGORY(schedule, "scheduler");
|
||||||
|
NSLOG_DEFINE_CATEGORY(fbtk, "Framebuffer toolkit");
|
||||||
|
|
||||||
static void
|
static void
|
||||||
netsurf_render_log(void *_ctx,
|
netsurf_render_log(void *_ctx,
|
||||||
|
@ -61,6 +61,7 @@ NSLOG_DECLARE_CATEGORY(llcache);
|
|||||||
NSLOG_DECLARE_CATEGORY(fetch);
|
NSLOG_DECLARE_CATEGORY(fetch);
|
||||||
NSLOG_DECLARE_CATEGORY(plot);
|
NSLOG_DECLARE_CATEGORY(plot);
|
||||||
NSLOG_DECLARE_CATEGORY(schedule);
|
NSLOG_DECLARE_CATEGORY(schedule);
|
||||||
|
NSLOG_DECLARE_CATEGORY(fbtk);
|
||||||
|
|
||||||
#else /* WITH_NSLOG */
|
#else /* WITH_NSLOG */
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user