[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
xji at chromium.org
xji at chromium.org
Wed Dec 22 13:54:04 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 791669ba31ae3080b1c2738c99681e6aada4da18
Author: xji at chromium.org <xji at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Sep 29 01:36:54 2010 +0000
2010-09-28 Xiaomei Ji <xji at chromium.org>
Reviewed by NOBODY (revert unsquashed git commits)
Revert change sets 68583 to 68590, which are un-squashed git-commits: Performance improvement for FontLinux regarding issue 46374.
https://bugs.webkit.org/show_bug.cgi?id=46374
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@68618 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 9a2c861..7a3049c 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,10 @@
+2010-09-28 Xiaomei Ji <xji at chromium.org>
+
+ Reviewed by NOBODY (revert unsquashed git commits)
+
+ Revert change sets 68583 to 68590, which are un-squashed git-commits: Performance improvement for FontLinux regarding issue 46374.
+ https://bugs.webkit.org/show_bug.cgi?id=46374
+
2010-09-28 Marc-Antoine Ruel <maruel at chromium.org>
Reviewed by Tony Chang.
@@ -68,27 +75,6 @@
(WebCore::LayerRendererChromium::present):
* platform/graphics/chromium/LayerRendererChromium.h:
-2010-09-28 Xiaomei Ji <xji at chromium.org>
-
- Reviewed by David Levin.
-
- Performance improvement for FontLinux.
- https://bugs.webkit.org/show_bug.cgi?id=46374
-
- Reduce new/delete operations by storing the maximum capacity of the glyph
- array and use that value in subsequent HB_ShapeItem calls. (Note that a
- call to HB_ShapeItem may reduce the value of m_item.num_glyphs below the
- capacity.)
-
- Also be consistent with zero'ing the glyph arrays before calling
- HB_ShapeItem.
-
- There is no functionality changes so no new tests are added.
-
- * platform/graphics/chromium/FontLinux.cpp:
- (WebCore::TextRunWalker::createGlyphArrays):
- (WebCore::TextRunWalker::resetGlyphArrays):
- (WebCore::TextRunWalker::shapeGlyphs):
2010-09-28 Jenn Braithwaite <jennb at chromium.org>
Reviewed by Dmitry Titov.
diff --git a/WebCore/platform/graphics/chromium/FontLinux.cpp b/WebCore/platform/graphics/chromium/FontLinux.cpp
index 4d984c4..a242523 100644
--- a/WebCore/platform/graphics/chromium/FontLinux.cpp
+++ b/WebCore/platform/graphics/chromium/FontLinux.cpp
@@ -477,40 +477,26 @@ private:
void createGlyphArrays(int size)
{
m_item.glyphs = new HB_Glyph[size];
+ memset(m_item.glyphs, 0, size * sizeof(HB_Glyph));
m_item.attributes = new HB_GlyphAttributes[size];
+ memset(m_item.attributes, 0, size * sizeof(HB_GlyphAttributes));
m_item.advances = new HB_Fixed[size];
+ memset(m_item.advances, 0, size * sizeof(HB_Fixed));
m_item.offsets = new HB_FixedPoint[size];
+ memset(m_item.offsets, 0, size * sizeof(HB_FixedPoint));
m_glyphs16 = new uint16_t[size];
m_xPositions = new SkScalar[size];
m_item.num_glyphs = size;
- m_glyphsArrayCapacity = size; // Save the GlyphArrays size.
- resetGlyphArrays();
- }
-
- void resetGlyphArrays()
- {
- int size = m_item.num_glyphs;
- // All the types here don't have pointers. It is safe to reset to
- // zero unless Harfbuzz breaks the compatibility in the future.
- memset(m_item.glyphs, 0, size * sizeof(HB_Glyph));
- memset(m_item.attributes, 0, size * sizeof(HB_GlyphAttributes));
- memset(m_item.advances, 0, size * sizeof(HB_Fixed));
- memset(m_item.offsets, 0, size * sizeof(HB_FixedPoint));
- memset(m_glyphs16, 0, size * sizeof(uint16_t));
- memset(m_xPositions, 0, size * sizeof(SkScalar));
}
void shapeGlyphs()
{
- // HB_ShapeItem() resets m_item.num_glyphs. If the previous call to
- // HB_ShapeItem() used less space than was available, the capacity of
- // the array may be larger than the current value of m_item.num_glyphs.
- // So, we need to reset the num_glyphs to the capacity of the array.
- m_item.num_glyphs = m_glyphsArrayCapacity;
- resetGlyphArrays();
- while (!HB_ShapeItem(&m_item)) {
+ for (;;) {
+ if (HB_ShapeItem(&m_item))
+ break;
+
// We overflowed our arrays. Resize and retry.
// HB_ShapeItem fills in m_item.num_glyphs with the needed size.
deleteGlyphArrays();
@@ -611,7 +597,6 @@ private:
unsigned m_offsetX; // Offset in pixels to the start of the next script run.
unsigned m_pixelWidth; // Width (in px) of the current script run.
unsigned m_numCodePoints; // Code points in current script run.
- unsigned m_glyphsArrayCapacity; // Current size of all the Harfbuzz arrays.
OwnPtr<TextRun> m_normalizedRun;
OwnArrayPtr<UChar> m_normalizedBuffer; // A buffer for normalized run.
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list