Lines Matching refs:gr_draw
43 static GRSurface* gr_draw = NULL; variable
147 gr_draw = gr_framebuffer+1; in fbdev_init()
156 gr_draw = (GRSurface*) malloc(sizeof(GRSurface)); in fbdev_init()
157 memcpy(gr_draw, gr_framebuffer, sizeof(GRSurface)); in fbdev_init()
158 gr_draw->data = (unsigned char*) malloc(gr_draw->height * gr_draw->row_bytes); in fbdev_init()
159 if (!gr_draw->data) { in fbdev_init()
165 memset(gr_draw->data, 0, gr_draw->height * gr_draw->row_bytes); in fbdev_init()
169 printf("framebuffer: %d (%d x %d)\n", fb_fd, gr_draw->width, gr_draw->height); in fbdev_init()
174 return gr_draw; in fbdev_init()
183 unsigned char* ucfb_vaddr = (unsigned char*)gr_draw->data; in fbdev_flip()
184 for (idx = 0 ; idx < (gr_draw->height * gr_draw->row_bytes); in fbdev_flip()
194 gr_draw = gr_framebuffer + displayed_buffer; in fbdev_flip()
198 memcpy(gr_framebuffer[0].data, gr_draw->data, in fbdev_flip()
199 gr_draw->height * gr_draw->row_bytes); in fbdev_flip()
201 return gr_draw; in fbdev_flip()
208 if (!double_buffered && gr_draw) { in fbdev_exit()
209 free(gr_draw->data); in fbdev_exit()
210 free(gr_draw); in fbdev_exit()
212 gr_draw = NULL; in fbdev_exit()