aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorinmarket <andrewh@inmarket.com.au>2013-10-24 11:32:46 +1000
committerinmarket <andrewh@inmarket.com.au>2013-10-24 11:32:46 +1000
commit4a5506df0a36a61b13c01b0173523a2ce31b5fb9 (patch)
tree7790dbe2b305f9aa581a0e5f918eb2919b4a5039
parent8c1a37b59eef97c1e713a4ae24459f3af82b65f2 (diff)
downloaduGFX-4a5506df0a36a61b13c01b0173523a2ce31b5fb9.tar.gz
uGFX-4a5506df0a36a61b13c01b0173523a2ce31b5fb9.tar.bz2
uGFX-4a5506df0a36a61b13c01b0173523a2ce31b5fb9.zip
Fixes to GDISP for streaming drivers.
Turn optimisation back on for SSD1289 driver
-rw-r--r--drivers/gdisp/SSD1289/gdisp_lld_config.h2
-rw-r--r--src/gdisp/gdisp.c8
2 files changed, 6 insertions, 4 deletions
diff --git a/drivers/gdisp/SSD1289/gdisp_lld_config.h b/drivers/gdisp/SSD1289/gdisp_lld_config.h
index f8743a2b..84e518d2 100644
--- a/drivers/gdisp/SSD1289/gdisp_lld_config.h
+++ b/drivers/gdisp/SSD1289/gdisp_lld_config.h
@@ -24,7 +24,7 @@
#define GDISP_HARDWARE_STREAM_WRITE TRUE
#define GDISP_HARDWARE_STREAM_READ TRUE
-//#define GDISP_HARDWARE_STREAM_POS TRUE
+#define GDISP_HARDWARE_STREAM_POS TRUE
#define GDISP_HARDWARE_CONTROL TRUE
#if defined(GDISP_USE_DMA)
diff --git a/src/gdisp/gdisp.c b/src/gdisp/gdisp.c
index 53882492..3d2e6e36 100644
--- a/src/gdisp/gdisp.c
+++ b/src/gdisp/gdisp.c
@@ -87,6 +87,7 @@ GDisplay *GDISP = GDisplayArray;
static INLINE void setglobalwindow(GDisplay *g) {
coord_t x, y;
x = g->p.x; y = g->p.y;
+ g->p.x = g->p.y = 0;
g->p.cx = g->g.Width; g->p.cy = g->g.Height;
gdisp_lld_write_start(g);
g->p.x = x; g->p.y = y;
@@ -304,8 +305,9 @@ static void hline_clip(GDisplay *g) {
{
if (!(g->flags & GDISP_FLG_SCRSTREAM))
setglobalwindow(g);
+ g->p.cx = g->p.x1 - g->p.x + 1;
gdisp_lld_write_pos(g);
- do { gdisp_lld_write_color(g); } while(g->p.cx--);
+ do { gdisp_lld_write_color(g); } while(--g->p.cx);
return;
}
#endif
@@ -319,7 +321,7 @@ static void hline_clip(GDisplay *g) {
g->p.cx = g->p.x1 - g->p.x + 1;
g->p.cy = 1;
gdisp_lld_write_start(g);
- do { gdisp_lld_write_color(g); } while(g->p.cx--);
+ do { gdisp_lld_write_color(g); } while(--g->p.cx);
gdisp_lld_write_stop(g);
return;
}
@@ -404,7 +406,7 @@ static void vline_clip(GDisplay *g) {
#endif
gdisp_lld_write_pos(g);
#endif
- do { gdisp_lld_write_color(g); } while(g->p.cy--);
+ do { gdisp_lld_write_color(g); } while(--g->p.cy);
gdisp_lld_write_stop(g);
return;
}