Bug 113657 - SVGImage::nativeImageForCurrentFrame() does not work if using DontCopyBackingStore
Summary: SVGImage::nativeImageForCurrentFrame() does not work if using DontCopyBacking...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
Depends on: 113420
  Show dependency treegraph
Reported: 2013-03-31 01:35 PDT by Chris Dumez
Modified: 2015-01-08 08:36 PST (History)
4 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 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:

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.
Comment 1 Stephen Chenney 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.