summaryrefslogtreecommitdiff
path: root/vcl/opengl/PackedTextureAtlas.cxx
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.com>2016-10-02 18:09:30 +0200
committerTomaž Vajngerl <quikee@gmail.com>2016-11-07 12:59:38 +0000
commit19dc288ce4a5ad7a386ff2b4208b7284d8731067 (patch)
treeefff7545278a77719dfd821439ec97ad3bb2b7eb /vcl/opengl/PackedTextureAtlas.cxx
parent055be3f4be764e445064effabf06de9d1ed819f7 (diff)
opengl: use shared_ptr for ImplOpenGLTexture
Change-Id: I755e312e3e0a69b99a8f02f7d05561b7289845ce Reviewed-on: https://gerrit.libreoffice.org/30597 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'vcl/opengl/PackedTextureAtlas.cxx')
-rw-r--r--vcl/opengl/PackedTextureAtlas.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/vcl/opengl/PackedTextureAtlas.cxx b/vcl/opengl/PackedTextureAtlas.cxx
index 46fdf3b5a36b..bad17587762d 100644
--- a/vcl/opengl/PackedTextureAtlas.cxx
+++ b/vcl/opengl/PackedTextureAtlas.cxx
@@ -109,7 +109,7 @@ Node* Node::insert(int nWidth, int nHeight, int nPadding)
struct PackedTexture
{
- std::unique_ptr<ImplOpenGLTexture> mpTexture;
+ std::shared_ptr<ImplOpenGLTexture> mpTexture;
std::unique_ptr<Node> mpRootNode;
PackedTexture(int nWidth, int nHeight)
@@ -149,7 +149,7 @@ OpenGLTexture PackedTextureAtlasManager::Reserve(int nWidth, int nHeight)
Node* pNode = pPackedTexture->mpRootNode->insert(nWidth, nHeight, 1);
if (pNode != nullptr)
{
- return OpenGLTexture(pPackedTexture->mpTexture.get(), pNode->mRectangle, -1);
+ return OpenGLTexture(pPackedTexture->mpTexture, pNode->mRectangle, -1);
}
}
CreateNewTexture();
@@ -157,7 +157,7 @@ OpenGLTexture PackedTextureAtlasManager::Reserve(int nWidth, int nHeight)
Node* pNode = pPackedTexture->mpRootNode->insert(nWidth, nHeight, 1);
if (pNode != nullptr)
{
- return OpenGLTexture(pPackedTexture->mpTexture.get(), pNode->mRectangle, -1);
+ return OpenGLTexture(pPackedTexture->mpTexture, pNode->mRectangle, -1);
}
return OpenGLTexture();
}