Closed Bug 1195209 Opened 10 years ago Closed 9 years ago

"Get Screenshot" through webIDE does not work on landscape mode

Categories

(Core :: Graphics, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla43
blocking-b2g 2.5?
Tracking Status
firefox43 --- fixed
b2g-v2.1 --- wontfix
b2g-v2.1S --- wontfix
b2g-v2.2 --- wontfix
b2g-v2.2r --- verified
b2g-master --- verified

People

(Reporter: pauljt, Assigned: jerry)

References

Details

(Whiteboard: [ft:conndevices])

Attachments

(8 files)

When trying to use "get screenshot" on WebIDE you just get a blank grey screen instead of the actual contents of the screen.
I mean Monitor -> Screenshot, to be clear.
Hi Evelyn, Hi Rex, Could you help to check on this? Thanks!
blocking-b2g: --- → 2.5+
Flags: needinfo?(rexboy)
Flags: needinfo?(ehung)
Whiteboard: [ft:conndevices]
This is probably something @evelyn and @rexboy can help if TV side send an all-grey image to WebIDE. For screenshot we use an off-screen canvas to capture the entire screen. It's more likely a graphics issue to me, @daosheng can provide more help on it.
Flags: needinfo?(dmu)
Yep, agree SC's comment 4. I'm not sure how WebIDE get a screenshot, but I assume it use the same API as Gaia system uses. Here is the API implementation in Gecko: https://dxr.mozilla.org/mozilla-central/source/dom/browser-element/BrowserElementChildPreload.js#1122 Daosheng, could you investigate it a bit? If there is anything you need from Gaia side, please ask Rex. Thanks!
Flags: needinfo?(ehung)
Ok! I will investigate it and answer it shortly.
As SC and Evelyn said, I guess this should be handled by just Gecko API called directly from WebIDE without Gaia's involve. If you found anything need Gaia's help please just NI me again.
Flags: needinfo?(rexboy)
Component: General → Gaia::TV
I have a quick investigation on my aries. Its screenshot is a gray image as well. I think it could be a underlying bug. I will continue to spend time in finding the reason.
I have reproduced it on my FxOS devices include nexus-5 and TV. This bug is only happened on landscape mode for screenshot. On TV, it is always on landscape mode. Therefore, I think that is the reason why it is so easy to be caught. Currently, I think it might due to nsIPresShell::RenderDocument. (https://dxr.mozilla.org/mozilla-central/source/dom/canvas/CanvasRenderingContext2D.cpp#4810).
Flags: needinfo?(dmu)
Component: Gaia::TV → Graphics
Product: Firefox OS → Core
Summary: "Get Screenshot" through webIDE does work on the TV → "Get Screenshot" through webIDE does not work on landscape mode
I'm doing some snapshot related work. If this is not a urgent bug, I can take a look next week.
(In reply to Jerry Shih[:jerry] (UTC+8) from comment #13) > I'm doing some snapshot related work. If this is not a urgent bug, I can > take a look next week. Thanks Jerry.
Assignee: nobody → hshih
Please note that this bug is also found on stingray TV which is based on b2g v2.1, which means this functionality is broken for a while (or never works perhaps).
Attached image rotation.png
We would like to use a) instead of b) for landscape mode.
Attachment #8653613 - Flags: review?(matt.woodrow) → review+
Please land the attachment 8653613 [details] [diff] [review] into m-c. Just a trivial fix, so I don't create a try.
Status: NEW → ASSIGNED
Keywords: checkin-needed
Blocks: 1199366
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla43
Hi David, Do we need this for 2.2r?
Flags: needinfo?(dflanagan)
Josh: yes, it sounds like this would be useful to have working correctly in 2.2r. Flip phones won't have a landscape mode, but sliders will. Thanks for asking.
Flags: needinfo?(dflanagan)
Flags: needinfo?(jocheng)
blocking-b2g: 2.5+ → 2.2r+
Flags: needinfo?(jocheng)
(In reply to Shih-Chiang Chien [:schien] (UTC+8) (use ni? plz) from comment #15) > Please note that this bug is also found on stingray TV which is based on b2g > v2.1, which means this functionality is broken for a while (or never works > perhaps). I applied patch[1] to stingray TV (based on v2.1), but still gray image is available on WebIDE screenshot. Additional patches are necessary? FYI This screenshot never works on stingray, but layerscope[2] works well. [1]https://hg.mozilla.org/releases/mozilla-b2g37_v2_2r/rev/c90978c0c488 [2]https://wiki.mozilla.org/Platform/GFX/LayerScope
Flags: needinfo?(schien)
(In reply to Daisuke from comment #24) > (In reply to Shih-Chiang Chien [:schien] (UTC+8) (use ni? plz) from comment > #15) > > Please note that this bug is also found on stingray TV which is based on b2g > > v2.1, which means this functionality is broken for a while (or never works > > perhaps). > > I applied patch[1] to stingray TV (based on v2.1), but still gray image is > available on WebIDE screenshot. > Additional patches are necessary? > > > FYI > This screenshot never works on stingray, but layerscope[2] works well. > > [1]https://hg.mozilla.org/releases/mozilla-b2g37_v2_2r/rev/c90978c0c488 > [2]https://wiki.mozilla.org/Platform/GFX/LayerScope Hi Kusaba-san, I finally got v2.1 running on Flame today. The snapshot issue is verified fixed on my flame with latest v2.1 gecko + patch on this bug. You may need to do further investigation on your side and Jerry will provide more debugging information. Hope this can help you lock down the issue quickly.
Flags: needinfo?(schien) → needinfo?(hshih)
Hi Daisuke, Please make sure we got the correct snapshot result from compositor at [1]. Use the Map() and GetData() interface(like [2]) to dump the content to file. Then use a raw-image viewer to check it. Finally, dump the drawTarget content at [3] through DrawTarget::Snapshot() and SourceSurface::GetDataSurface(). With these two checkpoints, we can make sure the error is at compositor or content side. [1] http://hg.mozilla.org/releases/mozilla-b2g34_v2_1/annotate/d1ed7de67f5a/gfx/layers/client/ClientLayerManager.cpp#l451 [2] https://hg.mozilla.org/mozilla-central/annotate/dd2a1d737a64d9a3f23714ec5cc623ec8933b51f/gfx/gl/GLReadTexImageHelper.cpp#l294 [3] http://hg.mozilla.org/releases/mozilla-b2g34_v2_1/annotate/d1ed7de67f5a/gfx/layers/client/ClientLayerManager.cpp#l461
Flags: needinfo?(hshih) → needinfo?(938.daisuke)
for debug webidl
Flags: needinfo?(938.daisuke) → needinfo?(suzuki.tarotaro33)
(In reply to Jerry Shih[:jerry] (UTC+8) from comment #26) > Hi Daisuke, > > Please make sure we got the correct snapshot result from compositor at [1]. > Use the Map() and GetData() interface(like [2]) to dump the content to file. > Then use a raw-image viewer to check it. > > Finally, dump the drawTarget content at [3] through DrawTarget::Snapshot() > and SourceSurface::GetDataSurface(). > > With these two checkpoints, we can make sure the error is at compositor or > content side. > > [1] > http://hg.mozilla.org/releases/mozilla-b2g34_v2_1/annotate/d1ed7de67f5a/gfx/ > layers/client/ClientLayerManager.cpp#l451 > > [2] > https://hg.mozilla.org/mozilla-central/annotate/ > dd2a1d737a64d9a3f23714ec5cc623ec8933b51f/gfx/gl/GLReadTexImageHelper.cpp#l294 > > [3] > http://hg.mozilla.org/releases/mozilla-b2g34_v2_1/annotate/d1ed7de67f5a/gfx/ > layers/client/ClientLayerManager.cpp#l461 Hi Jerry-san. Thanks for your patch. I tried to get raw images and attached. it seems all "0" data. Do you think that the error is at compositor side ?
Flags: needinfo?(suzuki.tarotaro33)
Attached file raw images (TV)
raw images captured by TV environment.
Flags: needinfo?(hshih)
Attached patch dump_fb.patchSplinter Review
Please try this patch again. It tries to use glReadPixel function to dump the fb to file. If we still see the all zero file, the glReadPixel might not work. Then we need to check the opengl implementation.
Flags: needinfo?(hshih) → needinfo?(suzuki.tarotaro33)
This issue is verified as fixed on Flame master and Aries master. Screenshots taken using WebIDE works on landscape as well as portrait orientation. Device: Aries 2.6 Master BuildID: 20151112122058 Gaia: 27bc9412ca607648bc398b25bb1ae25653b2b278 Gecko: 3cc3b1968524248450c465c4ea2ee5596ffa65f2 Gonk: a19052e4389c3ae2d8fc3e7a74a475401baacc56 Version: 45.0a1 (2.6) Firmware Version: D5803_23.1.A.1.28_NCB.ftf User Agent: Mozilla/5.0 (Mobile; rv:45.0) Gecko/45.0 Firefox/45.0 Device: Flame 2.6 Master BuildID: 20151112030244 Gaia: 27bc9412ca607648bc398b25bb1ae25653b2b278 Gecko: 3cc3b1968524248450c465c4ea2ee5596ffa65f2 Gonk: 205ac4204bbbb2098a8046444acba551ba5dc75a Version: 45.0a1 (2.6) Firmware Version: v18Dv4 User Agent: Mozilla/5.0 (Mobile; rv:45.0) Gecko/45.0 Firefox/45.0 Note: We don't have a 2.2r device so unable to verify that.
Status: RESOLVED → VERIFIED
Flags: needinfo?(jmercado)
Flags: needinfo?(jmercado)
Flags: needinfo?(suzuki.tarotaro33)
I don't think we fix the issue *on TV* here. Let's reopen it.
Status: VERIFIED → REOPENED
Resolution: FIXED → ---
[Blocking Requested - why for this release]: Hi Taro-san, Per comment 30, do you have any finding?
blocking-b2g: 2.2r+ → 2.5?
Flags: needinfo?(suzuki.tarotaro33)
Making this bug "resolved" again since we do fix screenshot issue on phone, file Bug 1266625 for tracking TV specific issue.
Status: REOPENED → RESOLVED
Closed: 10 years ago9 years ago
Flags: needinfo?(suzuki.tarotaro33)
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: