Low g2d_blit performance

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Low g2d_blit performance

Jump to solution
1,395 Views
alexeysizyukhin
Contributor I

Hello.

I'm now working on porting game of my company to i.mx6Solo custom board. Games is 2D and based on sprites.

Whole graphics was operated with SDL on PC and when we just built project with cross compile we had very low FPS. I decided to replace blit functions that were operating by SDL with g2d_blit operations.

All graphic resources are stored in memory as ARGB8888. First i blit resources to shadow buffer and then blit shadow buffer directly to /dev/fb0 (this is necessary to keep FPS stable for animation not to be too fast or too slow). In this workaround i meet very low blit performance when scene in game has very many little images over background (many string, which generated from one big font texture). So after this i have FPS about 45 for 640x480 resolution!

Could anyone please tell me whether i was wrong when decided to use g2d as 2d video card or i do something wrong with blitting directly to /dev/fb0? May be there's more legant ways to do what I want?

Sorry for my English, it's not my native language.

Labels (2)
Tags (2)
0 Kudos
Reply
1 Solution
1,124 Views
alexeysizyukhin
Contributor I

Found answer myself.

In all examples i saw g2d_finish() was called after every g2d_blit() but this is not necessary. Actually g2d_finish() must be called just to draw 1 frame for example it must be called in flip() routine where i blit shadow bufer to screen.

View solution in original post

0 Kudos
Reply
2 Replies
1,125 Views
alexeysizyukhin
Contributor I

Found answer myself.

In all examples i saw g2d_finish() was called after every g2d_blit() but this is not necessary. Actually g2d_finish() must be called just to draw 1 frame for example it must be called in flip() routine where i blit shadow bufer to screen.

0 Kudos
Reply
652 Views
mengfei
Contributor III

How did you obtain the physical address of FB?

0 Kudos
Reply