• Nigel Tao's avatar
    exp/draw fast path for glyph images. · d7a6d228
    Nigel Tao authored
    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
    d7a6d228
draw.go 7.52 KB