Revert "Generate small path SDFs directly from path."

This reverts commit 4407acb144.

Reason for revert: Causing issues with colorcomposefilter_wacky

Original change's description:
> Generate small path SDFs directly from path.
> 
> Change-Id: Ifdda3038eadf3910cb18bdefa8115f5038b1440e
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/261138
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Jim Van Verth <jvanverth@google.com>

TBR=jvanverth@google.com,bsalomon@google.com

Change-Id: I331e855c3198febcd8ca9ef0c5e6fe1ddc5ad8cf
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/261177
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
This commit is contained in:
Jim Van Verth 2019-12-19 21:12:54 +00:00 committed by Skia Commit-Bot
parent 4407acb144
commit 9ff61ab33c
2 changed files with 8 additions and 0 deletions

View File

@ -12,6 +12,10 @@
class SkMatrix;
#ifndef SK_USE_LEGACY_DISTANCE_FIELDS
#define SK_USE_LEGACY_DISTANCE_FIELDS
#endif
/** Given a vector path, generate the associated distance field.
* @param distanceField The distance field to be generated. Should already be allocated

View File

@ -570,11 +570,13 @@ private:
SkPath path;
shape.asPath(&path);
#ifndef SK_USE_LEGACY_DISTANCE_FIELDS
// Generate signed distance field directly from SkPath
bool succeed = GrGenerateDistanceFieldFromPath((unsigned char*)dfStorage.get(),
path, drawMatrix,
width, height, width * sizeof(unsigned char));
if (!succeed) {
#endif
// setup bitmap backing
SkAutoPixmapStorage dst;
if (!dst.tryAlloc(SkImageInfo::MakeA8(devPathBounds.width(),
@ -602,7 +604,9 @@ private:
SkGenerateDistanceFieldFromA8Image((unsigned char*)dfStorage.get(),
(const unsigned char*)dst.addr(),
dst.width(), dst.height(), dst.rowBytes());
#ifndef SK_USE_LEGACY_DISTANCE_FIELDS
}
#endif
// add to atlas
SkIPoint16 atlasLocation;