Re: [AD] al_put/draw_pixel() speed

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On Sat, August 8, 2009 7:19 pm, Matthew Leverton said:
>   557  for (i = 0; i < created_bitmaps._size; i++) {
>   558       ALLEGRO_BITMAP_D3D **bptr = (ALLEGRO_BITMAP_D3D
> **)_al_vector_ref(&created_bitmaps, i);
>   559       ALLEGRO_BITMAP_D3D *bmp = *bptr;
>   560       ALLEGRO_BITMAP *al_bmp = (ALLEGRO_BITMAP *)bmp;
>   561       if (bmp->display == disp)
>   562 	      //d3d_sync_bitmap_memory(al_bmp);
>   563 	      if (!al_bmp->preserve_texture) {
>   564 	      	bmp->modified = false;
>   565 	      }
>   566 	      else if (!bmp->is_backbuffer && bmp->modified &&
> !(al_bmp->flags & ALLEGRO_MEMORY_BITMAP)) {
>   567 	         _al_d3d_sync_bitmap(al_bmp);
>   568 		 bmp->modified = false;
>   569 	      }
>   570    }
>
> Does the comment on line 562 go with the condition on 561? Either way,
> it confusing as written.

The comment should be removed. It used to be the only thing there, before
I added the PRESERVE flag. Also there's no good reason to have a
"preserve_texture" field when the flags should contain it already, I think.

Trent :{)>




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/