Closed Bug 840868 Opened 7 years ago Closed 7 years ago

[Overdraw] Window background should be reset

Categories

(Firefox for Android :: General, defect)

ARM
Android
defect
Not set

Tracking

()

RESOLVED FIXED
Firefox 22

People

(Reporter: sriram, Assigned: sriram)

References

Details

Attachments

(1 file)

It's good to set window background in XML, so that Android makes it feel like the app has started loading when launching from launcher. It's like the background on a webpage. Like in a webpage, its good to have the background for the entire page, and leave the individual elements transparent. However, we cannot do that as we have 3-4 different layers in the content section of our gecko-app. Hence the windowBackground is pretty useless once the app has loaded. This can be removed reducing the overdraw.
Attached patch PatchSplinter Review
This reduces overdraw in about:home section. I could see the about:home go from all red to less red in background area. WIN! :D
Attachment #713282 - Flags: review?(mark.finkle)
Blocks: 819468
Comment on attachment 713282 [details] [diff] [review]
Patch

Review of attachment 713282 [details] [diff] [review]:
-----------------------------------------------------------------

::: mobile/android/base/GeckoApp.java
@@ +2069,5 @@
>  
>          if (!mInitialized && hasFocus)
>              initialize();
> +
> +        getWindow().setBackgroundDrawable(null);

Maybe it makes more sense to just do it once after the initialize() call (inside the 'if')?
Comment on attachment 713282 [details] [diff] [review]
Patch

I agree with Lucas. It seems like something we should only call one time. Moving it into the "if" block would make that happen.

r+, but move into the if block
Attachment #713282 - Flags: review?(mark.finkle) → review+
https://hg.mozilla.org/mozilla-central/rev/2440035e8590
Assignee: nobody → sriram
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 22
You need to log in before you can comment on or make changes to this bug.