[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373
eric at webkit.org
eric at webkit.org
Wed Apr 7 23:27:14 UTC 2010
The following commit has been merged in the webkit-1.2 branch:
commit e7f97023546054233c1a5b78b155b62f6ed3e632
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Nov 9 19:50:58 2009 +0000
2009-11-09 Shinichiro Hamaji <hamaji at chromium.org>
Reviewed by Dimitri Glazkov.
Win chromium is slow to draw transparent texts
https://bugs.webkit.org/show_bug.cgi?id=31258
Clip graphics context to reduce calculation.
No new tests because this change only affects performance.
* platform/graphics/chromium/FontChromiumWin.cpp:
(WebCore::TransparencyAwareFontPainter::TransparencyAwareFontPainter::initializeForGDI):
(WebCore::TransparencyAwareFontPainter::TransparencyAwareFontPainter::~TransparencyAwareFontPainter):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@50674 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index d813ad9..75a22e7 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,18 @@
+2009-11-09 Shinichiro Hamaji <hamaji at chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Win chromium is slow to draw transparent texts
+ https://bugs.webkit.org/show_bug.cgi?id=31258
+
+ Clip graphics context to reduce calculation.
+
+ No new tests because this change only affects performance.
+
+ * platform/graphics/chromium/FontChromiumWin.cpp:
+ (WebCore::TransparencyAwareFontPainter::TransparencyAwareFontPainter::initializeForGDI):
+ (WebCore::TransparencyAwareFontPainter::TransparencyAwareFontPainter::~TransparencyAwareFontPainter):
+
2009-11-09 Carol Szabo <carol.szabo at nokia.com>
Reviewed by Darin Adler.
diff --git a/WebCore/platform/graphics/chromium/FontChromiumWin.cpp b/WebCore/platform/graphics/chromium/FontChromiumWin.cpp
index 229188e..daea76d 100644
--- a/WebCore/platform/graphics/chromium/FontChromiumWin.cpp
+++ b/WebCore/platform/graphics/chromium/FontChromiumWin.cpp
@@ -112,6 +112,7 @@ void TransparencyAwareFontPainter::init()
void TransparencyAwareFontPainter::initializeForGDI()
{
+ m_graphicsContext->save();
SkColor color = m_platformContext->effectiveFillColor();
if (SkColorGetA(color) != 0xFF) {
// When the font has some transparency, apply it by creating a new
@@ -131,6 +132,7 @@ void TransparencyAwareFontPainter::initializeForGDI()
// and we could do ClearType in that case.
layerMode = TransparencyWin::TextComposite;
layerRect = estimateTextBounds();
+ m_graphicsContext->clip(layerRect);
// The transparency helper requires that we draw text in black in
// this mode and it will apply the color.
@@ -141,6 +143,7 @@ void TransparencyAwareFontPainter::initializeForGDI()
// but if we're drawing to a layer, we still need extra work.
layerMode = TransparencyWin::OpaqueCompositeLayer;
layerRect = estimateTextBounds();
+ m_graphicsContext->clip(layerRect);
} else {
// Common case of drawing onto the bottom layer of a web page: we
// know everything is opaque so don't need to do anything special.
@@ -167,6 +170,7 @@ TransparencyAwareFontPainter::~TransparencyAwareFontPainter()
m_transparency.composite();
if (m_createdTransparencyLayer)
m_graphicsContext->endTransparencyLayer();
+ m_graphicsContext->restore();
m_platformContext->canvas()->endPlatformPaint();
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list