> On May 7, 2015, at 9:43 PM, Michael David Crawford <mdcrawf...@gmail.com> > wrote: > > If I autorotate, redrawing the vertical lines takes hundreds > of times as long as redrawing the horizontal lines. That makes sense > as one can draw a horizontal line by incrementing a pointer into the > image buffer. To draw a vertical line one has to draw a pixel, then > calculate the memory address of the next pixel vertically downwards.
That intuition is a couple decades out of date :) All the rendering nowadays is done by dedicated GPU hardware that can draw millions of polygons per second without breaking a sweat. (Even back then, I don’t think it made much difference whether the increment was horizontal or vertical. The bigger win was that in low-bit-depth displays you could fill multiple horizontally adjacent pixels in one write operation. That advantage went away with 32bpp.) That said, I don’t know why the vertical lines would be slower. The first thing I’d try would be to draw the entire grid as a single path using CG. —Jens _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com