Fixes to GDISP for streaming drivers.

Turn optimisation back on for SSD1289 driver
ugfx_release_2.6
inmarket 2013-10-24 11:32:46 +10:00
parent 8c1a37b59e
commit 4a5506df0a
2 changed files with 6 additions and 4 deletions

View File

@ -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)

View File

@ -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;
}