[SCM] WebKit Debian packaging branch, webkit-1.3, updated. upstream/1.3.7-4207-g178b198
andreas.kling at nokia.com
andreas.kling at nokia.com
Sun Feb 20 23:35:55 UTC 2011
The following commit has been merged in the webkit-1.3 branch:
commit e48959478f530789923edf5b0cda7259767a8ff6
Author: andreas.kling at nokia.com <andreas.kling at nokia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Jan 21 23:45:26 2011 +0000
2011-01-21 Andreas Kling <kling at webkit.org>
Reviewed by Ariya Hidayat.
[Qt] Let QPainter decide whether a composition mode is supported or not
Lacking Porter-Duff support in the paint engine shouldn't exclude the
Source and Source-Over modes (and has nothing to do with the blend
and raster-op modes.)
Delegate this decision to QPainter instead (this will cause warnings
if an unsupported mode is used, but that's a good thing.)
* platform/graphics/qt/GraphicsContextQt.cpp:
(WebCore::GraphicsContext::clearRect):
(WebCore::GraphicsContext::setPlatformCompositeOperation):
* platform/graphics/qt/TransparencyLayer.h:
(WebCore::TransparencyLayer::TransparencyLayer):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76405 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog
index 1537557..a6316fa 100644
--- a/Source/WebCore/ChangeLog
+++ b/Source/WebCore/ChangeLog
@@ -1,3 +1,22 @@
+2011-01-21 Andreas Kling <kling at webkit.org>
+
+ Reviewed by Ariya Hidayat.
+
+ [Qt] Let QPainter decide whether a composition mode is supported or not
+
+ Lacking Porter-Duff support in the paint engine shouldn't exclude the
+ Source and Source-Over modes (and has nothing to do with the blend
+ and raster-op modes.)
+
+ Delegate this decision to QPainter instead (this will cause warnings
+ if an unsupported mode is used, but that's a good thing.)
+
+ * platform/graphics/qt/GraphicsContextQt.cpp:
+ (WebCore::GraphicsContext::clearRect):
+ (WebCore::GraphicsContext::setPlatformCompositeOperation):
+ * platform/graphics/qt/TransparencyLayer.h:
+ (WebCore::TransparencyLayer::TransparencyLayer):
+
2011-01-21 Chris Rogers <crogers at google.com>
Reviewed by Kenneth Russell.
diff --git a/Source/WebCore/platform/graphics/qt/GraphicsContextQt.cpp b/Source/WebCore/platform/graphics/qt/GraphicsContextQt.cpp
index 0592821..4dabe09 100644
--- a/Source/WebCore/platform/graphics/qt/GraphicsContextQt.cpp
+++ b/Source/WebCore/platform/graphics/qt/GraphicsContextQt.cpp
@@ -991,11 +991,9 @@ void GraphicsContext::clearRect(const FloatRect& rect)
QPainter* p = m_data->p();
QPainter::CompositionMode currentCompositionMode = p->compositionMode();
- if (p->paintEngine()->hasFeature(QPaintEngine::PorterDuff))
- p->setCompositionMode(QPainter::CompositionMode_Source);
+ p->setCompositionMode(QPainter::CompositionMode_Source);
p->fillRect(rect, Qt::transparent);
- if (p->paintEngine()->hasFeature(QPaintEngine::PorterDuff))
- p->setCompositionMode(currentCompositionMode);
+ p->setCompositionMode(currentCompositionMode);
}
void GraphicsContext::strokeRect(const FloatRect& rect, float lineWidth)
@@ -1085,12 +1083,7 @@ void GraphicsContext::setPlatformCompositeOperation(CompositeOperator op)
if (paintingDisabled())
return;
- QPainter* painter = m_data->p();
-
- if (!painter->paintEngine()->hasFeature(QPaintEngine::PorterDuff))
- return;
-
- painter->setCompositionMode(toQtCompositionMode(op));
+ m_data->p()->setCompositionMode(toQtCompositionMode(op));
}
void GraphicsContext::clip(const Path& path)
diff --git a/Source/WebCore/platform/graphics/qt/TransparencyLayer.h b/Source/WebCore/platform/graphics/qt/TransparencyLayer.h
index e4828f6..ff9ef20 100644
--- a/Source/WebCore/platform/graphics/qt/TransparencyLayer.h
+++ b/Source/WebCore/platform/graphics/qt/TransparencyLayer.h
@@ -61,8 +61,7 @@ public:
painter.setTransform(p->transform(), true);
painter.setOpacity(p->opacity());
painter.setFont(p->font());
- if (painter.paintEngine()->hasFeature(QPaintEngine::PorterDuff))
- painter.setCompositionMode(p->compositionMode());
+ painter.setCompositionMode(p->compositionMode());
}
TransparencyLayer()
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list