Extract the glyph picking and placing code.
authorherb <herb@google.com>
Mon, 9 Nov 2015 16:51:56 +0000 (08:51 -0800)
committerCommit bot <commit-bot@chromium.org>
Mon, 9 Nov 2015 16:51:56 +0000 (08:51 -0800)
commitf553e4e09cd2baf15fc041daab8a08bd46e352f0
treef5d6e2128610b12c5d85840c3ce15545d7da6837
parent44972e239b853cc4415d0df08ca600e93ec44f1f
Extract the glyph picking and placing code.

There is a common piece of code which finds and positions glyphs and is used in four places. Some places copied the code, some places added callbacks. Here is a list of code:

SkDraw::drawPosText
GrAtlasTextContext::internalDrawBMPPosText
GrAtlasTextContext::internalDrawDFPosText
SkXPSDevice::drawPosText

This only extracts the code from SkDraw::drawPosText. I would like to use it in the other three places. I think this code is performance neutral.

BUG=skia:

Review URL: https://codereview.chromium.org/1420973005
src/core/SkDraw.cpp