OSDN Git Service

Image pooling optimized
authornaru <bottle@mikage.to>
Sun, 20 Apr 2003 07:54:23 +0000 (07:54 +0000)
committernaru <bottle@mikage.to>
Sun, 20 Apr 2003 07:54:23 +0000 (07:54 +0000)
bottleclient/SppList.pas

index c2c5c66..3407951 100644 (file)
@@ -97,6 +97,7 @@ begin
       Bitmap.Assign(FImagePool.Objects[Index] as TBitmap);
     end;
     FImagePool.Move(Index, 0); // \90æ\93ª\82É\8e\9d\82Á\82Ä\82­\82é
+    OutputDebugString(PChar(IntToStr(Index) + 'Cache Used'));
     Exit;
   end;
   // DLL\82ð\8eÀ\8dÛ\82É\8cÄ\82Ñ\8fo\82µ\82Ä\8c\9f\8dõ\82·\82é
@@ -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;