[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: blits proposal, was Re: [pygame] Dirty rect overlapping optimizations



Pull request sent with basic functionality of Surface.blits.

https://bitbucket.org/pygame/pygame/pull-requests/79

On Thu, Mar 30, 2017 at 2:44 AM, René Dudfield <renesd@xxxxxxxxx> wrote:
Not sure. I need to do some benchmarking, and then more research into if the API can cover everything we want it to do. (which of course means figuring it out). So far I think the API I proposed will help with the Groups we have, and will also help with people who don't care about dirty rects.

It's not really much code... as you can see Leif has already done something like it... it's just a for loop around blit basically.
https://gist.github.com/bitcraft/1785face7c5684916cde

If someone who just knows python wants to help, they could begin writing unit tests for it in test/surface_test.py

My pygame things are basically these at the moment. If anyone wants to do the blits() API, that's fine too!

* keep improving https://pygame.org/wiki/GettingStarted , gather and file usability bugs with pip, python, pygame...
* help finalise github move decision/move.
* blits
* cython sprites.*Group
* SDL2 stuff


cheers,




On Thu, Mar 30, 2017 at 8:02 AM, DiliupG <diliupg@xxxxxxxxx> wrote:
When will this fabulous upgrade be available? :)

On 29 March 2017 at 12:58, René Dudfield <renesd@xxxxxxxxx> wrote:
On Wed, Mar 29, 2017 at 8:33 AM, Radomir Dopieralski <pygame@xxxxxxxxxxxx> wrote:
I think that special_flags could be shared for all the blits in the
list. I can't think of a case where I would want to use different flags
for each.


Yeah, I think you may be right. When I've used it (for particles as an example) it was for everything in a Group. I searched through some code online and found a few uses where it was used in Sprites. But then all of those Sprites were rendered the same. There's some sort of nice symmetry by using the same arguments with blit, and blits however.



--
http://www.diliupg.com

**********************************************************************************************
This e-mail is confidential. It may also be legally privileged. If you are not the intended recipient or have received it in error, please delete it and all copies from your system and notify the sender immediately by return e-mail. Any unauthorized reading, reproducing, printing or further dissemination of this e-mail or its contents is strictly prohibited and may be unlawful. Internet communications cannot be guaranteed to be timely, secure, error or virus-free. The sender does not accept liability for any errors or omissions.
**********************************************************************************************