Closed Bug 915234 Opened 7 years ago Closed 6 years ago
implement gralloc-backed tiles
190.97 KB, patch
|Details | Diff | Splinter Review|
No description provided.
6 years ago
Assignee: nobody → sotaro.ikeda.g
I've implemented this on the tiling branch: http://hg.mozilla.org/users/bschouten_mozilla.com/tiling Initial results are not good - our current Gralloc TextureSource has a very expensive BindTexture implementation (most of the time on a profile is spent in EGLImageTargetTexture2D). This may or may not be helped by state tracking, but it may just be an attribute of gralloc that is has an expensive bind. This would make it a bad choice for using with tiles, in this way at least. We're experimenting and trying to think of alternatives. Here's a few: - Don't use Gralloc for tiles and just use the shmem path (that works quite well and seems to perform adequately for our use-case) - Don't use Gralloc, but use EGLImage to move the texture upload into either another thread, or onto the content process - Copy from the gralloc texture to another texture (and hopefully this is faster than uploading from shmem, or it'd be pointless) - Find out why using Gralloc in this way is slow and see if there's anything that can be done, at either application or driver level (we have this kind of relationship, right?)
Assignee: sotaro.ikeda.g → chrislord.net
Status: NEW → ASSIGNED
OS: Mac OS X → Gonk (Firefox OS)
Hardware: x86 → ARM
Here's a profile runnning with full-tilt composition with a tiled layer visible on a buri device: http://people.mozilla.org/~bgirard/cleopatra/#report=df0e68a9c498a953717b6fdec4c1119a9d7ca7d0 This is running on the tree linked to in comment #1. It'd be great to have some feedback/suggestions from someone who has access to the driver code, so needinfo'ing Diego Wilson.
(In reply to Chris Lord [:cwiiis] from comment #1) > - Don't use Gralloc, but use EGLImage to move the texture upload into either > another thread, or onto the content process We were thinking about this way back when the Fennec native rewrite was going on, and I still think it could be a solid idea.
Are your textures 32-byte aligned? If not, that could be the reason for the performance hit.
We deduced the performance hit was due to contention on the texture used to bind the gralloc buffer, and we have a fix :)
here is a try push with the current state of the (European) tiling branch https://tbpl.mozilla.org/?tree=Try&rev=d20ab77f8a51
To get an idea of what's changed in the branch
Attachment #8382983 - Attachment description: [WIP] changes the last common revision with m-c → [WIP] changes since the last common revision with m-c
The previous diff was backward, sorry for the spam.
Attachment #8382983 - Attachment is obsolete: true
new try push https://tbpl.mozilla.org/?tree=Try&rev=8d4135de9be2
new try push https://tbpl.mozilla.org/?tree=Try&rev=01e3a84d93e4
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.