projects
/
platform
/
core
/
uifw
/
dali-toolkit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix leaking Glyph data
[platform/core/uifw/dali-toolkit.git]
/
dali-toolkit
/
internal
/
text
/
rendering
/
text-typesetter.cpp
diff --git
a/dali-toolkit/internal/text/rendering/text-typesetter.cpp
b/dali-toolkit/internal/text/rendering/text-typesetter.cpp
index
62e3b14
..
a55fd8d
100644
(file)
--- a/
dali-toolkit/internal/text/rendering/text-typesetter.cpp
+++ b/
dali-toolkit/internal/text/rendering/text-typesetter.cpp
@@
-248,6
+248,8
@@
PixelData Typesetter::Render( const Vector2& size )
// Retrieves the glyph's bitmap.
glyphData.glyphBitmap.buffer = NULL;
// Retrieves the glyph's bitmap.
glyphData.glyphBitmap.buffer = NULL;
+ glyphData.glyphBitmap.width = glyphInfo->width; // Desired width and height.
+ glyphData.glyphBitmap.height = glyphInfo->height;
fontClient.CreateBitmap( glyphInfo->fontId,
glyphInfo->index,
glyphData.glyphBitmap );
fontClient.CreateBitmap( glyphInfo->fontId,
glyphInfo->index,
glyphData.glyphBitmap );
@@
-258,6
+260,10
@@
PixelData Typesetter::Render( const Vector2& size )
TypesetGlyph( glyphData,
position,
color );
TypesetGlyph( glyphData,
position,
color );
+ // delete the glyphBitmap.buffer as it is now copied into glyphData.bitmapBuffer
+ delete []glyphData.glyphBitmap.buffer;
+ glyphData.glyphBitmap.buffer = NULL;
+
}
}
}
}