[Webkit-unassigned] [Bug 28150] WINCE PORT: Image Encoders

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Sep 1 18:22:57 PDT 2009


https://bugs.webkit.org/show_bug.cgi?id=28150


Adam Barth <abarth at webkit.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #34480|review?                     |review-
               Flag|                            |




--- Comment #2 from Adam Barth <abarth at webkit.org>  2009-09-01 18:22:57 PDT ---
(From update of attachment 34480)
+ // 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.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list