Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(475)

Issue 1937433002: HTML <canvas>: add WEBP lossless encoding support (Closed)

Created:
4 years, 7 months ago by Noel Gordon
Modified:
4 years, 7 months ago
Reviewers:
xlai (Olivia), urvang
CC:
chromium-reviews, blink-reviews, jzern, kinuko+watch, skal, urvang
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

HTML <canvas>: add WEBP lossless encoding support Deem "image/webp" to be an image format that supports alpha for the purposes of the HTML <canvas> spec: no need to implement the canvas composite-over-black spec requirement anymore, so we can remove the associated code, rgbPictureImport(). The WEBP image importer now includes the alpha channel always. When the image has no alpha, the libwebp encoder notices and removes the alpha channel from the encoded image. For "image/webp" encoding at maximum quality, maintain sharpness to match the JPEG encoder behavior (use WEBP lossless encoding). Change in behavior. Add new tests: fast/canvas/canvas-toDataURL-webp-maximum-quality.html fast/canvas/canvas-toDataURL-webp-alpha.html Update existing tests: fast/canvas/canvas-toBlob-webp-maximum-quality.html fast/canvas/canvas-toDataURL-webp.html Add "image/webp" to the <canvas> mime-type tests: fast/canvas/canvas-toDataURL-case-insensitive-mimetype.html fast/canvas/toDataURL-supportedTypes.html Note: regarding "image/gif" and toDataURL-supportedTypes.html. This format has never been supported by toDataURL. Move it into the list of unsupported mime types. BUG=523098 Committed: https://crrev.com/dd15c29bcac43daf9271fbb60bd5a93607e39fe5 Cr-Commit-Position: refs/heads/master@{#391429}

Patch Set 1 #

Patch Set 2 : More test expectations. #

Patch Set 3 : Tweak tests. #

Patch Set 4 : Merge to ToT #

Total comments: 6

Patch Set 5 : Patch for landing. #

Total comments: 1

Messages

Total messages: 39 (19 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1937433002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1937433002/1
4 years, 7 months ago (2016-04-29 15:16:13 UTC) #2
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1937433002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1937433002/20001
4 years, 7 months ago (2016-04-29 16:01:01 UTC) #4
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 7 months ago (2016-04-29 17:38:23 UTC) #6
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1937433002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1937433002/40001
4 years, 7 months ago (2016-04-30 02:07:11 UTC) #8
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 7 months ago (2016-04-30 03:12:32 UTC) #10
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1937433002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1937433002/60001
4 years, 7 months ago (2016-05-03 05:09:17 UTC) #15
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 7 months ago (2016-05-03 06:33:47 UTC) #17
Noel Gordon
4 years, 7 months ago (2016-05-03 07:46:30 UTC) #18
urvang
https://codereview.chromium.org/1937433002/diff/60001/third_party/WebKit/LayoutTests/fast/canvas/toDataURL-supportedTypes.html File third_party/WebKit/LayoutTests/fast/canvas/toDataURL-supportedTypes.html (left): https://codereview.chromium.org/1937433002/diff/60001/third_party/WebKit/LayoutTests/fast/canvas/toDataURL-supportedTypes.html#oldcode28 third_party/WebKit/LayoutTests/fast/canvas/toDataURL-supportedTypes.html:28: "image/gif", GIF is not supported? If so, this should ...
4 years, 7 months ago (2016-05-03 17:28:19 UTC) #20
xlai (Olivia)
I can only comment on the tests. Tried the patch locally and the webp images ...
4 years, 7 months ago (2016-05-03 19:20:26 UTC) #21
Noel Gordon
https://codereview.chromium.org/1937433002/diff/60001/third_party/WebKit/LayoutTests/fast/canvas/toDataURL-supportedTypes.html File third_party/WebKit/LayoutTests/fast/canvas/toDataURL-supportedTypes.html (left): https://codereview.chromium.org/1937433002/diff/60001/third_party/WebKit/LayoutTests/fast/canvas/toDataURL-supportedTypes.html#oldcode28 third_party/WebKit/LayoutTests/fast/canvas/toDataURL-supportedTypes.html:28: "image/gif", On 2016/05/03 17:28:19, urvang wrote: > GIF is ...
4 years, 7 months ago (2016-05-04 00:43:18 UTC) #23
Noel Gordon
https://codereview.chromium.org/1937433002/diff/60001/third_party/WebKit/Source/platform/image-encoders/skia/WEBPImageEncoder.cpp File third_party/WebKit/Source/platform/image-encoders/skia/WEBPImageEncoder.cpp (right): https://codereview.chromium.org/1937433002/diff/60001/third_party/WebKit/Source/platform/image-encoders/skia/WEBPImageEncoder.cpp#newcode41 third_party/WebKit/Source/platform/image-encoders/skia/WEBPImageEncoder.cpp:41: return static_cast<Vector<unsigned char>*>(picture->custom_ptr)->append(data, size), 1; On 2016/05/03 17:28:19, urvang ...
4 years, 7 months ago (2016-05-04 01:10:30 UTC) #24
Noel Gordon
https://codereview.chromium.org/1937433002/diff/80001/third_party/WebKit/Source/platform/image-encoders/skia/WEBPImageEncoder.cpp File third_party/WebKit/Source/platform/image-encoders/skia/WEBPImageEncoder.cpp (right): https://codereview.chromium.org/1937433002/diff/80001/third_party/WebKit/Source/platform/image-encoders/skia/WEBPImageEncoder.cpp#newcode73 third_party/WebKit/Source/platform/image-encoders/skia/WEBPImageEncoder.cpp:73: config.quality = 75; Note urvang@: the config.{quality,method} values used ...
4 years, 7 months ago (2016-05-04 01:15:58 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1937433002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1937433002/80001
4 years, 7 months ago (2016-05-04 01:17:15 UTC) #28
urvang
LGTM On Tue, May 3, 2016, 6:17 PM commit-bot@chromium.org via codereview.chromium.org <reply@chromiumcodereview-hr.appspotmail.com> wrote: > CQ ...
4 years, 7 months ago (2016-05-04 01:24:28 UTC) #29
urvang
LGTM On Tue, May 3, 2016, 6:17 PM commit-bot@chromium.org via codereview.chromium.org <reply@chromiumcodereview-hr.appspotmail.com> wrote: > CQ ...
4 years, 7 months ago (2016-05-04 01:24:29 UTC) #30
Noel Gordon
On 2016/05/03 19:20:26, xlai (Olivia) wrote: > I can only comment on the tests. Tried ...
4 years, 7 months ago (2016-05-04 01:44:18 UTC) #34
Noel Gordon
On 2016/05/04 01:24:28, urvang wrote: > LGTM Right, submitting.
4 years, 7 months ago (2016-05-04 01:44:54 UTC) #35
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years, 7 months ago (2016-05-04 03:10:54 UTC) #37
commit-bot: I haz the power
4 years, 7 months ago (2016-05-04 03:12:02 UTC) #39
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/dd15c29bcac43daf9271fbb60bd5a93607e39fe5
Cr-Commit-Position: refs/heads/master@{#391429}

Powered by Google App Engine
This is Rietveld 408576698