Ticket #10486: accelerantv2-r4.diff

File accelerantv2-r4.diff, 1.9 KB (added by kallisti5, 11 years ago)

Revision 4 of the proposed changes. Rename hooks to more basic name

  • headers/os/add-ons/graphics/Accelerant.h

    diff --git a/headers/os/add-ons/graphics/Accelerant.h b/headers/os/add-ons/graphics/Accelerant.h
    index 1322c35..f7bcff5 100644
    a b  
    11/*
    2  * Copyright 2009-2012, Haiku, Inc. All rights reserved.
     2 * Copyright 2009-2014, Haiku, Inc. All rights reserved.
    33 * Distributed under the terms of the MIT License.
    44 */
    55#ifndef _ACCELERANT_H_
    enum {  
    3434    B_GET_ACCELERANT_DEVICE_INFO,       /* required */
    3535    B_ACCELERANT_RETRACE_SEMAPHORE,     /* optional */
    3636
     37    B_GET_DISPLAY_COUNT,                /* optional */
     38    B_SET_DISPLAY_INDEX,                /* optional */
     39
    3740    /* mode configuration */
    3841    B_ACCELERANT_MODE_COUNT = 0x100,    /* required */
    3942    B_GET_MODE_LIST,                    /* required */
    typedef struct {  
    168171    struct {
    169172        uint16  week;
    170173        uint16  year;
    171     }       produced;
     174    } produced;
    172175    float   width;
    173176    float   height;
    174177    uint32  min_horizontal_frequency;   /* in kHz */
    typedef struct {  
    176179    uint32  min_vertical_frequency;     /* in Hz */
    177180    uint32  max_vertical_frequency;
    178181    uint32  max_pixel_clock;            /* in kHz */
     182    struct {
     183        uint32  connector_type;
     184        uint32  encoder_type;
     185        uint32  dpcm;                   /* in cm */
     186        uint32  reserved;               /* for future use */
     187    } hardware;
    179188} monitor_info;
    180189
    181190
    typedef struct {  
    261270
    262271enum {  /* engine capabilities */
    263272    B_2D_ACCELERATION = 1 << 0,
    264     B_3D_ACCELERATION = 1 << 1
     273    B_3D_ACCELERATION = 1 << 1,
     274    B_COMPUTE_ACCELERATION = 1 << 2
    265275};
    266276
    267277
    typedef void (*get_accelerant_clone_info)(void* data);  
    284294typedef status_t (*clone_accelerant)(void* data);
    285295typedef void (*uninit_accelerant)(void);
    286296typedef status_t (*get_accelerant_device_info)(accelerant_device_info* adi);
     297typedef uint32 (*get_display_count(void));
     298typedef status_t (*set_display_index(uint32 index));
    287299
    288300typedef uint32 (*accelerant_mode_count)(void);
    289301typedef status_t (*get_mode_list)(display_mode*);