diff options
author | Herb Derby <herb@google.com> | 2018-06-01 16:47:21 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-06-04 15:23:29 +0000 |
commit | feb9fa9e9ba47ec4a4e6480d90a88ad5cdb46020 (patch) | |
tree | 5a39a775f1ef0d6142f1a81c5b21c5109a390e84 /src/core/SkTypeface_remote.h | |
parent | e1adc3a9552c21e7b45b7a910f2a0854e00a92b9 (diff) |
Turn off logging for tests
Change-Id: I00bb3059bb92b5c11178022aff8a87918bb3781e
Reviewed-on: https://skia-review.googlesource.com/131640
Reviewed-by: Khushal Sagar <khushalsagar@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Diffstat (limited to 'src/core/SkTypeface_remote.h')
-rw-r--r-- | src/core/SkTypeface_remote.h | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/core/SkTypeface_remote.h b/src/core/SkTypeface_remote.h index ff5bc66775..1e079eff49 100644 --- a/src/core/SkTypeface_remote.h +++ b/src/core/SkTypeface_remote.h @@ -17,6 +17,8 @@ #include "SkScalerContext.h" #include "SkTypeface.h" +class SkTypefaceProxy; + class SkScalerContextProxy : public SkScalerContext { public: SkScalerContextProxy(sk_sp<SkTypeface> tf, @@ -32,6 +34,7 @@ protected: void generateImage(const SkGlyph& glyph) override; bool generatePath(SkGlyphID glyphID, SkPath* path) override; void generateFontMetrics(SkPaint::FontMetrics* metrics) override; + SkTypefaceProxy* getProxyTypeface() const; private: // Copied from SkGlyphCache @@ -40,7 +43,7 @@ private: static constexpr size_t kMinGlyphImageSize = 16 /* height */ * 8 /* width */; static constexpr size_t kMinAllocAmount = kMinGlyphImageSize * kMinGlyphCount; - SkArenaAlloc fAlloc{kMinAllocAmount}; + SkArenaAlloc fAlloc{kMinAllocAmount}; sk_sp<SkStrikeClient::DiscardableHandleManager> fDiscardableManager; typedef SkScalerContext INHERITED; }; @@ -51,13 +54,16 @@ public: int glyphCount, const SkFontStyle& style, bool isFixed, - sk_sp<SkStrikeClient::DiscardableHandleManager> manager) + sk_sp<SkStrikeClient::DiscardableHandleManager> manager, + bool isLogging = true) : INHERITED{style, false} , fFontId{fontId} , fGlyphCount{glyphCount} + , fIsLogging{isLogging} , fDiscardableManager{std::move(manager)} {} SkFontID remoteTypefaceID() const {return fFontId;} int glyphCount() const {return fGlyphCount;} + bool isLogging() const {return fIsLogging;} protected: int onGetUPEM() const override { SK_ABORT("Should never be called."); return 0; } @@ -125,11 +131,12 @@ protected: } private: - const SkFontID fFontId; - const int fGlyphCount; - + const SkFontID fFontId; + const int fGlyphCount; + const bool fIsLogging; sk_sp<SkStrikeClient::DiscardableHandleManager> fDiscardableManager; + typedef SkTypeface INHERITED; }; |