]> Cypherpunks repositories - gostls13.git/commit
exp/draw fast path for glyph images.
authorNigel Tao <nigeltao@golang.org>
Mon, 10 May 2010 00:32:08 +0000 (10:32 +1000)
committerNigel Tao <nigeltao@golang.org>
Mon, 10 May 2010 00:32:08 +0000 (10:32 +1000)
commitd7a6d22852168c94986ec1a4ca81efdfd8752970
treeb2f638e6350abe5ee0bad468b7d94389e4ba3e27
parentb717768b94d1afed70eb035221327fa9fee371c8
exp/draw fast path for glyph images.

To draw.Draw a 32x32 image.Alpha 10000 times,
Before: 633ms with 10000 mallocs
After: 49ms with 0 mallocs

These times are just blitting an image.Alpha, and do not include
rasterizing a glyph's vector contours to an image.Alpha.

The "generic" test case in draw_test.go tests this fast path.

R=rsc
CC=golang-dev
https://golang.org/cl/1122043
src/pkg/exp/draw/draw.go