RESOLVED WONTFIX 28150
WINCE PORT: Image Encoders
https://bugs.webkit.org/show_bug.cgi?id=28150
Summary WINCE PORT: Image Encoders
Yong Li
Reported 2009-08-10 09:32:49 PDT
this bug is created to split out the patch of Image Encoders from bug 27511
Attachments
the patch (16.35 KB, patch)
2009-08-10 09:46 PDT, Yong Li
abarth: review-
Yong Li
Comment 1 2009-08-10 09:46:37 PDT
Created attachment 34480 [details] the patch
Adam Barth
Comment 2 2009-09-01 18:22:57 PDT
Comment on attachment 34480 [details] the patch + // Zero base class memory + memset(this, 0, sizeof(jpeg_destination_mgr)); C++ semantics don't guarantee that this is safe! You don't know what the internal layout of your class is going to be. Yikes! (This error is repeated multiple times.) + Vector<char> m_buffer Member variables should be private. + dest->next_output_byte = reinterpret_cast<JOCTET*>(dest->m_buffer.data()); This line and the following line are not proper WebKit style. Note: this style error is made repeatedly throughout the file. + struct jpeg_compress_struct compressData= { 0 }; This line has improper style. + #if IMAGE_NO_ALPHA_USE_RGB555 Magic constants following this line should be removed. + // This section of the code is based on nsPNGEncoder.cpp in Mozilla I suspect we're missing the Mozilla license block then. Also, your ChangeLog leads me to believe this patch contains a bunch of copy-and-paste code duplication.
Yong Li
Comment 3 2009-09-01 18:38:17 PDT
(In reply to comment #2) > (From update of attachment 34480 [details]) > > + dest->next_output_byte = reinterpret_cast<JOCTET*>(dest->m_buffer.data()); > > This line and the following line are not proper WebKit style. Note: this style > error is made repeatedly throughout the file. many of the variable names and struct names are from libjpeg. > Magic constants following this line should be removed. > > + // This section of the code is based on nsPNGEncoder.cpp in Mozilla > > I suspect we're missing the Mozilla license block then. > > Also, your ChangeLog leads me to believe this patch contains a bunch of > copy-and-paste code duplication. yes PNGEncoder is mostly copied from image-encoders\skia. In the later image code refractoring, the code should be extracted out for share.
Note You need to log in before you can comment on or make changes to this bug.