Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- typedef struct alloc_device_t {
- struct hw_device_t common;
- /*
- * (*alloc)() Allocates a buffer in graphic memory with the requested
- * parameters and returns a buffer_handle_t and the stride in pixels to
- * allow the implementation to satisfy hardware constraints on the width
- * of a pixmap (eg: it may have to be multiple of 8 pixels).
- * The CALLER TAKES OWNERSHIP of the buffer_handle_t.
- *
- * Returns 0 on success or -errno on error.
- */
- int (*alloc)(struct alloc_device_t* dev,
- int w, int h, int format, int usage,
- buffer_handle_t* handle, int* stride,
- unsigned int* text, ogl_alloc_t ogl_alloc,
- ogl_free_t ogl_free);
- /*
- * (*free)() Frees a previously allocated buffer.
- * Behavior is undefined if the buffer is still mapped in any process,
- * but shall not result in termination of the program or security breaches
- * (allowing a process to get access to another process' buffers).
- * THIS FUNCTION TAKES OWNERSHIP of the buffer_handle_t which becomes
- * invalid after the call.
- *
- * Returns 0 on success or -errno on error.
- */
- int (*free)(struct alloc_device_t* dev,
- buffer_handle_t handle);
- void (*flush)(struct alloc_device_t* dev);
- } alloc_device_t;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement