Log Message
[skia] remove legacy draw-text-as-paths code, as skia now draws all text as text https://bugs.webkit.org/show_bug.cgi?id=64368
Patch by Mike Reed <[email protected]> on 2011-07-15 Reviewed by James Robinson. Source/WebCore: * platform/graphics/chromium/FontChromiumWin.cpp: (WebCore::TransparencyAwareFontPainter::TransparencyAwareGlyphPainter::drawGlyphs): * platform/graphics/chromium/FontPlatformDataChromiumWin.cpp: (WebCore::FontPlatformData::RefCountedHFONT::~RefCountedHFONT): * platform/graphics/chromium/UniscribeHelper.cpp: (WebCore::UniscribeHelper::draw): * platform/graphics/skia/SkiaFontWin.cpp: (WebCore::skiaDrawText): (WebCore::setupPaintForFont): (WebCore::paintSkiaText): * platform/graphics/skia/SkiaFontWin.h: LayoutTests: * platform/chromium/test_expectations.txt:
Modified Paths
- trunk/LayoutTests/ChangeLog
- trunk/LayoutTests/platform/chromium/test_expectations.txt
- trunk/Source/WebCore/ChangeLog
- trunk/Source/WebCore/platform/graphics/chromium/FontChromiumWin.cpp
- trunk/Source/WebCore/platform/graphics/chromium/FontPlatformDataChromiumWin.cpp
- trunk/Source/WebCore/platform/graphics/chromium/UniscribeHelper.cpp
- trunk/Source/WebCore/platform/graphics/skia/SkiaFontWin.cpp
- trunk/Source/WebCore/platform/graphics/skia/SkiaFontWin.h
Diff
Modified: trunk/LayoutTests/ChangeLog (91068 => 91069)
--- trunk/LayoutTests/ChangeLog 2011-07-15 15:10:17 UTC (rev 91068)
+++ trunk/LayoutTests/ChangeLog 2011-07-15 15:27:30 UTC (rev 91069)
@@ -1,3 +1,12 @@
+2011-07-15 Mike Reed <[email protected]>
+
+ [skia] remove legacy draw-text-as-paths code, as skia now draws all text as text
+ https://bugs.webkit.org/show_bug.cgi?id=64368
+
+ Reviewed by James Robinson.
+
+ * platform/chromium/test_expectations.txt:
+
2011-07-15 Gabor Loki <[email protected]>
Pixel difference in FEMorphology effect
Modified: trunk/LayoutTests/platform/chromium/test_expectations.txt (91068 => 91069)
--- trunk/LayoutTests/platform/chromium/test_expectations.txt 2011-07-15 15:10:17 UTC (rev 91068)
+++ trunk/LayoutTests/platform/chromium/test_expectations.txt 2011-07-15 15:27:30 UTC (rev 91069)
@@ -3381,6 +3381,205 @@
BUGDPRANKE : http/tests/navigation/redirect-on-back-updates-history-item.html = TIMEOUT PASS
BUGWK60125 : fast/files/create-blob-url-crash.html = CRASH PASS
+// Need rebaselining
+BUGWK64368 WIN : editing/selection/vertical-rl-rtl-extend-line-forward-br.html = IMAGE
+BUGWK64368 WIN : editing/selection/vertical-rl-ltr-extend-line-backward-p.html = IMAGE
+BUGWK64368 WIN : fast/backgrounds/repeat/negative-offset-repeat-transformed.html = IMAGE
+BUGWK64368 WIN : fast/block/lineboxcontain/inline-box-vertical.html = IMAGE
+BUGWK64368 WIN : fast/block/positioning/auto/vertical-lr/002.html = IMAGE
+BUGWK64368 WIN : editing/selection/vertical-lr-ltr-extend-line-backward-br.html = IMAGE
+BUGWK64368 WIN : http/tests/loading/simple-subframe.html = IMAGE
+BUGWK64368 WIN : fast/block/positioning/auto/vertical-rl/004.html = IMAGE
+BUGWK64368 WIN : fast/block/positioning/vertical-rl/fixed-positioning.html = IMAGE
+BUGWK64368 WIN : editing/selection/vertical-rl-rtl-extend-line-forward-p.html = IMAGE
+BUGWK64368 WIN : fast/block/positioning/vertical-lr/001.html = IMAGE
+BUGWK64368 WIN : fast/block/positioning/auto/vertical-rl/002.html = IMAGE
+BUGWK64368 WIN : fast/block/positioning/auto/vertical-lr/001.html = IMAGE
+BUGWK64368 WIN : fast/backgrounds/svg-as-background-5.html = IMAGE
+BUGWK64368 WIN : fast/blockflow/box-shadow-vertical-lr.html = IMAGE
+BUGWK64368 WIN : fast/block/positioning/vertical-rl/001.html = IMAGE
+BUGWK64368 WIN : editing/selection/vertical-rl-ltr-extend-line-forward-wrap.html = IMAGE
+BUGWK64368 WIN : fast/block/positioning/auto/vertical-lr/003.html = IMAGE
+BUGWK64368 WIN : fast/block/positioning/vertical-lr/002.html = IMAGE
+BUGWK64368 WIN : fast/block/positioning/auto/vertical-rl/001.html = IMAGE
+BUGWK64368 WIN : fast/canvas/canvas-text-alignment.html = IMAGE
+BUGWK64368 WIN : fast/block/positioning/vertical-rl/002.html = IMAGE
+BUGWK64368 WIN : editing/selection/vertical-rl-ltr-extend-line-backward-wrap.html = IMAGE
+BUGWK64368 WIN : fast/blockflow/vertical-lr-replaced-selection.html = IMAGE
+BUGWK64368 WIN : fast/block/positioning/auto/vertical-lr/004.html = IMAGE
+BUGWK64368 WIN : fast/block/positioning/auto/vertical-rl/003.html = IMAGE
+BUGWK64368 WIN : fast/css/h1-in-section-elements.html = IMAGE
+BUGWK64368 WIN : fast/forms/placeholder-position.html = IMAGE
+BUGWK64368 WIN : fast/dom/scroll-reveal-top-overflow.html = IMAGE
+BUGWK64368 WIN : editing/selection/vertical-lr-ltr-extend-line-forward-br.html = IMAGE
+BUGWK64368 WIN : fast/blockflow/english-rl-text.html = IMAGE
+BUGWK64368 WIN : fast/lists/003-vertical.html = IMAGE
+BUGWK64368 WIN : fast/html/details-writing-mode.html = IMAGE
+BUGWK64368 WIN : fast/multicol/vertical-lr/float-multicol.html = IMAGE
+BUGWK64368 WIN : editing/selection/vertical-rl-ltr-extend-line-forward-p.html = IMAGE
+BUGWK64368 WIN : fast/overflow/overflow-rtl-vertical.html = IMAGE
+BUGWK64368 WIN : fast/multicol/vertical-rl/column-break-with-balancing.html = IMAGE
+BUGWK64368 WIN : fast/blockflow/vertical-align-table-baseline.html = IMAGE
+BUGWK64368 WIN : http/tests/misc/location-replace-crossdomain.html = IMAGE
+BUGWK64368 WIN : fast/lists/002-vertical.html = IMAGE
+BUGWK64368 WIN : editing/selection/vertical-rl-ltr-extend-line-forward-br.html = IMAGE
+BUGWK64368 WIN : fast/replaced/vertical-lr/absolute-position-percentage-width.html = IMAGE
+BUGWK64368 WIN : fast/blockflow/border-radius-clipping-vertical-lr.html = IMAGE
+BUGWK64368 WIN : fast/multicol/vertical-rl/float-avoidance.html = IMAGE
+BUGWK64368 WIN : fast/multicol/vertical-lr/float-avoidance.html = IMAGE
+BUGWK64368 WIN : fast/repaint/shadow-multiple-strict-vertical.html = IMAGE
+BUGWK64368 WIN : fast/lists/007-vertical.html = IMAGE
+BUGWK64368 WIN : fast/replaced/vertical-lr/absolute-position-with-auto-height-and-top-and-bottom.html = IMAGE
+BUGWK64368 WIN : fast/blockflow/vertical-rl-replaced-selection.html = IMAGE
+BUGWK64368 WIN : http/tests/misc/acid2-pixel.html = IMAGE
+BUGWK64368 WIN : editing/selection/vertical-rl-ltr-extend-line-backward-br.html = IMAGE
+BUGWK64368 WIN : fast/multicol/vertical-rl/float-multicol.html = IMAGE
+BUGWK64368 WIN : fast/multicol/vertical-lr/column-rules.html = IMAGE
+BUGWK64368 WIN : fast/repaint/selection-rl.html = IMAGE
+BUGWK64368 WIN : fast/lists/005-vertical.html = IMAGE
+BUGWK64368 WIN : fast/replaced/vertical-lr/absolute-position-with-auto-width-and-left-and-right.html = IMAGE
+BUGWK64368 WIN : fast/blockflow/box-shadow-vertical-rl.html = IMAGE
+BUGWK64368 WIN : editing/selection/vertical-rl-rtl-extend-line-backward-br.html = IMAGE
+BUGWK64368 WIN : fast/multicol/vertical-rl/unsplittable-inline-block.html = IMAGE
+BUGWK64368 WIN : fast/multicol/vertical-lr/nested-columns.html = IMAGE
+BUGWK64368 WIN : fast/lists/008-vertical.html = IMAGE
+BUGWK64368 WIN : fast/replaced/vertical-rl/absolute-position-with-auto-height-and-top-and-bottom.html = IMAGE
+BUGWK64368 WIN : editing/selection/vertical-rl-rtl-extend-line-backward-p.html = IMAGE
+BUGWK64368 WIN : http/tests/misc/iframe404.html = IMAGE
+BUGWK64368 WIN : fast/multicol/vertical-rl/column-count-with-rules.html = IMAGE
+BUGWK64368 WIN : fast/blockflow/japanese-rl-text-with-broken-font.html = IMAGE
+BUGWK64368 WIN : fast/multicol/vertical-lr/unsplittable-inline-block.html = IMAGE
+BUGWK64368 WIN : fast/repaint/shadow-multiple-strict-horizontal.html = IMAGE
+BUGWK64368 WIN : fast/replaced/vertical-rl/absolute-position-with-auto-width-and-left-and-right.html = IMAGE
+BUGWK64368 WIN : fast/lists/001-vertical.html = IMAGE
+BUGWK64368 WIN : fast/ruby/overhang-vertical.html = IMAGE
+BUGWK64368 WIN : fast/table/table-display-types-vertical.html = IMAGE
+BUGWK64368 WIN : fast/multicol/vertical-rl/nested-columns.html = IMAGE
+BUGWK64368 WIN : fast/multicol/vertical-lr/border-padding-pagination.html = IMAGE
+BUGWK64368 WIN : fast/replaced/vertical-rl/absolute-position-percentage-width.html = IMAGE
+BUGWK64368 WIN : fast/lists/009-vertical.html = IMAGE
+BUGWK64368 WIN : fast/repaint/shadow-multiple-vertical.html = IMAGE
+BUGWK64368 WIN : fast/table/border-collapsing/rtl-border-collapsing-vertical.html = IMAGE
+BUGWK64368 WIN : fast/table/038-vertical.html = IMAGE
+BUGWK64368 WIN : fast/multicol/vertical-rl/column-rules.html = IMAGE
+BUGWK64368 WIN : fast/transforms/transform-table-row.html = IMAGE
+BUGWK64368 WIN : fast/multicol/vertical-lr/column-break-with-balancing.html = IMAGE
+BUGWK64368 WIN : fast/lists/006-vertical.html = IMAGE
+BUGWK64368 WIN : fast/table/border-collapsing/004-vertical.html = IMAGE
+BUGWK64368 WIN : http/tests/multipart/invalid-image-data-standalone.html = IMAGE
+BUGWK64368 WIN : fast/table/auto-with-percent-height-vertical.html = IMAGE
+BUGWK64368 WIN : fast/multicol/vertical-rl/border-padding-pagination.html = IMAGE
+BUGWK64368 WIN : fast/repaint/shadow-multiple-horizontal.html = IMAGE
+BUGWK64368 WIN : fast/transforms/shadows.html = IMAGE
+BUGWK64368 WIN : fast/multicol/vertical-lr/column-count-with-rules.html = IMAGE
+BUGWK64368 WIN : fast/table/border-collapsing/border-collapsing-head-foot-vertical.html = IMAGE
+BUGWK64368 WIN : media/audio-repaint.html = IMAGE
+BUGWK64368 WIN : fast/table/rowspan-paint-order-vertical.html = IMAGE
+BUGWK64368 WIN : fast/multicol/vertical-rl/float-paginate-complex.html = IMAGE
+BUGWK64368 WIN : platform/chromium/fast/text/text-stroke-with-border.html = IMAGE
+BUGWK64368 WIN : fast/transforms/transformed-document-element.html = IMAGE
+BUGWK64368 WIN : fast/table/border-collapsing/003-vertical.html = IMAGE
+BUGWK64368 WIN : fast/multicol/vertical-lr/float-paginate.html = IMAGE
+BUGWK64368 WIN : fast/table/027-vertical.html = IMAGE
+BUGWK64368 WIN : svg/W3C-I18N/tspan-dirRTL-ubEmbed-in-default-context.svg = IMAGE
+BUGWK64368 WIN : fast/multicol/vertical-rl/float-paginate.html = IMAGE
+BUGWK64368 WIN : svg/W3C-SVG-1.1/struct-group-03-t.svg = IMAGE
+BUGWK64368 WIN : fast/transforms/transform-on-inline.html = IMAGE
+BUGWK64368 WIN : http/tests/navigation/_javascript_link-frames.html = IMAGE
+BUGWK64368 WIN : fast/table/border-collapsing/001-vertical.html = IMAGE
+BUGWK64368 WIN : svg/W3C-SVG-1.1/fonts-kern-01-t.svg = IMAGE
+BUGWK64368 WIN : fast/table/035-vertical.html = IMAGE
+BUGWK64368 WIN : fast/multicol/vertical-lr/float-paginate-complex.html = IMAGE
+BUGWK64368 WIN : svg/W3C-I18N/tspan-direction-ltr.svg = IMAGE
+BUGWK64368 WIN : svg/W3C-SVG-1.1-SE/struct-use-14-f.svg = IMAGE
+BUGWK64368 WIN : svg/W3C-SVG-1.1/pservers-pattern-01-b.svg = IMAGE
+BUGWK64368 WIN : svg/W3C-SVG-1.1-SE/svgdom-over-01-f.svg = IMAGE
+BUGWK64368 WIN : svg/W3C-SVG-1.1-SE/text-tspan-02-b.svg = IMAGE
+BUGWK64368 WIN : svg/hixie/error/017.xml = IMAGE
+BUGWK64368 WIN : svg/carto.net/selectionlist.svg = IMAGE
+BUGWK64368 WIN : svg/carto.net/combobox.svg = IMAGE
+BUGWK64368 WIN : svg/css/group-with-shadow.svg = IMAGE
+BUGWK64368 WIN : svg/css/text-gradient-shadow.svg = IMAGE
+BUGWK64368 WIN : svg/css/text-shadow-multiple.xhtml = IMAGE
+BUGWK64368 WIN : svg/carto.net/colourpicker.svg = IMAGE
+BUGWK64368 WIN : svg/W3C-SVG-1.1/text-deco-01-b.svg = IMAGE
+BUGWK64368 WIN : svg/W3C-SVG-1.1/animate-elem-39-t.svg = IMAGE
+BUGWK64368 WIN : svg/transforms/text-with-pattern-with-svg-transform.svg = IMAGE
+BUGWK64368 WIN : svg/W3C-I18N/tspan-dirRTL-ubNone-in-default-context.svg = IMAGE
+BUGWK64368 WIN : svg/wicd/test-scalable-background-image2.xhtml = IMAGE
+BUGWK64368 WIN : svg/batik/paints/patternPreserveAspectRatioA.svg = IMAGE
+BUGWK64368 WIN : svg/text/text-path-middle-align.svg = IMAGE
+BUGWK64368 WIN : fast/table/028-vertical.html = IMAGE
+BUGWK64368 WIN : svg/W3C-I18N/tspan-dirRTL-ubOverride-in-ltr-context.svg = IMAGE
+BUGWK64368 WIN : svg/carto.net/window.svg = IMAGE
+BUGWK64368 WIN : svg/text/selection-styles.xhtml = IMAGE
+BUGWK64368 WIN : svg/W3C-I18N/tspan-dirRTL-ubEmbed-in-ltr-context.svg = IMAGE
+BUGWK64368 WIN : svg/dynamic-updates/SVGFEMorphologyElement-dom-in-attr.html = IMAGE
+BUGWK64368 WIN : svg/custom/use-on-disallowed-foreign-object-6.svg = IMAGE
+BUGWK64368 WIN : svg/W3C-I18N/tspan-dirRTL-ubOverride-in-default-context.svg = IMAGE
+BUGWK64368 WIN : transforms/2d/transform-origin-borderbox.html = IMAGE
+BUGWK64368 WIN : svg/W3C-SVG-1.1/text-text-08-b.svg = IMAGE
+BUGWK64368 WIN : svg/custom/text-rotation.svg = IMAGE
+BUGWK64368 WIN : svg/W3C-I18N/tspan-dirNone-ubOverride-in-rtl-context.svg = IMAGE
+BUGWK64368 WIN : svg/W3C-SVG-1.1/filters-example-01-b.svg = IMAGE
+BUGWK64368 WIN : svg/text/text-path-01-b.svg = IMAGE
+BUGWK64368 WIN : svg/text/selection-background-color.xhtml = IMAGE
+BUGWK64368 WIN : transforms/2d/compound-transforms-vs-containers.html = IMAGE
+BUGWK64368 WIN : svg/custom/use-on-disallowed-foreign-object-4.svg = IMAGE
+BUGWK64368 WIN : svg/batik/text/textOnPathSpaces.svg = IMAGE
+BUGWK64368 WIN : svg/W3C-SVG-1.1/types-basicDOM-01-b.svg = IMAGE
+BUGWK64368 WIN : svg/text/text-text-07-t.svg = IMAGE
+BUGWK64368 WIN : svg/W3C-I18N/tspan-dirRTL-ubNone-in-ltr-context.svg = IMAGE
+BUGWK64368 WIN : svg/W3C-SVG-1.1/pservers-grad-11-b.svg = IMAGE
+BUGWK64368 WIN : svg/custom/text-repaint-including-stroke.svg = IMAGE
+BUGWK64368 WIN : svg/text/text-gradient-positioning.svg = IMAGE
+BUGWK64368 WIN : svg/custom/text-rotated-gradient.svg = IMAGE
+BUGWK64368 WIN : svg/custom/text-dom-01-f.svg = IMAGE
+BUGWK64368 WIN : svg/text/text-text-08-b.svg = IMAGE
+BUGWK64368 WIN : svg/W3C-SVG-1.1/text-path-01-b.svg = IMAGE
+BUGWK64368 WIN : svg/dynamic-updates/SVGFEMorphologyElement-dom-operator-attr.html = IMAGE
+BUGWK64368 WIN : svg/custom/js-late-gradient-creation.svg = IMAGE
+BUGWK64368 WIN : svg/W3C-SVG-1.1/text-text-07-t.svg = IMAGE
+BUGWK64368 WIN : svg/text/text-deco-01-b.svg = IMAGE
+BUGWK64368 WIN : svg/batik/text/textLayout2.svg = IMAGE
+BUGWK64368 WIN : svg/batik/text/textProperties.svg = IMAGE
+BUGWK64368 WIN : svg/batik/text/textOnPath3.svg = IMAGE
+BUGWK64368 WIN : svg/dynamic-updates/SVGFEMorphologyElement-svgdom-radius-call.html = IMAGE
+BUGWK64368 WIN : svg/zoom/page/zoom-foreignObject.svg = IMAGE
+BUGWK64368 WIN : svg/dynamic-updates/SVGTextElement-dom-rotate-attr.html = IMAGE
+BUGWK64368 WIN : svg/batik/text/verticalTextOnPath.svg = IMAGE
+BUGWK64368 WIN : svg/batik/text/textDecoration.svg = IMAGE
+BUGWK64368 WIN : svg/dynamic-updates/SVGFEMorphologyElement-svgdom-operator-prop.html = IMAGE
+BUGWK64368 WIN : svg/dynamic-updates/SVGFEMorphologyElement-svgdom-in-prop.html = IMAGE
+BUGWK64368 WIN : svg/dynamic-updates/SVGFEMorphologyElement-dom-radius-attr.html = IMAGE
+BUGWK64368 WIN : svg/batik/text/textStyles.svg = IMAGE
+BUGWK64368 WIN : svg/batik/text/textGlyphOrientationHorizontal.svg = IMAGE
+BUGWK64368 WIN : svg/batik/text/textOnPath2.svg = IMAGE
+BUGWK64368 WIN : svg/batik/text/textOnPath.svg = IMAGE
+BUGWK64368 WIN : svg/custom/pointer-events-text.svg = IMAGE
+BUGWK64368 WIN : svg/batik/text/textFeatures.svg = IMAGE
+BUGWK64368 WIN : svg/custom/text-linking.svg = IMAGE
+BUGWK64368 WIN : svg/custom/focus-ring.svg = IMAGE
+BUGWK64368 WIN : svg/custom/use-on-non-svg-namespaced-element.svg = IMAGE
+BUGWK64368 WIN : svg/custom/use-on-disallowed-foreign-object-2.svg = IMAGE
+BUGWK64368 WIN : svg/custom/struct-use-09-b.svg = IMAGE
+BUGWK64368 WIN : svg/custom/linking-a-03-b-viewBox-transform.svg = IMAGE
+BUGWK64368 WIN : svg/custom/use-on-text.svg = IMAGE
+BUGWK64368 WIN : svg/custom/pattern-with-transformation.svg = IMAGE
+BUGWK64368 WIN : svg/custom/use-on-disallowed-foreign-object-3.svg = IMAGE
+BUGWK64368 WIN : svg/custom/use-on-disallowed-foreign-object-1.svg = IMAGE
+BUGWK64368 WIN : svg/custom/foreign-object-skew.svg = IMAGE
+BUGWK64368 WIN : svg/custom/use-on-disallowed-foreign-object-5.svg = IMAGE
+BUGWK64368 WIN : svg/custom/linking-a-03-b-all.svg = IMAGE
+BUGWK64368 WIN : svg/custom/use-detach.svg = IMAGE
+BUGWK64368 WIN : svg/custom/linking-a-03-b-transform.svg = IMAGE
+BUGWK64368 WIN : svg/custom/js-late-pattern-creation.svg = IMAGE
+BUGWK64368 WIN : svg/W3C-I18N/tspan-dirNone-ubOverride-in-default-context.svg = IMAGE TEXT
+BUGWK64368 WIN : svg/W3C-I18N/tspan-dirNone-ubOverride-in-ltr-context.svg = IMAGE TEXT
+BUGWK64368 WIN : svg/W3C-I18N/tspan-dirLTR-ubOverride-in-default-context.svg = IMAGE TEXT
+BUGWK64368 WIN : svg/W3C-I18N/tspan-dirLTR-ubOverride-in-ltr-context.svg = IMAGE TEXT
+BUGWK64368 WIN : svg/text/bidi-text-query.svg = IMAGE TEXT
+
// flakiness
BUGDPRANKE : fast/dom/Document/document-reopen.html = TEXT PASS
BUGDPRANKE : fast/parser/_javascript_-url-compat-mode.html = TEXT PASS
@@ -3394,7 +3593,7 @@
BUGWK60115 WIN : fast/text/shadow-translucent-fill.html = IMAGE
BUGWK60115 LEOPARD : fast/text/shadow-translucent-fill.html = IMAGE
BUGWK60115 MAC : fast/transforms/shadows.html = IMAGE PASS
-BUGWK60115 XP : svg/css/group-with-shadow.svg = IMAGE
+//BUGWK60115 XP : svg/css/group-with-shadow.svg = IMAGE
BUGWK60115 WIN : transitions/svg-text-shadow-transition.html = IMAGE
BUGWK60115 WIN : svg/css/composite-shadow-text.svg = IMAGE
BUGWK60115 WIN : svg/css/shadow-changes.svg = IMAGE
Modified: trunk/Source/WebCore/ChangeLog (91068 => 91069)
--- trunk/Source/WebCore/ChangeLog 2011-07-15 15:10:17 UTC (rev 91068)
+++ trunk/Source/WebCore/ChangeLog 2011-07-15 15:27:30 UTC (rev 91069)
@@ -1,3 +1,22 @@
+2011-07-15 Mike Reed <[email protected]>
+
+ [skia] remove legacy draw-text-as-paths code, as skia now draws all text as text
+ https://bugs.webkit.org/show_bug.cgi?id=64368
+
+ Reviewed by James Robinson.
+
+ * platform/graphics/chromium/FontChromiumWin.cpp:
+ (WebCore::TransparencyAwareFontPainter::TransparencyAwareGlyphPainter::drawGlyphs):
+ * platform/graphics/chromium/FontPlatformDataChromiumWin.cpp:
+ (WebCore::FontPlatformData::RefCountedHFONT::~RefCountedHFONT):
+ * platform/graphics/chromium/UniscribeHelper.cpp:
+ (WebCore::UniscribeHelper::draw):
+ * platform/graphics/skia/SkiaFontWin.cpp:
+ (WebCore::skiaDrawText):
+ (WebCore::setupPaintForFont):
+ (WebCore::paintSkiaText):
+ * platform/graphics/skia/SkiaFontWin.h:
+
2011-07-15 Piroska AndrĂ¡s <[email protected]>
Pixel difference in FEMorphology effect
Modified: trunk/Source/WebCore/platform/graphics/chromium/FontChromiumWin.cpp (91068 => 91069)
--- trunk/Source/WebCore/platform/graphics/chromium/FontChromiumWin.cpp 2011-07-15 15:10:17 UTC (rev 91068)
+++ trunk/Source/WebCore/platform/graphics/chromium/FontChromiumWin.cpp 2011-07-15 15:27:30 UTC (rev 91069)
@@ -262,8 +262,9 @@
if (!m_useGDI) {
SkPoint origin = m_point;
origin.fX += SkFloatToScalar(startAdvance);
- return paintSkiaText(m_graphicsContext, m_font->platformData().hfont(),
- numGlyphs, glyphs, advances, 0, &origin);
+ paintSkiaText(m_graphicsContext, m_font->platformData().hfont(),
+ numGlyphs, glyphs, advances, 0, &origin);
+ return true;
}
if (!m_graphicsContext || !m_hdc)
Modified: trunk/Source/WebCore/platform/graphics/chromium/FontPlatformDataChromiumWin.cpp (91068 => 91069)
--- trunk/Source/WebCore/platform/graphics/chromium/FontPlatformDataChromiumWin.cpp 2011-07-15 15:10:17 UTC (rev 91068)
+++ trunk/Source/WebCore/platform/graphics/chromium/FontPlatformDataChromiumWin.cpp 2011-07-15 15:27:30 UTC (rev 91069)
@@ -110,7 +110,6 @@
FontPlatformData::RefCountedHFONT::~RefCountedHFONT()
{
if (m_hfont != reinterpret_cast<HFONT>(-1)) {
- SkiaWinOutlineCache::removePathsForFont(m_hfont);
DeleteObject(m_hfont);
}
}
Modified: trunk/Source/WebCore/platform/graphics/chromium/UniscribeHelper.cpp (91068 => 91069)
--- trunk/Source/WebCore/platform/graphics/chromium/UniscribeHelper.cpp 2011-07-15 15:10:17 UTC (rev 91068)
+++ trunk/Source/WebCore/platform/graphics/chromium/UniscribeHelper.cpp 2011-07-15 15:27:30 UTC (rev 91069)
@@ -376,13 +376,14 @@
SkPoint origin;
origin.fX = curX + + innerOffset;
origin.fY = y + m_ascent;
- textOutOk = paintSkiaText(graphicsContext,
- shaping.m_hfont,
- glyphCount,
- &shaping.m_glyphs[fromGlyph],
- &shaping.m_advance[fromGlyph],
- &shaping.m_offsets[fromGlyph],
- &origin);
+ paintSkiaText(graphicsContext,
+ shaping.m_hfont,
+ glyphCount,
+ &shaping.m_glyphs[fromGlyph],
+ &shaping.m_advance[fromGlyph],
+ &shaping.m_offsets[fromGlyph],
+ &origin);
+ textOutOk = true;
}
if (!textOutOk && 0 == executions) {
Modified: trunk/Source/WebCore/platform/graphics/skia/SkiaFontWin.cpp (91068 => 91069)
--- trunk/Source/WebCore/platform/graphics/skia/SkiaFontWin.cpp 2011-07-15 15:10:17 UTC (rev 91068)
+++ trunk/Source/WebCore/platform/graphics/skia/SkiaFontWin.cpp 2011-07-15 15:27:30 UTC (rev 91069)
@@ -41,187 +41,8 @@
#include "SkTemplates.h"
#include "SkTypeface_win.h"
-#include <wtf/ListHashSet.h>
-#include <wtf/Vector.h>
-
namespace WebCore {
-struct CachedOutlineKey {
- CachedOutlineKey() : font(0), glyph(0), path(0) {}
- CachedOutlineKey(HFONT f, WORD g) : font(f), glyph(g), path(0) {}
-
- HFONT font;
- WORD glyph;
-
- // The lifetime of this pointer is managed externally to this class. Be sure
- // to call DeleteOutline to remove items.
- SkPath* path;
-};
-
-const bool operator==(const CachedOutlineKey& a, const CachedOutlineKey& b)
-{
- return a.font == b.font && a.glyph == b.glyph;
-}
-
-struct CachedOutlineKeyHash {
- static unsigned hash(const CachedOutlineKey& key)
- {
- unsigned keyBytes;
- memcpy(&keyBytes, &key.font, sizeof(unsigned));
- return keyBytes + key.glyph;
- }
-
- static unsigned equal(const CachedOutlineKey& a, const CachedOutlineKey& b)
- {
- return a.font == b.font && a.glyph == b.glyph;
- }
-
- static const bool safeToCompareToEmptyOrDeleted = true;
-};
-
-// The global number of glyph outlines we'll cache.
-static const int outlineCacheSize = 256;
-
-typedef ListHashSet<CachedOutlineKey, outlineCacheSize+1, CachedOutlineKeyHash> OutlineCache;
-
-// FIXME: Convert from static constructor to accessor function. WebCore tries to
-// avoid global constructors to save on start-up time.
-static OutlineCache outlineCache;
-
-static SkScalar FIXEDToSkScalar(FIXED fixed)
-{
- SkFixed skFixed;
- memcpy(&skFixed, &fixed, sizeof(SkFixed));
- return SkFixedToScalar(skFixed);
-}
-
-// Removes the given key from the cached outlines, also deleting the path.
-static void deleteOutline(OutlineCache::iterator deleteMe)
-{
- delete deleteMe->path;
- outlineCache.remove(deleteMe);
-}
-
-static void addPolyCurveToPath(const TTPOLYCURVE* polyCurve, SkPath* path)
-{
- switch (polyCurve->wType) {
- case TT_PRIM_LINE:
- for (WORD i = 0; i < polyCurve->cpfx; i++) {
- path->lineTo(FIXEDToSkScalar(polyCurve->apfx[i].x), -FIXEDToSkScalar(polyCurve->apfx[i].y));
- }
- break;
-
- case TT_PRIM_QSPLINE:
- // FIXME: doesn't this duplicate points if we do the loop > once?
- for (WORD i = 0; i < polyCurve->cpfx - 1; i++) {
- SkScalar bx = FIXEDToSkScalar(polyCurve->apfx[i].x);
- SkScalar by = FIXEDToSkScalar(polyCurve->apfx[i].y);
-
- SkScalar cx = FIXEDToSkScalar(polyCurve->apfx[i + 1].x);
- SkScalar cy = FIXEDToSkScalar(polyCurve->apfx[i + 1].y);
- if (i < polyCurve->cpfx - 2) {
- // We're not the last point, compute C.
- cx = SkScalarAve(bx, cx);
- cy = SkScalarAve(by, cy);
- }
-
- // Need to flip the y coordinates since the font's coordinate system is
- // flipped from ours vertically.
- path->quadTo(bx, -by, cx, -cy);
- }
- break;
-
- case TT_PRIM_CSPLINE:
- // FIXME
- break;
- }
-}
-
-// The size of the glyph path buffer.
-static const int glyphPathBufferSize = 4096;
-
-// Fills the given SkPath with the outline for the given glyph index. The font
-// currently selected into the given DC is used. Returns true on success.
-static bool getPathForGlyph(HDC dc, WORD glyph, SkPath* path)
-{
- char buffer[glyphPathBufferSize];
- GLYPHMETRICS gm;
- MAT2 mat = {{0, 1}, {0, 0}, {0, 0}, {0, 1}}; // Each one is (fract,value).
-
- DWORD totalSize = GetGlyphOutlineW(dc, glyph, GGO_GLYPH_INDEX | GGO_NATIVE,
- &gm, glyphPathBufferSize, buffer, &mat);
- if (totalSize == GDI_ERROR)
- return false;
-
- const char* curGlyph = buffer;
- const char* endGlyph = &buffer[totalSize];
- while (curGlyph < endGlyph) {
- const TTPOLYGONHEADER* polyHeader =
- reinterpret_cast<const TTPOLYGONHEADER*>(curGlyph);
- path->moveTo(FIXEDToSkScalar(polyHeader->pfxStart.x),
- -FIXEDToSkScalar(polyHeader->pfxStart.y));
-
- const char* curPoly = curGlyph + sizeof(TTPOLYGONHEADER);
- const char* endPoly = curGlyph + polyHeader->cb;
- while (curPoly < endPoly) {
- const TTPOLYCURVE* polyCurve =
- reinterpret_cast<const TTPOLYCURVE*>(curPoly);
- addPolyCurveToPath(polyCurve, path);
- curPoly += sizeof(WORD) * 2 + sizeof(POINTFX) * polyCurve->cpfx;
- }
- path->close();
- curGlyph += polyHeader->cb;
- }
-
- return true;
-}
-
-// Returns a SkPath corresponding to the give glyph in the given font. The font
-// should be selected into the given DC. The returned path is owned by the
-// hashtable. Returns 0 on error.
-const SkPath* SkiaWinOutlineCache::lookupOrCreatePathForGlyph(HDC hdc, HFONT font, WORD glyph)
-{
- CachedOutlineKey key(font, glyph);
- OutlineCache::iterator found = outlineCache.find(key);
- if (found != outlineCache.end()) {
- // Keep in MRU order by removing & reinserting the value.
- key = *found;
- outlineCache.remove(found);
- outlineCache.add(key);
- return key.path;
- }
-
- key.path = new SkPath;
- if (!getPathForGlyph(hdc, glyph, key.path))
- return 0;
-
- if (outlineCache.size() > outlineCacheSize)
- // The cache is too big, find the oldest value (first in the list).
- deleteOutline(outlineCache.begin());
-
- outlineCache.add(key);
- return key.path;
-}
-
-
-void SkiaWinOutlineCache::removePathsForFont(HFONT hfont)
-{
- // ListHashSet isn't the greatest structure for deleting stuff out of, but
- // removing entries will be relatively rare (we don't remove fonts much, nor
- // do we draw out own glyphs using these routines much either).
- //
- // We keep a list of all glyphs we're removing which we do in a separate
- // pass.
- Vector<CachedOutlineKey> outlinesToDelete;
- for (OutlineCache::iterator i = outlineCache.begin();
- i != outlineCache.end(); ++i)
- outlinesToDelete.append(*i);
-
- for (Vector<CachedOutlineKey>::iterator i = outlinesToDelete.begin();
- i != outlinesToDelete.end(); ++i)
- deleteOutline(outlineCache.find(*i));
-}
-
bool windowsCanHandleDrawTextShadow(GraphicsContext *context)
{
FloatSize shadowOffset;
@@ -274,11 +95,7 @@
return true;
}
-// Draws the given text string using skia. Note that gradient or
-// pattern may be NULL, in which case a solid colour is used.
-static bool skiaDrawText(HFONT hfont,
- HDC dc,
- PlatformContextSkia* platformContext,
+static void skiaDrawText(SkCanvas* canvas,
const SkPoint& point,
SkPaint* paint,
const WORD* glyphs,
@@ -286,45 +103,19 @@
const GOFFSET* offsets,
int numGlyphs)
{
- SkCanvas* canvas = platformContext->canvas();
- if (!platformContext->isNativeFontRenderingAllowed()) {
- SkASSERT(sizeof(WORD) == sizeof(uint16_t));
-
- // Reserve space for 64 glyphs on the stack. If numGlyphs is larger, the array
- // will dynamically allocate it space for numGlyph glyphs.
- static const size_t kLocalGlyphMax = 64;
- SkAutoSTArray<kLocalGlyphMax, SkPoint> posStorage(numGlyphs);
- SkPoint* pos = posStorage.get();
- SkScalar x = point.fX;
- SkScalar y = point.fY;
- for (int i = 0; i < numGlyphs; i++) {
- pos[i].set(x + (offsets ? offsets[i].du : 0),
- y + (offsets ? offsets[i].dv : 0));
- x += SkIntToScalar(advances[i]);
- }
- canvas->drawPosText(glyphs, numGlyphs * sizeof(uint16_t), pos, *paint);
- } else {
- float x = point.fX, y = point.fY;
-
- for (int i = 0; i < numGlyphs; i++) {
- const SkPath* path = SkiaWinOutlineCache::lookupOrCreatePathForGlyph(dc, hfont, glyphs[i]);
- if (!path)
- return false;
-
- float offsetX = 0.0f, offsetY = 0.0f;
- if (offsets && (offsets[i].du || offsets[i].dv)) {
- offsetX = offsets[i].du;
- offsetY = offsets[i].dv;
- }
-
- SkPath newPath;
- newPath.addPath(*path, x + offsetX, y + offsetY);
- canvas->drawPath(newPath, *paint);
-
- x += advances[i];
- }
+ // Reserve space for 64 glyphs on the stack. If numGlyphs is larger, the array
+ // will dynamically allocate it space for numGlyph glyphs.
+ static const size_t kLocalGlyphMax = 64;
+ SkAutoSTArray<kLocalGlyphMax, SkPoint> posStorage(numGlyphs);
+ SkPoint* pos = posStorage.get();
+ SkScalar x = point.fX;
+ SkScalar y = point.fY;
+ for (int i = 0; i < numGlyphs; i++) {
+ pos[i].set(x + (offsets ? offsets[i].du : 0),
+ y + (offsets ? offsets[i].dv : 0));
+ x += SkIntToScalar(advances[i]);
}
- return true;
+ canvas->drawPosText(glyphs, numGlyphs * sizeof(uint16_t), pos, *paint);
}
static void setupPaintForFont(HFONT hfont, SkPaint* paint)
@@ -344,9 +135,26 @@
SkTypeface* face = SkCreateTypefaceFromLOGFONT(info);
paint->setTypeface(face);
SkSafeUnref(face);
+
+ uint32_t flags = paint->getFlags();
+ // our defaults
+ flags |= SkPaint::kAntiAlias_Flag;
+ flags |= SkPaint::kLCDRenderText_Flag;
+ switch (info.lfQuality) {
+ case NONANTIALIASED_QUALITY:
+ flags &= ~SkPaint::kAntiAlias_Flag;
+ flags &= ~SkPaint::kLCDRenderText_Flag;
+ break;
+ case ANTIALIASED_QUALITY:
+ flags &= ~SkPaint::kLCDRenderText_Flag;
+ break;
+ default:
+ break;
+ }
+ paint->setFlags(flags);
}
-bool paintSkiaText(GraphicsContext* context,
+void paintSkiaText(GraphicsContext* context,
HFONT hfont,
int numGlyphs,
const WORD* glyphs,
@@ -358,22 +166,19 @@
HGDIOBJ oldFont = SelectObject(dc, hfont);
PlatformContextSkia* platformContext = context->platformContext();
+ SkCanvas* canvas = platformContext->canvas();
TextDrawingModeFlags textMode = platformContext->getTextDrawingMode();
// Filling (if necessary). This is the common case.
SkPaint paint;
platformContext->setupPaintForFilling(&paint);
- paint.setFlags(SkPaint::kAntiAlias_Flag);
- if (!platformContext->isNativeFontRenderingAllowed()) {
- paint.setTextEncoding(SkPaint::kGlyphID_TextEncoding);
- setupPaintForFont(hfont, &paint);
- }
+ paint.setTextEncoding(SkPaint::kGlyphID_TextEncoding);
+ setupPaintForFont(hfont, &paint);
+
bool didFill = false;
if ((textMode & TextModeFill) && (SkColorGetA(paint.getColor()) || paint.getLooper())) {
- if (!skiaDrawText(hfont, dc, platformContext, *origin, &paint,
- &glyphs[0], &advances[0], &offsets[0], numGlyphs))
- return false;
+ skiaDrawText(canvas, *origin, &paint, &glyphs[0], &advances[0], &offsets[0], numGlyphs);
didFill = true;
}
@@ -384,11 +189,8 @@
paint.reset();
platformContext->setupPaintForStroking(&paint, 0, 0);
- paint.setFlags(SkPaint::kAntiAlias_Flag);
- if (!platformContext->isNativeFontRenderingAllowed()) {
- paint.setTextEncoding(SkPaint::kGlyphID_TextEncoding);
- setupPaintForFont(hfont, &paint);
- }
+ paint.setTextEncoding(SkPaint::kGlyphID_TextEncoding);
+ setupPaintForFont(hfont, &paint);
if (didFill) {
// If there is a shadow and we filled above, there will already be
@@ -403,15 +205,11 @@
paint.setLooper(0);
}
- if (!skiaDrawText(hfont, dc, platformContext, *origin, &paint,
- &glyphs[0], &advances[0], &offsets[0], numGlyphs))
- return false;
+ skiaDrawText(canvas, *origin, &paint, &glyphs[0], &advances[0], &offsets[0], numGlyphs);
}
SelectObject(dc, oldFont);
ReleaseDC(0, dc);
-
- return true;
}
} // namespace WebCore
Modified: trunk/Source/WebCore/platform/graphics/skia/SkiaFontWin.h (91068 => 91069)
--- trunk/Source/WebCore/platform/graphics/skia/SkiaFontWin.h 2011-07-15 15:10:17 UTC (rev 91068)
+++ trunk/Source/WebCore/platform/graphics/skia/SkiaFontWin.h 2011-07-15 15:27:30 UTC (rev 91069)
@@ -34,7 +34,6 @@
#include <windows.h>
#include <usp10.h>
-class SkPath;
class SkPoint;
namespace WebCore {
@@ -42,18 +41,6 @@
class GraphicsContext;
class PlatformContextSkia;
-// FIXME: Rename file to SkiaWinOutlineCache
-class SkiaWinOutlineCache {
-public:
- static const SkPath* lookupOrCreatePathForGlyph(HDC, HFONT, WORD);
- // Removes any cached glyphs from the outline cache corresponding to the
- // given font handle.
- static void removePathsForFont(HFONT);
-
-private:
- SkiaWinOutlineCache();
-};
-
// The functions below are used for more complex font drawing (effects such as
// stroking and more complex transforms) than Windows supports directly. Since
// Windows drawing is faster you should use windowsCanHandleTextDrawing first to
@@ -82,11 +69,8 @@
// Note that the offsets parameter is optional. If not NULL it represents a
// per glyph offset (such as returned by ScriptPlace Windows API function).
-//
-// Returns true of the text was drawn successfully. False indicates an error
-// from Windows.
-bool paintSkiaText(GraphicsContext* graphicsContext,
- HFONT hfont,
+void paintSkiaText(GraphicsContext*,
+ HFONT,
int numGlyphs,
const WORD* glyphs,
const int* advances,
_______________________________________________ webkit-changes mailing list [email protected] http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes
