RESOLVED DUPLICATE of bug 18636554915
Remove unused JPEGImageEncoder code
https://bugs.webkit.org/show_bug.cgi?id=54915
Summary Remove unused JPEGImageEncoder code
Alice Boxhall
Reported 2011-02-21 16:24:59 PST
Remove unused JPEGImageEncoder code
Attachments
Patch (7.30 KB, patch)
2011-02-21 16:25 PST, Alice Boxhall
abarth: review-
Alice Boxhall
Comment 1 2011-02-21 16:25:26 PST
Peter Kasting
Comment 2 2011-02-21 16:50:56 PST
Do any build files (e.g. *.gyp) need to be touched?
Alice Boxhall
Comment 3 2011-02-21 17:02:40 PST
A grep through WebCore found nothing referring to it.
Adam Barth
Comment 4 2011-02-21 18:12:35 PST
Why was it added?
Adam Barth
Comment 5 2011-02-21 18:13:14 PST
Adam Barth
Comment 6 2011-02-21 18:13:52 PST
@yong & @staikos: Do we need this code? It seems unused.
Peter Kasting
Comment 7 2011-02-21 23:51:51 PST
(In reply to comment #6) > @yong & @staikos: Do we need this code? It seems unused. Also: Is the PNG encoder unused as well, or is someone using that?
Eric Seidel (no email)
Comment 8 2011-02-24 03:11:31 PST
Comment on attachment 83238 [details] Patch rs=me, assuming you didn't break any builds.
George Staikos
Comment 9 2011-02-24 06:21:36 PST
We'll likely be re-adding this commit again, as we are using. Still in the process of merging. I'm not sure why the urge to remove it.
Yong Li
Comment 10 2011-02-24 08:12:43 PST
Why do we want to remove it? It allows ImageBuffer to easily support saving images with image/jpeg format. The new ImageBufferOpenVG.cpp patch will use it, which is still in process. https://bugs.webkit.org/show_bug.cgi?id=39230 (the old patch is obsolete). Or this feature can be put into ImageBuffer.cpp to be shared by platforms.
Peter Kasting
Comment 11 2011-02-24 10:22:25 PST
(In reply to comment #10) > It allows ImageBuffer to easily support saving images with image/jpeg format. Why is this useful? How will this be exposed to users?
Yong Li
Comment 12 2011-02-24 12:41:26 PST
(In reply to comment #11) > (In reply to comment #10) > > It allows ImageBuffer to easily support saving images with image/jpeg format. > > Why is this useful? How will this be exposed to users? canvas.toDataURL(type); A web page can use this feature to convert canvas to iamge. A sample: http://www.nihilogic.dk/labs/canvas2image/
Peter Kasting
Comment 13 2011-02-24 12:43:33 PST
(In reply to comment #12) > (In reply to comment #11) > > (In reply to comment #10) > > > It allows ImageBuffer to easily support saving images with image/jpeg format. > > > > Why is this useful? How will this be exposed to users? > > canvas.toDataURL(type); Hmm. I'm pretty sure Chrome supports this already, I wonder how it's implemented there. Not sure who would know; abarth is already CCed, adding mihaip.
Yong Li
Comment 14 2011-02-24 12:50:11 PST
(In reply to comment #13) > (In reply to comment #12) > > (In reply to comment #11) > > > (In reply to comment #10) > > > > It allows ImageBuffer to easily support saving images with image/jpeg format. > > > > > > Why is this useful? How will this be exposed to users? > > > > canvas.toDataURL(type); > > Hmm. I'm pretty sure Chrome supports this already, I wonder how it's implemented there. Not sure who would know; abarth is already CCed, adding mihaip. Seems most ports either leave it unimplemented or rely on (graphics)platform feature. skia port is using a PNG encoder in image-encoders/skia. The jpeg/png encoders in image-encoders are platform independent, and can provide a shared implementation for other ports.
Mihai Parparita
Comment 15 2011-02-24 12:52:06 PST
(In reply to comment #14) > Seems most ports either leave it unimplemented or rely on (graphics)platform feature. skia port is using a PNG encoder in image-encoders/skia. The jpeg/png encoders in image-encoders are platform independent, and can provide a shared implementation for other ports. Based on http://trac.webkit.org/changeset/75488 the Skia ports are using image-encoders/skia for JPEG too.
Peter Kasting
Comment 16 2011-02-24 13:02:38 PST
(In reply to comment #15) > (In reply to comment #14) > > Seems most ports either leave it unimplemented or rely on (graphics)platform feature. skia port is using a PNG encoder in image-encoders/skia. The jpeg/png encoders in image-encoders are platform independent, and can provide a shared implementation for other ports. > > Based on http://trac.webkit.org/changeset/75488 the Skia ports are using image-encoders/skia for JPEG too. Is there a compelling reason to choose a platform-dependent versus platform-independent implementation? It seems like in principle it would be better to be consistent: either change various ports to all use the common code or have the OpenVG port (or whatever) use a mechanism more similar to the other ports. I have no idea how this stuff works so I can't say which is better. I'm biased towards cross-platform implementations if they don't come with disadvantages, though.
Adam Barth
Comment 17 2011-03-01 00:37:56 PST
Comment on attachment 83238 [details] Patch ok. Sounds like we shouldn't remove this code quite yet. We should either start using it or decide not to use it. If it's still unused after some moderate period of time, we should probably remove then.
Ahmad Saleem
Comment 18 2022-06-02 08:05:27 PDT
I think this has been taken care of based on this commit - https://github.com/WebKit/WebKit/commit/142915fea4abca2327bd6ed1e651a3e8671f5d03 Since I am not able to find any "code" with JPEGImageEncoder on Github Webkit mirror, only past commits and above one is latest. Thanks!
Alexey Proskuryakov
Comment 19 2022-06-02 09:05:58 PDT
Thank you for checking! *** This bug has been marked as a duplicate of bug 186365 ***
Note You need to log in before you can comment on or make changes to this bug.