summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/platform/graphics/android/FontAndroid.cpp
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2011-10-12 14:08:26 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-10-12 14:08:26 -0700
commit64652022e8f43ecfabaebc5cd148f1c3058e667c (patch)
treee2cf2b1d86169a2e8bdfbc0a990dba4cf51c977b /Source/WebCore/platform/graphics/android/FontAndroid.cpp
parent5403113c5aa5d55a05ea001f562829e907632178 (diff)
downloadexternal_webkit-64652022e8f43ecfabaebc5cd148f1c3058e667c.zip
external_webkit-64652022e8f43ecfabaebc5cd148f1c3058e667c.tar.gz
external_webkit-64652022e8f43ecfabaebc5cd148f1c3058e667c.tar.bz2
Revert "Support "Vertical Writing Mode"."
This reverts commit 5403113c5aa5d55a05ea001f562829e907632178
Diffstat (limited to 'Source/WebCore/platform/graphics/android/FontAndroid.cpp')
-rw-r--r--Source/WebCore/platform/graphics/android/FontAndroid.cpp24
1 files changed, 3 insertions, 21 deletions
diff --git a/Source/WebCore/platform/graphics/android/FontAndroid.cpp b/Source/WebCore/platform/graphics/android/FontAndroid.cpp
index e01fd83..674938b 100644
--- a/Source/WebCore/platform/graphics/android/FontAndroid.cpp
+++ b/Source/WebCore/platform/graphics/android/FontAndroid.cpp
@@ -183,10 +183,8 @@ void Font::drawGlyphs(GraphicsContext* gc, const SimpleFontData* font,
SkScalar y = SkFloatToScalar(point.y());
const GlyphBufferGlyph* glyphs = glyphBuffer.glyphs(from);
const GlyphBufferAdvance* adv = glyphBuffer.advances(from);
- SkAutoSTMalloc<32, SkPoint> storage(numGlyphs), storage2(numGlyphs), storage3(numGlyphs);
+ SkAutoSTMalloc<32, SkPoint> storage(numGlyphs);
SkPoint* pos = storage.get();
- SkPoint* vPosBegin = storage2.get();
- SkPoint* vPosEnd = storage3.get();
SkCanvas* canvas = gc->platformContext()->mCanvas;
@@ -223,28 +221,12 @@ void Font::drawGlyphs(GraphicsContext* gc, const SimpleFontData* font,
localCount * sizeof(uint16_t),
&pos[localIndex], paint);
} else {
- bool isVertical = font->platformData().orientation() == Vertical;
for (int i = 0; i < numGlyphs; i++) {
pos[i].set(x, y);
+ x += SkFloatToScalar(adv[i].width());
y += SkFloatToScalar(adv[i].height());
- if (isVertical) {
- SkScalar myWidth = SkFloatToScalar(adv[i].width());
- vPosBegin[i].set(x + myWidth, y);
- vPosEnd[i].set(x + myWidth, y - myWidth);
- x += myWidth;
-
- SkPath path;
- path.reset();
- path.moveTo(vPosBegin[i]);
- path.lineTo(vPosEnd[i]);
- canvas->drawTextOnPath(glyphs + i, 2, path, 0, paint);
- }
- else {
- x += SkFloatToScalar(adv[i].width());
- }
}
- if (!isVertical)
- canvas->drawPosText(glyphs, numGlyphs * sizeof(uint16_t), pos, paint);
+ canvas->drawPosText(glyphs, numGlyphs * sizeof(uint16_t), pos, paint);
}
}