Updating a Graphics Driver

This chapter describes how to update an existing graphics driver to the new QNX Graphics Framework.

In this chapter...

Overview

If you've written a driver using previous versions of the QNX Graphics DDK, you can update it to work with the current version using the instructions and tips in this chapter.

These are the general changes you'll need to make in your driver:

API changes

These are the changes to the Graphics Framework API from the previous version. You'll need to update your driver to include the new functions. Deprecated functions and structures will still compile, but are not used by the Framework.

disp_adapter_t
Deprecated:
disp_draw_context_t
Several changes, including:

Deprecated:

Changed: alpha_map is a pointer to a disp_surface_t, not unsigned char

New:

    unsigned        plane_mask;
    int             clip_left;
    int             clip_top;
    int             clip_right;
    int             clip_bottom;
    unsigned char   *palette_lut;
    disp_color_t    *dest_palette;
    int             dest_palette_size;
    disp_fx_t       xform_matrix[4];
    int             xlate_x;
    int             xlate_y;
    unsigned        line_flags;
    int             line_join;
    uint32_t        line_pat;
    int             line_repeat;
    int             line_initial_offset;
    int             cap_style;
    int             poly_fill;
    
disp_draw_contextfuncs_t
New members:
    void (*scaled_blit) ();
    void (*update_planemask) ();
    void (*draw_line) ();
    int (*fill_poly) ();
    int (*draw_polyline) ();
    void (*update_line) ();
    void (*blend_pixels) ();
    
disp_draw_miscfuncs_t
These new functions are defined:
disp_layer_query_t
Has a new member, order_mask.
disp_memfuncs_t
New members:
    int (*query_apertures) ();
    int (*query_surface) ();
    int (*get_alloc_info) ();
    int (*get_alloc_layer_info) ();
    
disp_modefuncs_t

Deprecated:

Changed:

New:

    int (*layer_set_order)  ();
    int (*set_hw_cursor)  ();
    void (*enable_hw_cursor)  ();
    void (*disable_hw_cursor)  ();
    void (*set_hw_cursor_pos)  ();
    int (*i2c_read)  ();
    int (*i2c_write)  ();
    int (*i2c_writeread)  ();
    
disp_vcapfuncs_t
Deprecated:

New:

    int (*set_props)) ();
    int (*set_adjustments) ();
    int (*bind_layer) ();
    int (*set_enabled) ();
    void (*wait_vsync) ();
    
These video capture structures are deprecated:
These video scaler structures are deprecated: