Closed Bug 912897 Opened 11 years ago Closed 10 years ago

Support sharing the same texture with several layers

Categories

(Core :: Graphics: Layers, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: nical, Unassigned)

References

Details

Attachments

(1 file)

      No description provided.
Blocks: 912907
Not clear if this is the only way to "fix" bug 912907?
(In reply to Milan Sreckovic [:milan] from comment #1)
> Not clear if this is the only way to "fix" bug 912907?

There are two ways:
* A) make it possible to share the same texture to different layers.
* B) make sure we copy textures if we want to pass it to a layer but it happens to already be shared to another layer.

We also want A) for other performance/memory usage reasons, in particular websites using the same source image for multiple <img> objects (or css-backgrounds, or a combination). For an example see bug 889957.

I tried to implement B) as it seemed like the slow-but-easy way but with gralloc it didn't work well at all, I suspect because it makes it very likely that both the client (doing the copy) and the host (compositing) try to get the lock on the texture at the same time so frame rate becomes pretty bad (under 2fps) and eventually it crashes. I didn't spend a lot of time on implementing B) so I assume it is possible to do correctly but it's the least efficient way to do it and not as trivial as it looks at first.
Blocks: 889959
Depends on: 909356
Assignee: nical.bugzilla → nobody
This was sitting in my PTexture patch queue but belongs here more than in the PTexture bug.
We no longer call ForceRemove here, but AddForceRemovingTexture instead.

I think we'll still want this (though probably under a different name) to still hold a ref to the TextureClient until the end of the transaction, but won't call ForceRemove().
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: