Closed
Bug 821453
Opened 12 years ago
Closed 12 years ago
Lightweight theme buttons don't have a gradient on 4.2.1
Categories
(Firefox for Android Graveyard :: Theme and Visual Design, defect)
Tracking
(firefox19 fixed, firefox20 fixed)
RESOLVED
FIXED
Firefox 20
People
(Reporter: sriram, Assigned: sriram)
References
Details
Attachments
(1 file)
|
24.47 KB,
patch
|
mfinkle
:
review+
bajaj
:
approval-mozilla-aurora+
|
Details | Diff | Splinter Review |
With changes to mutate() in the Android drawables, the BitmapDrawable inside a LayerDrawable, which inturn is inside a ShapeDrawable (and oh! that's inside a LevelDrawable) cannot show transparency, starting 4.2.1.
Also, it's better to combine the layers in a LayerDrawable into a single Drawable using shaders. This reduces the number of times a paint is drawn. This is also better over the PorterDuffXfermode approach.
| Assignee | ||
Comment 1•12 years ago
|
||
This patch solves the problem on 4.2.1 and lower.
From view's perspective:
1. A view either gets a Color based or Texture based LightweightThemeDrawable. TabsPanel is special which gets both.
2. The view sets an alpha value --> this is used for the LinearGradient used with the bitmap shader.
On LightweightThemeDrawable:
1. A texture-paint is created based on the given texture -- this uses a bitmap-shader.
2. A color-paint is created based on the given color.
3. A bitmap-paint is created based on the given bitmap and the linear-gradient to apply. It's based to combine these shaders into one ComposeShader, that will make the paint draw in one go. (Ofcourse, porter-duff is needed, as always).
Suggestions:
It might be better to combine the texture-paint's shader and the color-paint's shader with the bitmap-paint. That will ensure paint the canvas only once -- which is a performance win. However, I didn't want to overload this patch and would like to do as a followup.
Assignee: nobody → sriram
Attachment #691982 -
Flags: review?(mark.finkle)
Comment 2•12 years ago
|
||
Comment on attachment 691982 [details] [diff] [review]
Patch
Thanks for adding the comments too
Attachment #691982 -
Flags: review?(mark.finkle) → review+
| Assignee | ||
Comment 3•12 years ago
|
||
Comment 4•12 years ago
|
||
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 20
| Assignee | ||
Comment 5•12 years ago
|
||
Comment on attachment 691982 [details] [diff] [review]
Patch
[Approval Request Comment]
Bug caused by (feature/regressing bug #): Android's bug on mutating drawable. (Someone watched X-men there!)
User impact if declined: JB phones will not show personas properly.
Testing completed (on m-c, etc.): Landed on m-c on 12/15
Risk to taking this patch (and alternatives if risky): Very low. This optimizes the drawable for performance. This is needed for bug 822421 to land.
String or UUID changes made by this patch: None.
Attachment #691982 -
Flags: approval-mozilla-aurora?
Updated•12 years ago
|
Attachment #691982 -
Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
| Assignee | ||
Comment 6•12 years ago
|
||
Updated•12 years ago
|
status-firefox19:
--- → fixed
status-firefox20:
--- → fixed
Updated•4 years ago
|
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•