[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.17-1283-gcf603cf
eric at webkit.org
eric at webkit.org
Tue Jan 5 23:42:50 UTC 2010
The following commit has been merged in the webkit-1.1 branch:
commit 8ccd88f42403dea65c2a6b6aae4b971e80d9092c
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Sat Dec 5 00:39:27 2009 +0000
2009-12-04 Adam Langley <agl at google.com>
Reviewed by Eric Seidel.
Chromium: make rounded borders heavier.
Skia draws its rounded corners differently from the other ports.
Whereas they have anti-aliased clipping regions, Skia only has 1-bit
regions. (Which is technically more correct, but somewhat unhelpful
for us.) Instead, with Skia we use a layer and collect all the
clipping paths in effect. When the state is popped, we paint
transparency outside the clipping paths and merge the layer down.
This appears to cause rounded borders to look a little thin, which is
addressed in this patch.
This is well covered by existing tests but will require new baselines
in the Chromium tree.
https://bugs.webkit.org/show_bug.cgi?id=31778
* platform/graphics/skia/GraphicsContextSkia.cpp:
(WebCore::GraphicsContext::addInnerRoundedRectClip):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@51722 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 3ad456f..4bf7f58 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,27 @@
+2009-12-04 Adam Langley <agl at google.com>
+
+ Reviewed by Eric Seidel.
+
+ Chromium: make rounded borders heavier.
+
+ Skia draws its rounded corners differently from the other ports.
+ Whereas they have anti-aliased clipping regions, Skia only has 1-bit
+ regions. (Which is technically more correct, but somewhat unhelpful
+ for us.) Instead, with Skia we use a layer and collect all the
+ clipping paths in effect. When the state is popped, we paint
+ transparency outside the clipping paths and merge the layer down.
+
+ This appears to cause rounded borders to look a little thin, which is
+ addressed in this patch.
+
+ This is well covered by existing tests but will require new baselines
+ in the Chromium tree.
+
+ https://bugs.webkit.org/show_bug.cgi?id=31778
+
+ * platform/graphics/skia/GraphicsContextSkia.cpp:
+ (WebCore::GraphicsContext::addInnerRoundedRectClip):
+
2009-12-04 Simon Fraser <simon.fraser at apple.com>
Reviewed by Dan Bernstein.
diff --git a/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp b/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp
index 01737a1..f1536a6 100644
--- a/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp
+++ b/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp
@@ -293,7 +293,10 @@ void GraphicsContext::addInnerRoundedRectClip(const IntRect& rect, int thickness
path.addOval(r, SkPath::kCW_Direction);
// only perform the inset if we won't invert r
if (2 * thickness < rect.width() && 2 * thickness < rect.height()) {
- r.inset(SkIntToScalar(thickness), SkIntToScalar(thickness));
+ // Adding one to the thickness doesn't make the border too thick as
+ // it's painted over afterwards. But without this adjustment the
+ // border appears a little anemic after anti-aliasing.
+ r.inset(SkIntToScalar(thickness + 1), SkIntToScalar(thickness + 1));
path.addOval(r, SkPath::kCCW_Direction);
}
platformContext()->clipPathAntiAliased(path);
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list