Esempio n. 1
0
int raster_init(raster_t *raster,
                unsigned int num_modes)
{
    raster->intialized = 0;

    raster->modes = lib_malloc(sizeof(raster_modes_t));
    raster_modes_init(raster->modes, num_modes);
    raster_canvas_init(raster);
    raster_changes_init(raster);

    raster_reset(raster);

    raster->display_xstart = raster->display_xstop = 0;
    raster->display_ystart = raster->display_ystop = 0;

    raster->cache = NULL;
    raster->cache_enabled = 0;
    raster->dont_cache = 1;
    raster->dont_cache_all = 0;
    raster->num_cached_lines = 0;

    raster->fake_draw_buffer_line = NULL;

    raster->can_disable_border = 0;
    raster->border_disable = 0;

    raster->border_color = 0;
    raster->background_color = 0;
    raster->idle_background_color = 0;
    raster->xsmooth_color = 0;

    memset(raster->gfx_msk, 0, RASTER_GFX_MSK_SIZE);
    memset(raster->zero_gfx_msk, 0, RASTER_GFX_MSK_SIZE);

    video_viewport_get(raster->canvas, &raster->viewport, &raster->geometry);

    raster->canvas->initialized = 1;
    raster_set_canvas_refresh(raster, 1);

    return 0;
}
Esempio n. 2
0
void vdc_set_canvas_refresh(int enable)
{
    raster_set_canvas_refresh(&vdc.raster, enable);
}