Revert "fonts: Bandaid fix for desc mismatch in SkRemoteGlyphCache."

This reverts commit ef4142a9bc.

Reason for revert: 2 of 5

Original change's description:
> fonts: Bandaid fix for desc mismatch in SkRemoteGlyphCache.
> 
> Since the typeface proxies on the client don't perform the same
> filtering done on the server during SkDescriptor generation, it causes
> the desc mismatches during raster. Disable this filtering on the server
> until this is resolved.
> 
> Bug: 831354
> Change-Id: I5683372fb497a4874dede5aec9c734cd1392872c
> Reviewed-on: https://skia-review.googlesource.com/125140
> Commit-Queue: Khusal Sagar <khushalsagar@chromium.org>
> Reviewed-by: Herb Derby <herb@google.com>

TBR=herb@google.com,khushalsagar@chromium.org

Change-Id: I8e732f57aa49323c186e3c4ea6120ff1caf8e25b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 831354
Reviewed-on: https://skia-review.googlesource.com/125261
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
This commit is contained in:
Mike Klein 2018-05-02 13:53:14 +00:00 committed by Skia Commit-Bot
parent bffeb8cbf6
commit 192b18a261
4 changed files with 7 additions and 9 deletions

View File

@ -354,10 +354,9 @@ void SkTextBlobCacheDiffCanvas::processGlyphRun(
// TODO(crbug.com/831354): The typeface proxy on the client does not replicate the
// filtering done by the typeface on the server.
const bool enableTypefaceFiltering = false;
SkScalerContext::MakeRecAndEffects(runPaint, &fSurfaceProps, &runMatrix,
SkScalerContextFlags::kFakeGammaAndBoostContrast, &rec,
&effects, enableTypefaceFiltering);
&effects);
TRACE_EVENT1("skia", "RecForDesc", "rec", TRACE_STR_COPY(rec.dump().c_str()));
auto desc = SkScalerContext::DescriptorGivenRecAndEffects(rec, effects);

View File

@ -817,8 +817,7 @@ void SkScalerContext::MakeRecAndEffects(const SkPaint& paint,
const SkMatrix* deviceMatrix,
SkScalerContextFlags scalerContextFlags,
SkScalerContextRec* rec,
SkScalerContextEffects* effects,
bool enableTypefaceFiltering) {
SkScalerContextEffects* effects) {
SkASSERT(deviceMatrix == nullptr || !deviceMatrix->hasPerspective());
SkTypeface* typeface = SkPaintPriv::GetTypefaceOrDefault(paint);
@ -964,9 +963,7 @@ void SkScalerContext::MakeRecAndEffects(const SkPaint& paint,
// cache. This way if we're asking for something that they will ignore,
// they can modify our rec up front, so we don't create duplicate cache
// entries.
if (enableTypefaceFiltering) {
typeface->onFilterRec(rec);
}
typeface->onFilterRec(rec);
if (!SkToBool(scalerContextFlags & SkScalerContextFlags::kFakeGamma)) {
rec->ignoreGamma();

View File

@ -310,8 +310,7 @@ public:
const SkMatrix* deviceMatrix,
SkScalerContextFlags scalerContextFlags,
SkScalerContextRec* rec,
SkScalerContextEffects* effects,
bool enableTypefaceFiltering = true);
SkScalerContextEffects* effects);
static SkDescriptor* MakeDescriptorForPaths(SkFontID fontID,
SkAutoDescriptor* ad);

View File

@ -89,6 +89,8 @@ DEF_TEST(SkRemoteGlyphCache_TypefaceSerialization, reporter) {
server_tf->uniqueID());
}
#if 0
TODO(khushalsagar): Re-enable once crbug.com/831354 is fixed.
DEF_TEST(SkRemoteGlyphCache_StrikeSerialization, reporter) {
sk_sp<DiscardableManager> discardableManager = sk_make_sp<DiscardableManager>();
SkStrikeServer server(discardableManager.get());
@ -122,6 +124,7 @@ DEF_TEST(SkRemoteGlyphCache_StrikeSerialization, reporter) {
}
}
}
#endif
DEF_TEST(SkRemoteGlyphCache_StrikeLockingServer, reporter) {
sk_sp<DiscardableManager> discardableManager = sk_make_sp<DiscardableManager>();