I am working in safari, on top of OSX, using core graphics and I've got a plugin running two threads (main and rendering timer thread). The rendering timer thread invokes "NPN_InvalidateRect" while the main plugin thread handles the corresponding event and redraws itself. However this seems to work differently in safari 32 bit versus safari 64 bit:
- 64 bit (cocoa event model): requires NPN_InvalidateRect + NPN_ForceRedraw = correct redrawing
- 32 bit (cocoa if supported, otherwise carbon): NPN_InvalidateRect = correct redrawing however, doing both NPN_InvalidateRect + NPN_ForceRedraw (like 64 bit case) causes flickering image.
Questions:
Is there a better way to force a plugin to render itself, while sticking to native NPAPI, core graphics and support for carbon&cocoa event models.
If not, how can i detect, at runtime, if the browser is running as 32 versus 64 bit application so i can pick which NPN functions of call.
Thanks,
(cross-posted to firebreath, I will post responses in both places)