本文整理汇总了C++中CSurface::DrawContentL方法的典型用法代码示例。如果您正苦于以下问题:C++ CSurface::DrawContentL方法的具体用法?C++ CSurface::DrawContentL怎么用?C++ CSurface::DrawContentL使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CSurface
的用法示例。
在下文中一共展示了CSurface::DrawContentL方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: LoadGpuProcessorL
void CEglTest_TestStep_StressLoad::LoadGpuProcessorL()
{
CSurface *surface = CSurface::SurfaceFactoryL(ESurfTypeEglWindow);
CleanupStack::PushL(surface);
surface->CreateL(EStandard128sqSurface, TPoint(128, 128));
TRgb bg = TRgb(0x55, 0x88, 0xff); // Cyan/turqoise-ish.
TRgb fg = TRgb(0xff, 0x11, 0x22); // Red (sort of)
while(!__e32_atomic_load_acq32(&iStopThreadFlag[EThreadLoadGpuProcessor]))
{
surface->DrawContentL(bg);
surface->DrawComplexL(fg);
surface->SubmitContent(ETrue);
}
CleanupStack::PopAndDestroy(surface);
eglReleaseThread();
}
示例2: LoadGpuMemoryL
void CEglTest_TestStep_StressLoad::LoadGpuMemoryL()
{
const TInt KMaxSurfaceAllocs = 1000;
CSurface **surfaces = new CSurface*[KMaxSurfaceAllocs];
ENGINE_ASSERT(surfaces);
TInt nSurfaces = 0;
TInt err;
while(!__e32_atomic_load_acq32(&iStopThreadFlag[EThreadLoadGpuMemory]))
{
ENGINE_ASSERT(nSurfaces < KMaxSurfaceAllocs);
CSurface* s = CSurface::SurfaceFactoryL(ESurfTypePBuffer);
if (s)
{
TRAP(err, s->CreateL(ELargeSurface));
if (err == KErrNone)
{
surfaces[nSurfaces++] = s;
TRAP(err, s->DrawContentL(TRgb(0x10, 0x20, 0xB0)));
}
else
{
delete s;
s = NULL;
}
}
if (!s)
{
User::After(100 * 1000);
TInt nRelease = nSurfaces / 4;
for(TInt i = 0; i < nRelease; i++)
{
delete surfaces[--nSurfaces];
surfaces[nSurfaces] = NULL;
}
User::After(100 * 1000); // 100 ms.
}
}
while(nSurfaces)
{
delete surfaces[--nSurfaces];
}
delete [] surfaces;
eglReleaseThread();
}