Closed Bug 1007574 Opened 11 years ago Closed 11 years ago

[b2g] Receive two "getScreenshot" request with size 1x1 when open an application

Categories

(Firefox OS Graveyard :: Gaia::System::Window Mgmt, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: pchang, Assigned: alive)

References

Details

Attachments

(1 file)

Open any application, I always see two "getScreenshot" requests happened and the requested size of screenshot is 1x1. I would expect no "getScreenshot" request when app goes to foreground. I/Gecko (31921): BrowserElementChild - Received getScreenshot message: (req_10) I/Gecko (31921): BrowserElementChild - Taking a screenshot: maxWidth=1, maxHeight=1, mimeType=image/jpeg, domRequestID=req_10. I/Gecko (31921): BrowserElementChild - Received setVisible message: (true) I/Gecko (31921): BrowserElementChild - Received getScreenshot message: (req_11) I/Gecko (31921): BrowserElementChild - Got afterpaint event: app://communications.gaiamobile.org/contacts/index.html I/Gecko (31921): BrowserElementChild - Taking a screenshot: maxWidth=1, maxHeight=1, mimeType=image/jpeg, domRequestID=req_11. I/Gecko (31921): BrowserElementChild - Received setVisible message: (true)
This is done as a hack to ensure the frame is already painted, sine |setVisible()| does not return anything. Alive can verify. What kind of trouble we are in if we keep this?
Component: Gaia → Gaia::System::Window Mgmt
Flags: needinfo?(pchang)
Flags: needinfo?(alive)
Yes, this is to make sure we have the iframe painted.
Flags: needinfo?(alive)
(In reply to Tim Guan-tin Chien [:timdream] (MoCo-TPE) (please ni?) from comment #1) > This is done as a hack to ensure the frame is already painted, sine > |setVisible()| does not return anything. Alive can verify. > > What kind of trouble we are in if we keep this? Compare to painting task, this should be small overhead. I just notice this during debugging. Alive, why do I see the requests happen twice when open an app? But I only saw once after unlock screen from suspend.
Flags: needinfo?(pchang) → needinfo?(alive)
The first request is to force it to be repainted before doing opening transition. The second request is to make sure before we remove the screenshot layer it's repainted. What's the problem is, if we always have screenshot on top the app we don't need the first check but sometimes we have sometimes we don't. If this really matters(two requests) I will try to fix it.
Flags: needinfo?(alive)
Assignee: nobody → alive
Attached file patch for master
v1: If the app window is already protected by screenshot layer, be ready right away.
Attachment #8419914 - Flags: review?(timdream)
Attachment #8419914 - Flags: review?(timdream) → review+
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Summary: [b2g] Receive "getScreenshot" request with size 1x1 when open an application → [b2g] Receive two "getScreenshot" request with size 1x1 when open an application
Depends on: 1009368
Depends on: 1016274
Hi Alive, Does this one affect v1.4?
Flags: needinfo?(alive)
Yes I think so.
Flags: needinfo?(alive)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: