Revert "ICU: SkShaper (bidi iterator only)"
This reverts commit 64e3d040e911687a9e65514696c421a50953a6fe.
Reason for revert: Breaking google3
Original change's description:
> ICU: SkShaper (bidi iterator only)
>
> Change-Id: I845cc0a962790ce37600f943473f21f619ee029b
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308508
> Reviewed-by: Ben Wagner <bungeman@google.com>
> Commit-Queue: Julia Lavrova <jlavrova@google.com>
TBR=djsollen@google.com,bungeman@google.com,reed@google.com,jlavrova@google.com
Change-Id: Ib081d97f61e57f74bb9414b3973cca640f3b3929
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309442
Reviewed-by: Julia Lavrova <jlavrova@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
diff --git a/modules/skshaper/src/SkUnicode.h b/modules/skshaper/src/SkUnicode.h
index 0b5b363..2219ce3 100644
--- a/modules/skshaper/src/SkUnicode.h
+++ b/modules/skshaper/src/SkUnicode.h
@@ -31,6 +31,8 @@
#endif
#endif
+namespace skia {
+
enum class UtfFormat {
kUTF8,
kUTF16
@@ -71,40 +73,12 @@
Position end;
};
-class SKUNICODE_API SkBidiIterator {
-public:
- typedef int32_t Position;
- typedef uint8_t Level;
- struct Region {
- Region(Position start, Position end, Level level)
- : start(start), end(end), level(level) { }
- Position start;
- Position end;
- Level level;
- };
- enum Direction {
- kLTR,
- kRTL,
- };
- virtual ~SkBidiIterator() {}
- virtual Position getLength() = 0;
- virtual Level getLevelAt(Position) = 0;
- static void ReorderVisual(const Level runLevels[], int levelsCount, int32_t logicalFromVisual[]);
-};
-
class SKUNICODE_API SkUnicode {
public:
typedef uint32_t ScriptID;
typedef uint32_t CombiningClass;
typedef uint32_t GeneralCategory;
virtual ~SkUnicode() = default;
-
- // Iterators (used in SkShaper)
- virtual std::unique_ptr<SkBidiIterator> makeBidiIterator
- (const uint16_t text[], int count, SkBidiIterator::Direction) = 0;
- virtual std::unique_ptr<SkBidiIterator> makeBidiIterator
- (const char text[], int count, SkBidiIterator::Direction) = 0;
-
// High level methods (that we actually use somewhere=SkParagraph)
virtual bool getBidiRegions
(const char utf8[], int utf8Units, Direction dir, std::vector<BidiRegion>* results) = 0;
@@ -122,4 +96,6 @@
static std::unique_ptr<SkUnicode> Make();
};
+} // namespace skia
+
#endif // SkUnicode_DEFINED