Blender Git Commit Log

Git Commits -> Revision 02c618f

Revision 02c618f by Benoit Bolsee (decklink)
August 30, 2015, 20:37 (GMT)
VideoTexture: Add an optional parameter to the refresh method of image sources.

If provided, the parameter must be an object that supports the buffer protocol
(bytearray, memoryview, etc) otherwise a runtime error is generated. If the
buffer is sufficiently large, the image is copied in the buffer before being
refreshed (i.e. invalidated). If the image was not already available, it will
be updated first. In the later case, it is possible that the image is loaded
directly in the user's buffer wihtout an intermediate copy in the internal
image buffer. This is currently the case for ImageViewport and ImageRender
sources when the OGL format matches the buffer format (alpha, no filter,
no flip, no scaling). Note that the image format in the buffer is always RGBA.
If no parameter is provided, the method works as before: the image is
invalidated without any attempt to updated it first.

The function returns False if a buffer was provided but could not be updated
for any reason (source not ready, buffer too small). It returns True in all
other situations.

The purpose of this function is to efficiently retrieve the OGL frame buffer
directly into a user buffer by skiping an extra copy to the internal image
buffer if it's not needed.

Commit Details:

Full Hash: 02c618fb9453df2754a03c9f7aba1455c5317384
Parent Commit: 6c7358a
Lines Changed: +174, -23

11 Modified Paths:

/source/gameengine/VideoTexture/ImageBase.cpp (+55, -3) (Diff)
/source/gameengine/VideoTexture/ImageBase.h (+4, -1) (Diff)
/source/gameengine/VideoTexture/ImageMix.cpp (+1, -1) (Diff)
/source/gameengine/VideoTexture/ImageRender.cpp (+28, -11) (Diff)
/source/gameengine/VideoTexture/ImageRender.h (+4, -1) (Diff)
/source/gameengine/VideoTexture/ImageViewport.cpp (+33, -1) (Diff)
/source/gameengine/VideoTexture/ImageViewport.h (+3, -0) (Diff)
/source/gameengine/VideoTexture/VideoBase.cpp (+42, -1) (Diff)
/source/gameengine/VideoTexture/VideoBase.h (+1, -1) (Diff)
/source/gameengine/VideoTexture/VideoDeckLink.cpp (+1, -1) (Diff)
/source/gameengine/VideoTexture/VideoFFmpeg.cpp (+2, -2) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021