diff options
author | Hal Canary <halcanary@google.com> | 2017-05-04 10:10:05 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-05-04 16:57:43 +0000 |
commit | cef018896e5cad8eb46a536b60cdf79ebe2b0191 (patch) | |
tree | 2085d6071e90287f8dcacc31d801eaa99f35c035 /tests/FontMgrTest.cpp | |
parent | ba9028440be7cd651759be3ff517809aad189de3 (diff) |
SkTypeface::getAdvancedMetrics(): cleanup
- 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: I37571ebcc383ba9eb21bc20c60c734e3ca317582
Reviewed-on: https://skia-review.googlesource.com/15311
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
Diffstat (limited to 'tests/FontMgrTest.cpp')
-rw-r--r-- | tests/FontMgrTest.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/FontMgrTest.cpp b/tests/FontMgrTest.cpp index 251eb154a0..ef420f3b1d 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 @@ static void test_matchStyleCSS3(skiatest::Reporter* reporter) { 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 { |