Skip to content

Conversation

@Aloz1
Copy link
Contributor

@Aloz1 Aloz1 commented Aug 4, 2016

This pull request is in reference to issue #36

Aloz1 added 6 commits August 1, 2016 17:00
Added an SDL_Surface as a cache for the bitmap so that pixels can be
transfered all at once to the GPU
Speed tests were already partly implemented, but conditionals for
selecting the tests based on input from the user must have been
accidentally removed during rebase from v4 branch to devel.
As bitmaps now always have an allocated surface, there is no need to
ensure the surface exists.

Surfaces are now also always drawable (which means that
bitmap_be.drawable is probably no longer needed. This was done because
it seemed the only reason surfaces were not drawable because of images
that had been loaded from file which needed to be kept in sync with
their textures. My modifications now no longer make this a problem as
data will always be synced between surfaces when different drawing
operations call for it.
All bitmaps should have a surface, otherwise there will be serious
issues when trying to draw to the surface, or sync the surface to it's
corresponding texture. Thus this function has been made redundant and
has been optimised out.
The image is opened through a read only surface, then copied to a newly
created bitmap. This properly frees image surface after copying it to
the bitmap.
Bitmaps no longer need to know if they're drawable as their SDL_Surface
is always drawable and always exists.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant