Diff
Modified: trunk/Source/WebCore/ChangeLog (139137 => 139138)
--- trunk/Source/WebCore/ChangeLog 2013-01-09 01:17:19 UTC (rev 139137)
+++ trunk/Source/WebCore/ChangeLog 2013-01-09 01:36:28 UTC (rev 139138)
@@ -1,3 +1,25 @@
+2013-01-08 Florin Malita <fmal...@chromium.org>
+
+ Remove unused GraphicsContext::addInnerRoundedRectClip()
+ https://bugs.webkit.org/show_bug.cgi?id=106376
+
+ Reviewed by Andreas Kling.
+
+ Since there don't seem to be any users left for it, remove addInnerRoundedRectClip().
+
+ No new tests: no functional changes.
+
+ * platform/graphics/GraphicsContext.h:
+ (GraphicsContext):
+ * platform/graphics/cairo/GraphicsContextCairo.cpp:
+ * platform/graphics/cg/GraphicsContextCG.cpp:
+ * platform/graphics/openvg/GraphicsContextOpenVG.cpp:
+ * platform/graphics/qt/GraphicsContextQt.cpp:
+ * platform/graphics/skia/GraphicsContextSkia.cpp:
+ (WebCore):
+ * platform/graphics/wince/GraphicsContextWinCE.cpp:
+ * platform/graphics/wx/GraphicsContextWx.cpp:
+
2013-01-08 Justin Novosad <ju...@google.com>
Color bleeding with rounded rectangles on high dpi displays
Modified: trunk/Source/WebCore/platform/graphics/GraphicsContext.h (139137 => 139138)
--- trunk/Source/WebCore/platform/graphics/GraphicsContext.h 2013-01-09 01:17:19 UTC (rev 139137)
+++ trunk/Source/WebCore/platform/graphics/GraphicsContext.h 2013-01-09 01:36:28 UTC (rev 139138)
@@ -344,7 +344,6 @@
void clip(const IntRect&);
void clip(const FloatRect&);
void addRoundedRectClip(const RoundedRect&);
- void addInnerRoundedRectClip(const IntRect&, int thickness);
void clipOut(const IntRect&);
void clipOutRoundedRect(const RoundedRect&);
void clipPath(const Path&, WindRule);
Modified: trunk/Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp (139137 => 139138)
--- trunk/Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp 2013-01-09 01:17:19 UTC (rev 139137)
+++ trunk/Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp 2013-01-09 01:36:28 UTC (rev 139138)
@@ -844,29 +844,6 @@
m_data->setCTM(transform);
}
-void GraphicsContext::addInnerRoundedRectClip(const IntRect& rect, int thickness)
-{
- if (paintingDisabled())
- return;
-
- cairo_t* cr = platformContext()->cr();
- clip(rect);
-
- Path p;
- FloatRect r(rect);
- // Add outer ellipse
- p.addEllipse(r);
- // Add inner ellipse
- r.inflate(-thickness);
- p.addEllipse(r);
- appendWebCorePathToCairoContext(cr, p);
-
- cairo_fill_rule_t savedFillRule = cairo_get_fill_rule(cr);
- cairo_set_fill_rule(cr, CAIRO_FILL_RULE_EVEN_ODD);
- cairo_clip(cr);
- cairo_set_fill_rule(cr, savedFillRule);
-}
-
void GraphicsContext::setPlatformShadow(FloatSize const& size, float, Color const&, ColorSpace)
{
if (paintingDisabled())
Modified: trunk/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp (139137 => 139138)
--- trunk/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp 2013-01-09 01:17:19 UTC (rev 139137)
+++ trunk/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp 2013-01-09 01:36:28 UTC (rev 139138)
@@ -1097,23 +1097,6 @@
return enclosingIntRect(CGContextGetClipBoundingBox(platformContext()));
}
-void GraphicsContext::addInnerRoundedRectClip(const IntRect& rect, int thickness)
-{
- if (paintingDisabled())
- return;
-
- clip(rect);
- CGContextRef context = platformContext();
-
- // Add outer ellipse
- CGContextAddEllipseInRect(context, CGRectMake(rect.x(), rect.y(), rect.width(), rect.height()));
- // Add inner ellipse.
- CGContextAddEllipseInRect(context, CGRectMake(rect.x() + thickness, rect.y() + thickness,
- rect.width() - (thickness * 2), rect.height() - (thickness * 2)));
-
- CGContextEOClip(context);
-}
-
void GraphicsContext::beginPlatformTransparencyLayer(float opacity)
{
if (paintingDisabled())
Modified: trunk/Source/WebCore/platform/graphics/openvg/GraphicsContextOpenVG.cpp (139137 => 139138)
--- trunk/Source/WebCore/platform/graphics/openvg/GraphicsContextOpenVG.cpp 2013-01-09 01:17:19 UTC (rev 139137)
+++ trunk/Source/WebCore/platform/graphics/openvg/GraphicsContextOpenVG.cpp 2013-01-09 01:36:28 UTC (rev 139138)
@@ -444,19 +444,6 @@
UNUSED_PARAM(imageBuffer);
}
-void GraphicsContext::addInnerRoundedRectClip(const IntRect& rect, int thickness)
-{
- if (paintingDisabled())
- return;
-
- Path path;
- path.addEllipse(rect);
- path.addEllipse(FloatRect(rect.x() + thickness, rect.y() + thickness,
- rect.width() - (thickness * 2), rect.height() - (thickness * 2)));
-
- m_data->clipPath(path, PainterOpenVG::IntersectClip, m_state.fillRule);
-}
-
void GraphicsContext::concatCTM(const AffineTransform& transformation)
{
if (paintingDisabled())
Modified: trunk/Source/WebCore/platform/graphics/qt/GraphicsContextQt.cpp (139137 => 139138)
--- trunk/Source/WebCore/platform/graphics/qt/GraphicsContextQt.cpp 2013-01-09 01:17:19 UTC (rev 139137)
+++ trunk/Source/WebCore/platform/graphics/qt/GraphicsContextQt.cpp 2013-01-09 01:36:28 UTC (rev 139138)
@@ -1334,32 +1334,6 @@
}
}
-void GraphicsContext::addInnerRoundedRectClip(const IntRect& rect,
- int thickness)
-{
- if (paintingDisabled())
- return;
-
- clip(rect);
- QPainterPath path;
-
- // Add outer ellipse
- path.addEllipse(QRectF(rect.x(), rect.y(), rect.width(), rect.height()));
-
- // Add inner ellipse.
- path.addEllipse(QRectF(rect.x() + thickness, rect.y() + thickness,
- rect.width() - (thickness * 2), rect.height() - (thickness * 2)));
-
- path.setFillRule(Qt::OddEvenFill);
-
- QPainter* p = m_data->p();
-
- const bool antiAlias = p->testRenderHint(QPainter::Antialiasing);
- p->setRenderHint(QPainter::Antialiasing, true);
- p->setClipPath(path, Qt::IntersectClip);
- p->setRenderHint(QPainter::Antialiasing, antiAlias);
-}
-
void GraphicsContext::concatCTM(const AffineTransform& transform)
{
if (paintingDisabled())
Modified: trunk/Source/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp (139137 => 139138)
--- trunk/Source/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp 2013-01-09 01:17:19 UTC (rev 139137)
+++ trunk/Source/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp 2013-01-09 01:36:28 UTC (rev 139138)
@@ -275,25 +275,6 @@
// Graphics primitives ---------------------------------------------------------
-void GraphicsContext::addInnerRoundedRectClip(const IntRect& rect, int thickness)
-{
- if (paintingDisabled())
- return;
-
- SkRect r(rect);
- SkPath path;
- 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()) {
- // 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()->clipPath(path, PlatformContextSkia::AntiAliased);
-}
-
void GraphicsContext::clearPlatformShadow()
{
if (paintingDisabled())
Modified: trunk/Source/WebCore/platform/graphics/wince/GraphicsContextWinCE.cpp (139137 => 139138)
--- trunk/Source/WebCore/platform/graphics/wince/GraphicsContextWinCE.cpp 2013-01-09 01:17:19 UTC (rev 139137)
+++ trunk/Source/WebCore/platform/graphics/wince/GraphicsContextWinCE.cpp 2013-01-09 01:36:28 UTC (rev 139138)
@@ -1061,12 +1061,6 @@
notImplemented();
}
-void GraphicsContext::addInnerRoundedRectClip(const IntRect& rect, int thickness)
-{
- // We can only clip rectangles on WINCE
- clip(rect);
-}
-
void GraphicsContext::clearRect(const FloatRect& rect)
{
if (paintingDisabled())
Modified: trunk/Source/WebCore/platform/graphics/wx/GraphicsContextWx.cpp (139137 => 139138)
--- trunk/Source/WebCore/platform/graphics/wx/GraphicsContextWx.cpp 2013-01-09 01:17:19 UTC (rev 139137)
+++ trunk/Source/WebCore/platform/graphics/wx/GraphicsContextWx.cpp 2013-01-09 01:36:28 UTC (rev 139138)
@@ -743,20 +743,6 @@
notImplemented();
}
-void GraphicsContext::addInnerRoundedRectClip(const IntRect& r, int thickness)
-{
- if (paintingDisabled())
- return;
-
- FloatRect rect(r);
- clip(rect);
- Path path;
- path.addEllipse(rect);
- rect.inflate(-thickness);
- path.addEllipse(rect);
- clipPath(path, RULE_EVENODD);
-}
-
#if OS(WINDOWS)
HDC GraphicsContext::getWindowsContext(const IntRect& dstRect, bool supportAlphaBlend, bool mayCreateBitmap)
{