本文整理汇总了C++中CFbsBitmap::Reset方法的典型用法代码示例。如果您正苦于以下问题:C++ CFbsBitmap::Reset方法的具体用法?C++ CFbsBitmap::Reset怎么用?C++ CFbsBitmap::Reset使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CFbsBitmap
的用法示例。
在下文中一共展示了CFbsBitmap::Reset方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: CopyBitmap
// ============================ MEMBER FUNCTIONS ===============================
// -----------------------------------------------------------------------------
// CMaskedBitmap::CopyBitmap
// -----------------------------------------------------------------------------
TInt BitmapUtil::CopyBitmap( const CFbsBitmap& aSource, CFbsBitmap& aDestination )
{
TSize size( aSource.SizeInPixels() );
TDisplayMode displayMode( aSource.DisplayMode() );
TInt err( aDestination.Create( size, displayMode ) );
if( !err )
{
err = BitmapUtil::CopyBitmapData( aSource, aDestination, size, displayMode );
if( err )
{
aDestination.Reset();
}
}
return err;
}
示例2: BitmapsL
/**
@SYMTestCaseID
GRAPHICS-FBSERV-0512
@SYMTestCaseDesc
Creates bitmaps in different ways and checks if memory allocation succeeded
@SYMTestActions
Creates normal size bitmaps, large bitmaps, loads bitmaps, loads shared bitmaps,
duplicated bitmaps, resizes bitmaps, compresses bitmaps, externalized bitmaps to write store,
internalizes bitmaps back again from write store. All ways of creating bitmaps are tested
against Out Of Memory error conditions
@SYMTestExpectedResults
Test should pass
*/
void CTAlloc::BitmapsL()
{
TInt heapMarkCheckFlag;
if( !iStep->GetIntFromConfig(KDefaultSectionName, KFbsHeapMarkCheckFlag, heapMarkCheckFlag) )
{
INFO_PRINTF1(_L("Error reading ini file"));
User::Leave(KErrNotFound);
}
CFbsBitmap iBitmap;
CFbsBitmap iBitmap2;
iTestBitmapName = KTestBitmapOnZ;
TInt ret = iBitmap.Load(iTestBitmapName,ETfbs,NULL);
TEST2(ret, KErrNone);
ret = iBitmap.Create(KLargeSize,EColor256); // Expand server caches
TEST2(ret, KErrNone);
iBitmap.Reset();
TInt count;
// Create bitmap
INFO_PRINTF1(_L("CFbsBitmap::Create()\r\n"));
for (count = 1; ; count++)
{
iFbs->SendCommand(EFbsMessDefaultAllocFail,count);
if(heapMarkCheckFlag)
{
iFbs->SendCommand(EFbsMessDefaultMark);
iFbs->SendCommand(EFbsMessUserMark);
}
ret = iBitmap.Create(KSmallSize,EColor256);
if (ret == KErrNoMemory)
{
if(heapMarkCheckFlag)
{
iFbs->SendCommand(EFbsMessDefaultMark);
iFbs->SendCommand(EFbsMessUserMark);
}
}
else if (ret == KErrNone)
{
iBitmap.Reset();
if(heapMarkCheckFlag)
{
iFbs->SendCommand(EFbsMessDefaultMark);
iFbs->SendCommand(EFbsMessUserMark);
}
break;
}
else
TEST2(ret, KErrNone);
}
iFbs->SendCommand(EFbsMessDefaultAllocFail,0);
iFbs->SendCommand(EFbsMessUserAllocFail,0);
TEST(iFbs->ResourceCount()==0);
for (count = 1; ; count++)
{
iFbs->SendCommand(EFbsMessUserAllocFail,count);
if(heapMarkCheckFlag)
{
iFbs->SendCommand(EFbsMessDefaultMark);
iFbs->SendCommand(EFbsMessUserMark);
}
ret=iBitmap.Create(KSmallSize,EGray2);
if (ret == KErrNoMemory)
{
if(heapMarkCheckFlag)
{
iFbs->SendCommand(EFbsMessDefaultMarkEnd);
iFbs->SendCommand(EFbsMessUserMarkEnd);
}
}
else if (ret == KErrNone)
{
iBitmap.Reset();
if(heapMarkCheckFlag)
{
//.........这里部分代码省略.........