[iOS] PDFDocumentImage should not create a cached image larger than 4M pixels
[WebKit-https.git] / Source / WebCore / rendering / RenderBoxModelObject.cpp
index 98aa361..82649ce 100644 (file)
@@ -756,7 +756,7 @@ void RenderBoxModelObject::paintFillLayerExtended(const PaintInfo& paintInfo, co
         maskRect.intersect(snappedIntRect(paintInfo.rect));
 
         // Now create the mask.
-        maskImage = context.createCompatibleBuffer(maskRect.size());
+        maskImage = ImageBuffer::createCompatibleBuffer(maskRect.size(), context);
         if (!maskImage)
             return;
         paintMaskForTextFillBox(maskImage.get(), maskRect, box, scrolledPaintRect);