WebRadioApp  0.1
ewextgfx.c File Reference
#include "ewrte.h"
#include "ewgfx.h"
#include "ewextpxl_RGB565.h"
#include "ew_bsp_display.h"
#include "ew_bsp_graphics.h"
Include dependency graph for ewextgfx.c:

Data Structures

struct  XGfxSurface
 
struct  XGfxViewport
 

Macros

#define Err01   "Invalid framebuffer address!"
 
#define Err02
 
#define Err03   "Could not allocate memory!"
 
#define Err04   "Invalid double-buffer address!"
 
#define Err05   "Requested operation with graphics accelerator failed!"
 
#define Err06   "Full screen update cannot be done within scratch-pad buffer!"
 
#define Err07   "Partial screen update cannot be combined with double buffering!"
 
#define EW_SURFACE_PREALLOCATED   0x01000000
 
#define EW_SURFACE_MODIFIED_BY_CPU   0x02000000
 
#define EW_SURFACE_MODIFIED_BY_GA   0x04000000
 
#define EW_SURFACE_TRANSACTION_MASK   0x0000FFFF
 
#define EW_CACHE_LINE_SIZE   0
 
#define EW_CACHE_ALIGNMENT   0
 
#define EW_INVALIDATE_CACHE(addr, size)
 
#define EW_CLEAN_CACHE(addr, size)
 

Functions

static void GfxFlushGraphics (void)
 
static void GfxSelectSurfaces (unsigned long aDstSurfaceHandle, unsigned long aSrcSurfaceHandle)
 
static void TrackMemoryUsage (void)
 
int GfxInitGfx (void *aArgs)
 
unsigned long GfxInitViewport (int aWidth, int aHeight, int aExtentX, int aExtentY, int aExtentWidth, int aExtentHeight, int aOrient, int aOpacity, void *aDisplay1, void *aDisplay2, void *aDisplay3)
 
void GfxDoneViewport (unsigned long aHandle)
 
unsigned long GfxBeginUpdate (unsigned long aHandle)
 
unsigned long GfxBeginUpdateArea (unsigned long aHandle, int aX, int aY, int aWidth, int aHeight)
 
void GfxEndUpdate (unsigned long aHandle, int aX, int aY, int aWidth, int aHeight)
 
unsigned long GfxCreateSurface (int aFormat, int aWidth, int aHeight)
 
unsigned long GfxCreateConstSurface (int aFormat, int aWidth, int aHeight, XSurfaceMemory *aMemory)
 
void GfxDestroySurface (unsigned long aHandle)
 
unsigned long GfxLockSurface (unsigned long aHandle, int aX, int aY, int aWidth, int aHeight, int aIndex, int aCount, int aReadPixel, int aWritePixel, int aReadClut, int aWriteClut, XSurfaceMemory *aMemory)
 
void GfxUnlockSurface (unsigned long aSurfaceHandle, unsigned long aLockHandle, int aX, int aY, int aWidth, int aHeight, int aIndex, int aCount, int aWritePixel, int aWriteClut)
 
void GfxFillDriver (unsigned long aDstHandle, int aDstX, int aDstY, int aWidth, int aHeight, int aBlend, unsigned long *aColors)
 
void GfxCopyDriver (unsigned long aDstHandle, unsigned long aSrcHandle, int aDstX, int aDstY, int aSrcX, int aSrcY, int aWidth, int aHeight, int aBlend, unsigned long *aColors)
 
void GfxBlendDriver (unsigned long aDstHandle, unsigned long aSrcHandle, int aDstX, int aDstY, int aSrcX, int aSrcY, int aWidth, int aHeight, int aBlend, unsigned long *aColors)
 
void GfxUseGraphicsAccelerator (int aActive)
 
int GfxIsGraphicsAcceleratorUsed (void)
 

Variables

static unsigned char UseGraphicsAccelerator = 1
 
static unsigned short TransactionNumber = 0
 
static voidLoadedClutSurface = 0
 
int EwResourcesMemory
 
int EwResourcesMemoryPeak
 
int EwObjectsMemory
 
int EwStringsMemory
 
int EwMemoryPeak
 

Macro Definition Documentation

◆ Err01

#define Err01   "Invalid framebuffer address!"

◆ Err02

#define Err02
Value:
"Size of framebuffer device (display size) does not match with given " \
"application size!"

◆ Err03

#define Err03   "Could not allocate memory!"

◆ Err04

#define Err04   "Invalid double-buffer address!"

◆ Err05

#define Err05   "Requested operation with graphics accelerator failed!"

◆ Err06

#define Err06   "Full screen update cannot be done within scratch-pad buffer!"

◆ Err07

#define Err07   "Partial screen update cannot be combined with double buffering!"

◆ EW_CACHE_ALIGNMENT

#define EW_CACHE_ALIGNMENT   0

◆ EW_CACHE_LINE_SIZE

#define EW_CACHE_LINE_SIZE   0

◆ EW_CLEAN_CACHE

#define EW_CLEAN_CACHE (   addr,
  size 
)

◆ EW_INVALIDATE_CACHE

#define EW_INVALIDATE_CACHE (   addr,
  size 
)

◆ EW_SURFACE_MODIFIED_BY_CPU

#define EW_SURFACE_MODIFIED_BY_CPU   0x02000000

◆ EW_SURFACE_MODIFIED_BY_GA

#define EW_SURFACE_MODIFIED_BY_GA   0x04000000

◆ EW_SURFACE_PREALLOCATED

#define EW_SURFACE_PREALLOCATED   0x01000000

◆ EW_SURFACE_TRANSACTION_MASK

#define EW_SURFACE_TRANSACTION_MASK   0x0000FFFF

Function Documentation

◆ GfxBeginUpdate()

unsigned long GfxBeginUpdate ( unsigned long  aHandle)

References XGfxViewport::DoubleBuffer, Err06, EW_ERROR, EwBspDisplayWaitForCompletion(), XGfxViewport::FrameBuffer, GfxFlushGraphics(), and LoadedClutSurface.

Here is the call graph for this function:

◆ GfxBeginUpdateArea()

unsigned long GfxBeginUpdateArea ( unsigned long  aHandle,
int  aX,
int  aY,
int  aWidth,
int  aHeight 
)

References XGfxSurface::BytesPerPixel, XGfxViewport::DoubleBuffer, Err07, EW_ERROR, EwBspDisplayWaitForCompletion(), XGfxViewport::FrameBuffer, GfxFlushGraphics(), XGfxSurface::Height, LoadedClutSurface, XGfxSurface::OrigPixel, XGfxSurface::Pixel, and XGfxSurface::Width.

Here is the call graph for this function:

◆ GfxBlendDriver()

◆ GfxCopyDriver()

◆ GfxCreateConstSurface()

unsigned long GfxCreateConstSurface ( int  aFormat,
int  aWidth,
int  aHeight,
XSurfaceMemory aMemory 
)

◆ GfxCreateSurface()

unsigned long GfxCreateSurface ( int  aFormat,
int  aWidth,
int  aHeight 
)

◆ GfxDestroySurface()

void GfxDestroySurface ( unsigned long  aHandle)

References XGfxSurface::AllocSize, EW_SURFACE_TRANSACTION_MASK, EwFreeVideo(), EwResourcesMemory, XGfxSurface::Flags, GfxFlushGraphics(), and TransactionNumber.

Here is the call graph for this function:

◆ GfxDoneViewport()

void GfxDoneViewport ( unsigned long  aHandle)

References XGfxViewport::DoubleBuffer, EwBspGraphicsDone(), EwFree(), EwResourcesMemory, XGfxViewport::FrameBuffer, and GfxFlushGraphics().

Here is the call graph for this function:

◆ GfxEndUpdate()

void GfxEndUpdate ( unsigned long  aHandle,
int  aX,
int  aY,
int  aWidth,
int  aHeight 
)

◆ GfxFillDriver()

void GfxFillDriver ( unsigned long  aDstHandle,
int  aDstX,
int  aDstY,
int  aWidth,
int  aHeight,
int  aBlend,
unsigned long *  aColors 
)

◆ GfxFlushGraphics()

static void GfxFlushGraphics ( void  )
static

References EwBspGraphicsWaitForCompletion().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GfxInitGfx()

◆ GfxInitViewport()

unsigned long GfxInitViewport ( int  aWidth,
int  aHeight,
int  aExtentX,
int  aExtentY,
int  aExtentWidth,
int  aExtentHeight,
int  aOrient,
int  aOpacity,
void aDisplay1,
void aDisplay2,
void aDisplay3 
)

◆ GfxIsGraphicsAcceleratorUsed()

int GfxIsGraphicsAcceleratorUsed ( void  )

◆ GfxLockSurface()

unsigned long GfxLockSurface ( unsigned long  aHandle,
int  aX,
int  aY,
int  aWidth,
int  aHeight,
int  aIndex,
int  aCount,
int  aReadPixel,
int  aWritePixel,
int  aReadClut,
int  aWriteClut,
XSurfaceMemory aMemory 
)

References XGfxSurface::BytesPerPixel, XGfxSurface::Clut, XSurfaceMemory::Clut, EW_INVALIDATE_CACHE, EW_SURFACE_MODIFIED_BY_CPU, EW_SURFACE_MODIFIED_BY_GA, EW_SURFACE_TRANSACTION_MASK, EW_UNUSED_ARG, EwZero(), XGfxSurface::Flags, GfxFlushGraphics(), XGfxSurface::Height, XSurfaceMemory::Pitch1X, XSurfaceMemory::Pitch1Y, XGfxSurface::Pixel, XSurfaceMemory::Pixel1, TransactionNumber, and XGfxSurface::Width.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GfxSelectSurfaces()

static void GfxSelectSurfaces ( unsigned long  aDstSurfaceHandle,
unsigned long  aSrcSurfaceHandle 
)
static

References XGfxSurface::BytesPerPixel, EW_CLEAN_CACHE, EW_SURFACE_MODIFIED_BY_CPU, EW_SURFACE_MODIFIED_BY_GA, EW_SURFACE_TRANSACTION_MASK, XGfxSurface::Flags, XGfxSurface::Height, XGfxSurface::Pixel, TransactionNumber, and XGfxSurface::Width.

Here is the caller graph for this function:

◆ GfxUnlockSurface()

void GfxUnlockSurface ( unsigned long  aSurfaceHandle,
unsigned long  aLockHandle,
int  aX,
int  aY,
int  aWidth,
int  aHeight,
int  aIndex,
int  aCount,
int  aWritePixel,
int  aWriteClut 
)

References EW_UNUSED_ARG.

Here is the caller graph for this function:

◆ GfxUseGraphicsAccelerator()

void GfxUseGraphicsAccelerator ( int  aActive)

References EwPrint(), and UseGraphicsAccelerator.

Here is the call graph for this function:

◆ TrackMemoryUsage()

static void TrackMemoryUsage ( void  )
static

References EwMemoryPeak, EwObjectsMemory, EwResourcesMemory, EwResourcesMemoryPeak, and EwStringsMemory.

Here is the caller graph for this function:

Variable Documentation

◆ EwMemoryPeak

int EwMemoryPeak

◆ EwObjectsMemory

int EwObjectsMemory

◆ EwResourcesMemory

int EwResourcesMemory

◆ EwResourcesMemoryPeak

int EwResourcesMemoryPeak

◆ EwStringsMemory

int EwStringsMemory

◆ LoadedClutSurface

void* LoadedClutSurface = 0
static

◆ TransactionNumber

unsigned short TransactionNumber = 0
static

◆ UseGraphicsAccelerator

unsigned char UseGraphicsAccelerator = 1
static