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

Side by Side Diff: tests/FontMgrTest.cpp

Issue 1872253004: Revert of Pass effects directly to fontcache (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 8 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 unified diff | Download patch
« no previous file with comments | « src/ports/SkTypeface_win_dw.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2013 Google Inc. 2 * Copyright 2013 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "SkCommandLineFlags.h" 8 #include "SkCommandLineFlags.h"
9 #include "SkFontMgr.h" 9 #include "SkFontMgr.h"
10 #include "SkTypeface.h" 10 #include "SkTypeface.h"
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 118
119 static void test_matchStyleCSS3(skiatest::Reporter* reporter) { 119 static void test_matchStyleCSS3(skiatest::Reporter* reporter) {
120 static const SkFontID invalidFontID = std::numeric_limits<SkFontID>::max(); 120 static const SkFontID invalidFontID = std::numeric_limits<SkFontID>::max();
121 static const SkFontStyle invalidFontStyle(101, SkFontStyle::kNormal_Width, S kFontStyle::kUpright_Slant); 121 static const SkFontStyle invalidFontStyle(101, SkFontStyle::kNormal_Width, S kFontStyle::kUpright_Slant);
122 122
123 class TestTypeface : public SkTypeface { 123 class TestTypeface : public SkTypeface {
124 public: 124 public:
125 TestTypeface(const SkFontStyle& fontStyle, SkFontID id) : SkTypeface(fon tStyle, id, false){} 125 TestTypeface(const SkFontStyle& fontStyle, SkFontID id) : SkTypeface(fon tStyle, id, false){}
126 protected: 126 protected:
127 SkStreamAsset* onOpenStream(int* ttcIndex) const override { return nullp tr; } 127 SkStreamAsset* onOpenStream(int* ttcIndex) const override { return nullp tr; }
128 SkScalerContext* onCreateScalerContext(const SkScalerContextEffects&, 128 SkScalerContext* onCreateScalerContext(const SkDescriptor*) const overri de {
129 const SkDescriptor*) const overri de {
130 return nullptr; 129 return nullptr;
131 } 130 }
132 void onFilterRec(SkScalerContextRec*) const override { } 131 void onFilterRec(SkScalerContextRec*) const override { }
133 virtual SkAdvancedTypefaceMetrics* onGetAdvancedTypefaceMetrics( 132 virtual SkAdvancedTypefaceMetrics* onGetAdvancedTypefaceMetrics(
134 PerGlyphInfo, 133 PerGlyphInfo,
135 const uint32_t*, uint32_t) const override { return nullptr; } 134 const uint32_t*, uint32_t) const override { return nullptr; }
136 void onGetFontDescriptor(SkFontDescriptor*, bool*) const override { } 135 void onGetFontDescriptor(SkFontDescriptor*, bool*) const override { }
137 virtual int onCharsToGlyphs(const void* chars, Encoding encoding, 136 virtual int onCharsToGlyphs(const void* chars, Encoding encoding,
138 uint16_t glyphs[], int glyphCount) const override { 137 uint16_t glyphs[], int glyphCount) const override {
139 if (glyphs && glyphCount > 0) { 138 if (glyphs && glyphCount > 0) {
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after
641 } 640 }
642 641
643 DEFINE_bool(verboseFontMgr, false, "run verbose fontmgr tests."); 642 DEFINE_bool(verboseFontMgr, false, "run verbose fontmgr tests.");
644 643
645 DEF_TEST(FontMgr, reporter) { 644 DEF_TEST(FontMgr, reporter) {
646 test_matchStyleCSS3(reporter); 645 test_matchStyleCSS3(reporter);
647 test_fontiter(reporter, FLAGS_verboseFontMgr); 646 test_fontiter(reporter, FLAGS_verboseFontMgr);
648 test_alias_names(reporter); 647 test_alias_names(reporter);
649 test_font(reporter); 648 test_font(reporter);
650 } 649 }
OLDNEW
« no previous file with comments | « src/ports/SkTypeface_win_dw.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698