From: Bowon Ryu Date: Tue, 22 Apr 2025 09:34:10 +0000 (+0900) Subject: Remove variations ptr of the text shaper X-Git-Tag: dali_2.4.17~2^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F55%2F323055%2F2;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git Remove variations ptr of the text shaper Due to changes in the structure of the text cache(adaptor), variations ptr argument is no longer needed in shaper. https://review.tizen.org/gerrit/c/platform/core/uifw/dali-adaptor/+/322748 Change-Id: Ie88615354b94092fb170e82917e105967dcb7f0c Signed-off-by: Bowon Ryu --- diff --git a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-text-abstraction.cpp b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-text-abstraction.cpp index e8b3465708..f7f4c0448e 100644 --- a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-text-abstraction.cpp +++ b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-text-abstraction.cpp @@ -304,7 +304,7 @@ public: } } - Length Shape(TextAbstraction::FontClient& fontClient, unsigned int const* text, unsigned int numChars, unsigned int fontId, Script script, Property::Map* variationsMapPtr) + Length Shape(TextAbstraction::FontClient& fontClient, unsigned int const* text, unsigned int numChars, unsigned int fontId, Script script) { mText = new unsigned char[numChars]; mNumChars = numChars; @@ -716,9 +716,9 @@ void Shaping::GetGlyphs(GlyphInfo* glyphStore, unsigned int* mappingTable) GetImplementation(*this).GetGlyphs(glyphStore, mappingTable); } -Length Shaping::Shape(TextAbstraction::FontClient& fontClient, unsigned int const* text, unsigned int numChars, unsigned int fontId, Script script, Property::Map* variationsMapPtr) +Length Shaping::Shape(TextAbstraction::FontClient& fontClient, unsigned int const* text, unsigned int numChars, unsigned int fontId, Script script) { - return GetImplementation(*this).Shape(fontClient, text, numChars, fontId, script, variationsMapPtr); + return GetImplementation(*this).Shape(fontClient, text, numChars, fontId, script); } } // namespace TextAbstraction diff --git a/dali-toolkit/internal/text/async-text/async-text-loader-impl.cpp b/dali-toolkit/internal/text/async-text/async-text-loader-impl.cpp index 709ee10d7e..d2c335d57b 100644 --- a/dali-toolkit/internal/text/async-text/async-text-loader-impl.cpp +++ b/dali-toolkit/internal/text/async-text/async-text-loader-impl.cpp @@ -505,8 +505,7 @@ void AsyncTextLoader::Update(AsyncTextParameters& parameters) glyphs, glyphsToCharactersMap, charactersPerGlyph, - newParagraphGlyphs, - variationsMapPtr); + newParagraphGlyphs); // Create the 'number of glyphs' per character and the glyph to character conversion tables. mTextModel->mVisualModel->CreateGlyphsPerCharacterTable(0u, 0u, numberOfCharacters); diff --git a/dali-toolkit/internal/text/controller/text-controller-impl-model-updater.cpp b/dali-toolkit/internal/text/controller/text-controller-impl-model-updater.cpp index 29d369d763..f67b4d55b4 100644 --- a/dali-toolkit/internal/text/controller/text-controller-impl-model-updater.cpp +++ b/dali-toolkit/internal/text/controller/text-controller-impl-model-updater.cpp @@ -384,12 +384,6 @@ bool ControllerImplModelUpdater::Update(Controller::Impl& impl, OperationsMask o TextAbstraction::Shaping shaping = TextAbstraction::Shaping::Get(); - Property::Map *variationsMapPtr = nullptr; - if(!impl.mModel->mLogicalModel->mVariationsMap.Empty()) - { - variationsMapPtr = &impl.mModel->mLogicalModel->mVariationsMap; - } - // Shapes the text. ShapeText(shaping, impl.mFontClient, @@ -403,8 +397,7 @@ bool ControllerImplModelUpdater::Update(Controller::Impl& impl, OperationsMask o glyphs, glyphsToCharactersMap, charactersPerGlyph, - newParagraphGlyphs, - variationsMapPtr); + newParagraphGlyphs); // Create the 'number of glyphs' per character and the glyph to character conversion tables. impl.mModel->mVisualModel->CreateGlyphsPerCharacterTable(startIndex, impl.mTextUpdateInfo.mStartGlyphIndex, requestedNumberOfCharacters); diff --git a/dali-toolkit/internal/text/shaper.cpp b/dali-toolkit/internal/text/shaper.cpp index 617bd33e89..af85e8af11 100644 --- a/dali-toolkit/internal/text/shaper.cpp +++ b/dali-toolkit/internal/text/shaper.cpp @@ -62,8 +62,7 @@ void ShapeText(TextAbstraction::Shaping& shaping, Vector& glyphs, Vector& glyphToCharacterMap, Vector& charactersPerGlyph, - Vector& newParagraphGlyphs, - Property::Map* variationsMapPtr) + Vector& newParagraphGlyphs) { if(0u == numberOfCharacters) { @@ -213,8 +212,7 @@ void ShapeText(TextAbstraction::Shaping& shaping, textBuffer + previousIndex, (currentIndex - previousIndex), // The number of characters to shape. currentFontId, - currentScript, - variationsMapPtr); + currentScript); #if defined(TRACE_ENABLED) if(logEnabled) diff --git a/dali-toolkit/internal/text/shaper.h b/dali-toolkit/internal/text/shaper.h index c170af53ca..671bec9059 100644 --- a/dali-toolkit/internal/text/shaper.h +++ b/dali-toolkit/internal/text/shaper.h @@ -52,7 +52,6 @@ class VisualModel; * @param[out] glyphToCharacterMap Vector containing the first character in the logical model that each glyph relates to. * @param[out] charactersPerGlyph Vector containing the number of characters per glyph. * @param[out] newParagraphGlyphs Vector containing the indices to the new paragraph glyphs. - * @param[in] variationsMapPtr The variations used in variable fonts. */ void ShapeText(TextAbstraction::Shaping& shaping, TextAbstraction::FontClient& fontClient, @@ -66,8 +65,7 @@ void ShapeText(TextAbstraction::Shaping& shaping, Vector& glyphs, Vector& glyphToCharacterMap, Vector& charactersPerGlyph, - Vector& newParagraphGlyphs, - Property::Map* variationsMapPtr = nullptr); + Vector& newParagraphGlyphs); } // namespace Text