kivy/kivy — pull request #1766 by matham (2014-01-15 09:06:49+00:00)
Title: graphics-cython-buffer improvments

The first commit removes the allocate function from Memory and instead moves it into the constructor. A realloc function can be implemented instead if needed. It also adds parameters for accepting a ctypes array as the buffer source. And adds a read only flag in case we don't want to modify the memory.

The second and 4th commit make sure to keep a reference to the original proxy objects so that they don't go out of memory while in use.

The third commit just fixes and optimizes things overall.

The 5th commit changes blit to also accept bytearrays.

Hopefully I did not stray from what you intended. But if I did let me know and I'll change things.