• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Drawing many thin vertical lines is very slow
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Drawing many thin vertical lines is very slow


  • Subject: Re: Drawing many thin vertical lines is very slow
  • From: Jens Alfke <email@hidden>
  • Date: Thu, 07 May 2015 22:24:33 -0700

> On May 7, 2015, at 9:43 PM, Michael David Crawford <email@hidden> 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 (email@hidden)

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:

This email sent to email@hidden


References: 
 >Drawing many thin vertical lines is very slow (From: Michael David Crawford <email@hidden>)

  • Prev by Date: Re: Drawing many thin vertical lines is very slow
  • Next by Date: Re: Drawing many thin vertical lines is very slow
  • Previous by thread: Re: Drawing many thin vertical lines is very slow
  • Next by thread: Re: Drawing many thin vertical lines is very slow
  • Index(es):
    • Date
    • Thread