0
此鏈接:http://www.mediafire.com/view/?hr441qalu6b6d7s位圖上SurfaceView Optomization
指向表明我的位圖的繪製花費很長的時間,導致滯後於我的應用程序的圖像。我如何優化這個以免造成太多滯後。目前我有這個作爲我的畫布方法:
Canvas c = holder.lockCanvas();
Paint p = new Paint();
p.setTextSize(30);
p.setColor(Color.BLACK);
new handleStuff().execute("");
//Actions End
//Background
Bitmap scaledBackground = Bitmap.createScaledBitmap(background, this.getWidth(), this.getHeight(), true);
c.drawBitmap(scaledBackground, 0, 0, null);
//Background End
我最初的想法是,背景,每一次是什麼原因造成的是滯後的,但我不知道的繪製。