From 7fe60435bce6595a9c58a9bfd8244d74b5320e96 Mon Sep 17 00:00:00 2001 From: Benjamin Franzke Date: Tue, 15 Jan 2013 08:46:13 +0100 Subject: Import DirectFB141_2k11R3_beta5 --- Source/DirectFB/gfxdrivers/sh772x/sh7722_screen.c | 85 +++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100755 Source/DirectFB/gfxdrivers/sh772x/sh7722_screen.c (limited to 'Source/DirectFB/gfxdrivers/sh772x/sh7722_screen.c') diff --git a/Source/DirectFB/gfxdrivers/sh772x/sh7722_screen.c b/Source/DirectFB/gfxdrivers/sh772x/sh7722_screen.c new file mode 100755 index 0000000..2fe4d46 --- /dev/null +++ b/Source/DirectFB/gfxdrivers/sh772x/sh7722_screen.c @@ -0,0 +1,85 @@ +#ifdef SH7722_DEBUG_SCREEN +#define DIRECT_ENABLE_DEBUG +#endif + + +#include + +#include + +#include + +#include + +#include + +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include + +#include + +#include +#include + + +#include "sh7722.h" +#include "sh7722_screen.h" + + +D_DEBUG_DOMAIN( SH7722_Screen, "SH7722/Screen", "Renesas SH7722 Screen" ); + +/**********************************************************************************************************************/ + +static DFBResult +sh7722InitScreen( CoreScreen *screen, + CoreGraphicsDevice *device, + void *driver_data, + void *screen_data, + DFBScreenDescription *description ) +{ + D_DEBUG_AT( SH7722_Screen, "%s()\n", __FUNCTION__ ); + + /* Set the screen capabilities. */ + description->caps = DSCCAPS_NONE; + + /* Set the screen name. */ + snprintf( description->name, DFB_SCREEN_DESC_NAME_LENGTH, "SH7722 Screen" ); + + return DFB_OK; +} + +static DFBResult +sh7722GetScreenSize( CoreScreen *screen, + void *driver_data, + void *screen_data, + int *ret_width, + int *ret_height ) +{ + SH7722DriverData *sdrv = driver_data; + SH7722DeviceData *sdev = sdrv->dev; + D_DEBUG_AT( SH7722_Screen, "%s()\n", __FUNCTION__ ); + + D_ASSERT( ret_width != NULL ); + D_ASSERT( ret_height != NULL ); + + *ret_width = sdev->lcd_width; + *ret_height = sdev->lcd_height; + + return DFB_OK; +} + +ScreenFuncs sh7722ScreenFuncs = { + .InitScreen = sh7722InitScreen, + .GetScreenSize = sh7722GetScreenSize, +}; + -- cgit