make SK_SUPPORT_LEGACY_FONTMETRICS_IN_PAINT conditional

Bug: skia:
Change-Id: I467f177bfef74f3727127a251057f310ec3f3428
Reviewed-on: https://skia-review.googlesource.com/c/177063
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
This commit is contained in:
Mike Reed 2018-12-12 14:00:19 -05:00 committed by Skia Commit-Bot
parent f31f64ef2d
commit 340aeda6b3
2 changed files with 4 additions and 0 deletions

View File

@ -974,9 +974,11 @@ static SkTDArray<uint8_t> make_fuzz_text(Fuzz* fuzz, const SkFont& font, SkTextE
return array;
}
#ifdef SK_SUPPORT_LEGACY_FONTMETRICS_IN_PAINT
static SkTDArray<uint8_t> make_fuzz_text(Fuzz* fuzz, const SkPaint& paint) {
return make_fuzz_text(fuzz, SkFont::LEGACY_ExtractFromPaint(paint), paint.getTextEncoding());
}
#endif
static sk_sp<SkTextBlob> make_fuzz_textblob(Fuzz* fuzz) {
SkTextBlobBuilder textBlobBuilder;

View File

@ -27,7 +27,9 @@
#include "SkMatrix.h"
#include "SkRefCnt.h"
#ifndef SK_SUPPORT_LEGACY_FONTMETRICS_IN_PAINT
#define SK_SUPPORT_LEGACY_FONTMETRICS_IN_PAINT
#endif
class GrTextBlob;
class SkAutoDescriptor;