[SCM] WebKit Debian packaging branch, webkit-1.3, updated. upstream/1.3.7-4207-g178b198
reni at webkit.org
reni at webkit.org
Sun Feb 20 23:43:16 UTC 2011
The following commit has been merged in the webkit-1.3 branch:
commit 5e28fa7fa78b79a6cc604245c93d684c61584725
Author: reni at webkit.org <reni at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Jan 24 15:01:30 2011 +0000
[Qt] QWebFramePrivate::renderRelativeCoords() calls QPainter::save/restore more than necessary
https://bugs.webkit.org/show_bug.cgi?id=49915
Reviewed by Andreas Kling.
In the first loop of renderRelativeCoords() the call of QPainter::save/restore is useless, because
the context is saved/stored within the loop.
In the second loop the calls are also avoidable by using inverse translation on context.
* Api/qwebframe.cpp:
(QWebFramePrivate::renderRelativeCoords):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76516 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/WebKit/qt/Api/qwebframe.cpp b/Source/WebKit/qt/Api/qwebframe.cpp
index 0d502b3..5cb9b69 100644
--- a/Source/WebKit/qt/Api/qwebframe.cpp
+++ b/Source/WebKit/qt/Api/qwebframe.cpp
@@ -357,7 +357,6 @@ void QWebFramePrivate::renderRelativeCoords(GraphicsContext* context, QWebFrame:
view->updateLayoutAndStyleIfNeededRecursive();
if (layer & QWebFrame::ContentsLayer) {
- painter->save();
for (int i = 0; i < vector.size(); ++i) {
const QRect& clipRect = vector.at(i);
@@ -383,7 +382,6 @@ void QWebFramePrivate::renderRelativeCoords(GraphicsContext* context, QWebFrame:
context->restore();
}
- painter->restore();
#if USE(ACCELERATED_COMPOSITING) && USE(TEXTURE_MAPPER)
renderCompositedLayers(context, IntRect(clip.boundingRect()));
#endif
@@ -403,15 +401,13 @@ void QWebFramePrivate::renderRelativeCoords(GraphicsContext* context, QWebFrame:
if (layer & QWebFrame::ScrollBarLayer
&& !view->scrollbarsSuppressed()
&& (view->horizontalScrollbar() || view->verticalScrollbar())) {
- context->save();
-
QRect rect = intersectedRect;
context->translate(x, y);
rect.translate(-x, -y);
view->paintScrollbars(context, rect);
- context->restore();
+ context->translate(-x, -y);
}
#if ENABLE(PAN_SCROLLING)
diff --git a/Source/WebKit/qt/ChangeLog b/Source/WebKit/qt/ChangeLog
index 8d49fa1..fd2b6db 100644
--- a/Source/WebKit/qt/ChangeLog
+++ b/Source/WebKit/qt/ChangeLog
@@ -1,3 +1,17 @@
+2011-01-24 Renata Hodovan <reni at webkit.org>
+
+ Reviewed by Andreas Kling.
+
+ [Qt] QWebFramePrivate::renderRelativeCoords() calls QPainter::save/restore more than necessary
+ https://bugs.webkit.org/show_bug.cgi?id=49915
+
+ In the first loop of renderRelativeCoords() the call of QPainter::save/restore is useless, because
+ the context is saved/stored within the loop.
+ In the second loop the calls are also avoidable by using inverse translation on context.
+
+ * Api/qwebframe.cpp:
+ (QWebFramePrivate::renderRelativeCoords):
+
2011-01-24 Andras Becsi <abecsi at webkit.org>
Reviewed by Csaba Osztrogonác.
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list