Delete GrCoverageCountingPathRenderer::CropPath
The purpose of this method was to not allow FP values get too large for the now-deleted coverage counting shaders. Change-Id: I9f86c2adf64cc5e66ed9585d18945e8a2be35c34 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/387056 Reviewed-by: Adlai Holler <adlai@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
This commit is contained in:
parent
cd7ba500b6
commit
633b9f3cd5
@ -70,16 +70,7 @@ std::unique_ptr<GrFragmentProcessor> GrCoverageCountingPathRenderer::makeClipPro
|
||||
this->lookupPendingPaths(opsTaskID)->fClipPaths[key];
|
||||
if (!clipPath.isInitialized()) {
|
||||
// This ClipPath was just created during lookup. Initialize it.
|
||||
const SkRect& pathDevBounds = deviceSpacePath.getBounds();
|
||||
if (std::max(pathDevBounds.height(), pathDevBounds.width()) > kPathCropThreshold) {
|
||||
// The path is too large. Crop it or analytic AA can run out of fp32 precision.
|
||||
SkPath croppedPath;
|
||||
int maxRTSize = caps.maxRenderTargetSize();
|
||||
CropPath(deviceSpacePath, SkIRect::MakeWH(maxRTSize, maxRTSize), &croppedPath);
|
||||
clipPath.init(croppedPath, accessRect, caps);
|
||||
} else {
|
||||
clipPath.init(deviceSpacePath, accessRect, caps);
|
||||
}
|
||||
clipPath.init(deviceSpacePath, accessRect, caps);
|
||||
} else {
|
||||
clipPath.addAccess(accessRect);
|
||||
}
|
||||
@ -148,14 +139,3 @@ void GrCoverageCountingPathRenderer::postFlush(GrDeferredUploadToken,
|
||||
|
||||
SkDEBUGCODE(fFlushing = false);
|
||||
}
|
||||
|
||||
void GrCoverageCountingPathRenderer::CropPath(const SkPath& path, const SkIRect& cropbox,
|
||||
SkPath* out) {
|
||||
SkPath cropboxPath;
|
||||
cropboxPath.addRect(SkRect::Make(cropbox));
|
||||
if (!Op(cropboxPath, path, kIntersect_SkPathOp, out)) {
|
||||
// This can fail if the PathOps encounter NaN or infinities.
|
||||
out->reset();
|
||||
}
|
||||
out->setIsVolatile(true);
|
||||
}
|
||||
|
@ -63,8 +63,6 @@ public:
|
||||
// fp32 precision.
|
||||
static constexpr float kPathCropThreshold = 1 << 16;
|
||||
|
||||
static void CropPath(const SkPath&, const SkIRect& cropbox, SkPath* out);
|
||||
|
||||
// Maximum inflation of path bounds due to stroking (from width, miter, caps). Strokes wider
|
||||
// than this will be converted to fill paths and drawn by the CCPR filler instead.
|
||||
static constexpr float kMaxBoundsInflationFromStroke = 4096;
|
||||
|
Loading…
Reference in New Issue
Block a user