ccpr: Fix debug counters for stencil resolve instances
TBR=robertphillips@google.com Bug: skia: Change-Id: I7ddc477b61472549aff047afae51810378534aa4 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/228838 Reviewed-by: Chris Dalton <csmartdalton@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
This commit is contained in:
parent
c9f0c593ed
commit
9bc450b2f6
@ -275,6 +275,7 @@ void GrCCDrawPathsOp::SingleDraw::accountForOwnPath(
|
||||
++specs->fNumRenderedPaths[idx];
|
||||
specs->fRenderedPathStats[idx].statPath(path);
|
||||
specs->fRenderedAtlasSpecs.accountForSpace(fMaskDevIBounds.width(), fMaskDevIBounds.height());
|
||||
SkDEBUGCODE(fWasCountedAsRender = true);
|
||||
}
|
||||
|
||||
bool GrCCDrawPathsOp::SingleDraw::shouldCachePathMask(int maxRenderTargetSize) const {
|
||||
@ -363,7 +364,7 @@ void GrCCDrawPathsOp::SingleDraw::setupResources(
|
||||
resources->appendDrawPathInstance().set(
|
||||
*fCacheEntry, fCachedMaskShift, SkPMColor4f_toFP16(fColor), fillRule);
|
||||
#ifdef SK_DEBUG
|
||||
if (fDoCachePathMask) {
|
||||
if (fWasCountedAsRender) {
|
||||
// A path mask didn't exist for this path at the beginning of flush, but we have one
|
||||
// now. What this means is that we've drawn the same path multiple times this flush.
|
||||
// Let the resources know that we reused one for their internal debug counters.
|
||||
|
@ -118,6 +118,7 @@ private:
|
||||
SkIVector fCachedMaskShift;
|
||||
bool fDoCopyToA8Coverage = false;
|
||||
bool fDoCachePathMask = false;
|
||||
SkDEBUGCODE(bool fWasCountedAsRender = false);
|
||||
|
||||
SingleDraw* fNext = nullptr;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user