• 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: Something faster than [NSImage drawInRect:...]?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Something faster than [NSImage drawInRect:...]?


  • Subject: Re: Something faster than [NSImage drawInRect:...]?
  • From: John Pannell <email@hidden>
  • Date: Wed, 25 Jan 2006 13:22:01 -0700

Hi August-

Have you tried using Shark to profile what is taking the most time in the drawing? It may reveal something that can be optimized...

Are you compositing the image over something else? What are the values for operation and fraction in your method? I would guess that NSCompositeCopy and 1.0 would be fastest, and other values (requiring more calculation in drawing) would be slower. I'm also guessing that you are using this method to crop a portion of the source picture to fill the screen... there might be faster ways to do this (before drawing).

There are a lot of options to get an image drawn full screen; without knowing more about what you are doing, I can only ask questions. I am confident that you are justifiably concerned that performance could be better. I have a couple apps that draw or compose images to full screen without a noticeable delay.

Hope this helps a little - feel free to post more info if I can be of more assistance!

John

On Jan 25, 2006, at 9:41 AM, August Trometer wrote:


I have an image in a view that takes up the full screen. When I draw the image using [NSImage drawInRect:fromRect:operation:fraction] it takes, on average, about a third of a second to draw. Not a huge delay, granted, but noticeable.

I'm sure that most of this delay is due to the size of the image, but is there a faster way to draw the image in the view?

Thanks!

August
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Something faster than [NSImage drawInRect:...]? (From: August Trometer <email@hidden>)

  • Prev by Date: Re: Controlling Zoom size
  • Next by Date: Re: orderFrontCharacterPalette works... but with one potentially untenable requirement
  • Previous by thread: Re: Something faster than [NSImage drawInRect:...]?
  • Next by thread: [Ann] Seattle Xcoders meeting: 26 January 2006
  • Index(es):
    • Date
    • Thread