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

使用EGL版本的AWTK没法设置窗口全透明? #109

Open
Gravity-of-eath opened this issue Aug 13, 2024 · 6 comments
Open

使用EGL版本的AWTK没法设置窗口全透明? #109

Gravity-of-eath opened this issue Aug 13, 2024 · 6 comments

Comments

@Gravity-of-eath
Copy link

我的应用在RGB图层做功能UI,有个监控页面视频数据是调用接口让监控应用在指定的区域的YUV图层渲染视频数据,但是从Fb(可以透明到下面)切换为EGL版本,设置窗口为透明的窗口就是白色的,设置其他颜色就是其他颜色,但是有透明度就会显示和白色混合后的颜色,感觉就是window_manager后面还有一层白色的底

@Gravity-of-eath
Copy link
Author

zlgopen/awtk#303
需求和这个类似,就是需要窗口和窗口管理器全透明,需要AWTK输出的图像是带透明度的,有硬件会把其他图层混合后渲染到屏幕

@xianjimli
Copy link
Member

@Gravity-of-eath
Copy link
Author

clear_bg=true 试过没有用,问题在awtk/src/window_manager/window_manager_default.c
#752 color_t bg = color_init(0xff, 0xff, 0xff, 0xff)
这里会把wm的背景初始化成白色的

@xianjimli
Copy link
Member

color_t bg = color_init(0xff, 0xff, 0xff, 0xff)
在没有窗口时才会生效。

创建一个window,指定为透明的背景颜色,配合clear_bg=true 试试

@Gravity-of-eath
Copy link
Author

这个是你底层在EGL里面创建画布时带出来的问题,在这里没法解决,我们找了个折中的方式绕过去了

@adas-eye
Copy link

老大,请问是如何绕过的?@Gravity-of-eath

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

3 participants