WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED CONFIGURATION CHANGED
113657
SVGImage::nativeImageForCurrentFrame() does not work if using DontCopyBackingStore
https://bugs.webkit.org/show_bug.cgi?id=113657
Summary
SVGImage::nativeImageForCurrentFrame() does not work if using DontCopyBacking...
Chris Dumez
Reported
2013-03-31 01:35:36 PDT
The current implementation of SVGImage::nativeImageForCurrentFrame() creates a temporary ImageBuffer, draw the SVG to it and then returns a pointer to the native image using: ImageBuffer::copyImage(CopyBackingStore)->nativeImageForCurrentFrame(); Using CopyBackingStore here is suboptimal. However, DontCopyBackingStore does not work in this case, at least with Skia implementation. The reason for this is that the underlying SkBitmap pixels do not get copied when creating the new Image but the pixels get freed when the temporary ImageBuffer gets destroyed. Therefore, the returned native image has no valid pixel data.
Attachments
Add attachment
proposed patch, testcase, etc.
Stephen Chenney
Comment 1
2015-01-08 08:36:18 PST
The Skia limitation is obviously not relevant any more, so maybe this can be fixed for other ports. Even in Chromium, the Skia limitation is no longer a problem.
Ahmad Saleem
Comment 2
2023-09-21 09:33:06 PDT
https://searchfox.org/wubkat/source/Source/WebCore/svg/graphics/SVGImageForContainer.cpp#57
RefPtr<NativeImage> SVGImageForContainer::nativeImageForCurrentFrame() { return m_image->nativeImageForCurrentFrame(); } Do we need to keep this open?
Kimmo Kinnunen
Comment 3
2023-09-26 02:06:30 PDT
No, this is already fixed by "sinking" the imagebuffer into the native image, which does not incur a copy.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug