From: naru Date: Sun, 20 Apr 2003 07:54:23 +0000 (+0000) Subject: Image pooling optimized X-Git-Tag: BOTTLE2-55~20 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=55b39504a1b681bc8c67be3c57928eddc1ca6995;p=winbottle%2Fwinbottle.git Image pooling optimized --- diff --git a/bottleclient/SppList.pas b/bottleclient/SppList.pas index c2c5c66..3407951 100644 --- a/bottleclient/SppList.pas +++ b/bottleclient/SppList.pas @@ -97,6 +97,7 @@ begin Bitmap.Assign(FImagePool.Objects[Index] as TBitmap); end; FImagePool.Move(Index, 0); // æ“ª‚ÉŽ‚Á‚Ä‚­‚é + OutputDebugString(PChar(IntToStr(Index) + 'Cache Used')); Exit; end; // DLL‚ðŽÀÛ‚ɌĂяo‚µ‚ÄŒŸõ‚·‚é @@ -115,7 +116,7 @@ begin PoolItem := TBitmap.Create; try PoolItem.Assign(Bitmap); - FImagePool.AddObject(Ghost + ',' + IntToStr(Surface), PoolItem); + FImagePool.InsertObject(0, Ghost + ',' + IntToStr(Surface), PoolItem); except PoolItem.Free; end;