Use at least SkStreamAsset for SkTypefaces.

The existing AssetStreamAdapter is only SkStreamRewindable, and does not
support 'duplicate'. This is needed in order for SkTypeface to be used
properly. Also, SkTypeface is moving to require SkStreamAsset for
creating typefaces for performance and code reasons.

In the previous code, Asset::getBuffer is called on creation of the
typeface, so do so explicitly and manage the memory directly. This
also prevents additional copies being made of the asset data.

BUG: 18867034
Change-Id: I458a8ec024efefb761138178b87b88b48cb4a773
1 file changed