Closed
Bug 1155495
Opened 9 years ago
Closed 9 years ago
refactor the part of android fence in TextureHostOGL
Categories
(Core :: Graphics: Layers, defect)
Tracking
()
RESOLVED
FIXED
mozilla41
Tracking | Status | |
---|---|---|
firefox41 | --- | fixed |
People
(Reporter: ethlin, Assigned: chenpighead)
References
(Blocks 1 open bug)
Details
(Whiteboard: [gfx-noted])
Attachments
(2 files, 5 obsolete files)
3.46 KB,
patch
|
sotaro
:
review+
nical
:
review+
|
Details | Diff | Splinter Review |
9.99 KB,
patch
|
nical
:
review+
sotaro
:
review+
|
Details | Diff | Splinter Review |
All functions and members in TextureHostOGL is for android fence. Each time using these functions will call AsHostOGL() to cast TextureHost to TextureHostOGL and check if the platform is WIDGE_GONK [1]. And there should be only GrallocTextureHost uses these members and functions. I think there may be some way to refactor it to make the code more clear. [1] https://dxr.mozilla.org/mozilla-central/source/gfx/layers/ipc/LayerTransactionParent.cpp#926
Comment 1•9 years ago
|
||
Jeremy, I think this is a good practice for you to study the gfx code flow related to textureclient/host
Flags: needinfo?(jeremychen)
Assignee | ||
Comment 2•9 years ago
|
||
Thank you, Peter. I'll study this once I finished my work in hand.
Flags: needinfo?(jeremychen)
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → jeremychen
Assignee | ||
Comment 3•9 years ago
|
||
Remove TextureHostOGL class and integrate the Android platform specific version API into TextureHost class.
Assignee | ||
Comment 4•9 years ago
|
||
From part1 patch, we've removed TextureHostOGL class. So, we can Remove unnecessary class inheritance and class casting in the implementations.
Assignee | ||
Updated•9 years ago
|
Attachment #8604556 -
Flags: feedback?(etlin)
Attachment #8604556 -
Flags: feedback?(chung)
Assignee | ||
Updated•9 years ago
|
Attachment #8604558 -
Flags: feedback?(etlin)
Attachment #8604558 -
Flags: feedback?(chung)
Assignee | ||
Updated•9 years ago
|
Attachment #8604556 -
Flags: feedback?(etlin)
Attachment #8604556 -
Flags: feedback?(chung)
Assignee | ||
Updated•9 years ago
|
Attachment #8604558 -
Flags: feedback?(etlin)
Attachment #8604558 -
Flags: feedback?(chung)
Assignee | ||
Comment 5•9 years ago
|
||
Remove feedback request for now, cause I've got some feedback from Ethan.
Assignee | ||
Comment 6•9 years ago
|
||
Remove TextureHostOGL and integrate the Android platform specific version API into TextureHost.
Attachment #8604556 -
Attachment is obsolete: true
Attachment #8607437 -
Flags: feedback?(etlin)
Assignee | ||
Comment 7•9 years ago
|
||
From part1 patch, we've removed TextureHostOGL. So, we can Remove unnecessary class multi-inheritance and class casting in the implementations.
Attachment #8604558 -
Attachment is obsolete: true
Attachment #8607441 -
Flags: feedback?(etlin)
Reporter | ||
Comment 8•9 years ago
|
||
Comment on attachment 8607441 [details] [diff] [review] Bug 1155495 - part2: Remove unnecessary class inheritance and casting. (v2) Review of attachment 8607441 [details] [diff] [review]: ----------------------------------------------------------------- It looks good to me.
Attachment #8607441 -
Flags: feedback?(etlin) → feedback+
Reporter | ||
Comment 9•9 years ago
|
||
Comment on attachment 8607437 [details] [diff] [review] Bug 1155495 - part1: Remove TextureHostOGL and integrate the platform specific API into TextureHost. (v2) Review of attachment 8607437 [details] [diff] [review]: ----------------------------------------------------------------- f+ if the comments are addressed. ::: gfx/layers/composite/TextureHost.cpp @@ +165,5 @@ > + return true; > +} > + > +FenceHandle > +TextureHost::GetAndResetReleaseFence() Since there is already a function named GetAndResetReleaseFenceHandle, you may combine GetAndResetReleaseFenceHandle and GetAndResetReleaseFence in the TextureHost and remove the GetAndResetReleaseFenceHandle in GrallocTextureHost. ::: gfx/layers/composite/TextureHost.h @@ +521,5 @@ > + /** > + * Store a fence that will signal when the current buffer is no longer being read. > + * Similar to android's GLConsumer::setReleaseFence() > + */ > + virtual bool SetReleaseFence(const FenceHandle& aReleaseFence); We should unify the function name. Maybe this function name should be SetReleaseFenceHandle. And it doesn't need to be virtual. @@ +526,5 @@ > + > + /** > + * Return a releaseFence's Fence and clear a reference to the Fence. > + */ > + virtual FenceHandle GetAndResetReleaseFence(); Combine with GetAndResetReleaseFenceHandle and remove virtual. @@ +528,5 @@ > + * Return a releaseFence's Fence and clear a reference to the Fence. > + */ > + virtual FenceHandle GetAndResetReleaseFence(); > + > + virtual void SetAcquireFence(const FenceHandle& aAcquireFence); Ditto. @@ +533,5 @@ > + > + /** > + * Return a acquireFence's Fence and clear a reference to the Fence. > + */ > + virtual FenceHandle GetAndResetAcquireFence(); Ditto. @@ +535,5 @@ > + * Return a acquireFence's Fence and clear a reference to the Fence. > + */ > + virtual FenceHandle GetAndResetAcquireFence(); > + > + virtual void WaitAcquireFenceSyncComplete(); Remove virtual.
Attachment #8607437 -
Flags: feedback?(etlin) → feedback+
Assignee | ||
Comment 10•9 years ago
|
||
Addressed Ethan's comment.
Attachment #8607437 -
Attachment is obsolete: true
Assignee | ||
Comment 11•9 years ago
|
||
Fix function names.
Attachment #8607441 -
Attachment is obsolete: true
Assignee | ||
Comment 12•9 years ago
|
||
In part1 patch, I remove TextureHostOGL and integrate the platform specific API into TextureHost. GetAndResetReleaseFenceHandle and GetAndResetReleaseFence are combined to one unified version in the TextureHost. Function names with "Fence" are fixed with "FenceHandle", which is now agree with those in TextureClient. In part2 patch, we no longer need multi-inheritance and AsHostOGL() for GrallocTextureHost to use the platform specific API anymore. Hi Sotaro, could you review these two patches?
Assignee | ||
Updated•9 years ago
|
Attachment #8607999 -
Flags: review?(sotaro.ikeda.g)
Assignee | ||
Updated•9 years ago
|
Attachment #8608001 -
Flags: review?(sotaro.ikeda.g)
Comment 13•9 years ago
|
||
Comment on attachment 8607999 [details] [diff] [review] Bug 1155495 - part1: (v3) Remove TextureHostOGL and integrate the platform specific API into TextureHost. Review of attachment 8607999 [details] [diff] [review]: ----------------------------------------------------------------- The implementation looks good. But TextureHost::WaitAcquireFenceHandleSyncComplete() is OpenGL specific. So, it is not clear for me that is OK to move the implementation from TextureHostOGL to TextureHost. Then, I forward the review to nical.
Attachment #8607999 -
Flags: review?(sotaro.ikeda.g) → review?(nical.bugzilla)
Comment 14•9 years ago
|
||
Comment on attachment 8607999 [details] [diff] [review] Bug 1155495 - part1: (v3) Remove TextureHostOGL and integrate the platform specific API into TextureHost. Review of attachment 8607999 [details] [diff] [review]: ----------------------------------------------------------------- ::: gfx/layers/composite/TextureHost.cpp @@ +180,5 @@ > + return FenceHandle(fdObj); > +} > + > +void > +TextureHost::WaitAcquireFenceHandleSyncComplete() Can this function's implementation be moved into FenceHandle? If it is done, we could remove dependence to EGL from TextureHost.
Comment 15•9 years ago
|
||
Comment on attachment 8607999 [details] [diff] [review] Bug 1155495 - part1: (v3) Remove TextureHostOGL and integrate the platform specific API into TextureHost. Review of attachment 8607999 [details] [diff] [review]: ----------------------------------------------------------------- I like the idea of removing TextureHostOGL but let's not put EGL specific code in TextureHost. r+ if you implement sotaro's suggestion of abstracting away the EGL fence logic under FenceHandle or some kind of abstract fence.
Attachment #8607999 -
Flags: review?(nical.bugzilla) → review-
Assignee | ||
Comment 16•9 years ago
|
||
If we put EGL fence logic into FenceHandle, would it affect the generality of FenceHandle? To remove dependence to EGL from TextureHost, could we set WaitAcquireFenceHandleSyncComplete() to virtual in TextureHost, and let GrallocTextureHost implement it? In that case, we could keep the generality of FenceHandle. We also could keep TextureHost away from platform specific code, and leave it to be implemented in any platform specific class.
Flags: needinfo?(sotaro.ikeda.g)
Comment 17•9 years ago
|
||
(In reply to Jeremy Chen [:jeremychen] from comment #16) > To remove dependence to EGL from TextureHost, could we set > WaitAcquireFenceHandleSyncComplete() to virtual in TextureHost, and let > GrallocTextureHost implement it? In that case, we could keep the generality > of FenceHandle. Sounds good to me.
Comment 18•9 years ago
|
||
(In reply to Nicolas Silva [:nical] from comment #17) > (In reply to Jeremy Chen [:jeremychen] from comment #16) > > To remove dependence to EGL from TextureHost, could we set > > WaitAcquireFenceHandleSyncComplete() to virtual in TextureHost, and let > > GrallocTextureHost implement it? In that case, we could keep the generality > > of FenceHandle. > > Sounds good to me. me too.
Flags: needinfo?(sotaro.ikeda.g)
Assignee | ||
Comment 19•9 years ago
|
||
Remove dependence to EGL from TextureHost. Set WaitAcquireFenceHandleSyncComplete() to virtual in TextureHost, and let GrallocTextureHost implement it.
Attachment #8607999 -
Attachment is obsolete: true
Assignee | ||
Updated•9 years ago
|
Attachment #8609259 -
Flags: review?(sotaro.ikeda.g)
Attachment #8609259 -
Flags: review?(nical.bugzilla)
Assignee | ||
Updated•9 years ago
|
Attachment #8608001 -
Flags: review?(nical.bugzilla)
Updated•9 years ago
|
Attachment #8609259 -
Flags: review?(nical.bugzilla) → review+
Updated•9 years ago
|
Attachment #8608001 -
Flags: review?(nical.bugzilla) → review+
Updated•9 years ago
|
Attachment #8608001 -
Flags: review?(sotaro.ikeda.g) → review+
Updated•9 years ago
|
Attachment #8609259 -
Flags: review?(sotaro.ikeda.g) → review+
Assignee | ||
Comment 20•9 years ago
|
||
try result: https://treeherder.mozilla.org/#/jobs?repo=try&revision=c38b2d46d8cb It looks positive except for Linux debug reftest R(R1), which has nothing to do with this patch but always timeout lately.
Assignee | ||
Comment 21•9 years ago
|
||
try result: https://treeherder.mozilla.org/#/jobs?repo=try&revision=ed51d0c3b74f Linux debug reftest R(R1) still timeout, like other similar jobs.
Assignee | ||
Updated•9 years ago
|
Keywords: checkin-needed
Assignee | ||
Updated•9 years ago
|
Keywords: checkin-needed
Assignee | ||
Comment 22•9 years ago
|
||
(In reply to Jeremy Chen [:jeremychen] from comment #21) > try result: > https://treeherder.mozilla.org/#/jobs?repo=try&revision=ed51d0c3b74f > > Linux debug reftest R(R1) still timeout, like other similar jobs. Don't know why all B2G Desktop Linux x64 opt tests are showing exception now, while they were passed successfully before. Resend patches to try and wait for positive results. Clear checkin-needed keyword first.
Assignee | ||
Comment 23•9 years ago
|
||
try looks good: https://treeherder.mozilla.org/#/jobs?repo=try&revision=255b0df97ec0
Assignee | ||
Updated•9 years ago
|
Keywords: checkin-needed
Comment 24•9 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/b8e8e84f21e1 https://hg.mozilla.org/integration/mozilla-inbound/rev/a8d45d284f81
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/b8e8e84f21e1 https://hg.mozilla.org/mozilla-central/rev/a8d45d284f81
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox41:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla41
You need to log in
before you can comment on or make changes to this bug.
Description
•