mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-17 07:15:46 +00:00
Bug 1711164 - Ensure we never use cached surfaces with blob recordings. r=gfx-reviewers,nical
We don't support storing blob recordings in the surface cache at this time so we should never look at it. It is possible that one may request a blob recording, and have a previous rasterization available in the cache because it was used in canvas or as a repeating background image. We want to explicitly avoid the cache in that case. Differential Revision: https://phabricator.services.mozilla.com/D115136
This commit is contained in:
parent
2f54d388e2
commit
5d41449c23
@ -998,14 +998,12 @@ already_AddRefed<gfxDrawable> VectorImage::CreateSVGDrawable(
|
||||
Tuple<RefPtr<SourceSurface>, IntSize> VectorImage::LookupCachedSurface(
|
||||
const IntSize& aSize, const Maybe<SVGImageContext>& aSVGContext,
|
||||
uint32_t aFlags) {
|
||||
// If we're not allowed to use a cached surface, don't attempt a lookup.
|
||||
if (aFlags & FLAG_BYPASS_SURFACE_CACHE) {
|
||||
return MakeTuple(RefPtr<SourceSurface>(), aSize);
|
||||
}
|
||||
|
||||
// We don't do any caching if we have animation, so don't bother with a lookup
|
||||
// in this case either.
|
||||
if (mHaveAnimations) {
|
||||
// We can't use cached surfaces if we:
|
||||
// - Explicitly disallow it via FLAG_BYPASS_SURFACE_CACHE
|
||||
// - Want a blob recording which aren't supported by the cache.
|
||||
// - Have animations which aren't supported by the cache.
|
||||
if (aFlags & (FLAG_BYPASS_SURFACE_CACHE | FLAG_RECORD_BLOB) ||
|
||||
mHaveAnimations) {
|
||||
return MakeTuple(RefPtr<SourceSurface>(), aSize);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user