Hi, we're using Wince BSP V01.00.00.
I don't understand some codes in the function OMAPDDGPE::AllocSurface, in the file "COMMON_TI_V1\COMMON_TI\DSS\DDGPE\omap_ddsurf.cpp", what does the code in red color use for? what if my screen resolution is 800x480?
//------------------------------------------------------------------------------
SCODE
OMAPDDGPE::AllocSurface(
OMAPDDGPESurface ** ppSurf,
OMAP_DSS_PIXELFORMAT pixelFormat,
int width,
int height
)
{
BOOL bResult;
OMAPSurface* pOmapSurface;
// Allocate OMAP surface
bResult = m_pSurfaceMgr->Allocate(
pixelFormat,
width,
height,
&pOmapSurface );
if (bResult == FALSE)
{
DEBUGMSG(GPE_ZONE_WARNING, (L"OMAP DDraw AllocSurface - Out of Video Memory\n"));
return DDERR_OUTOFVIDEOMEMORY;
}
if ((width == 720) && (height == 480))
{
m_lgSufAddress = pOmapSurface->PhysicalAddr();
RETAILMSG(1, (L"OMAPDDGPE:AllocSurface:m_lgSufAddress = %x\r\n", m_lgSufAddress));
}
// Allocate a OMAPDDGPESurface object to wrap the OMAP surface
*ppSurf = new OMAPDDGPESurface(m_pSurfaceMgr, pOmapSurface);
if (*ppSurf == NULL)
{
// Out of system memory
DEBUGMSG(GPE_ZONE_WARNING, (L"OMAP DDraw AllocSurface - Out of Memory\n"));
delete pOmapSurface;
return E_OUTOFMEMORY;
}
// Surface created in video memory
return S_OK;
}
Regards,
Jack