Re: Converting a webkit plugin to NPAPI?
Stuart Morgan <[email protected]>
| Newsgroups | gmane.comp.mozilla.devel.plugins |
|---|---|
| Organization | http://groups.google.com |
| Message-ID | <8ecf740b-d096-43dd-81df-aed679c30ad1@y24g2000yqb.googlegroups.com> |
You have two options, each of which is pretty easy if that's actually the only thing you are doing: - Use the CoreGraphics drawing model: call NPN_InvalidateRect each time you have a new frame, then in the paint callback draw your NSImage to the CGContextRef you are given as an argument. - Use the Core Animation drawing model: Convert your bitmap to a CGImageRef instead of an NSImage, and set it as the content property of the CALayer you vend. If you handle events, have other controls in your view, etc. then you'll have more work to do. -Stuart