Closed Bug 1355763 Opened 3 years ago Closed 3 years ago

Clarify opaque vs premult-alpha vs non-premult-alpha

Categories

(Core :: Canvas: WebGL, enhancement, P1)

enhancement

Tracking

()

RESOLVED FIXED
mozilla55
Tracking Status
firefox55 --- fixed

People

(Reporter: jgilbert, Assigned: jgilbert)

References

Details

(Whiteboard: gfx-noted)

Attachments

(3 files)

This should make it more clear when we can skip conversion, which is particularly useful for faster video uploads. (or at least making the fast-path broader, easier to hit)
This patch makes at least the webm here work:
http://alteredqualia.com/xg/examples/webgl_video_aspect_ratio.html
Comment on attachment 8857402 [details]
Bug 1355763 - Add gfxAlphaType for specifying opaque/premult/non-premult. -

https://reviewboard.mozilla.org/r/129396/#review132020

r=me after fixing some nits.

::: dom/canvas/CanvasRenderingContext2D.h:412
(Diff revision 1)
>        CurrentState().imageSmoothingEnabled = aImageSmoothingEnabled;
>      }
>    }
>  
>    void DrawWindow(nsGlobalWindow& aWindow, double aX, double aY,
> -                  double aW, double aH,
> +      double aW, double aH,

This indentation seems to be wrong.

::: testing/talos/talos/test.py:428
(Diff revision 1)
> +    gecko_profile_interval = 10
> +    gecko_profile_entries = 2000000
> +    win_counters = w7_counters = linux_counters = mac_counters = None
> +    """ ASAP mode """
> +    filters = filter.ignore_first.prepare(1) + filter.median.prepare()
> +    unit = 'ms'

Please remove this unused code.
Attachment #8857402 - Flags: review?(dmu) → review+
Comment on attachment 8857539 [details]
Bug 1355763 - Handle UNPACK_ state for ConvertPlanarYCbCr, and reject blits with _SKIP_* for now. -

https://reviewboard.mozilla.org/r/129508/#review132314

LGTM
Attachment #8857539 - Flags: review?(dmu) → review+
Pushed by jgilbert@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/f97fd860c168
Add gfxAlphaType for specifying opaque/premult/non-premult. - r=daoshengmu
https://hg.mozilla.org/integration/mozilla-inbound/rev/f71e84602f68
Handle UNPACK_ state for ConvertPlanarYCbCr, and reject blits with _SKIP_* for now. - r=daoshengmu
Pushed by jgilbert@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/f0e8fd36b730
Add gfxAlphaType for specifying opaque/premult/non-premult. - r=daoshengmu
https://hg.mozilla.org/integration/mozilla-inbound/rev/bbd23665a2d1
Handle UNPACK_ state for ConvertPlanarYCbCr, and reject blits with _SKIP_* for now. - r=daoshengmu
https://hg.mozilla.org/integration/mozilla-inbound/rev/c9683ac4e2d1
Only premult if there's something to premult.
Flags: needinfo?(jgilbert)
You need to log in before you can comment on or make changes to this bug.