Closed
Bug 988941
Opened 11 years ago
Closed 9 years ago
Implement TextureClient recycle for MediaDecoder
Categories
(Core :: Graphics, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 1135935
People
(Reporter: sotaro, Assigned: sotaro)
References
Details
VideoData::Create() almost always allocates new TextureClient via PlanarYCbCrImage class except OMXCodec case in b2g gonk. It is expensive operation. It seem better to recycle TextureClient than creating new TextureClient.
Like bug 985772, TextureClient's recycling mechanism is going to be used other places. It might be better to use same mechanism.
Assignee | ||
Comment 1•11 years ago
|
||
cpearce, nical, is there already some recycle implementation?
Flags: needinfo?(nical.bugzilla)
Flags: needinfo?(cpearce)
Comment 2•11 years ago
|
||
(In reply to Sotaro Ikeda [:sotaro] from comment #1)
> cpearce, nical, is there already some recycle implementation?
There is TextureClientPool here: http://dxr.mozilla.org/mozilla-central/source/gfx/layers/client/TextureClientPool.h#21
We have a pool per surface format in each LayerManagerComposite. At the moment it's always used on the main thread so if you reuse it you may have to make it thread-safe (if it is not).
Flags: needinfo?(nical.bugzilla)
Updated•11 years ago
|
Flags: needinfo?(cpearce)
Assignee | ||
Comment 3•11 years ago
|
||
(In reply to Nicolas Silva [:nical] from comment #2)
>
> We have a pool per surface format in each LayerManagerComposite. At the
> moment it's always used on the main thread so if you reuse it you may have
> to make it thread-safe (if it is not).
Is there a reason why using pools per surface format? For MediaDecoder, it seems not necessary.
Flags: needinfo?(nical.bugzilla)
Comment 4•11 years ago
|
||
(In reply to Sotaro Ikeda [:sotaro] from comment #3)
> (In reply to Nicolas Silva [:nical] from comment #2)
> >
> > We have a pool per surface format in each LayerManagerComposite. At the
> > moment it's always used on the main thread so if you reuse it you may have
> > to make it thread-safe (if it is not).
>
> Is there a reason why using pools per surface format? For MediaDecoder, it
> seems not necessary.
ClientLayerManager has a pool per surface format because it has to deal with several formats, but if you want to use a TextureClientPool with MediaDecoder, nothing forces you to have a pool per format. The TextureClientPool itself just stores its format to make sure we don't mix formats in a given pool, but it doesn't force you to have several pool. Or maybe I misunderstood the question.
Flags: needinfo?(nical.bugzilla)
Assignee | ||
Updated•11 years ago
|
Assignee: nobody → sotaro.ikeda.g
Updated•9 years ago
|
Component: Audio/Video → Graphics
Assignee | ||
Updated•9 years ago
|
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•