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:
Andrew Osmond 2021-05-17 18:45:02 +00:00
parent 1455c4b2b0
commit 4a2233b842
2 changed files with 7 additions and 9 deletions

View File

@ -143,7 +143,7 @@ add_task(async function open_10_tabs() {
let knownProblematicPrefs = {
"layout.css.dpi": {
max: 35,
max: 60,
},
"browser.zoom.full": {
min: 10,

View File

@ -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);
}