强制在 root 设备上的所有应用程序中使用 Honeycomb 2D 硬件加速渲染?

发布于 2024-11-03 02:03:05 字数 793 浏览 0 评论 0原文

希望非常明智的罗曼·盖伊(Romain Guy)给出答案(但希望任何有想法的人都能给出答案!)。

之前,他写了以下内容来回应用户询问 为什么默认情况下没有启用硬件加速

默认情况下不开启 兼容性原因。不是100%的 开启后支持Canvas API (虽然缺失的部分非常多 很少且很少使用)并且可能有 是新实施中的错误。 还有新的限制(对于 例如,如果您尝试绘制位图 大于最大 OpenGL 纹理 大小,它将失败。)

新的渲染管道还使用 每个视图的本机显示列表, 这会触发某些应用程序中的错误。为了 例如,如果一个 View 依赖于它的 父级 invalidate() 重绘 本身,这是应用程序中的一个错误,但它 无需硬件加速即可“工作”。 但是它不适用于硬件 加速开启。

我们的目标是制造硬件 默认情况下加速 有可能,但我们不想打破 应用程序。也就是说,使用标准的应用程序 视图和 API 应该可以正常工作。

我想知道是否有任何方法可以强制在已 root 的 Honeycomb 设备上默认打开 Honeycomb 的硬件加速。尽管存在潜在的问题,我仍然有兴趣尝试一下。我粗略地浏览了一下 build.prop,没有发现任何东西。有人愿意为我指出正确的方向吗?

先感谢您!

Hoping for an answer by the incredibly wise Romain Guy (but would love an answer from anyone who has any ideas!).

Before, he wrote the following in response to a user asking why HW acceleration wasn't enabled by default:

It is not turned on by default for
compatibility reasons. Not 100% of the
Canvas API is supported when turned on
(although the missing parts are very
few and rarely used) and there might
be bugs in the new implementation.
There are also new constraints (for
instance if you try to draw a bitmap
larger than the maximum OpenGL texture
size, it will fail.)

The new rendering pipeline also uses
native display lists for each View,
which triggers bugs in some apps. For
instance, if a View relies on its
parent to invalidate() to redraw
itself, it's a bug in the app, but it
"works" without hardware acceleration.
It will however not work with hardware
acceleration on.

Our goal is to make hardware
acceleration on by default as soon as
possible but we do not want to break
apps. That said, apps using standard
views and APIs should work just fine.

I was wondering if there is any way to force Honeycomb's hardware acceleration to be turned on by default on a rooted Honeycomb device. Despite the potential issues, I am still interested in giving it a shot. I gave the build.prop a cursory glance and couldn't find anything. Does anyone care to point me in the right direction, please?

Thank you in advance!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

匿名的好友 2024-11-10 02:03:05

你可以这样做,但没有系统属性。您需要修改源代码或编译后的代码。 hwAccelerated 标志的检查在几个地方完成(在 ActivityManager 中,然后在 ViewRoot 中)。

You could do it but there is not system property. You would need to modify the source code or the compiled code. The check for the hwAccelerated flag is done in a couple of places (in the ActivityManager and then in ViewRoot.)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文