Remove variations ptr of the text shaper 55/323055/2
authorBowon Ryu <bowon.ryu@samsung.com>
Tue, 22 Apr 2025 09:34:10 +0000 (18:34 +0900)
committerBowon Ryu <bowon.ryu@samsung.com>
Thu, 24 Apr 2025 02:08:40 +0000 (11:08 +0900)
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 <bowon.ryu@samsung.com>
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-text-abstraction.cpp
dali-toolkit/internal/text/async-text/async-text-loader-impl.cpp
dali-toolkit/internal/text/controller/text-controller-impl-model-updater.cpp
dali-toolkit/internal/text/shaper.cpp
dali-toolkit/internal/text/shaper.h

index e8b3465708e9febcd103c56351ee323df0a578b6..f7f4c0448e07b62c6a81da1f4c0b9848d843a026 100644 (file)
@@ -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
index 709ee10d7e2228a8e65ed702dbf1cb0a9ad39577..d2c335d57b0fa70aaa736afedee92e38e6a7a0b4 100644 (file)
@@ -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);
index 29d369d76375f2190b246d922ad09adbdf5f1a98..f67b4d55b4f8d2e2bb9af9c702b9d5b32e927ef1 100644 (file)
@@ -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);
index 617bd33e89be71a8fbaf46e2b2c89c4b359d50fb..af85e8af111625fcc6eb88d75b33f3972829afda 100644 (file)
@@ -62,8 +62,7 @@ void ShapeText(TextAbstraction::Shaping&    shaping,
                Vector<GlyphInfo>&           glyphs,
                Vector<CharacterIndex>&      glyphToCharacterMap,
                Vector<Length>&              charactersPerGlyph,
-               Vector<GlyphIndex>&          newParagraphGlyphs,
-               Property::Map*               variationsMapPtr)
+               Vector<GlyphIndex>&          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)
index c170af53caeebea5ca6b227b8feb5d68594ae7ca..671bec9059e9bc23dfd138f20a450caa8f92da3d 100644 (file)
@@ -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<GlyphInfo>&           glyphs,
                Vector<CharacterIndex>&      glyphToCharacterMap,
                Vector<Length>&              charactersPerGlyph,
-               Vector<GlyphIndex>&          newParagraphGlyphs,
-               Property::Map*               variationsMapPtr = nullptr);
+               Vector<GlyphIndex>&          newParagraphGlyphs);
 
 } // namespace Text