Skip to content

Commit 340aeda

Browse files
reed-at-googleSkia Commit-Bot
authored andcommitted
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>
1 parent f31f64e commit 340aeda

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

fuzz/FuzzCanvas.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -974,9 +974,11 @@ static SkTDArray<uint8_t> make_fuzz_text(Fuzz* fuzz, const SkFont& font, SkTextE
974974
return array;
975975
}
976976

977+
#ifdef SK_SUPPORT_LEGACY_FONTMETRICS_IN_PAINT
977978
static SkTDArray<uint8_t> make_fuzz_text(Fuzz* fuzz, const SkPaint& paint) {
978979
return make_fuzz_text(fuzz, SkFont::LEGACY_ExtractFromPaint(paint), paint.getTextEncoding());
979980
}
981+
#endif
980982

981983
static sk_sp<SkTextBlob> make_fuzz_textblob(Fuzz* fuzz) {
982984
SkTextBlobBuilder textBlobBuilder;

include/core/SkPaint.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@
2727
#include "SkMatrix.h"
2828
#include "SkRefCnt.h"
2929

30+
#ifndef SK_SUPPORT_LEGACY_FONTMETRICS_IN_PAINT
3031
#define SK_SUPPORT_LEGACY_FONTMETRICS_IN_PAINT
32+
#endif
3133

3234
class GrTextBlob;
3335
class SkAutoDescriptor;

0 commit comments

Comments
 (0)