Closed Bug 988594 Opened 11 years ago Closed 2 years ago

[Camera][Nexus4] Very slow to draw previews when swiping through Preview from Camera

Categories

(Core :: Graphics, defect)

ARM
Gonk (Firefox OS)
defect

Tracking

()

RESOLVED INVALID

People

(Reporter: marcia, Unassigned)

References

Details

(Whiteboard: [m+])

Attachments

(1 file)

Buri, while running with the latest master. Gaia 5ae2df02e30bda2ae04830d6e181ecf31ff38817 SourceStamp c69c55582faa BuildID 20140326040202 Version 31.0a1 STR: 1. Take a series of pictures using the camera app. 2. Select the gallery preview to the left of the shutter button. 3. Observe the attached video. There is a hesitation as the picture content draws on the screen. It draws very slow from the top. Expected: Seamless transition. Video is here: http://youtu.be/hVy1f8uhBH0 Bug 987569 is related.
Blocks: 983
Blocks: 983405
No longer blocks: 983
Severity: normal → blocker
Whiteboard: [m+]
We need to trace whats going on here...mike, can you help here
Flags: needinfo?(mhabicher)
I'll take a look. For future reference, we can get profiling data by: # ./profile.sh start # ./profile.sh capture ...and then loading the resulting data into http://people.mozilla.org/~bgirard/cleopatra/
Flags: needinfo?(mhabicher)
Further to comment 2, the profile has a relatively small capture buffer, so you should run the 'capture' step right after reproducing the problem.
Trivial to confirm with: - gecko: b2g-inbound:ef73445154cf - gaia: master:786421ba46463a9bb2cb35fb67b2e5e3dad87b1f
Summary: [Camera][Madai] Very slow to draw previews when swiping through Gallery from Camera → [Camera] Very slow to draw previews when swiping through Gallery from Camera
Based on the profile, we're spending a large chunk of time (~400ms) in here: http://mxr.mozilla.org/mozilla-central/source/image/src/RasterImage.cpp#2247 It looks like we're hitting this dispatch: http://mxr.mozilla.org/mozilla-central/source/image/src/RasterImage.cpp#2298
Summary: [Camera] Very slow to draw previews when swiping through Gallery from Camera → [Camera] Very slow to draw previews when swiping through Preview from Camera
Component: Gaia::Gallery → Graphics
Product: Firefox OS → Core
Hmm, maybe there is more to this than a core graphics problem. I just noticed in the logcat the following messages: 03-28 18:34:26.279 1029 1029 E GeckoConsole: [JavaScript Error: "TypeError: this.fit is null" {file: "app://camera.gaiamobile.org/js/main.js" line: 8857}] 03-28 18:34:26.389 1029 1029 E GeckoConsole: Content JS ERROR at app://camera.gaiamobile.org/js/main.js:8412 in displayImage: The thumbnail contained in the jpeg doesn't fitthe device screen. The full size image is rendered.This might cause out of memory errors And also, the device is constantly churning out: 03-28 18:34:26.399 893 919 D HwcUtils: Skip layer 03-28 18:34:26.399 162 1061 E mm-camera: vfe_aecawb_stats_update: AWB_AEC stats not enabled 03-28 18:34:26.399 893 919 D HwcUtils: Skip layer 03-28 18:34:26.399 162 1061 E mm-camera: vfe_aecawb_stats_update: AWB_AEC stats not enabled
Flags: needinfo?(jdarcangelo)
Oh, and most importantly--when I see those errors in comment 7, the previews never appear! The Camera gallery stays grey (blank).
Assignee: nobody → dmarcos
The full image is rendered instead of the preview. There are three problems: 1. The gallery is not reading the preview/thumbnail and always passes the full image to the media frame. I'm working on fixing that (bug 990630) 2. We're not setting the thumbnail size when starting the camera and the default is picked. In the case of the nexus 4 it doesn't cover the screen and the full image will be render in the preview/gallery 3. None of the thumbnail sizes provided by the camera fits the nexus 4 screen. We have to downscale the full image if we want to improve render performance Thumbnail sizes available on Nexus 4: "[{"height":288,"width":512},{"height":288,"width":480},{"height":288,"width":432},{"height":384,"width":512},{"height":288,"width":352},{"height":240,"width":320},{"height":144,"width":176},{"height":0,"width":0}]"
Flags: needinfo?(jdarcangelo)
Depends on: 990630
Diego - We need to get this bug addressed first (in your list of bugs)...can I get an eta please! thanks hema
I don't think we have to fix this on the nexus 4 since we're not shipping on that device. We can live with slow previews since that device is pretty fast to begin with. But we can't live with this on other devices. Note that there is a build-time configuration option in 1.3 that allows us to define what "big enough" means for thumbnails. I don't remember whether that got ported to the refactored version of the camera, but if so, there is a build-time config option that allows us to workaround the nexus 4 thumbnail issue.
Diego, please provide an update
Bug 990630 landed last night and will be uplifted to v1.4 today. That bug fixes this issue on Hamachi. The nexus 4 still has the issue becase the firmware on that phone cannot produce an EXIF preview that is big enough, and we are forced to decode the full-size image in order to display anything. This isn't such a big deal on the Nexus 4, however, because that phone is faster. We should keep this bug open, but I don't think we need to block on fixing it in 1.4. When we have a stable solution to the downsample-while-decoding problem we can transition to using that instead of relying on EXIF previews. I'm talking about bug 854795 or the alternative solution that has been proposed. Hopefully we will be able to use that to get the images to display really quickly.
blocking-b2g: --- → 1.4+
blocking-b2g: 1.4+ → ---
Summary: [Camera] Very slow to draw previews when swiping through Preview from Camera → [Camera][Nexus4] Very slow to draw previews when swiping through Preview from Camera

The bug assignee didn't login in Bugzilla in the last 7 months, so the assignee is being reset.

Assignee: dmarcos → nobody

In the process of migrating remaining bugs to the new severity system, the severity for this bug cannot be automatically determined. Please retriage this bug using the new severity system.

Severity: blocker → --

Closing old B2G bugs

Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: