Post Reply 
Issues about the BLIT function(beta v3)
01-27-2018, 04:17 AM
Post: #1
Issues about the BLIT function(beta v3)
Hello,
I found that the BLIT_P function runs 50% slower than the other firmware (including beta v1, v2) . So I suppose it is not caused by the 32bit color. In addition, the BLIT_P function will also go wrong when the left-top corner of the area goes out of the GROB.
for example:
<code>DIMGROBG_P(G1,320,240);
BLIT_P(G0,0,0,320,240,G1,-10,-10,310,230);
FREEZE;</code>

The speed test code:
<code>DIMGROB_P(G1,320,240);
TEVAL(MAKELIST(BLIT_P(G1),X,1,10));</code>

It takes about 0.1s in the previous firmware while 0.2s in the current firmware.
It really slows down many programs especially video games.
Find all posts by this user
Quote this message in a reply
01-29-2018, 09:48 AM
Post: #2
RE: Issues about the BLIT function(beta v3)
Hello,

Great job, you have found 2 issues in one go!

The first one has to do with dimgrob.

The previous version of dimgrob was doing a poor job at testing for memory issues when allocating very large grobs (yeilding crashes). A fix was put in place, but this fix does have an issue. When you do a 2nd dimgrob on a graphic object with the SAME size, it will return an insufisant memory! A workaround is to only do the dimgrob if the grob size has changed, or put a IFFERR around it.

The 2nd issue has to do with blit and transparencies (which stems from the switch to 32 bit colors).
The reason why it is slower is that the system will do alpha blending between your 2 grobs. This is what is slowing down the graphic by the factor of 2 that you see.

Fixing these is now on the todo list.

Cyrille

Although I work for the HP calculator group, the views and opinions I post here are my own. I do not speak for HP.
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)