summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/platform/graphics/GraphicsContext.h
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2011-05-18 13:36:51 +0100
committerSteve Block <steveblock@google.com>2011-05-24 15:38:28 +0100
commit2fc2651226baac27029e38c9d6ef883fa32084db (patch)
treee396d4bf89dcce6ed02071be66212495b1df1dec /Source/WebCore/platform/graphics/GraphicsContext.h
parentb3725cedeb43722b3b175aaeff70552e562d2c94 (diff)
downloadexternal_webkit-2fc2651226baac27029e38c9d6ef883fa32084db.zip
external_webkit-2fc2651226baac27029e38c9d6ef883fa32084db.tar.gz
external_webkit-2fc2651226baac27029e38c9d6ef883fa32084db.tar.bz2
Merge WebKit at r78450: Initial merge by git.
Change-Id: I6d3e5f1f868ec266a0aafdef66182ddc3f265dc1
Diffstat (limited to 'Source/WebCore/platform/graphics/GraphicsContext.h')
-rw-r--r--Source/WebCore/platform/graphics/GraphicsContext.h23
1 files changed, 16 insertions, 7 deletions
diff --git a/Source/WebCore/platform/graphics/GraphicsContext.h b/Source/WebCore/platform/graphics/GraphicsContext.h
index 77321e2..21a9067 100644
--- a/Source/WebCore/platform/graphics/GraphicsContext.h
+++ b/Source/WebCore/platform/graphics/GraphicsContext.h
@@ -176,6 +176,11 @@ namespace WebCore {
, shouldSmoothFonts(true)
, paintingDisabled(false)
, shadowsIgnoreTransforms(false)
+#if PLATFORM(CG)
+ // Core Graphics incorrectly renders shadows with radius > 8px (<rdar://problem/8103442>),
+ // but we need to preserve this buggy behavior for canvas and -webkit-box-shadow.
+ , shadowsUseLegacyRadius(false)
+#endif
{
}
@@ -212,6 +217,9 @@ namespace WebCore {
bool shouldSmoothFonts : 1;
bool paintingDisabled : 1;
bool shadowsIgnoreTransforms : 1;
+#if PLATFORM(CG)
+ bool shadowsUseLegacyRadius : 1;
+#endif
};
class GraphicsContext {
@@ -320,6 +328,7 @@ namespace WebCore {
void fillRect(const FloatRect&, Generator&);
void fillRoundedRect(const IntRect&, const IntSize& topLeft, const IntSize& topRight, const IntSize& bottomLeft, const IntSize& bottomRight, const Color&, ColorSpace);
void fillRoundedRect(const RoundedIntRect&, const Color&, ColorSpace);
+ void fillRectWithRoundedHole(const IntRect&, const RoundedIntRect& roundedHoleRect, const Color&, ColorSpace);
void clearRect(const FloatRect&);
@@ -355,6 +364,8 @@ namespace WebCore {
void clipPath(const Path&, WindRule);
void clipConvexPolygon(size_t numPoints, const FloatPoint*, bool antialias = true);
void clipToImageBuffer(ImageBuffer*, const FloatRect&);
+
+ IntRect clipBounds() const;
TextDrawingModeFlags textDrawingMode() const;
void setTextDrawingMode(TextDrawingModeFlags);
@@ -385,6 +396,10 @@ namespace WebCore {
bool hasShadow() const;
void setShadow(const FloatSize&, float blur, const Color&, ColorSpace);
+ // Legacy shadow blur radius is used for canvas, and -webkit-box-shadow.
+ // It has different treatment of radii > 8px.
+ void setLegacyShadow(const FloatSize&, float blur, const Color&, ColorSpace);
+
bool getShadow(FloatSize&, float&, Color&, ColorSpace&) const;
void clearShadow();
@@ -404,16 +419,11 @@ namespace WebCore {
void setCompositeOperation(CompositeOperator);
CompositeOperator compositeOperation() const;
-#if PLATFORM(SKIA)
- void beginPath();
- void addPath(const Path&);
-#endif
-
void clip(const Path&);
// This clip function is used only by <canvas> code. It allows
// implementations to handle clipping on the canvas differently since
- // the disipline is different.
+ // the discipline is different.
void canvasClip(const Path&);
void clipOut(const Path&);
@@ -500,7 +510,6 @@ namespace WebCore {
bool inTransparencyLayer() const;
void pushTransparencyLayerInternal(const QRect &rect, qreal opacity, QPixmap& alphaMask);
void takeOwnershipOfPlatformContext();
- static QPainter::CompositionMode toQtCompositionMode(CompositeOperator op);
#endif
#if PLATFORM(QT) || PLATFORM(CAIRO)