From dd7595a3475407a7fa96a97393bae8c5220e8762 Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Wed, 4 Jan 2012 18:41:13 +1000 Subject: Add the base Enlightenment Foundation Libraries - eina, eet, evas, ecore, embryo, and edje. Note that embryo wont be used, but I'm not sure yet if you can build edje without it. --- .../evas/src/modules/engines/psl1ght/rsxutil.h | 43 ++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 libraries/evas/src/modules/engines/psl1ght/rsxutil.h (limited to 'libraries/evas/src/modules/engines/psl1ght/rsxutil.h') diff --git a/libraries/evas/src/modules/engines/psl1ght/rsxutil.h b/libraries/evas/src/modules/engines/psl1ght/rsxutil.h new file mode 100644 index 0000000..838a751 --- /dev/null +++ b/libraries/evas/src/modules/engines/psl1ght/rsxutil.h @@ -0,0 +1,43 @@ +/* + * This software is distributed under the terms of the MIT License + */ + +#ifndef __RSXUTIL_H__ +#define __RSXUTIL_H__ + +#include +#include + +#define CB_SIZE 0x100000 +#define HOST_SIZE (32 * 1024 * 1024) + +typedef struct +{ + int height; + int width; + int id; + uint32_t *ptr; + // Internal stuff + uint32_t offset; +} rsxBuffer; + +/* Initilize the RSX properly. Returns NULL on error */ +gcmContextData *initScreen(void *host_addr, u32 size); +/* Block the PPU thread untill the previous flip operation has finished. */ +void waitFlip(void); +/* Flip a buffer onto the screen. Returns TRUE on success */ +int flipBuffer(gcmContextData *context, s32 buffer); +/* Create a buffer to draw into and assign it to @id. Returns NULL on error */ +int makeBuffer(rsxBuffer *buffer, u16 width, u16 height, int id); +/* Copy the contents of a buffer to another buffer */ +int copyBuffer(gcmContextData *context, rsxBuffer *source, rsxBuffer *destination); +/* Get current screen resolution. returns TRUE on success */ +int getResolution(u16 *width, u16 *height); +/* Set screen resolution to closest matching and. returns TRUE on success */ +int setResolution(gcmContextData *context, u16 *width, u16 *height); +/* Initilize the RSX properly. Returns NULL on error */ +void freeScreen(gcmContextData *context); +/* Flush the RSX pipeline (any commands and wait for flip) */ +void flushRSX(gcmContextData *context); + +#endif /* __RSXUTIL_H__ */ -- cgit v1.1