Reversing a GlyphBuffer needlessly queries its size multiple times
authormitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 5 Oct 2012 18:18:50 +0000 (18:18 +0000)
committermitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 5 Oct 2012 18:18:50 +0000 (18:18 +0000)
commitec648e62920ece0a48e0b040baae42f590db7f80
treec9924396f5264fcb06814233a39448617f9be765
parent730adb6cf22ec4ec3efad285a11a6b8d758838c9
Reversing a GlyphBuffer needlessly queries its size multiple times
https://bugs.webkit.org/show_bug.cgi?id=98530

Reviewed by Simon Fraser.

No new tests because there is no change in behavior.

* WebCore.xcodeproj/project.pbxproj:
* platform/graphics/FontFastPath.cpp:
(WebCore::Font::getGlyphsAndAdvancesForSimpleText): Replaced the condition
(i < glyphBuffer.size() / 2) with the equivalent test (i < end).
* platform/graphics/mac/FontComplexTextMac.cpp:
(WebCore::Font::getGlyphsAndAdvancesForComplexText): Ditto.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@130531 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/FontFastPath.cpp
Source/WebCore/platform/graphics/mac/FontComplexTextMac.cpp