Hi all, Recently I've profiled several applications using pixman. (Webkit cairo port is my major concern) Most of cases are covered by C, SSE2 and NEON fast paths now. However siarhei's slow-path-reporter still reports some non-optimized general_composite_rect(). One of them is PIXMAN_REPEAT_NORMAL. This repeat mode is used for drawing tiled background or some gradient patterns.
I've modified nearest/bilinear fast path macro templates to support NORMAL repeat. The basic idea is breaking down one scanline composition into several NONE_REPEAT scanline compositions. So we can use already implemented scanline functions. This approach does not increase binary size much and gives us reasonable speed up. When width of src image is very small, too frequent function call can decrease performance. In this case, pre-repeating src scanline into temporary buffer can reduce the function calls. Bilinear may require last and first pixels to interpolate. Temporary wrap-around buffer can resolve this case. I want to know whether this approach is proper way to go. Maybe you guys are thinking of handling repeat mode inside scanline functions?? (Some scanline functions take max_vx though it is not used yet). Any kind of comments would be appreciated. Here're some benchmark results of SSE2 and NEON fast paths. << SSE2 Fast Paths >> OP=SRC Bilinear Scaling 8888_8888 sse2_src_8888_8888 for comparison : 122.40 MPix/s width = 1 to 512 Before : 28.21 MPix/s After : 74.27 MPix/s (37.18 MPix/s without pre-repeating) width = 15 to 512 Before : 24.73 MPix/s After : 92.72 MPix/s width = 63 to 512 Before : 24.88 MPix/s After : 114.11 MPix/s << NEON Fast Paths >> OP=SRC Bilinear Scaling 8888_8888 neon_src_8888_8888 for comparison : 99.56 MPix/s width = 1 to 512 Before : 5.48 MPix/s After : 30.66 MPix/s (10.13 MPix/s without pre-repeating) width = 15 to 512 Before : 3.81 MPix/s After : 43.95 MPix/s width = 63 to 512 Before : 4.16 MPix/s After : 78.93 MPix/s -- Best Regards, Taekyun Kim
_______________________________________________ Pixman mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/pixman
