Don't sync unique keys on ccpr clip FP proxies
CCPR clip masks are never cached, and the clip FP proxies need to ignore any unique keys that atlas textures use for path mask caching. Change-Id: I40d0f40c8b1cebbae6798ff95c88cb32616c84a2 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/255143 Commit-Queue: Chris Dalton <csmartdalton@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
This commit is contained in:
parent
b9df230d65
commit
e7b8e4144f
@ -125,7 +125,7 @@ GrCCAtlas::GrCCAtlas(CoverageType coverageType, const Specs& specs, const GrCaps
|
||||
desc, format, GrRenderable::kYes, sampleCount, GrMipMapped::kNo,
|
||||
SkBudgeted::kYes, GrProtected::kNo);
|
||||
}
|
||||
return fBackingTexture;
|
||||
return GrSurfaceProxy::LazyCallbackResult(fBackingTexture);
|
||||
},
|
||||
fCoverageType, caps, GrSurfaceProxy::UseAllocator::kNo);
|
||||
}
|
||||
|
@ -65,7 +65,7 @@ public:
|
||||
SkUNREACHABLE;
|
||||
}
|
||||
|
||||
using LazyInstantiateAtlasCallback = std::function<sk_sp<GrTexture>(
|
||||
using LazyInstantiateAtlasCallback = std::function<GrSurfaceProxy::LazyCallbackResult(
|
||||
GrResourceProvider*, GrPixelConfig, const GrBackendFormat&, int sampleCount)>;
|
||||
|
||||
static sk_sp<GrTextureProxy> MakeLazyAtlasProxy(const LazyInstantiateAtlasCallback&,
|
||||
|
@ -29,7 +29,7 @@ void GrCCClipPath::init(
|
||||
if (!textureProxy || !textureProxy->instantiate(resourceProvider)) {
|
||||
fAtlasScale = fAtlasTranslate = {0, 0};
|
||||
SkDEBUGCODE(fHasAtlasTransform = true);
|
||||
return sk_sp<GrTexture>();
|
||||
return GrSurfaceProxy::LazyCallbackResult();
|
||||
}
|
||||
|
||||
sk_sp<GrTexture> texture = sk_ref_sp(textureProxy->peekTexture());
|
||||
@ -43,7 +43,12 @@ void GrCCClipPath::init(
|
||||
fDevToAtlasOffset.fY * fAtlasScale.y());
|
||||
SkDEBUGCODE(fHasAtlasTransform = true);
|
||||
|
||||
return texture;
|
||||
// We use LazyInstantiationKeyMode::kUnsynced here because CCPR clip masks are never
|
||||
// cached, and the clip FP proxies need to ignore any unique keys that atlas
|
||||
// textures use for path mask caching.
|
||||
return GrSurfaceProxy::LazyCallbackResult(
|
||||
std::move(texture), true,
|
||||
GrSurfaceProxy::LazyInstantiationKeyMode::kUnsynced);
|
||||
},
|
||||
atlasCoverageType, caps, GrSurfaceProxy::UseAllocator::kYes);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user