views:

13

answers:

0

I have 2 threads, one that decodes bitmaps from the assetManager, and another that is my SurfaceView. When i set the priority of the bitmap decoder very low, i actually get more lag then if its much higher. Why would it act like that? thanks.

Heres my code:

        public void bitmapLoader(final String filePath,final int pathVariable) {
        handler.post(new Runnable() {
    @Override
    public void run() {
        if(bitmapArray[pathVariable]==null){
    try {
    bitmapArray[pathVariable]=BitmapFactory.decodeStream(assetManager.open(filePath));
    Log.e("sys","decoded bitmap # "+pathVariable);

} catch (IOException e) {
    e.printStackTrace();
} 
        }
    }//end runnable.
});
    }
}//end BitmapLoaderThread class.