Bug 51300

Summary: [Qt] [WK2] QWKPagePrivate::paint() does not need to save the graphics context
Product: WebKit Reporter: Benjamin Poulain <benjamin>
Component: WebKit2Assignee: Benjamin Poulain <benjamin>
Status: RESOLVED FIXED    
Severity: Trivial CC: commit-queue
Priority: P4 Keywords: Qt, QtTriaged
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch none

Description Benjamin Poulain 2010-12-18 15:28:44 PST
QWKPagePrivate::paint() currently saves and restore the context at each call.

This is uncessary, the DrawingAreaProxy already does that:

-TiledDrawingAreaProxy uses gc.save() before rendering anything.
-ChunkedUpdateDrawingAreaProxy calls platformPaint. For Qt, ChunkedUpdateDrawingAreaProxy::platformPaint() is just calling drawimage, which has no side effect.

In any case, there is no requirement for a graphics item to return the painter in the same state as it was given.
Comment 1 Benjamin Poulain 2010-12-18 15:30:48 PST
Created attachment 76948 [details]
Patch
Comment 2 Benjamin Poulain 2010-12-18 16:38:08 PST
Comment on attachment 76948 [details]
Patch

Thanks Kenneth for the review.
Comment 3 WebKit Commit Bot 2010-12-18 16:40:58 PST
Comment on attachment 76948 [details]
Patch

Rejecting attachment 76948 [details] from commit-queue.

Failed to run "['./Tools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '--bot-id=cr-jail-3', 'apply-attachment', '--non-interactive', 76948]" exit_code: 2
Last 500 characters of output:
ts/svn-apply', u'--reviewer', u'Kenneth Rohde Christiansen', u'--force']" exit_code: 1
Parsed 2 diffs from patch file(s).
patching file WebKit2/ChangeLog
Hunk #1 succeeded at 1 with fuzz 3.
patching file WebKit2/UIProcess/API/qt/qwkpage.cpp
Hunk #1 FAILED at 160.
1 out of 1 hunk FAILED -- saving rejects to file WebKit2/UIProcess/API/qt/qwkpage.cpp.rej

Failed to run "[u'/mnt/git/webkit-commit-queue/Tools/Scripts/svn-apply', u'--reviewer', u'Kenneth Rohde Christiansen', u'--force']" exit_code: 1

Full output: http://queues.webkit.org/results/7231043
Comment 4 Benjamin Poulain 2010-12-19 11:48:27 PST
Comment on attachment 76948 [details]
Patch

cq+, that should merge now.
Comment 5 WebKit Commit Bot 2010-12-19 13:35:06 PST
Comment on attachment 76948 [details]
Patch

Clearing flags on attachment: 76948

Committed r74327: <http://trac.webkit.org/changeset/74327>
Comment 6 WebKit Commit Bot 2010-12-19 13:35:13 PST
All reviewed patches have been landed.  Closing bug.