Title: [153898] trunk/Source/WebCore
- Revision
- 153898
- Author
- a...@webkit.org
- Date
- 2013-08-09 10:00:35 -0700 (Fri, 09 Aug 2013)
Log Message
[GTK] [EFL] Enable tiled shadow blur for the inset shadows.
https://bugs.webkit.org/show_bug.cgi?id=119078
Reviewed by Martin Robinson.
Already covered in the tests.
* platform/graphics/GraphicsContext.cpp:
* platform/graphics/cairo/GraphicsContextCairo.cpp:
(WebCore::fillCurrentCairoPath): Added to allow fill the path
without the shadow.
(WebCore::shadowAndFillCurrentCairoPath):
(WebCore::GraphicsContext::fillRectWithRoundedHole): Added cairo
implementation.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (153897 => 153898)
--- trunk/Source/WebCore/ChangeLog 2013-08-09 16:53:38 UTC (rev 153897)
+++ trunk/Source/WebCore/ChangeLog 2013-08-09 17:00:35 UTC (rev 153898)
@@ -1,3 +1,20 @@
+2013-08-09 Alejandro G. Castro <a...@igalia.com>
+
+ [GTK] [EFL] Enable tiled shadow blur for the inset shadows.
+ https://bugs.webkit.org/show_bug.cgi?id=119078
+
+ Reviewed by Martin Robinson.
+
+ Already covered in the tests.
+
+ * platform/graphics/GraphicsContext.cpp:
+ * platform/graphics/cairo/GraphicsContextCairo.cpp:
+ (WebCore::fillCurrentCairoPath): Added to allow fill the path
+ without the shadow.
+ (WebCore::shadowAndFillCurrentCairoPath):
+ (WebCore::GraphicsContext::fillRectWithRoundedHole): Added cairo
+ implementation.
+
2013-08-09 Jakob Petsovits <jpetsov...@blackberry.com>
[BlackBerry] Don't release the canvas Drawable, flush it directly instead.
Modified: trunk/Source/WebCore/platform/graphics/GraphicsContext.cpp (153897 => 153898)
--- trunk/Source/WebCore/platform/graphics/GraphicsContext.cpp 2013-08-09 16:53:38 UTC (rev 153897)
+++ trunk/Source/WebCore/platform/graphics/GraphicsContext.cpp 2013-08-09 17:00:35 UTC (rev 153898)
@@ -693,7 +693,7 @@
fillRect(rect.rect(), color, colorSpace, compositeOperation(), blendMode);
}
-#if !USE(CG) && !PLATFORM(QT)
+#if !USE(CG) && !PLATFORM(QT) && !USE(CAIRO)
void GraphicsContext::fillRectWithRoundedHole(const IntRect& rect, const RoundedRect& roundedHoleRect, const Color& color, ColorSpace colorSpace)
{
if (paintingDisabled())
Modified: trunk/Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp (153897 => 153898)
--- trunk/Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp 2013-08-09 16:53:38 UTC (rev 153897)
+++ trunk/Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp 2013-08-09 17:00:35 UTC (rev 153898)
@@ -150,19 +150,23 @@
cairo_append_path(cairoContext, path.get());
}
-static inline void shadowAndFillCurrentCairoPath(GraphicsContext* context)
+static inline void fillCurrentCairoPath(GraphicsContext* context)
{
cairo_t* cr = context->platformContext()->cr();
cairo_save(cr);
- drawPathShadow(context, Fill);
-
context->platformContext()->prepareForFilling(context->state(), PlatformContextCairo::AdjustPatternForGlobalAlpha);
cairo_fill(cr);
cairo_restore(cr);
}
+static inline void shadowAndFillCurrentCairoPath(GraphicsContext* context)
+{
+ drawPathShadow(context, Fill);
+ fillCurrentCairoPath(context);
+}
+
static inline void shadowAndStrokeCurrentCairoPath(GraphicsContext* context)
{
drawPathShadow(context, Stroke);
@@ -1036,6 +1040,28 @@
cairo_restore(cr);
}
+void GraphicsContext::fillRectWithRoundedHole(const IntRect& rect, const RoundedRect& roundedHoleRect, const Color& color, ColorSpace colorSpace)
+{
+ if (paintingDisabled() || !color.isValid())
+ return;
+
+ if (this->mustUseShadowBlur())
+ platformContext()->shadowBlur().drawInsetShadow(this, rect, roundedHoleRect.rect(), roundedHoleRect.radii());
+
+ Path path;
+ path.addRect(rect);
+ if (!roundedHoleRect.radii().isZero())
+ path.addRoundedRect(roundedHoleRect);
+ else
+ path.addRect(roundedHoleRect.rect());
+
+ cairo_t* cr = platformContext()->cr();
+ cairo_save(cr);
+ setPathOnCairoContext(platformContext()->cr(), path.platformPath()->context());
+ fillCurrentCairoPath(this);
+ cairo_restore(cr);
+}
+
#if PLATFORM(GTK)
void GraphicsContext::setGdkExposeEvent(GdkEventExpose* expose)
{
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes