Closed
Bug 1152370
Opened 10 years ago
Closed 10 years ago
Use DisplaySurface as abstract display surface instead of FramebufferSurface
Categories
(Core :: Graphics, defect)
Tracking
()
RESOLVED
FIXED
mozilla40
Tracking | Status | |
---|---|---|
firefox40 | --- | fixed |
People
(Reporter: sotaro, Assigned: sotaro)
References
Details
Attachments
(3 files, 8 obsolete files)
34.24 KB,
patch
|
mwu
:
review+
|
Details | Diff | Splinter Review |
4.59 KB,
patch
|
sotaro
:
review+
|
Details | Diff | Splinter Review |
41.37 KB,
patch
|
sotaro
:
review+
|
Details | Diff | Splinter Review |
FramebufferSurface is used for gonk's display surface. But it is not the only display surface on gonk. VirtualDisplaySurface also exits. Therefore, as part of multiple display support. It seems better to use DisplaySurface.
Assignee | ||
Comment 1•10 years ago
|
||
Assignee | ||
Updated•10 years ago
|
Attachment #8589706 -
Attachment is patch: true
Attachment #8589706 -
Attachment mime type: text/x-patch → text/plain
Assignee | ||
Comment 2•10 years ago
|
||
The name of DisplaySurface comes from android. But I modified class relationship a little bit.
In android, DisplaySurface and ConsumerBase are independent each other. FramebufferSurface and VirtualDisplaySurface are derived from them. DisplaySurface is used only by SurfaceFlinger.
https://github.com/sotaroikeda/android-diagrams/blob/master/graphics/DisplayDevice_4.4.pdf
In attachment 8589706 [details] [diff] [review], DisplaySurface is derived from ConsumerBase from the following reasons.
- HwcComposer2D does part of android's SurfaceFlinger's role
- gonk adds some functions to FramebufferSurface to interact with HwcComposer2D.
To add same functions to VirtualDisplaySurface, DisplaySurface is good place to define the functions.
- It makes classes handling simpler on gonk.
Assignee | ||
Updated•10 years ago
|
Assignee: nobody → sotaro.ikeda.g
Assignee | ||
Comment 3•10 years ago
|
||
Fix build problems on gonk KK.
Attachment #8589706 -
Attachment is obsolete: true
Assignee | ||
Comment 4•10 years ago
|
||
Fix ICS build failure.
Attachment #8589741 -
Attachment is obsolete: true
Assignee | ||
Comment 5•10 years ago
|
||
Assignee | ||
Updated•10 years ago
|
Attachment #8589751 -
Flags: review?(mwu)
Comment 6•10 years ago
|
||
Comment on attachment 8589751 [details] [diff] [review]
wip patch
Review of attachment 8589751 [details] [diff] [review]:
-----------------------------------------------------------------
(I'll assume you're asking for feedback rather than review)
Most of this makes sense to me. Can you add VirtualDisplaySurface.(cpp|h) as a separate patch though? It'll make it easier to see what changes you did to the original android code.
Attachment #8589751 -
Flags: review?(mwu)
Assignee | ||
Comment 7•10 years ago
|
||
Thanks for checking! I am going to update the patch.
Assignee | ||
Comment 8•10 years ago
|
||
VirtualDisplaySurface sources are from android v5.1 AOSP.
Attachment #8589751 -
Attachment is obsolete: true
Assignee | ||
Comment 9•10 years ago
|
||
Assignee | ||
Comment 11•10 years ago
|
||
correct patch.
Attachment #8590373 -
Attachment is obsolete: true
Assignee | ||
Updated•10 years ago
|
Attachment #8590375 -
Flags: feedback?(mwu)
Assignee | ||
Updated•10 years ago
|
Attachment #8590366 -
Attachment description: patch part 1 - Add VirtualDisplaySurface → patch part 1 - Add android aosp VirtualDisplaySurface
Assignee | ||
Updated•10 years ago
|
Attachment #8590375 -
Flags: feedback?(mwu)
Assignee | ||
Updated•10 years ago
|
Attachment #8590366 -
Flags: review?(mwu)
Assignee | ||
Updated•10 years ago
|
Attachment #8590375 -
Flags: review?(mwu)
Assignee | ||
Comment 12•10 years ago
|
||
un-bitrot.
Attachment #8590375 -
Attachment is obsolete: true
Attachment #8590375 -
Flags: review?(mwu)
Assignee | ||
Updated•10 years ago
|
Attachment #8594845 -
Flags: review?(mwu)
Comment 13•10 years ago
|
||
Comment on attachment 8590366 [details] [diff] [review]
patch part 1 - Add android aosp VirtualDisplaySurface
Review of attachment 8590366 [details] [diff] [review]:
-----------------------------------------------------------------
Rubberstamp.
Attachment #8590366 -
Flags: review?(mwu) → review+
Comment 14•10 years ago
|
||
FWIW, I would also like to have DisplaySurface.h split out. No need to do it now though - just for the next time you refresh the patches.
Comment 15•10 years ago
|
||
I took a closer look at the patch, and most of it makes sense *but*... VirtualDisplaySurface isn't used in this patch. It's just dead code. Do you have a patch on top of this which uses VirtualDisplaySurface? It would provide better context for what's going on here. I'm not entirely sure what VirtualDisplaySurface does differently than FramebufferSurface.
Assignee | ||
Comment 16•10 years ago
|
||
Screen recording(Bug 1144103) and Wifi Display(Bug 925615) is going to use VirtualDisplaySurface.
VirtualDisplaySurface class related diagrams in android are like the following.
https://github.com/sotaroikeda/android-diagrams/blob/master/graphics/DisplayDevice_4.4.pdf
https://github.com/sotaroikeda/android-diagrams/raw/master/graphics/Presentation_5.1.pdf
It provide a capability that rendering result could be consumed by another system. The another system provide IGraphicBufferProducer to VirtualDisplaySurface. The VirtualDisplaySurface does the composition to buffers of the IGraphicBufferProducer. The rendered buffers are returned to the IGraphicBufferProducer. Then the another system gets the buffers via the IGraphicBufferProducer.
Assignee | ||
Comment 17•10 years ago
|
||
attachment 8594820 [details] [diff] [review] in Bug 1144103 is just a wip patch. And it includes VirtualDisplaySurface by itself.
Assignee | ||
Comment 18•10 years ago
|
||
FramebufferSurface case, rendered buffers are always consumed by hardware composer.
Assignee | ||
Comment 19•10 years ago
|
||
From comment 16, VirtualDisplaySurface could cause a security risk. Therefore, if we want to actually use it within a system, we need to add security checks.
Comment 20•10 years ago
|
||
Comment on attachment 8594845 [details] [diff] [review]
patch part 2 - Use DisplaySurface as abstract display surface
Review of attachment 8594845 [details] [diff] [review]:
-----------------------------------------------------------------
Ok, I think I understand enough of this to r+ it. The only thing is I couldn't find where the IGraphicBufferProducer comes from in the other WIP patches, but that's fine for now.
Attachment #8594845 -
Flags: review?(mwu) → review+
Assignee | ||
Comment 21•10 years ago
|
||
Thanks. IGraphicBufferProducer normally comes from gonk code. SurfaceComposerClient::setDisplaySurface() actually set it. In screenrecord case, prepareVirtualDisplay() call it like the following.
http://androidxref.com/5.1.0_r1/xref/frameworks/av/cmds/screenrecord/screenrecord.cpp#288
Assignee | ||
Comment 22•10 years ago
|
||
(In reply to Sotaro Ikeda [:sotaro] from comment #21)
> Thanks. IGraphicBufferProducer normally comes from gonk code.
> SurfaceComposerClient::setDisplaySurface() actually set it.
It is only about screenrecord case. Wifi display could be different route.
Assignee | ||
Comment 23•10 years ago
|
||
Split DisplaySurface to different file. Carry "r=mwu".
Attachment #8594845 -
Attachment is obsolete: true
Attachment #8596183 -
Flags: review+
Assignee | ||
Comment 25•10 years ago
|
||
Fix build problem on android. Carry "r=mwu".
Attachment #8596185 -
Attachment is obsolete: true
Attachment #8596290 -
Flags: review+
Assignee | ||
Comment 26•10 years ago
|
||
Assignee | ||
Comment 27•10 years ago
|
||
Comment 28•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/6869f1714918
https://hg.mozilla.org/mozilla-central/rev/a67f53938736
https://hg.mozilla.org/mozilla-central/rev/1d33044efb31
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla40
You need to log in
before you can comment on or make changes to this bug.
Description
•