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 /chart2 | |
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 'chart2')
-rw-r--r-- | chart2/source/view/main/OpenGLRender.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/chart2/source/view/main/OpenGLRender.cxx b/chart2/source/view/main/OpenGLRender.cxx index 2c93d36b4130..42b21cf67b1a 100644 --- a/chart2/source/view/main/OpenGLRender.cxx +++ b/chart2/source/view/main/OpenGLRender.cxx @@ -697,7 +697,9 @@ int OpenGLRender::CreateTextTexture(const BitmapEx& rBitmapEx, const awt::Point& } #endif - boost::shared_array<sal_uInt8> bitmapBuf(OpenGLHelper::ConvertBitmapExToRGBABuffer(rBitmapEx)); + boost::shared_array<sal_uInt8> bitmapBuf(new sal_uInt8[4 * rBitmapEx.GetSizePixel().Width() * rBitmapEx.GetSizePixel().Height()]); + + OpenGLHelper::ConvertBitmapExToRGBABuffer(rBitmapEx, bitmapBuf.get()); return CreateTextTexture(bitmapBuf, rBitmapEx.GetSizePixel(), awt::Point(), aSize, rotation, rTrans); |