"RokuMarkn" wrote:
When you change an item in an ImageCanvas, it redraws the whole screen, just like when you change something on an roScreen. The only difference is the redraw is done by the firmware in the case of the ImageCanvas, whereas it's done in your Brightscript code in the case of roScreen. So although the Brightscript code looks simpler, the actual work being done is approximately the same. roScreen gives you more direct control over what's being drawn and the timing of the changes.
So "if the shoe fits"
roImageCanvas API, there will be no significant difference in speed comparatively to re-doing it with
roScreen? Regardless if the player is
OpenGL or DIrectFB?
"NewManLiving" wrote:
roScreen uses the 2D API and depending on the device may have access to OpenGL. It can also be double buffered for top performance. The imagecanvas is a much higher level component with a simple interface. [...] finally, imagecanvas is just that- a canvas designed for images and not optimized for animation. The 2d is designed for animation- a menu is an animation
Some clarifications, to avoid confusion:
- roScreen does not "use", rather it "is part of" the 2D API, the "DIY-drawing" model
- There is no reason to believe roImageCanvas does not take advantage of OpenGL (actually i'd appreciate hearing from the Co on that)
- double-buffering does not improve performance - its purpose is to eliminate flicker. Image canvas likely does the same (does it flicker?)
- the 2D API is "designed for animation" only in the sense that one can be "close to the metal" when doing say tweens or transitions, e.g. by doing it frame-by-frame. Same can be done in roImageCanvas - by time, without being sure how it really looks on screen due to async update. Then again with roScreen there is some of this uncertainty too, because of how SwapBuffers() may - or may not - wait for VSYNC, depending. So it's a mixed bag.
- UI elements like menus are not proper animations - i mean you may flourish them with animations but that's decoration.
That aside, i agree with the spirit of what you said.
(*) by shoe-fit i mean the use pattern matches the canvas conceptual model, layers of images/text. And i guess
ifImageCanvas.allowUpdates(bool) can be used to provide transactionality of an update, akin to Finish()/SwapBuffers() ?