Jump to content

Draw pixel on framebuffer


topsecret9x

Recommended Posts

Hi everyone,

I already tracked to this function gdisp_lld_draw_pixel(GDisplay *g)  in /driver/gdisp/framebuffer/gdisp_lld_framebuffer.c and I have a question: Whenever I want to draw anything, such as Background, BMP picture, .. on framebuffer, this function is always called? Or any other functions else?

And another question for gwinDestroy(GHandle gh) and  gwinSetVisible(GHandle gh, bool_t visible), I tracked but can't find which functions are called to clear the buffer and redraw, such as that function above  gdisp_lld_draw_pixel(GDisplay *g). Can you guys help me to point out this?

Thank you very much.

Link to comment
Share on other sites

The framebuffer driver uses gdisp_lld_draw_pixel. Other display drivers use other low level driver calls. See the wiki article on gdisp driver models for more information. 

The reason you can't trace from gwinSetVisible or gwinDestroy right down to the driver level is because the actual drawing typically occurs on a seperate gtimer thread. Those calls simply set a flag to tell the update code that the windows need updating. 

Link to comment
Share on other sites

Don't even think about doing that. That is a part private to the display driver itself. You must never touch that. There's a lot of stuff hidden that you don't necessarily see. Stuff like synchronization, grouped flushing, different redrawing modes and so on.

If you tell us why you want to do that we'd be happy to tell you how to solve your problem or how to archive what you want correctly without breaking anything.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...