Closed Bug 1069822 Opened 10 years ago Closed 10 years ago

[dolphin] unable to set wallpaper after zoom in a picture

Categories

(Firefox OS Graveyard :: Gaia::Wallpaper, defect)

x86
Windows 7
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1055805

People

(Reporter: angelc04, Assigned: GaryChen, NeedInfo)

Details

(Whiteboard: [sprd351948])

Attachments

(1 file)

STR
-----------------------------------------------------------------------
1. Launch Gallery
2. View a large pic (1944*2592) 
3. Zoom in this picture
4. Tap on Share and select Wallpaper
   --> Wallpaper set fails due to OOM.


Analysis from partner developper
----------------------------------------------------------------------------
In gallery:
  // If the blob is a JPEG then we can use #-moz-samplesize to downsample
  // it while decoding. If this is a particularly large image then to avoid
  // OOMs, we may not want to allow it to ever be decoded at full size


But in wallpaper,we didn't  have any protections.
share.html:
      <img id="previewImage" />
css:
/* for the share activity */
#preview {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow:hidden;
}
If we pick a 1944*2592 picture from gallery to set wallpaper,it will decode the whole picture firstly and cause OOM easily,especially,when we zoom picture in gallery and has consumed a lot of memory.


Can we do some protections before display like gallery?
Whiteboard: [sprd351948]
Hi Evelyn, this one is just a minor bug, but seems partner has some suggestions regarding how to fix it, maybe you can find someone to take a look at what partner propose and comment?

Thanks for your help

Vance
Flags: needinfo?(ehung)
Hi Gary -

Would you mind checking Comment#0 and provide some feedbacks?

Thanks
Flags: needinfo?(gchen)
Yeah, Gary is the right person.
Flags: needinfo?(ehung)
Assignee: nobody → gchen
Flags: needinfo?(gchen)
Hi David,
   I just used #-moz-samplesize to reduce memory usage while user select large image to be wallpaper.
   Here is my patch, please give me some feedback, thanks.
Attachment #8499448 - Flags: feedback?(dflanagan)
Hi Siiaceon -

Could you find someone to test Gary's patch on Comment#4 as well?

Thanks

Vance
Flags: needinfo?(siiaceon.cao)
Comment on attachment 8499448 [details] [review]
pull request: https://github.com/mozilla-b2g/gaia/pull/24744

This is a dupe of 1055805. I'd prefer to uplift the patch from that bug instead of using a new patch here.  That patch uses a new shared file shared/js/image_utils.js that is probably not in the shared/ directory in 1.4, so in order to uplift you'll probably have to copy that file directly into the wallpaper app.  But doing that is simpler than using the four different shared files that this patch requires.

If you just uplift the patch for 1055805 you don't need my review for that.
It seems to me that the process failed here because no one check to see whether the bug existed on master. If that check had been done, then it would have been easy to find the already existing fix!
Thanks David, it it my bad since i should check with QA to see if the bug existed on master...

And sorry Gary to let you work on something already been fixed
Thanks David, I'll check master first next time. :)

No worries, Vance. It is a good chance and worth to learn something in wallpaper.

Thanks.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → DUPLICATE
Comment on attachment 8499448 [details] [review]
pull request: https://github.com/mozilla-b2g/gaia/pull/24744

clear feedback flag, since this issue duplicates Bug 1055805.
Attachment #8499448 - Flags: feedback?(dflanagan)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: