Revert "Revert "SkTypeface::getAdvancedMetrics(): cleanup""
This reverts commit 59ad782b2b05b07aa6eb961aa4d62e934093cbd1.
- SkAdvancedTypefaceMetrics is a struct not a class
- SkTypeface::PerGlyphInfo is gone
- s/getAdvancedTypefaceMetrics/getAdvancedMetrics/g
- s/onGetAdvancedTypefaceMetrics/onGetAdvancedMetrics/g
- [on]getAdvancedMetrics now return unique_ptr rather than bare ptr.
- [on]getAdvancedMetrics no longer has parameters. (Only caller always
used same arguments.)
- SkAdvancedTypefaceMetrics uses C++11 in-class member initializers.
- SkAdvancedTypefaceMetrics no longer inherits from SkRefCnt
Change-Id: I91b56e60f7d9de7d46c426c6bd34ce124e0cf00e
Reviewed-on: https://skia-review.googlesource.com/15360
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
diff --git a/tests/FontMgrTest.cpp b/tests/FontMgrTest.cpp
index 251eb15..ef420f3 100644
--- a/tests/FontMgrTest.cpp
+++ b/tests/FontMgrTest.cpp
@@ -5,14 +5,14 @@
* found in the LICENSE file.
*/
+#include "SkAdvancedTypefaceMetrics.h"
#include "SkCommandLineFlags.h"
+#include "SkFont.h"
#include "SkFontMgr.h"
+#include "SkPaint.h"
#include "SkTypeface.h"
#include "Test.h"
-#include "SkFont.h"
-#include "SkPaint.h"
-
#include <initializer_list>
#include <limits>
#include <vector>
@@ -133,9 +133,9 @@
return nullptr;
}
void onFilterRec(SkScalerContextRec*) const override { }
- virtual SkAdvancedTypefaceMetrics* onGetAdvancedTypefaceMetrics(
- PerGlyphInfo,
- const uint32_t*, uint32_t) const override { return nullptr; }
+ std::unique_ptr<SkAdvancedTypefaceMetrics> onGetAdvancedMetrics() const override {
+ return nullptr;
+ }
void onGetFontDescriptor(SkFontDescriptor*, bool*) const override { }
virtual int onCharsToGlyphs(const void* chars, Encoding encoding,
uint16_t glyphs[], int glyphCount) const override {