summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
authorjhaas@chromium.org <jhaas@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-11 16:20:27 +0000
committerjhaas@chromium.org <jhaas@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-11 16:20:27 +0000
commit9b900694217a563c2482d7b5b2f2d3437e0c9358 (patch)
tree33383c05bc90d49e1b1b43016635d2fd20ced9dc /webkit
parent806b9c6f00c6d21259d049d21ebea52de9b47663 (diff)
downloadchromium_src-9b900694217a563c2482d7b5b2f2d3437e0c9358.zip
chromium_src-9b900694217a563c2482d7b5b2f2d3437e0c9358.tar.gz
chromium_src-9b900694217a563c2482d7b5b2f2d3437e0c9358.tar.bz2
Added code to support the setUseAntialiasing() method, which is invoked
when an object is specified with shape-rendering="crispEdges" Review URL: http://codereview.chromium.org/1830 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2061 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r--webkit/data/layout_test_results/v8/LayoutTests/svg/W3C-SVG-1.1/filters-composite-02-b-expected.checksum2
-rw-r--r--webkit/data/layout_test_results/v8/LayoutTests/svg/W3C-SVG-1.1/filters-composite-02-b-expected.pngbin4813 -> 4764 bytes
-rw-r--r--webkit/data/layout_test_results/v8/LayoutTests/svg/custom/shape-rendering-expected.checksum2
-rw-r--r--webkit/data/layout_test_results/v8/LayoutTests/svg/custom/shape-rendering-expected.pngbin7396 -> 7632 bytes
-rw-r--r--webkit/port/platform/graphics/GraphicsContextSkia.cpp3
-rw-r--r--webkit/port/platform/graphics/SkPaintContext.cpp8
-rw-r--r--webkit/port/platform/graphics/SkPaintContext.h1
7 files changed, 11 insertions, 5 deletions
diff --git a/webkit/data/layout_test_results/v8/LayoutTests/svg/W3C-SVG-1.1/filters-composite-02-b-expected.checksum b/webkit/data/layout_test_results/v8/LayoutTests/svg/W3C-SVG-1.1/filters-composite-02-b-expected.checksum
index 6e96921..c78985a 100644
--- a/webkit/data/layout_test_results/v8/LayoutTests/svg/W3C-SVG-1.1/filters-composite-02-b-expected.checksum
+++ b/webkit/data/layout_test_results/v8/LayoutTests/svg/W3C-SVG-1.1/filters-composite-02-b-expected.checksum
@@ -1 +1 @@
-967e37c8cd8b4c225ec97093ee83927f \ No newline at end of file
+2ab457f91a121120ddbe13ce7ac29dd0 \ No newline at end of file
diff --git a/webkit/data/layout_test_results/v8/LayoutTests/svg/W3C-SVG-1.1/filters-composite-02-b-expected.png b/webkit/data/layout_test_results/v8/LayoutTests/svg/W3C-SVG-1.1/filters-composite-02-b-expected.png
index d4bf37f..2f30880 100644
--- a/webkit/data/layout_test_results/v8/LayoutTests/svg/W3C-SVG-1.1/filters-composite-02-b-expected.png
+++ b/webkit/data/layout_test_results/v8/LayoutTests/svg/W3C-SVG-1.1/filters-composite-02-b-expected.png
Binary files differ
diff --git a/webkit/data/layout_test_results/v8/LayoutTests/svg/custom/shape-rendering-expected.checksum b/webkit/data/layout_test_results/v8/LayoutTests/svg/custom/shape-rendering-expected.checksum
index 43d9e8b..1cc7f60 100644
--- a/webkit/data/layout_test_results/v8/LayoutTests/svg/custom/shape-rendering-expected.checksum
+++ b/webkit/data/layout_test_results/v8/LayoutTests/svg/custom/shape-rendering-expected.checksum
@@ -1 +1 @@
-9a8ab1084029a8ddbb061f6da8b74d34 \ No newline at end of file
+a1c00b911b9e1258e166d1b12867fd90 \ No newline at end of file
diff --git a/webkit/data/layout_test_results/v8/LayoutTests/svg/custom/shape-rendering-expected.png b/webkit/data/layout_test_results/v8/LayoutTests/svg/custom/shape-rendering-expected.png
index 4deb7dc..e6a289e 100644
--- a/webkit/data/layout_test_results/v8/LayoutTests/svg/custom/shape-rendering-expected.png
+++ b/webkit/data/layout_test_results/v8/LayoutTests/svg/custom/shape-rendering-expected.png
Binary files differ
diff --git a/webkit/port/platform/graphics/GraphicsContextSkia.cpp b/webkit/port/platform/graphics/GraphicsContextSkia.cpp
index e169a1d..90eb7ea 100644
--- a/webkit/port/platform/graphics/GraphicsContextSkia.cpp
+++ b/webkit/port/platform/graphics/GraphicsContextSkia.cpp
@@ -24,7 +24,6 @@
#include "Assertions.h"
#include "AffineTransform.h"
#include "NativeImageSkia.h"
-#include "NotImplemented.h"
#include "SkBlurDrawLooper.h"
#include "SkCornerPathEffect.h"
#include "SkiaUtils.h"
@@ -1297,7 +1296,7 @@ void GraphicsContext::setUseAntialiasing(bool enable)
{
if (paintingDisabled())
return;
- notImplemented();
+ m_data->setUseAntialiasing(enable);
}
void GraphicsContext::setShouldDelete(bool should_delete)
diff --git a/webkit/port/platform/graphics/SkPaintContext.cpp b/webkit/port/platform/graphics/SkPaintContext.cpp
index 57c8f4c..4bf8cd1 100644
--- a/webkit/port/platform/graphics/SkPaintContext.cpp
+++ b/webkit/port/platform/graphics/SkPaintContext.cpp
@@ -66,6 +66,7 @@ struct SkPaintContext::State {
StrokeStyle mStrokeStyle;
SkColor mStrokeColor;
float mStrokeThickness;
+ bool mUseAntialiasing;
SkDashPathEffect* mDash;
SkShader* mGradient;
@@ -84,6 +85,7 @@ struct SkPaintContext::State {
mStrokeStyle(SolidStroke),
mStrokeColor(0x0FF000000),
mStrokeThickness(0),
+ mUseAntialiasing(true),
mDash(NULL),
mGradient(NULL),
mPattern(NULL) {
@@ -189,7 +191,7 @@ void SkPaintContext::setup_paint_common(SkPaint* paint) const {
}
#endif
- paint->setAntiAlias(true);
+ paint->setAntiAlias(state_->mUseAntialiasing);
paint->setPorterDuffXfermode(state_->mPorterDuffMode);
paint->setLooper(state_->mLooper);
@@ -295,6 +297,10 @@ void SkPaintContext::setStrokeThickness(float thickness) {
state_->mStrokeThickness = thickness;
}
+void SkPaintContext::setUseAntialiasing(bool enable) {
+ state_->mUseAntialiasing = enable;
+}
+
SkColor SkPaintContext::fillColor() const {
return state_->mFillColor;
}
diff --git a/webkit/port/platform/graphics/SkPaintContext.h b/webkit/port/platform/graphics/SkPaintContext.h
index f068e50..0d7aaae 100644
--- a/webkit/port/platform/graphics/SkPaintContext.h
+++ b/webkit/port/platform/graphics/SkPaintContext.h
@@ -65,6 +65,7 @@ class SkPaintContext {
void setStrokeStyle(StrokeStyle strokestyle);
void setStrokeColor(SkColor strokecolor);
void setStrokeThickness(float thickness);
+ void setUseAntialiasing(bool enable);
void beginPath();
void addPath(const SkPath& path);