summaryrefslogtreecommitdiff
path: root/navit
diff options
context:
space:
mode:
authorsleske <sleske@ffa7fe5e-494d-0410-b361-a75ebd5db220>2015-01-25 13:36:03 +0000
committersleske <sleske@ffa7fe5e-494d-0410-b361-a75ebd5db220>2015-01-25 13:36:03 +0000
commit93a83c7dfc27b66af5311523d453ea78d75844da (patch)
tree78a38878338e5b376356ce127c50066d4fb3ff79 /navit
parent40427d58152e04a748873a39cb54c8afe0e89864 (diff)
downloadnavit-svn-93a83c7dfc27b66af5311523d453ea78d75844da.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
Diffstat (limited to 'navit')
-rw-r--r--navit/android/src/org/navitproject/navit/NavitGraphics.java1
-rw-r--r--navit/graphics.h2
-rw-r--r--navit/graphics/opengl/graphics_opengl.c2
-rw-r--r--navit/graphics/qt_qpainter/graphics_qt_qpainter.cpp3
-rw-r--r--navit/navit.c2
-rw-r--r--navit/vehicle.c13
-rw-r--r--navit/vehicle.h2
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 b854f325..ef73a544 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 75230600..4438fa66 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 9d13ef34..8e666f51 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 a804673f..a8217016 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 737630aa..3f5700a1 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 c8ad5a84..f0ca8cd8 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 b2936549..54cc1577 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_);