Revert of Don't allow uncacheable paths in tessellated path renderer (patchset #2 id:20001 of https://codereview.chromium.org/1990793003/ )
Reason for revert: Caused innershapes test to be rendered incorrectly on the N10. This might be a driver bug. Original issue's description: > Don't allow uncacheable paths in tessellated path renderer > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1990793003 > > Committed: https://skia.googlesource.com/skia/+/aebd0fd32f8fde610de03b4f1e6d11ce24bfb73d TBR=senorblanco@google.com,senorblanco@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review-Url: https://codereview.chromium.org/1993923002
This commit is contained in:
parent
bac5eb073e
commit
81b630007b
@ -105,14 +105,11 @@ GrTessellatingPathRenderer::GrTessellatingPathRenderer() {
|
|||||||
bool GrTessellatingPathRenderer::onCanDrawPath(const CanDrawPathArgs& args) const {
|
bool GrTessellatingPathRenderer::onCanDrawPath(const CanDrawPathArgs& args) const {
|
||||||
// This path renderer can draw all fill styles, all stroke styles except hairlines, but does
|
// This path renderer can draw all fill styles, all stroke styles except hairlines, but does
|
||||||
// not do antialiasing. It can do convex and concave paths, but we'll leave the convex ones to
|
// not do antialiasing. It can do convex and concave paths, but we'll leave the convex ones to
|
||||||
// simpler algorithms. Similarly, we skip the non-hairlines that can be treated as hairline.
|
// simpler algorithms. Similary, we skip the non-hairlines that can be treated as hairline.
|
||||||
// An arbitrary path effect could produce a hairline result so we pass on those. We also skip
|
// An arbitrary path effect could produce a hairline result so we pass on those.
|
||||||
// volatile paths since they are not cacheable.
|
return !IsStrokeHairlineOrEquivalent(*args.fStyle, *args.fViewMatrix, nullptr) &&
|
||||||
return !args.fAntiAlias && !args.fPath->isVolatile() &&
|
|
||||||
!args.fStyle->strokeRec().isHairlineStyle() &&
|
!args.fStyle->strokeRec().isHairlineStyle() &&
|
||||||
!args.fStyle->hasNonDashPathEffect() &&
|
!args.fStyle->hasNonDashPathEffect() && !args.fAntiAlias && !args.fPath->isConvex();
|
||||||
!IsStrokeHairlineOrEquivalent(*args.fStyle, *args.fViewMatrix, nullptr) &&
|
|
||||||
!args.fPath->isConvex();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class TessellatingPathBatch : public GrVertexBatch {
|
class TessellatingPathBatch : public GrVertexBatch {
|
||||||
@ -163,8 +160,7 @@ private:
|
|||||||
int clipBoundsCnt =
|
int clipBoundsCnt =
|
||||||
fPath.isInverseFillType() ? sizeof(fClipBounds) / sizeof(uint32_t) : 0;
|
fPath.isInverseFillType() ? sizeof(fClipBounds) / sizeof(uint32_t) : 0;
|
||||||
int styleDataCnt = GrStyle::KeySize(fStyle, GrStyle::Apply::kPathEffectAndStrokeRec);
|
int styleDataCnt = GrStyle::KeySize(fStyle, GrStyle::Apply::kPathEffectAndStrokeRec);
|
||||||
// We should have excluded anything we wouldn't know how to cache.
|
if (styleDataCnt >= 0) {
|
||||||
SkASSERT(styleDataCnt >= 0);
|
|
||||||
GrUniqueKey::Builder builder(&key, kDomain, 2 + clipBoundsCnt + styleDataCnt);
|
GrUniqueKey::Builder builder(&key, kDomain, 2 + clipBoundsCnt + styleDataCnt);
|
||||||
builder[0] = fPath.getGenerationID();
|
builder[0] = fPath.getGenerationID();
|
||||||
builder[1] = fPath.getFillType();
|
builder[1] = fPath.getFillType();
|
||||||
@ -183,6 +179,7 @@ private:
|
|||||||
this->drawVertices(target, gp, cachedVertexBuffer.get(), 0, actualCount);
|
this->drawVertices(target, gp, cachedVertexBuffer.get(), 0, actualCount);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
SkPath path;
|
SkPath path;
|
||||||
if (fStyle.applies()) {
|
if (fStyle.applies()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user