RESOLVED FIXED 58862
[Windows, WinCairo] Teach DIBPixelData to Write to a file
https://bugs.webkit.org/show_bug.cgi?id=58862
Summary [Windows, WinCairo] Teach DIBPixelData to Write to a file
Brent Fulgham
Reported 2011-04-18 19:57:26 PDT
The attached patch extends the DIBPixelData class with a utility function to dump the bitmap to disk. I found this extremely helpful when working on some recent Windows development.
Attachments
Patch (3.93 KB, patch)
2011-04-18 23:01 PDT, Brent Fulgham
no flags
Patch (3.04 KB, patch)
2011-04-18 23:08 PDT, Brent Fulgham
aroben: review+
Brent Fulgham
Comment 1 2011-04-18 23:01:34 PDT
WebKit Review Bot
Comment 2 2011-04-18 23:04:48 PDT
Attachment 90149 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCor..." exit_code: 1 Source/WebCore/platform/graphics/win/DIBPixelData.cpp:32: One space before end of line comments [whitespace/comments] [5] Total errors found: 1 in 5 files If any of these errors are false positives, please file a bug against check-webkit-style.
Brent Fulgham
Comment 3 2011-04-18 23:08:37 PDT
Adam Roben (:aroben)
Comment 4 2011-04-19 09:24:35 PDT
Comment on attachment 90150 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=90150&action=review > Source/WebCore/platform/graphics/win/DIBPixelData.cpp:32 > +const WORD s_bitmapType = 0x4d42; > +const WORD s_bitmapPixelsPerMeter = 2834; // 72 dpi No need for the s_ prefixes here. But you should mark them "static". > Source/WebCore/platform/graphics/win/DIBPixelData.h:52 > + void writeToFile(LPCWSTR); Maybe this function should be wrapped in #ifndef NDEBUG?
Brent Fulgham
Comment 5 2011-04-19 10:01:47 PDT
Note You need to log in before you can comment on or make changes to this bug.