Summary: | [Qt] Canvas putImageData() resets painter state | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Andreas Kling <kling> | ||||||||||
Component: | WebCore Misc. | Assignee: | QtWebKit Unassigned <webkit-qt-unassigned> | ||||||||||
Status: | RESOLVED FIXED | ||||||||||||
Severity: | Normal | CC: | commit-queue, webkit-ews, webkit.review.bot | ||||||||||
Priority: | P2 | Keywords: | HTML5, Qt, QtTriaged | ||||||||||
Version: | 528+ (Nightly build) | ||||||||||||
Hardware: | All | ||||||||||||
OS: | All | ||||||||||||
Attachments: |
|
Description
Andreas Kling
2010-07-07 19:10:59 PDT
Created attachment 60828 [details]
Proposed patch
Patch to use QImage instead of QPixmap as the backing store of ImageBuffer.
Attachment 60828 [details] did not pass style-queue:
Failed to run "['WebKitTools/Scripts/check-webkit-style', '--no-squash']" exit_code: 1
WebCore/platform/graphics/qt/ImageBufferData.h:30: Alphabetical sorting problem. [build/include_order] [4]
Total errors found: 1 in 7 files
If any of these errors are false positives, please file a bug against check-webkit-style.
Attachment 60828 [details] did not build on qt: Build output: http://webkit-commit-queue.appspot.com/results/3496001 Comment on attachment 60828 [details]
Proposed patch
Oops, used some 4.7+ API here. Leaving r? for visibility. zzz..
Comment on attachment 60828 [details]
Proposed patch
r- after discussion with Simon. There should be a simpler way to fix this.
Created attachment 60865 [details]
Proposed patch v2
Better solution - use QPainter::drawImage() to copy pixel data into the canvas backing store.
Comment on attachment 60865 [details]
Proposed patch v2
r- due to bathroom epiphany. More awesome patch coming shortly.
Created attachment 60866 [details]
Proposed patch v3
Accomplish the same thing without converting the canvas backing store into a QImage.
Created attachment 60867 [details]
Proposed patch v4
Patch updated to set correct composition mode when painter isn't active at the time putImageData() is called.
Comment on attachment 60867 [details] Proposed patch v4 Clearing flags on attachment: 60867 Committed r62782: <http://trac.webkit.org/changeset/62782> All reviewed patches have been landed. Closing bug. |