diff --git a/src/core/SkGlyph.h b/src/core/SkGlyph.h index fe5787b852..2633d6738f 100644 --- a/src/core/SkGlyph.h +++ b/src/core/SkGlyph.h @@ -203,15 +203,13 @@ public: int16_t fTop = 0, fLeft = 0; - // Used by the GDI scaler to track state. - int8_t fForceBW = 0; - // This is a combination of SkMask::Format and SkGlyph state. The SkGlyph can be in one of two // states, just the advances have been calculated, and all the metrics are available. The // illegal mask format is used to signal that only the advances are available. uint8_t fMaskFormat = MASK_FORMAT_UNKNOWN; private: + friend class SkScalerContext_DW; // Support horizontal and vertical skipping strike-through / underlines. // The caller walks the linked list looking for a match. For a horizontal underline, @@ -230,6 +228,9 @@ private: bool fHasPath{false}; }; + // Used by the DirectWrite scaler to track state. + int8_t fForceBW = 0; + // TODO(herb) remove friend statement after SkStrike cleanup. friend class SkStrike; SkPackedGlyphID fID; diff --git a/src/core/SkRemoteGlyphCache.cpp b/src/core/SkRemoteGlyphCache.cpp index c142bd0923..ec098f9c0f 100644 --- a/src/core/SkRemoteGlyphCache.cpp +++ b/src/core/SkRemoteGlyphCache.cpp @@ -458,6 +458,8 @@ void SkStrikeServer::SkGlyphCacheState::addGlyph(SkPackedGlyphID glyph, bool asP pending->push_back(glyph); } +// No need to write fForceBW because it is a flag private to SkScalerContext_DW, which will never +// be called on the GPU side. static void writeGlyph(SkGlyph* glyph, Serializer* serializer) { serializer->write(glyph->getPackedID()); serializer->write(glyph->fAdvanceX); @@ -466,7 +468,6 @@ static void writeGlyph(SkGlyph* glyph, Serializer* serializer) { serializer->write(glyph->fHeight); serializer->write(glyph->fTop); serializer->write(glyph->fLeft); - serializer->write(glyph->fForceBW); serializer->write(glyph->fMaskFormat); } @@ -703,6 +704,8 @@ SkStrikeClient::~SkStrikeClient() = default; return false; \ } +// No need to read fForceBW because it is a flag private to SkScalerContext_DW, which will never +// be called on the GPU side. static bool readGlyph(SkTLazy& glyph, Deserializer* deserializer) { SkPackedGlyphID glyphID; if (!deserializer->read(&glyphID)) return false; @@ -713,7 +716,6 @@ static bool readGlyph(SkTLazy& glyph, Deserializer* deserializer) { if (!deserializer->read(&glyph->fHeight)) return false; if (!deserializer->read(&glyph->fTop)) return false; if (!deserializer->read(&glyph->fLeft)) return false; - if (!deserializer->read(&glyph->fForceBW)) return false; if (!deserializer->read(&glyph->fMaskFormat)) return false; if (!SkMask::IsValidFormat(glyph->fMaskFormat)) return false;