Low g2d_blit performance

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Low g2d_blit performance

跳至解决方案
1,396 次查看
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.

标签 (2)
标记 (2)
0 项奖励
回复
1 解答
1,125 次查看
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 项奖励
回复
2 回复数
1,126 次查看
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 项奖励
回复
653 次查看
mengfei
Contributor III

How did you obtain the physical address of FB?

0 项奖励
回复