RESOLVED FIXED 49915
[Qt] QWebFramePrivate::renderRelativeCoords() calls QPainter::save/restore more than necessary
https://bugs.webkit.org/show_bug.cgi?id=49915
Summary [Qt] QWebFramePrivate::renderRelativeCoords() calls QPainter::save/restore mo...
Andreas Kling
Reported 2010-11-22 09:21:13 PST
Find a way to minimize the number of save/restore calls.
Attachments
Patch (2.24 KB, patch)
2011-01-24 06:19 PST, Renata Hodovan
no flags
Renata Hodovan
Comment 1 2011-01-24 06:19:46 PST
Andreas Kling
Comment 2 2011-01-24 06:24:08 PST
Comment on attachment 79917 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=79917&action=review > Source/WebKit/qt/ChangeLog:9 > + In the first loop of renderRelativeCoords() the call of QPainter::save/restore is useless, because > + the only change is on it's context which is restored. This sounds a bit strange, I would say something like "..., because the context is saved/restored within the loop." > Source/WebKit/qt/ChangeLog:10 > + In the second loop their calling is also avoidable by using invert translation on context. s/their calling is/the calls are/ s/invert/inverse/ > Source/WebKit/qt/Api/qwebframe.cpp:408 > view->paintScrollbars(context, rect); Are you sure that FrameView::paintScrollbars() doesn't taint the GraphicsContext state?
Renata Hodovan
Comment 3 2011-01-24 06:49:11 PST
(In reply to comment #2) > (From update of attachment 79917 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=79917&action=review > > > Source/WebKit/qt/ChangeLog:9 > > + In the first loop of renderRelativeCoords() the call of QPainter::save/restore is useless, because > > + the only change is on it's context which is restored. > > This sounds a bit strange, I would say something like "..., because the context is saved/restored within the loop." > > > Source/WebKit/qt/ChangeLog:10 > > + In the second loop their calling is also avoidable by using invert translation on context. > > s/their calling is/the calls are/ > s/invert/inverse/ Uppppdated... > > Source/WebKit/qt/Api/qwebframe.cpp:408 > > view->paintScrollbars(context, rect); > > Are you sure that FrameView::paintScrollbars() doesn't taint the GraphicsContext state? No, GC is absolutely undamaged :)
Andreas Kling
Comment 4 2011-01-24 06:53:01 PST
Comment on attachment 79917 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=79917&action=review >>> Source/WebKit/qt/Api/qwebframe.cpp:408 >>> view->paintScrollbars(context, rect); >> >> Are you sure that FrameView::paintScrollbars() doesn't taint the GraphicsContext state? > > No, GC is absolutely undamaged :) Awesomecake! r=me
Renata Hodovan
Comment 5 2011-01-24 07:03:04 PST
Closing bug. This is landed in <http://trac.webkit.org/changeset/76516>
WebKit Review Bot
Comment 6 2011-01-24 08:46:54 PST
http://trac.webkit.org/changeset/76516 might have broken GTK Linux 32-bit Debug The following tests are not passing: editing/selection/extend-selection-bidi.html
Note You need to log in before you can comment on or make changes to this bug.