DescriptionConsolidate most simple vs. complex Font methods
This CL encapsulates the simple/complex logic in a low level glyphBuffer builder function, and removes all paint-related codepath-specific methods. Everything above buildGlyphBuffer() now operates on a codepath-agnostic data structure (glyphBuffer).
To pull this off, the CL unifies GlyphBuffer & GlyphBufferWithOffsets by adding offset support to the former. The approach has no downside beyond a slightly increased stack frame size for the simple path, and is aligned with plans to eventually store offsets for simple text also (and possibly drop advances altogether).
Also, most text blob caching logic is relocated down into Font drawText() - which allows us to trivially add support for complex text blobs (currently still off due to the lack of offsets support in buildTextBlob). The advance return value (which doesn't play well with blob caching) is dropped, and the only existing client for it is converted to use a new dedicated, blob-cache-bypassing drawUncachedText() method.
R=jbroman@chromium.org,eae@chromium.org,dominik.rottsches@intel.com,leviw@chromium.org
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=183620
Patch Set 1 #Patch Set 2 : GlyphBufferTest fix #Patch Set 3 : minor drawText refactor #Patch Set 4 : minor cleanup #
Messages
Total messages: 8 (3 generated)
|