Make SkTypeface::onGetVariationDesignPosition pure virtual.
It was non-pure until it could be implemented everywhere. Now that it
is implemented everywhere, mark it as pure virtual.
Change-Id: I985eda37d52e6d194fb39c27cb6bc0ce641238ec
Reviewed-on: https://skia-review.googlesource.com/9125
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
diff --git a/include/core/SkTypeface.h b/include/core/SkTypeface.h
index 24693a9..07d8bc3 100644
--- a/include/core/SkTypeface.h
+++ b/include/core/SkTypeface.h
@@ -356,10 +356,9 @@
// TODO: make pure virtual.
virtual std::unique_ptr<SkFontData> onMakeFontData() const;
- // TODO: make pure virtual.
virtual int onGetVariationDesignPosition(
SkFontArguments::VariationPosition::Coordinate coordinates[],
- int coordinateCount) const;
+ int coordinateCount) const = 0;
virtual void onGetFontDescriptor(SkFontDescriptor*, bool* isLocal) const = 0;
diff --git a/src/core/SkTypeface.cpp b/src/core/SkTypeface.cpp
index ff473c9..2d8f920 100644
--- a/src/core/SkTypeface.cpp
+++ b/src/core/SkTypeface.cpp
@@ -250,13 +250,6 @@
return skstd::make_unique<SkFontData>(std::move(stream), index, nullptr, 0);
};
-// This implementation is temporary until this method can be made pure virtual.
-int SkTypeface::onGetVariationDesignPosition(
- SkFontArguments::VariationPosition::Coordinate coordinates[], int coordinateCount) const
-{
- return -1;
-}
-
int SkTypeface::charsToGlyphs(const void* chars, Encoding encoding,
uint16_t glyphs[], int glyphCount) const {
if (glyphCount <= 0) {