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

Unified Diff: tests/TypefaceTest.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 | « tests/FontMgrTest.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/TypefaceTest.cpp
diff --git a/tests/TypefaceTest.cpp b/tests/TypefaceTest.cpp
index 13196bca48fd0d1e49267b82b84630bf3bb96250..4c65fa3f9d8e08d018a3c980a669ef56c6727951 100644
--- a/tests/TypefaceTest.cpp
+++ b/tests/TypefaceTest.cpp
@@ -31,9 +31,9 @@ namespace {
class SkEmptyTypeface : public SkTypeface {
public:
- static sk_sp<SkTypeface> Create(SkFontID id) { return sk_sp<SkTypeface>(new SkEmptyTypeface(id)); }
+ static sk_sp<SkTypeface> Create() { return sk_sp<SkTypeface>(new SkEmptyTypeface()); }
protected:
- SkEmptyTypeface(SkFontID id) : SkTypeface(SkFontStyle(), id, true) { }
+ SkEmptyTypeface() : SkTypeface(SkFontStyle(), true) { }
SkStreamAsset* onOpenStream(int* ttcIndex) const override { return nullptr; }
SkScalerContext* onCreateScalerContext(const SkScalerContextEffects&,
@@ -76,12 +76,12 @@ static int count(skiatest::Reporter* reporter, const SkTypefaceCache& cache) {
}
DEF_TEST(TypefaceCache, reporter) {
- sk_sp<SkTypeface> t1(SkEmptyTypeface::Create(1));
+ sk_sp<SkTypeface> t1(SkEmptyTypeface::Create());
{
SkTypefaceCache cache;
REPORTER_ASSERT(reporter, count(reporter, cache) == 0);
{
- sk_sp<SkTypeface> t0(SkEmptyTypeface::Create(0));
+ sk_sp<SkTypeface> t0(SkEmptyTypeface::Create());
cache.add(t0.get());
REPORTER_ASSERT(reporter, count(reporter, cache) == 1);
cache.add(t1.get());
« no previous file with comments | « tests/FontMgrTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698