Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GraphicBuffer as a fallback for API<26? #4

Open
2 tasks
tareksander opened this issue May 24, 2023 · 3 comments
Open
2 tasks

GraphicBuffer as a fallback for API<26? #4

tareksander opened this issue May 24, 2023 · 3 comments

Comments

@tareksander
Copy link
Owner

tareksander commented May 24, 2023

  • Benchmark the performance for pbuffer + shared memory to see if it get a good improvement
  • If the improvement is enough, integrate it as an option for API 24 + 25
@twaik
Copy link
Contributor

twaik commented May 24, 2023

I think pbuffer + shared memory will always have lower perfomance since it always uses some kind of memcpy implementation between graphic accelerator and CPU (which has terrible perfomance). When I tried to flip image with this code

//real_glReadPixels(0, 0, w->pWidth, w->pHeight, GL_RGBA, GL_UNSIGNED_BYTE, w->pData);
for (int i=0; i<w->pHeight; i++)
    real_glReadPixels(0, i, w->pWidth, 1, GL_RGBA, GL_UNSIGNED_BYTE, &((uint32_t *) w->pData)[(w->pHeight - i - 1) * w->pWidth]);

FPS was much lower (20 instead of 30). So we definitely should check if it can work.

@twaik
Copy link
Contributor

twaik commented May 24, 2023

Going on this conversation.

Termux-x11's server also works as termux-app's child process, so if setting sdk version for process will work with libegl-android.so it will work for termux-x11 too.

@twaik
Copy link
Contributor

twaik commented May 24, 2023

Also I should point that in the case it works we will be able to get DMABUF fd almost directly with GraphicBuffer API. Without socketpair trick.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants