Bug 1508822 - Guard against trying to create an oversized DrawTargetRecording with WebRender. r=mstange

Differential Revision: https://phabricator.services.mozilla.com/D12950

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Kartikaya Gupta 2018-11-26 18:14:59 +00:00
parent 7a4b1d8a07
commit 573d3aec36
3 changed files with 10 additions and 0 deletions

View File

@ -0,0 +1,5 @@
<style>
* { scale: 0.55749 10 1 }
</style>
<svg>
<circle r="49%" mask="url()">

View File

@ -175,3 +175,4 @@ load 1501518.html
load 1503986-1.html
load 1505426-1.html
load 1508811.html
load 1508822.html

View File

@ -582,6 +582,10 @@ CreateAndPaintMaskSurface(const PaintFramesParams& aParams,
return paintResult;
}
if (!ctx.GetDrawTarget()->CanCreateSimilarDrawTarget(maskSurfaceRect.Size(),
SurfaceFormat::A8)) {
return paintResult;
}
RefPtr<DrawTarget> maskDT =
ctx.GetDrawTarget()->CreateSimilarDrawTarget(maskSurfaceRect.Size(),
SurfaceFormat::A8);