Enable plane alpha support for HWC layers in newer H/W Composer.

RESOLVED FIXED

Status

defect
P2
normal
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: sushilchauhan, Assigned: sushilchauhan)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 3 obsolete attachments)

Enable plane alpha support for HWC layers in newer H/W Composer version.
Attachment #810028 - Flags: review?(pchang)
Attachment #810028 - Flags: review?(mwu)
Attachment #810028 - Flags: review?(dwilson)
Depends on: 919676
Comment on attachment 810028 [details] [diff] [review]
Enable plane alpha support for HWC layers in newer H/W Composer.

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

::: widget/gonk/HwcComposer2D.cpp
@@ +269,4 @@
>  
>      hwcLayer.acquireFenceFd = -1;
>      hwcLayer.releaseFenceFd = -1;
> +    hwcLayer.planeAlpha = (uint8_t)(opacity * 255.0);

I think this conversion is biased a bit towards zero. Something like min(255, opacity*256.0) will give us a better distribution. We should probably use this uint8 value of opacity to determine whether the layer is opaque or not, since it won't give up on values very very close to but not quite 1.0.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment on attachment 810028 [details] [diff] [review]
Enable plane alpha support for HWC layers in newer H/W Composer.

Waiting for a new patch.
Attachment #810028 - Flags: review?(mwu)
Attachment #810028 - Flags: review?(dwilson)
No longer depends on: 919676
Makes sense. Addressed the comments in latest patch.
Attachment #810028 - Attachment is obsolete: true
Attachment #810028 - Flags: review?(pchang)
Attachment #813819 - Flags: review?(mwu)
Attachment #813819 - Flags: review?(dwilson)
Comment on attachment 813819 [details] [diff] [review]
Enable plane alpha support for HWC layers in newer H/W Composer.

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

::: widget/gonk/HwcComposer2D.cpp
@@ +158,3 @@
>      }
>  
>      float opacity = aLayer->GetEffectiveOpacity();

Can you move the float -> int conversion here, and have the rest of the function operate on the int version of opacity?
Attachment #813819 - Flags: review?(mwu)
Attachment #813819 - Flags: review?(dwilson)
Attachment #813819 - Attachment is obsolete: true
Attachment #817384 - Flags: review?(mwu)
Attachment #817384 - Flags: feedback?(dwilson)
Attachment #817384 - Flags: review?(mwu) → review+
Diego, could you please check it on ICS device.
Uploading HG friendly patch.
Attachment #817384 - Attachment is obsolete: true
Attachment #817384 - Flags: feedback?(dwilson)
Attachment #817490 - Flags: review+
Assignee: nobody → sushilchauhan
Status: NEW → ASSIGNED
Keywords: checkin-needed
Comment on attachment 817490 [details] [diff] [review]
Bug 920654 - Enable plane alpha support for HWC layers in newer H/W Composer. r=mwu

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

Verified on ICS target
Attachment #817490 - Flags: review+
https://hg.mozilla.org/mozilla-central/rev/c92ba82eb054
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.