網頁

2010年10月25日 星期一

Android 貼圖速度

以下由模擬器測試結果

一次的getPixel 是 0.06ms
一次的DrawRect(0,0,100,100) 一次大約是0.12ms (565的環境下)
一次的DrawRect(0,0,100,100) 一次大約是0.17ms (ARGB 4444 8888的環境下)

一次的DrawRect(10,10,210,210) 一次大約是0.25ms (565的環境下)

一次的drawBitmap(Plant, 0, 0, paint); 大約是0.38ms (RGB565的環境下) Png 200 *200 無透明
一次的drawBitmap(Plant, 0, 0, paint); 大約是0.39ms (RGB565的環境下) JPG 200 *200 無透明

一次的drawBitmap(Plant, 0, 0, paint); 大約是0.18ms (RGB565的環境下) JPG 100 * 100 無透明

一次的drawBitmap(Plant, 0, 0, paint); 大約是0.54ms (RGB565的環境下) PNG 100 * 100 有透明
一次的drawBitmap(Plant, 0, 0, paint); 大約是0.52ms (ARGB8888的環境下) PNG 100 * 100 有透明

一次的drawBitmap(Plant, 0, 0, paint); 大約是2ms (RGB565的環境下) PNG 200 *200 有透明
一次的drawBitmap(Plant, 0, 0, paint); 大約是1.5ms (ARGB8888的環境下) PNG 200 *200 有透明

一次的drawCircle(50, 50, 50, paint); 一次大約是0.37ms (RGB565的環境下)
一次的DrawText 大約是0.11ms (565的環境下)
一次的DrawText 大約是0.12ms (ARGB 4444 8888的環境下)

沒有留言: