diff options
author | sleske <sleske@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2015-01-25 13:36:03 +0000 |
---|---|---|
committer | sleske <sleske@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2015-01-25 13:36:03 +0000 |
commit | 86b78c384f5a19d8bed7a319e44c3dc518b094f2 (patch) | |
tree | 78a38878338e5b376356ce127c50066d4fb3ff79 | |
parent | 76efbd74b76062a5cffba5e7af87264ac7bf2ea2 (diff) | |
download | navit-86b78c384f5a19d8bed7a319e44c3dc518b094f2.tar.gz |
Fix:core:Remove draw_mode_end_lazy. Only used by QPainter and OpenGL graphics, where it does not appear to do anything useful.
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@6010 ffa7fe5e-494d-0410-b361-a75ebd5db220
-rw-r--r-- | navit/android/src/org/navitproject/navit/NavitGraphics.java | 1 | ||||
-rw-r--r-- | navit/graphics.h | 2 | ||||
-rw-r--r-- | navit/graphics/opengl/graphics_opengl.c | 2 | ||||
-rw-r--r-- | navit/graphics/qt_qpainter/graphics_qt_qpainter.cpp | 3 | ||||
-rw-r--r-- | navit/navit.c | 2 | ||||
-rw-r--r-- | navit/vehicle.c | 13 | ||||
-rw-r--r-- | navit/vehicle.h | 2 |
7 files changed, 10 insertions, 15 deletions
diff --git a/navit/android/src/org/navitproject/navit/NavitGraphics.java b/navit/android/src/org/navitproject/navit/NavitGraphics.java index b854f3258..ef73a5449 100644 --- a/navit/android/src/org/navitproject/navit/NavitGraphics.java +++ b/navit/android/src/org/navitproject/navit/NavitGraphics.java @@ -934,7 +934,6 @@ public class NavitGraphics /* These constants must be synchronized with enum draw_mode_num in graphics.h. */ public static final int draw_mode_begin = 0; public static final int draw_mode_end = 1; - public static final int draw_mode_end_lazy = 2; protected void draw_mode(int mode) { diff --git a/navit/graphics.h b/navit/graphics.h index 752306008..4438fa664 100644 --- a/navit/graphics.h +++ b/navit/graphics.h @@ -37,7 +37,7 @@ struct mapset; /* This enum must be synchronized with the constants in NavitGraphics.java. */ enum draw_mode_num { - draw_mode_begin, draw_mode_end, draw_mode_end_lazy + draw_mode_begin, draw_mode_end }; struct graphics_priv; diff --git a/navit/graphics/opengl/graphics_opengl.c b/navit/graphics/opengl/graphics_opengl.c index 9d13ef349..8e666f515 100644 --- a/navit/graphics/opengl/graphics_opengl.c +++ b/navit/graphics/opengl/graphics_opengl.c @@ -1210,7 +1210,7 @@ draw_mode(struct graphics_priv *gr, enum draw_mode_num mode) glNewList(gr->DLid, GL_COMPILE); } - if (mode == draw_mode_end || mode == draw_mode_end_lazy) { + if (mode == draw_mode_end) { glEndList(); } #endif diff --git a/navit/graphics/qt_qpainter/graphics_qt_qpainter.cpp b/navit/graphics/qt_qpainter/graphics_qt_qpainter.cpp index a804673f2..a82170162 100644 --- a/navit/graphics/qt_qpainter/graphics_qt_qpainter.cpp +++ b/navit/graphics/qt_qpainter/graphics_qt_qpainter.cpp @@ -531,9 +531,6 @@ static void draw_mode(struct graphics_priv *gr, enum draw_mode_num mode) if (!gr->parent) QCoreApplication::processEvents(QEventLoop::ExcludeUserInputEvents|QEventLoop::ExcludeSocketNotifiers|QEventLoop::DeferredDeletion|QEventLoop::X11ExcludeTimers); } - if (mode == draw_mode_end_lazy) { - gr->painter->end(); - } gr->mode=mode; } diff --git a/navit/navit.c b/navit/navit.c index 737630aa1..3f5700a12 100644 --- a/navit/navit.c +++ b/navit/navit.c @@ -3004,7 +3004,7 @@ navit_vehicle_draw(struct navit *this_, struct navit_vehicle *nv, struct point * return; transform(this_->trans_cursor, pro, &nv->coord, &cursor_pnt, 1, 0, 0, NULL); } - vehicle_draw(nv->vehicle, this_->gra, &cursor_pnt, pnt ? 0:1, nv->dir-transform_get_yaw(this_->trans_cursor), nv->speed); + vehicle_draw(nv->vehicle, this_->gra, &cursor_pnt, nv->dir-transform_get_yaw(this_->trans_cursor), nv->speed); } /** diff --git a/navit/vehicle.c b/navit/vehicle.c index c8ad5a84e..f0ca8cd81 100644 --- a/navit/vehicle.c +++ b/navit/vehicle.c @@ -78,7 +78,7 @@ struct vehicle { struct object_func vehicle_func; static void vehicle_set_default_name(struct vehicle *this); -static void vehicle_draw_do(struct vehicle *this_, int lazy); +static void vehicle_draw_do(struct vehicle *this_); static void vehicle_log_nmea(struct vehicle *this_, struct log *log); static void vehicle_log_gpx(struct vehicle *this_, struct log *log); static void vehicle_log_textfile(struct vehicle *this_, struct log *log); @@ -364,16 +364,15 @@ vehicle_set_cursor(struct vehicle *this_, struct cursor *cursor, int overwrite) * @param this_ The vehicle * @param gra The graphics * @param pnt Screen coordinates of the vehicle. - * @param lazy use lazy draw mode. * @param angle The angle relative to the map. * @param speed The speed of the vehicle. */ void -vehicle_draw(struct vehicle *this_, struct graphics *gra, struct point *pnt, int lazy, int angle, int speed) +vehicle_draw(struct vehicle *this_, struct graphics *gra, struct point *pnt, int angle, int speed) { if (angle < 0) angle+=360; - dbg(lvl_debug,"enter this=%p gra=%p pnt=%p lazy=%d dir=%d speed=%d\n", this_, gra, pnt, lazy, angle, speed); + dbg(lvl_debug,"enter this=%p gra=%p pnt=%p dir=%d speed=%d\n", this_, gra, pnt, angle, speed); dbg(lvl_debug,"point %d,%d\n", pnt->x, pnt->y); this_->cursor_pnt=*pnt; this_->angle=angle; @@ -393,7 +392,7 @@ vehicle_draw(struct vehicle *this_, struct graphics *gra, struct point *pnt, int graphics_background_gc(this_->gra, this_->bg); } } - vehicle_draw_do(this_, lazy); + vehicle_draw_do(this_); } int @@ -419,7 +418,7 @@ static void vehicle_set_default_name(struct vehicle *this_) static void -vehicle_draw_do(struct vehicle *this_, int lazy) +vehicle_draw_do(struct vehicle *this_) { struct point p; struct cursor *cursor=this_->cursor; @@ -460,7 +459,7 @@ vehicle_draw_do(struct vehicle *this_, int lazy) ++attr; } graphics_draw_drag(this_->gra, &this_->cursor_pnt); - graphics_draw_mode(this_->gra, lazy ? draw_mode_end_lazy : draw_mode_end); + graphics_draw_mode(this_->gra, draw_mode_end); if (this_->animate_callback) { ++this_->sequence; if (cursor->sequence_range && cursor->sequence_range->max < this_->sequence) diff --git a/navit/vehicle.h b/navit/vehicle.h index b29365493..54cc15771 100644 --- a/navit/vehicle.h +++ b/navit/vehicle.h @@ -50,7 +50,7 @@ int vehicle_set_attr(struct vehicle *this_, struct attr *attr); int vehicle_add_attr(struct vehicle *this_, struct attr *attr); int vehicle_remove_attr(struct vehicle *this_, struct attr *attr); void vehicle_set_cursor(struct vehicle *this_, struct cursor *cursor, int overwrite); -void vehicle_draw(struct vehicle *this_, struct graphics *gra, struct point *pnt, int lazy, int angle, int speed); +void vehicle_draw(struct vehicle *this_, struct graphics *gra, struct point *pnt, int angle, int speed); int vehicle_get_cursor_data(struct vehicle *this_, struct point *pnt, int *angle, int *speed); void vehicle_log_gpx_add_tag(char *tag, char **logstr); struct vehicle * vehicle_ref(struct vehicle *this_); |