projects
/
lttv.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
resourceview: add softirq resource
[lttv.git]
/
ltt
/
branches
/
poly
/
lttv
/
modules
/
gui
/
controlflow
/
drawitem.c
diff --git
a/ltt/branches/poly/lttv/modules/gui/controlflow/drawitem.c
b/ltt/branches/poly/lttv/modules/gui/controlflow/drawitem.c
index a73df51a38b16fbf9688ec00efeb7889cf4af0f9..d97628b021f3b9abed37236c0693a612328662b5 100644
(file)
--- a/
ltt/branches/poly/lttv/modules/gui/controlflow/drawitem.c
+++ b/
ltt/branches/poly/lttv/modules/gui/controlflow/drawitem.c
@@
-94,6
+94,10
@@
* Author : Mathieu Desnoyers, October 2003
*/
* Author : Mathieu Desnoyers, October 2003
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#include <glib.h>
#include <gtk/gtk.h>
#include <gdk/gdk.h>
#include <glib.h>
#include <gtk/gtk.h>
#include <gdk/gdk.h>
@@
-104,7
+108,9
@@
#include <lttv/tracecontext.h>
#include <lttv/state.h>
#include <lttv/tracecontext.h>
#include <lttv/state.h>
+#include <lttv/lttv.h>
+#include "drawing.h"
#include "drawitem.h"
#include "drawitem.h"
@@
-118,9
+124,7
@@
gboolean draw_text( void *hook_data, void *call_data)
PangoContext *context;
PangoLayout *layout;
PangoContext *context;
PangoLayout *layout;
- PangoAttribute *attribute;
PangoFontDescription *font_desc;// = pango_font_description_new();
PangoFontDescription *font_desc;// = pango_font_description_new();
- gint font_size;
PangoRectangle ink_rect;
layout = draw_context->pango_layout;
PangoRectangle ink_rect;
layout = draw_context->pango_layout;
@@
-160,7
+164,7
@@
gboolean draw_text( void *hook_data, void *call_data)
break;
}
/* verify if there is enough space to draw */
break;
}
/* verify if there is enough space to draw */
- if(
x + width <= draw_context->drawinfo.end.x
) {
+ if(
unlikely(x + width <= draw_context->drawinfo.end.x)
) {
enough_space = TRUE;
*offset += width;
}
enough_space = TRUE;
*offset += width;
}
@@
-185,14
+189,14
@@
gboolean draw_text( void *hook_data, void *call_data)
break;
}
/* verify if there is enough space to draw */
break;
}
/* verify if there is enough space to draw */
- if(
x - width >= draw_context->drawinfo.start.x
) {
+ if(
unlikely(x - width >= draw_context->drawinfo.start.x)
) {
enough_space = TRUE;
*offset -= width;
}
break;
}
enough_space = TRUE;
*offset -= width;
}
break;
}
- if(
enough_space
)
+ if(
unlikely(enough_space)
)
gdk_draw_layout_with_colors(draw_context->drawable,
draw_context->gc,
x,
gdk_draw_layout_with_colors(draw_context->drawable,
draw_context->gc,
x,
@@
-220,7
+224,7
@@
gboolean draw_icon( void *hook_data, void *call_data)
g_assert(lttv_iattribute_find_by_path(attributes, icon_name,
LTTV_POINTER, &value));
g_assert(lttv_iattribute_find_by_path(attributes, icon_name,
LTTV_POINTER, &value));
- if(
*(value.v_pointer) == NULL
)
+ if(
unlikely(*(value.v_pointer) == NULL)
)
{
*(value.v_pointer) = icon_info = g_new(IconStruct,1);
{
*(value.v_pointer) = icon_info = g_new(IconStruct,1);
@@
-258,7
+262,7
@@
gboolean draw_icon( void *hook_data, void *call_data)
break;
}
/* verify if there is enough space to draw */
break;
}
/* verify if there is enough space to draw */
- if(
x + width <= draw_context->drawinfo.end.x
) {
+ if(
unlikely(x + width <= draw_context->drawinfo.end.x)
) {
enough_space = TRUE;
*offset += width;
}
enough_space = TRUE;
*offset += width;
}
@@
-283,14
+287,14
@@
gboolean draw_icon( void *hook_data, void *call_data)
break;
}
/* verify if there is enough space to draw */
break;
}
/* verify if there is enough space to draw */
- if(
x - width >= draw_context->drawinfo.start.x
) {
+ if(
unlikely(x - width >= draw_context->drawinfo.start.x)
) {
enough_space = TRUE;
*offset -= width;
}
break;
}
enough_space = TRUE;
*offset -= width;
}
break;
}
- if(
enough_space
) {
+ if(
unlikely(enough_space)
) {
gdk_gc_set_clip_mask(draw_context->gc, icon_info->mask);
gdk_gc_set_clip_origin(
gdk_gc_set_clip_mask(draw_context->gc, icon_info->mask);
gdk_gc_set_clip_origin(
@@
-316,9
+320,8
@@
gboolean draw_line( void *hook_data, void *call_data)
PropertiesLine *properties = (PropertiesLine*)hook_data;
DrawContext *draw_context = (DrawContext*)call_data;
PropertiesLine *properties = (PropertiesLine*)hook_data;
DrawContext *draw_context = (DrawContext*)call_data;
- //gdk_gc_set_foreground(draw_context->gc, properties->color);
- gdk_gc_set_rgb_fg_color(draw_context->gc, &properties->color);
- //gdk_gc_set_foreground(gc, properties->color);
+ gdk_gc_set_foreground(draw_context->gc, &properties->color);
+ //gdk_gc_set_rgb_fg_color(draw_context->gc, &properties->color);
gdk_gc_set_line_attributes( draw_context->gc,
properties->line_width,
properties->style,
gdk_gc_set_line_attributes( draw_context->gc,
properties->line_width,
properties->style,
@@
-363,8
+366,8
@@
gboolean draw_arc( void *hook_data, void *call_data)
PropertiesArc *properties = (PropertiesArc*)hook_data;
DrawContext *draw_context = (DrawContext*)call_data;
PropertiesArc *properties = (PropertiesArc*)hook_data;
DrawContext *draw_context = (DrawContext*)call_data;
-
//
gdk_gc_set_foreground(draw_context->gc, properties->color);
- gdk_gc_set_rgb_fg_color(draw_context->gc, properties->color);
+ gdk_gc_set_foreground(draw_context->gc, properties->color);
+
//
gdk_gc_set_rgb_fg_color(draw_context->gc, properties->color);
gint x=0, y=0;
gint *offset=NULL;
gint x=0, y=0;
gint *offset=NULL;
@@
-392,7
+395,7
@@
gboolean draw_arc( void *hook_data, void *call_data)
break;
}
/* verify if there is enough space to draw */
break;
}
/* verify if there is enough space to draw */
- if(
x + width <= draw_context->drawinfo.end.x
) {
+ if(
unlikely(x + width <= draw_context->drawinfo.end.x)
) {
enough_space = TRUE;
*offset += width;
}
enough_space = TRUE;
*offset += width;
}
@@
-417,14
+420,14
@@
gboolean draw_arc( void *hook_data, void *call_data)
break;
}
/* verify if there is enough space to draw */
break;
}
/* verify if there is enough space to draw */
- if(
x - width >= draw_context->drawinfo.start.x
) {
+ if(
unlikely(x - width >= draw_context->drawinfo.start.x)
) {
enough_space = TRUE;
*offset -= width;
}
break;
}
enough_space = TRUE;
*offset -= width;
}
break;
}
- if(
enough_space
)
+ if(
unlikely(enough_space)
)
gdk_draw_arc(draw_context->drawable, draw_context->gc,
properties->filled,
x,
gdk_draw_arc(draw_context->drawable, draw_context->gc,
properties->filled,
x,
@@
-439,8
+442,8
@@
gboolean draw_bg( void *hook_data, void *call_data)
PropertiesBG *properties = (PropertiesBG*)hook_data;
DrawContext *draw_context = (DrawContext*)call_data;
PropertiesBG *properties = (PropertiesBG*)hook_data;
DrawContext *draw_context = (DrawContext*)call_data;
-
//
gdk_gc_set_foreground(draw_context->gc, properties->color);
- gdk_gc_set_rgb_fg_color(draw_context->gc, properties->color);
+ gdk_gc_set_foreground(draw_context->gc, properties->color);
+
//
gdk_gc_set_rgb_fg_color(draw_context->gc, properties->color);
//g_critical("DRAWING RECT : x: %i, y: %i, w:%i, h:%i, val1 :%i, val2:%i ",
// draw_context->previous->over->x,
//g_critical("DRAWING RECT : x: %i, y: %i, w:%i, h:%i, val1 :%i, val2:%i ",
// draw_context->previous->over->x,
This page took
0.025512 seconds
and
4
git commands to generate.