[iOS] PDFDocumentImage should not create a cached image larger than 4M pixels
[WebKit-https.git] / Source / WebCore / platform / graphics / NamedImageGeneratedImage.cpp
index bd798c0..6810974 100644 (file)
@@ -64,7 +64,7 @@ void NamedImageGeneratedImage::draw(GraphicsContext& context, const FloatRect& d
 void NamedImageGeneratedImage::drawPattern(GraphicsContext& context, const FloatRect& srcRect, const AffineTransform& patternTransform, const FloatPoint& phase, const FloatSize& spacing, CompositeOperator compositeOp, const FloatRect& dstRect, BlendMode blendMode)
 {
 #if USE(NEW_THEME)
-    std::unique_ptr<ImageBuffer> imageBuffer = context.createCompatibleBuffer(size(), true);
+    auto imageBuffer = ImageBuffer::createCompatibleBuffer(size(), context, true);
     if (!imageBuffer)
         return;