From 9bbe189db16d396060458e653deae50211b24351 Mon Sep 17 00:00:00 2001 From: Sungyeon Woo Date: Tue, 2 Apr 2013 19:50:02 +0900 Subject: [PATCH] rollback bidi cache Change-Id: Ibbd3865a6fb471d1cd475d7c4a6ded279a0c7b31 Signed-off-by: Sungyeon Woo --- src/graphics/FGrp_Font.cpp | 10 ++++++++-- src/graphics/FGrp_FontFt2.cpp | 34 ++++++++++++++++++---------------- 2 files changed, 26 insertions(+), 18 deletions(-) diff --git a/src/graphics/FGrp_Font.cpp b/src/graphics/FGrp_Font.cpp index 5da2ec4..214daff 100644 --- a/src/graphics/FGrp_Font.cpp +++ b/src/graphics/FGrp_Font.cpp @@ -1400,7 +1400,10 @@ _Font::__GetTextExtentList(_TextBidiPropertyWithReorder& bidiProperty, _Util::Ac _IFont::Glyph* pGlyph; pEnum->GetCurrent(pGlyph); - pBaseFont->UnloadGlyph(&pGlyph); + delete[] (char*) pGlyph; + + // bidi cache underdevelop + //pBaseFont->UnloadGlyph(&pGlyph); } delete pEnum; @@ -1738,7 +1741,10 @@ _Font::__DrawText(_Canvas& canvas, const Point& point, const Tizen::Base::String _IFont::Glyph* pGlyph; pEnum->GetCurrent(pGlyph); - pBaseFont->UnloadGlyph(&pGlyph); + delete[] (char*) pGlyph; + + // bidi cache underdevelop + //pBaseFont->UnloadGlyph(&pGlyph); } delete pEnum; diff --git a/src/graphics/FGrp_FontFt2.cpp b/src/graphics/FGrp_FontFt2.cpp index 3ff62ce..f94bccc 100644 --- a/src/graphics/FGrp_FontFt2.cpp +++ b/src/graphics/FGrp_FontFt2.cpp @@ -902,15 +902,16 @@ _FontFt2::GetGlyphList(const _Util::String& reorderedText, Tizen::Base::Collecti FT_UInt glyph_index = auxInfo.glyphIndex; - _IFont::Glyph *pFontGlyphData; - - bool rtn = FindCache(glyph_index, __fontAttrib.size, __fontAttrib.style, &pFontGlyphData); - - if (rtn) - { - out.Add(pFontGlyphData); - continue; - } + // bidi cache underdevelop + //_IFont::Glyph *pFontGlyphData; + // + //bool rtn = FindCache(glyph_index, __fontAttrib.size, __fontAttrib.style, &pFontGlyphData); + // + //if (rtn) + //{ + // out.Add(pFontGlyphData); + // continue; + //} if (isSynthetic) { @@ -959,7 +960,7 @@ _FontFt2::GetGlyphList(const _Util::String& reorderedText, Tizen::Base::Collecti image.bytesPerLine = pSlot->bitmap.pitch; image.pBitmap = pSlot->bitmap.buffer; - pFontGlyphData = (_IFont::Glyph*) new (std::nothrow) char[sizeof(_IFont::Glyph) + (image.bytesPerLine * image.height)]; + _IFont::Glyph *pFontGlyphData = (_IFont::Glyph*) new (std::nothrow) char[sizeof(_IFont::Glyph) + (image.bytesPerLine * image.height)]; if (pFontGlyphData == null) { @@ -988,12 +989,13 @@ _FontFt2::GetGlyphList(const _Util::String& reorderedText, Tizen::Base::Collecti out.Add(pFontGlyphData); - AddCache(glyph_index, __fontAttrib.size, __fontAttrib.style, pFontGlyphData); - - if (pFontGlyphData != null) - { - pFontGlyphData->hasOwnerShip = 1; - } + // bidi cache underdevelop + //AddCache(glyph_index, __fontAttrib.size, __fontAttrib.style, pFontGlyphData); + // + //if (pFontGlyphData != null) + //{ + // pFontGlyphData->hasOwnerShip = 1; + //} } return true; -- 2.7.4