Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(95)

Unified Diff: tests/FontMgrTest.cpp

Issue 2147733002: Remove user specified typeface id. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Remove one last straggler. Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/ports/SkTypeface_win_dw.h ('k') | tests/TypefaceTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/FontMgrTest.cpp
diff --git a/tests/FontMgrTest.cpp b/tests/FontMgrTest.cpp
index dd280cd83797789990fe81d0b8bd8dee9d97bdd2..da72542f7cb9817b2a63f6d248022683b2128e46 100644
--- a/tests/FontMgrTest.cpp
+++ b/tests/FontMgrTest.cpp
@@ -115,12 +115,11 @@ static void test_fontiter(skiatest::Reporter* reporter, bool verbose) {
}
static void test_matchStyleCSS3(skiatest::Reporter* reporter) {
- static const SkFontID invalidFontID = std::numeric_limits<SkFontID>::max();
static const SkFontStyle invalidFontStyle(101, SkFontStyle::kNormal_Width, SkFontStyle::kUpright_Slant);
class TestTypeface : public SkTypeface {
public:
- TestTypeface(const SkFontStyle& fontStyle, SkFontID id) : SkTypeface(fontStyle, id, false){}
+ TestTypeface(const SkFontStyle& fontStyle) : SkTypeface(fontStyle, false){}
protected:
SkStreamAsset* onOpenStream(int* ttcIndex) const override { return nullptr; }
SkScalerContext* onCreateScalerContext(const SkScalerContextEffects&,
@@ -168,9 +167,9 @@ static void test_matchStyleCSS3(skiatest::Reporter* reporter) {
}
SkTypeface* createTypeface(int index) override {
if (index < 0 || this->count() <= index) {
- return new TestTypeface(invalidFontStyle, invalidFontID);
+ return new TestTypeface(invalidFontStyle);
}
- return new TestTypeface(fStyles[index], index);
+ return new TestTypeface(fStyles[index]);
}
SkTypeface* matchStyle(const SkFontStyle& pattern) override {
return this->matchStyleCSS3(pattern);
« no previous file with comments | « src/ports/SkTypeface_win_dw.h ('k') | tests/TypefaceTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698