开发者

Blitting over YUV Overlay

开发者 https://www.devze.com 2023-04-01 21:57 出处:网络
I have a YUV overlay that I want to draw a HUD over.Think of a video with a scrubber bar.I want to know what the fastest method of doing this would be.The platform I am on does not support Hardware Su

I have a YUV overlay that I want to draw a HUD over. Think of a video with a scrubber bar. I want to know what the fastest method of doing this would be. The platform I am on does not support Hardware Surfaces.

Currently I do things in this order:

  • Draw YUV overlay directly to screen
  • Blit scrubber bar directly to screen

Would th开发者_JS百科ere be any speed advantage in doing something like:

  • Draw YUV overlay to temporary SDL_Surface
  • Blit scrubber bar to temporary SDL_Surface
  • Blit temporary SDL_Surface to screen


I think the second way would be faster. Looking at program flow, every time you blit to the screen you might get stuck waiting for the direct blit to finish. Blitting to a temporary surface is just copying from one C array to another, so you can push the final blit to screen to the end of your program logic.

0

精彩评论

暂无评论...
验证码 换一张
取 消