Hi all, I have a bit of complex question for the gurus here. My project has multiple graphical threads and each thread is bound to its own dispmanx layer. I draw things on them using openVG API and manage the surfaces with EGL quite the standard way. A question arises when I call eglSwapBuffers(). E...
Hello all, I'm working to obtain some text with a shadow behind it. The main idea I had can be resumed in these three simple passages: 1) draw a text, using vgDrawGlyph 2) apply a convolution to blur the image, using vgConvolve or vgSeparateConvolve 3) redraw the same text on top of the blurred text...
I recently reviewed my font library and the openVG documentation. The OpenVG documentation states that bitmap glyphs should be referenced by vgSetGlyphToImage that accepts a VGImage handle. Actually I create images using vgCreateImage function and vgCreateImage is responsible for the 4096 bytes alig...
Indeed you're going to use: - EGL - OpenVG - Some bits about native broadcom libraries. EGL is the "glue" between all the Open* libraries (like OpenGL, OpenVG). It has the deal to glue them together with the underlying proprietary stuff and let them interoperate. Since you're going to use just 2d, p...
Yes, I thought about that. Using a sprite image and then render the needed parts to build the text is a well-known technique. But it has two major problems: 1) You're limited to a typeface and font size, since you need your font completely rendered into a sprite. This is a major limitation because I...
Hi all, back again with another question about optimization :) I coded my own font library that uses openVG glyph rendering and FreeType2 to render the characters to bitmaps. I do these passages to render a character: 1) Render it in CPU memory using freetype2 library 2) Load it into GPU memory usin...
Thanks for the explanation! It is really useful to understand how to optimize the rendering process. I understand that also calls like vgGetPixels should invoke vgFlush/vgFinish to flush the pipeline to the GPU before being executed... This let me think I could afford some more optimization doing a ...
Still working on my 2D-intenstive project, I found a major increase in speed removing completely vgGetError() calls from my code. I was used to invoke vgGetError() after each operation I did (like acting on a transformation matrix, blitting an image or font glyph, ...) to check for problems. It turn...
I did some preliminar tests, leaving the application running all the night and didn't notice memory leaks. I'll do some more long-term empirical testings and report here. Anyway to me the leaks seems pretty well fixed.
I'll check that out as soon as possible. I hope there aren't side-effects, but I have the chance to do a stress test on a real long-running process that will make evident any leak.
Thanks for the hint. I'll try the workaround and report if it worked.
edit: I tried to add a usleep (10000); as suggested after eglReleaseThread in the leak_test example provided above but no luck... to me it looks like there just isn't the code to free the thread state memory in the implementation.
I found the implementation of eglReleaseThread function in file userland/interface/khronos/egl/egl_client.c.
At the row 1249 of such file I see this suspect comment...:
I didn't try any memory leak detector yet. I'm pretty sure the leak is in the egl side, but I'm not sure if the leak happens because I forgot to setup correctly the egl state, it is expected* or it is a real implementation fault. Just calling eglBindApi and then immediately calling eglReleaseThread ...
I did some experiments but hadn't found a solution to this memory leak. To either bump up this thread and give a simple proof everyone can run, I made a little program. It just initializes the EGL environment and do an on screen color fading using a newly generated thread on each iteration. Inside t...
Hello guys, I'm new here on the forum. I'd like to confront myself with some problems with multithreaded graphics programming I've run into. I am working on a python project where there is a lot of 2D graphical interaction. I built myself some libraries in C/C++ to access low level EGL/openVG primit...