[Solved] Cairo is not working
[Solved] Cairo is not working
EDIT: Solved. I had to learn some Cairo before testing it
Last edited by Agola on Sat May 27, 2017 3:32 am, edited 3 times in total.
Keyboard not found!
Press F1 to run setup.
Press F2 to continue.
Press F1 to run setup.
Press F2 to continue.
Re: Cairo is not working
You say you ported those applications but appear to be trying to run it in kernel space. You're also writing directly to a physical address (instead of using the LFB information Grub/VBE gave you) when you should be mapping that to virtual memory. You're not checking the return value of the cairo functions (I'm assuming they return NULL or something else upon failure).
Re: Cairo is not working
It was for a simple test, not for real gui.goku420 wrote:You say you ported those applications but appear to be trying to run it in kernel space. You're also writing directly to a physical address (instead of using the LFB information Grub/VBE gave you) when you should be mapping that to virtual memory. You're not checking the return value of the cairo functions (I'm assuming they return NULL or something else upon failure).
I'm working with QEMU, so I assume framebuffer is 0xFD000000.
I fixed the problem, looks I should learn the basics of Cairo. Now everything looks good.
Last edited by Agola on Sat May 27, 2017 3:30 am, edited 1 time in total.
Keyboard not found!
Press F1 to run setup.
Press F2 to continue.
Press F1 to run setup.
Press F2 to continue.
Re: Cairo is not working
For the benefit of future readers, what was the problem/solution?Agola wrote:It is for a simple test, not for real gui.
I'm running my os in QEMU, so I assume framebuffer is 0xFD000000.
I fixed the problem, looks I should learn the basics of Cairo. Now everything looks good.
Re: Cairo is not working
Cairo wasn't working.goku420 wrote:For the benefit of future readers, what was the problem/solution?Agola wrote:It is for a simple test, not for real gui.
I'm running my os in QEMU, so I assume framebuffer is 0xFD000000.
I fixed the problem, looks I should learn the basics of Cairo. Now everything looks good.
cairo_format_stride_for_width expects format and width as arguments, but I passed height.
cairo_format_stride_for_width(CAIRO_FORMAT_ARGB32, 480) had to be cairo_format_stride_for_width(CAIRO_FORMAT_ARGB32, 640)
Keyboard not found!
Press F1 to run setup.
Press F2 to continue.
Press F1 to run setup.
Press F2 to continue.
Re: [Solved] Cairo is not working
Sorry, but I thought it was such a rookie mistake and nobody (except me) can do a mistake like that.
Keyboard not found!
Press F1 to run setup.
Press F2 to continue.
Press F1 to run setup.
Press F2 to continue.