diff options
author | Zolnai Tamás <tamas.zolnai@collabora.com> | 2014-08-04 12:04:10 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@collabora.co.uk> | 2014-08-29 17:40:28 +0200 |
commit | f71aae75017308545d0f835de6a5e39603d17002 (patch) | |
tree | 24bf333c937cfb4f755562d7f7df71012284b2d6 /include | |
parent | 9991b50ccc6ef3d26c28859b4a31504bd5001368 (diff) |
It seems better if the caller allocates the memory for the RGBA buffer.
For example it allows to use std::vector<> and call the method
Change-Id: Id4b8e33838d358dd242d0176e42558505fa8d4a3
Diffstat (limited to 'include')
-rw-r--r-- | include/vcl/opengl/OpenGLHelper.hxx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/include/vcl/opengl/OpenGLHelper.hxx b/include/vcl/opengl/OpenGLHelper.hxx index 52093c2b1a14..aa9448c2b3b7 100644 --- a/include/vcl/opengl/OpenGLHelper.hxx +++ b/include/vcl/opengl/OpenGLHelper.hxx @@ -21,7 +21,11 @@ class VCLOPENGL_DLLPUBLIC OpenGLHelper public: static GLint LoadShaders(const OUString& rVertexShaderName, const OUString& rFragmentShaderName); - static sal_uInt8* ConvertBitmapExToRGBABuffer(const BitmapEx& rBitmapEx); + /** + * Note: The caller is responsible for allocate the memory for the RGBA buffer, before call + * this method. RGBA buffer size is assumed to be 4*width*height + **/ + static void ConvertBitmapExToRGBABuffer(const BitmapEx& rBitmapEx, sal_uInt8* o_pRGBABuffer); static BitmapEx ConvertBGRABufferToBitmapEx(const sal_uInt8* const pBuffer, long nWidth, long nHeight); static void renderToFile(long nWidth, long nHeight, const OUString& rFileName); |