aboutsummaryrefslogtreecommitdiff
path: root/tests/FontMgrTest.cpp
diff options
context:
space:
mode:
authorRobert Phillips <robertphillips@google.com>2019-04-17 12:03:45 +0000
committerSkia Commit-Bot <skia-commit-bot@chromium.org>2019-04-17 12:03:53 +0000
commit33906ad1e26fd36430a70712382b3edc3970213c (patch)
tree7e1d1af5db96bbf5f517ff5b9a97ef370d8c915d /tests/FontMgrTest.cpp
parente88d4382e1cf0041ecc1f148e05fbf3b7d0fb7b1 (diff)
downloadskia-33906ad1e26fd36430a70712382b3edc3970213c.tar.gz
Reland "Revert "Simplify SkTypeface::charsToGlyphs API to require UTF32 input""
This reverts commit 652b007a4cbb0b8c716510949456243573129ff4. Reason for revert: Potentially causing Google3 errors Original change's description: > Revert "Revert "Simplify SkTypeface::charsToGlyphs API to require UTF32 input"" > > with legacy guard for google3 > > Needs this to land first: https://critique.corp.google.com/#review/243924283 > > This reverts commit 70ed05e53ad244b3234415b447e5fcd53fb40e3b. > > Change-Id: I3e821dfcdbf3004382092338ebad7cceaf40cefd > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/208668 > Reviewed-by: Mike Reed <reed@google.com> > Commit-Queue: Mike Reed <reed@google.com> > Auto-Submit: Mike Reed <reed@google.com> TBR=fmalita@chromium.org,reed@google.com Change-Id: Id2b3ed8a6157b5e33721b0c5168c5680bfac15b0 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/c/skia/+/208669 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'tests/FontMgrTest.cpp')
-rw-r--r--tests/FontMgrTest.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/FontMgrTest.cpp b/tests/FontMgrTest.cpp
index c0d8b492ee..67867b54dd 100644
--- a/tests/FontMgrTest.cpp
+++ b/tests/FontMgrTest.cpp
@@ -136,8 +136,12 @@ static void test_matchStyleCSS3(skiatest::Reporter* reporter) {
return nullptr;
}
void onGetFontDescriptor(SkFontDescriptor*, bool*) const override { }
- void onCharsToGlyphs(const SkUnichar* chars, int count, SkGlyphID glyphs[]) const override {
- sk_bzero(glyphs, count * sizeof(glyphs[0]));
+ virtual int onCharsToGlyphs(const void* chars, Encoding encoding,
+ uint16_t glyphs[], int glyphCount) const override {
+ if (glyphs && glyphCount > 0) {
+ sk_bzero(glyphs, glyphCount * sizeof(glyphs[0]));
+ }
+ return 0;
}
int onCountGlyphs() const override { return 0; }
int onGetUPEM() const override { return 0; }