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

Issue 1609763002: Implement ImageBitmap options premultiplyAlpha (Closed)

Created:
4 years, 11 months ago by xidachen
Modified:
4 years, 10 months ago
Reviewers:
Justin Novosad
CC:
chromium-reviews, blink-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Implement ImageBitmap options premultiplyAlpha In this CL, we implement the option of premultiplyAlpha for ImageBitmap. At this moment, it works for createImageBitmap from HTMLImageElement, HTMLCanvasElement and Blob. The cases of from ImageBitmap, HTMLVideoElemtn and ImageData will be solved in future CL(s). This CL also includes modifies a current layout tests, which tests the combination of ImageBitmap options "flipY" and premultiplyAlpha BUG=249382 Committed: https://crrev.com/dfbf8dd24ba36edab0e567c3f98f4ed6ad8dd1e2 Cr-Commit-Position: refs/heads/master@{#374132}

Patch Set 1 #

Total comments: 2

Patch Set 2 : change to enum instead of boolean #

Total comments: 11

Patch Set 3 : check invalid option as well #

Patch Set 4 : hide ImageBitmapOption behind flags #

Total comments: 4

Patch Set 5 : apply comments #

Messages

Total messages: 22 (10 generated)
xidachen
PTAL. https://codereview.chromium.org/1609763002/diff/1/third_party/WebKit/Source/core/frame/ImageBitmap.cpp File third_party/WebKit/Source/core/frame/ImageBitmap.cpp (right): https://codereview.chromium.org/1609763002/diff/1/third_party/WebKit/Source/core/frame/ImageBitmap.cpp#newcode82 third_party/WebKit/Source/core/frame/ImageBitmap.cpp:82: surface->getCanvas()->drawImage(skiaImage.get(), dstLeft, dstTop); This program could crash at ...
4 years, 11 months ago (2016-01-20 02:29:07 UTC) #2
Justin Novosad
We are getting ahead of the spec here. I would like us to first converge ...
4 years, 11 months ago (2016-01-20 16:41:30 UTC) #3
xidachen
PTAL
4 years, 10 months ago (2016-02-05 14:26:42 UTC) #5
Justin Novosad
https://codereview.chromium.org/1609763002/diff/20001/third_party/WebKit/LayoutTests/fast/canvas/canvas-createImageBitmap-drawImage-with-options.html File third_party/WebKit/LayoutTests/fast/canvas/canvas-createImageBitmap-drawImage-with-options.html (right): https://codereview.chromium.org/1609763002/diff/20001/third_party/WebKit/LayoutTests/fast/canvas/canvas-createImageBitmap-drawImage-with-options.html#newcode165 third_party/WebKit/LayoutTests/fast/canvas/canvas-createImageBitmap-drawImage-with-options.html:165: imageOrientationOptions = ["none", "flipY"]; You should try passing invalid ...
4 years, 10 months ago (2016-02-05 14:46:41 UTC) #6
xidachen
https://codereview.chromium.org/1609763002/diff/20001/third_party/WebKit/Source/core/frame/ImageBitmap.cpp File third_party/WebKit/Source/core/frame/ImageBitmap.cpp (right): https://codereview.chromium.org/1609763002/diff/20001/third_party/WebKit/Source/core/frame/ImageBitmap.cpp#newcode24 third_party/WebKit/Source/core/frame/ImageBitmap.cpp:24: imageOrientationFlipYFlag = false; On 2016/02/05 14:46:41, Justin Novosad wrote: ...
4 years, 10 months ago (2016-02-05 16:47:37 UTC) #7
Justin Novosad
https://codereview.chromium.org/1609763002/diff/60001/third_party/WebKit/Source/core/frame/ImageBitmap.cpp File third_party/WebKit/Source/core/frame/ImageBitmap.cpp (right): https://codereview.chromium.org/1609763002/diff/60001/third_party/WebKit/Source/core/frame/ImageBitmap.cpp#newcode25 third_party/WebKit/Source/core/frame/ImageBitmap.cpp:25: ASSERT(options.imageOrientation() == imageBitmapOptionNone); The assert goes in the 'else'. ...
4 years, 10 months ago (2016-02-05 22:33:01 UTC) #8
xidachen
https://codereview.chromium.org/1609763002/diff/60001/third_party/WebKit/Source/core/frame/ImageBitmap.cpp File third_party/WebKit/Source/core/frame/ImageBitmap.cpp (right): https://codereview.chromium.org/1609763002/diff/60001/third_party/WebKit/Source/core/frame/ImageBitmap.cpp#newcode25 third_party/WebKit/Source/core/frame/ImageBitmap.cpp:25: ASSERT(options.imageOrientation() == imageBitmapOptionNone); On 2016/02/05 22:33:01, Justin Novosad wrote: ...
4 years, 10 months ago (2016-02-06 01:18:41 UTC) #9
Justin Novosad
On 2016/02/06 01:18:41, xidachen wrote: > https://codereview.chromium.org/1609763002/diff/60001/third_party/WebKit/Source/core/frame/ImageBitmap.cpp > File third_party/WebKit/Source/core/frame/ImageBitmap.cpp (right): > > https://codereview.chromium.org/1609763002/diff/60001/third_party/WebKit/Source/core/frame/ImageBitmap.cpp#newcode25 > ...
4 years, 10 months ago (2016-02-08 14:54:06 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/1609763002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1609763002/80001
4 years, 10 months ago (2016-02-08 14:59:44 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1609763002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1609763002/80001
4 years, 10 months ago (2016-02-08 16:24:01 UTC) #18
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years, 10 months ago (2016-02-08 16:29:55 UTC) #20
commit-bot: I haz the power
4 years, 10 months ago (2016-02-08 16:30:53 UTC) #22
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/dfbf8dd24ba36edab0e567c3f98f4ed6ad8dd1e2
Cr-Commit-Position: refs/heads/master@{#374132}

Powered by Google App Engine
This is Rietveld 408576698