Closed Bug 817134 Opened 13 years ago Closed 13 years ago

Delete the low-res screenshot code

Categories

(Firefox for Android Graveyard :: Toolbar, defect)

All
Android
defect
Not set
normal

Tracking

(firefox19 fixed, firefox20 fixed)

RESOLVED FIXED
Firefox 20
Tracking Status
firefox19 --- fixed
firefox20 --- fixed

People

(Reporter: kats, Assigned: kats)

References

Details

Attachments

(2 files)

Now that the low-res screenshot has been obsoleted by the progressive and low-res tiles stuff, we can delete the code. This includes all of the code in ScreenshotHandler as well as the AfterPaintListener goop in nsAppShell.cpp. We'll need to keep the AndroidBridge::TakeScreenshot and related code for the thumbnail codepaths, although it will need some renaming and rebinding of JNI functions.
This should also save a bunch of memory because we're still allocating a 2-meg buffer in ScreenshotLayer which we don't need to be doing.
Assignee: nobody → bugmail.mozilla
Blocks: 256meg
Whiteboard: [MemShrink]
Attached patch Delete some codeSplinter Review
Attachment #692373 - Flags: review?(blassey.bugs)
Attachment #692374 - Attachment description: Delete maor code and stop wasting memory → Delete moar code and stop wasting memory
Comment on attachment 692373 [details] [diff] [review] Delete some code Review of attachment 692373 [details] [diff] [review]: ----------------------------------------------------------------- Can we get rid of the ScreenshotLayer entirely? ::: widget/android/AndroidBridge.cpp @@ +2459,5 @@ > jobject JNICALL > Java_org_mozilla_gecko_GeckoAppShell_allocateDirectBuffer(JNIEnv *env, jclass, jlong size); > > > +nsresult AndroidBridge::TakeThumbnail(nsIDOMWindow *window, int32_t bufW, int32_t bufH, int32_t tabId, jobject buffer) naming nit, I'd go with CaptureThumnail()
Attachment #692373 - Flags: review?(blassey.bugs) → review+
Comment on attachment 692374 [details] [diff] [review] Delete moar code and stop wasting memory Review of attachment 692374 [details] [diff] [review]: ----------------------------------------------------------------- guess I should have looked at this patch before asking about removing ScreenshotLayer
Attachment #692374 - Flags: review?(blassey.bugs) → review+
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 20
Note: the removal of the 2-meg direct-allocation buffer reduces Fennec's startup vsize by the corresponding 2 megs, but doesn't reduce RSS that much because most of the 2 megs was never touched and so remained unmapped anyway.
Whiteboard: [MemShrink]
Blocks: 817514
Can/should we land this on 19 as well? It looks like this "fixes" topcrash bug 817514.
I think we can uplift it, yeah. I'll request approval once I have a chance to apply the patch on aurora and make sure none of the conflicts are dealbreakers (it's a large patch and will definitely not apply cleanly).
Comment on attachment 692373 [details] [diff] [review] Delete some code [Approval Request Comment] Bug caused by (feature/regressing bug #): unknown User impact if declined: some crashes in screenshotting-related code, like bug 805353 and bug 817514. Testing completed (on m-c, etc.): on m-c, nightlies (FF20) since mid-december Risk to taking this patch (and alternatives if risky): touches android code only. the patches are large-ish but i was able to rebase them successfully to 19 branch, so I don't think there's a lot of risk. Note that the second patch here rebases much more easily if patch #2 from bug 820556 is also uplifted, so i will request uplift for that as well. String or UUID changes made by this patch: none Try build with the rebased patches: https://tbpl.mozilla.org/?tree=Try&rev=1248c582658d
Attachment #692373 - Flags: approval-mozilla-beta?
Comment on attachment 692374 [details] [diff] [review] Delete moar code and stop wasting memory [Approval Request Comment] Same as above
Attachment #692374 - Flags: approval-mozilla-beta?
Comment on attachment 692373 [details] [diff] [review] Delete some code Approving in support of fixing top crasher bug 817514 - we'll have a few weeks of bake time with this change.
Attachment #692373 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Attachment #692374 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
See Also: → 1329200
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: