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

Issue 1797313002: Make ImageBitmap transferable work with ImageBitmapOptions (Closed)

Created:
4 years, 9 months ago by xidachen
Modified:
4 years, 8 months ago
Reviewers:
Justin Novosad
CC:
chromium-reviews, krit, pdr+graphicswatchlist_chromium.org, drott+blinkwatch_chromium.org, blink-reviews-platform-graphics_chromium.org, dshwang, jbroman, Rik, Stephen Chennney, blink-reviews, f(malita), danakj+watch_chromium.org, kinuko+watch, rwlbuis
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Make ImageBitmap transferable work with ImageBitmapOptions At this moment, transfer an ImageBitmap works fine with an ImageBitmap created with the default options. Now that we have options of flipY and premultiplyAlpha, we should make sure that the transfer logic works. To verify that, we create an ImageBitmap with flipY=true and premultiplyAlpha =false, we transfer this ImageBitmap to the worker thread and worker transfer it back to the main thread. Now on the main thread, the ImageBitmap should have the same pixel data as the originally created one. The tricky part here is that when transferring an ImageBitmap to worker, we are actually pass a StaticBitmapImage which is stored internally in the ImageBitmap. Since StaticBitmapImage doesn't have info about whether it is premultiplied alpha or not, we will lose this info. To make sure the transferring logic is correct, we add a member m_isPremultiplied to StaticBitmapImage, and ImageBitmap keeps track of this member. A layout test is added to make sure that the ImageBitmap's pixel data survives the round trip from main<-->worker thread. Committed: https://crrev.com/162000219b284ce3b5e98129d8bde4f06bb9c8cc Cr-Commit-Position: refs/heads/master@{#383780}

Patch Set 1 #

Patch Set 2 : Also testing create ImageBitmap on worker with options #

Patch Set 3 : Don't flip again on worker #

Patch Set 4 : rebase #

Total comments: 4

Patch Set 5 : add comments #

Messages

Total messages: 15 (5 generated)
xidachen
PTAL
4 years, 9 months ago (2016-03-15 15:53:04 UTC) #2
xidachen
PTAL
4 years, 9 months ago (2016-03-24 14:22:20 UTC) #3
xidachen
junov@: gentle ping.
4 years, 8 months ago (2016-03-29 13:57:18 UTC) #4
Justin Novosad
https://codereview.chromium.org/1797313002/diff/60001/third_party/WebKit/LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-image-bitmap-transferable.html File third_party/WebKit/LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-image-bitmap-transferable.html (right): https://codereview.chromium.org/1797313002/diff/60001/third_party/WebKit/LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-image-bitmap-transferable.html#newcode58 third_party/WebKit/LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-image-bitmap-transferable.html:58: createImageBitmap(image, {imageOrientation: "flipY", premultiplyAlpha: "none"}).then(function(imageBitmap) { The way this ...
4 years, 8 months ago (2016-03-29 14:39:54 UTC) #5
xidachen
https://codereview.chromium.org/1797313002/diff/60001/third_party/WebKit/LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-image-bitmap-transferable.html File third_party/WebKit/LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-image-bitmap-transferable.html (right): https://codereview.chromium.org/1797313002/diff/60001/third_party/WebKit/LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-image-bitmap-transferable.html#newcode58 third_party/WebKit/LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-image-bitmap-transferable.html:58: createImageBitmap(image, {imageOrientation: "flipY", premultiplyAlpha: "none"}).then(function(imageBitmap) { On 2016/03/29 14:39:53, ...
4 years, 8 months ago (2016-03-29 15:41:01 UTC) #6
Justin Novosad
lgtm
4 years, 8 months ago (2016-03-29 15:47:01 UTC) #7
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1797313002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1797313002/80001
4 years, 8 months ago (2016-03-29 15:51:30 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1797313002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1797313002/80001
4 years, 8 months ago (2016-03-29 17:13:55 UTC) #12
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years, 8 months ago (2016-03-29 18:48:04 UTC) #13
commit-bot: I haz the power
4 years, 8 months ago (2016-03-29 18:49:09 UTC) #15
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/162000219b284ce3b5e98129d8bde4f06bb9c8cc
Cr-Commit-Position: refs/heads/master@{#383780}

Powered by Google App Engine
This is Rietveld 408576698