topsecret9x Posted January 13, 2017 Report Posted January 13, 2017 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.
inmarket Posted January 13, 2017 Report Posted January 13, 2017 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.
topsecret9x Posted January 17, 2017 Author Report Posted January 17, 2017 @inmarket Thank you for your answer. I still have a question: In /driver/gdisp/framebuffer/gdisp_lld_framebuffer.c, I saw PIXEL_ADDR(g, pos)[0], is this the data array to draw? If I change the value, is it directly changed on framebuffer right away?
Joel Bodenmann Posted January 17, 2017 Report Posted January 17, 2017 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.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now