Thanks for the help so far! I've started switching things over to roImageCanvas and the performance is pretty poor. I think I'm missing something.
My UI will have 6 or 7 128x128 images that are scaled up to 256x256 that need to animate (just reposition - no rotation or alpha). For now, I have only two images move 10px each when the user presses a button. On my Roku2 XS, the delay between button press and UI update is roughly half a second. Here's the sub that's called when the user presses a button:
Sub animateImages()
m.x = m.x + 10
list=[
{
url: "http://www.foo.com/image1.jpg",
TargetRect:{x:m.x, y:100, w:256, h:256}
},
{
url:"http://www.foo.com/image2.jpg",
TargetRect:{x:m.x + 200, y:100, w:256, h:256}
}]
m.canvas.SetLayer(0, {
Color: "#00000000",
CompositionMode: "Source" ,
})
m.canvas.SetLayer(1, list)
end Sub
1. Is there a better way to move an existing item in a roImageCanvas? Right now, I'm essentially telling the Roku box to download (or pull from the cache), decode, scale, and draw each image each time. This seems really inefficient but I haven't found anything that would let me simply move/update an existing object instead of recreating it with SetLayer().
2.When I did this with roScreen, the screen updated immediately after a button press. The 500ms I'm seeing now seems unreasonably high. Are there any other things about roImageCanvas that could account for such a delay?
3. Please poke holes in anything else you see that's weird or inefficient!