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

Issue 1409243005: Make ImageBitmap Transferable (Closed)

Created:
5 years, 1 month ago by xidachen
Modified:
5 years, 1 month ago
CC:
blink-reviews, blink-reviews-bindings_chromium.org, blink-reviews-platform-graphics_chromium.org, Rik, chromium-reviews, danakj, dshwang, drott+blinkwatch_chromium.org, krit, f(malita), jbroman, pdr+graphicswatchlist_chromium.org, rwlbuis, Stephen Chennney, vmpstr+blinkwatch_chromium.org, oilpan-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Make ImageBitmap Transferable Including a layout test that does 2 things: 1. transfer an ImageBitmap to the worker and let worker transfer back to main, the main thread exam the transfered-back ImageBitmap to make sure the data is the same as the original ImageBitmap. 2. When worker receives the ImageBitmap from main, worker calls createImageBimmap() to create a new ImageBitmap and send it back to main. BUG=532142 Committed: https://crrev.com/5d8ed50933226127fdc64744d86ab3d9b7d57276 Cr-Commit-Position: refs/heads/master@{#356575}

Patch Set 1 #

Patch Set 2 : Fix blank line #

Total comments: 9

Patch Set 3 : Make code OilPan compatible #

Patch Set 4 : Changing expected.txt to account for the description change. #

Total comments: 1

Patch Set 5 : Fix OilPan compatible issue #

Patch Set 6 : More on fixing OilPan compatible issue. #

Total comments: 4

Patch Set 7 : Even more on OilPan compatible issue #

Total comments: 2

Patch Set 8 : Better transfer function #

Total comments: 26

Patch Set 9 : Fix Oilpan and other issues #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+340 lines, -60 lines) Patch
A third_party/WebKit/LayoutTests/fast/canvas/canvas-ImageBitmap-transferable.html View 1 2 1 chunk +94 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/canvas/canvas-ImageBitmap-transferable-expected.txt View 1 2 3 4 5 6 7 8 1 chunk +39 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/canvas/resources/canvas-ImageBitmap-transferable.js View 1 2 1 chunk +12 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/ScriptValueSerializer.h View 1 2 3 4 5 6 7 8 10 chunks +12 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/ScriptValueSerializer.cpp View 10 chunks +60 lines, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/SerializationTag.h View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/SerializedScriptValue.h View 1 2 3 4 5 6 4 chunks +7 lines, -1 line 1 comment Download
M third_party/WebKit/Source/bindings/core/v8/SerializedScriptValue.cpp View 1 2 3 4 5 6 7 8 7 chunks +38 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/SerializedScriptValueFactory.h View 2 chunks +6 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/SerializedScriptValueFactory.cpp View 1 2 3 4 5 6 7 8 7 chunks +19 lines, -18 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/SerializedScriptValueTest.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/custom/V8WindowCustom.cpp View 3 chunks +4 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/bindings/modules/v8/ScriptValueSerializerForModules.h View 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/bindings/modules/v8/ScriptValueSerializerForModules.cpp View 2 chunks +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/bindings/modules/v8/SerializedScriptValueForModulesFactory.h View 1 chunk +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/bindings/modules/v8/SerializedScriptValueForModulesFactory.cpp View 5 chunks +7 lines, -7 lines 0 comments Download
M third_party/WebKit/Source/bindings/scripts/v8_methods.py View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/bindings/scripts/v8_types.py View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/templates/methods.cpp View 1 chunk +3 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestObject.cpp View 1 2 3 4 5 6 7 8 4 chunks +6 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/frame/ImageBitmap.h View 1 2 3 4 5 6 7 2 chunks +3 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/frame/ImageBitmap.cpp View 1 2 3 4 5 6 7 8 1 chunk +15 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/web/WebSerializedScriptValue.cpp View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 41 (9 generated)
xidachen
Hi, This CL is for making ImageBitmap transferable. Please review. Thank you.
5 years, 1 month ago (2015-10-22 13:58:46 UTC) #3
jochen (gone - plz use gerrit)
+haraken for bindings
5 years, 1 month ago (2015-10-23 12:17:42 UTC) #5
Justin Novosad
https://codereview.chromium.org/1409243005/diff/20001/third_party/WebKit/LayoutTests/fast/canvas/canvas-ImageBitmap-transferable.html File third_party/WebKit/LayoutTests/fast/canvas/canvas-ImageBitmap-transferable.html (right): https://codereview.chromium.org/1409243005/diff/20001/third_party/WebKit/LayoutTests/fast/canvas/canvas-ImageBitmap-transferable.html#newcode10 third_party/WebKit/LayoutTests/fast/canvas/canvas-ImageBitmap-transferable.html:10: description("Tests that the ImageBitmap is transferable"); ...and that the ...
5 years, 1 month ago (2015-10-23 13:30:04 UTC) #6
xidachen
Hi Justin, Thank you for the awesome comments. I have fixed the code and it ...
5 years, 1 month ago (2015-10-23 14:41:05 UTC) #7
Justin Novosad
https://codereview.chromium.org/1409243005/diff/60001/third_party/WebKit/Source/core/frame/ImageBitmap.cpp File third_party/WebKit/Source/core/frame/ImageBitmap.cpp (right): https://codereview.chromium.org/1409243005/diff/60001/third_party/WebKit/Source/core/frame/ImageBitmap.cpp#newcode194 third_party/WebKit/Source/core/frame/ImageBitmap.cpp:194: return adoptRef(new ImageBitmap(this, m_cropRect)); I don't think this is ...
5 years, 1 month ago (2015-10-23 15:01:22 UTC) #8
xidachen
https://codereview.chromium.org/1409243005/diff/100001/third_party/WebKit/Source/bindings/core/v8/SerializedScriptValue.cpp File third_party/WebKit/Source/bindings/core/v8/SerializedScriptValue.cpp (right): https://codereview.chromium.org/1409243005/diff/100001/third_party/WebKit/Source/bindings/core/v8/SerializedScriptValue.cpp#newcode116 third_party/WebKit/Source/bindings/core/v8/SerializedScriptValue.cpp:116: OwnPtr<ImageBitmapArray> contents = adoptPtr(new ImageBitmapArray(imageBitmaps.size())); This may not be ...
5 years, 1 month ago (2015-10-23 18:02:22 UTC) #9
Justin Novosad
Oilpan is a bit tricky and hard to figure out just by reading code and ...
5 years, 1 month ago (2015-10-23 19:39:57 UTC) #10
xidachen
Thank you Justin. After making changes, the oilpan trybots goes green, and the layout test ...
5 years, 1 month ago (2015-10-24 01:22:33 UTC) #11
Justin Novosad
https://codereview.chromium.org/1409243005/diff/120001/third_party/WebKit/Source/core/frame/ImageBitmap.cpp File third_party/WebKit/Source/core/frame/ImageBitmap.cpp (right): https://codereview.chromium.org/1409243005/diff/120001/third_party/WebKit/Source/core/frame/ImageBitmap.cpp#newcode184 third_party/WebKit/Source/core/frame/ImageBitmap.cpp:184: void ImageBitmap::neuter() I don't see why neuter and transfer ...
5 years, 1 month ago (2015-10-24 03:04:48 UTC) #12
xidachen
https://codereview.chromium.org/1409243005/diff/120001/third_party/WebKit/Source/core/frame/ImageBitmap.cpp File third_party/WebKit/Source/core/frame/ImageBitmap.cpp (right): https://codereview.chromium.org/1409243005/diff/120001/third_party/WebKit/Source/core/frame/ImageBitmap.cpp#newcode184 third_party/WebKit/Source/core/frame/ImageBitmap.cpp:184: void ImageBitmap::neuter() That makes perfect sense. They are now ...
5 years, 1 month ago (2015-10-24 20:36:25 UTC) #13
haraken
https://codereview.chromium.org/1409243005/diff/100001/third_party/WebKit/Source/bindings/core/v8/SerializedScriptValue.cpp File third_party/WebKit/Source/bindings/core/v8/SerializedScriptValue.cpp (right): https://codereview.chromium.org/1409243005/diff/100001/third_party/WebKit/Source/bindings/core/v8/SerializedScriptValue.cpp#newcode116 third_party/WebKit/Source/bindings/core/v8/SerializedScriptValue.cpp:116: OwnPtr<ImageBitmapArray> contents = adoptPtr(new ImageBitmapArray(imageBitmaps.size())); On 2015/10/23 19:39:57, Justin ...
5 years, 1 month ago (2015-10-26 06:52:14 UTC) #14
xidachen
Thank you for your suggestions. I did try building my CL with the parameter GYP_DEFINES='enable_oilpan=1 ...
5 years, 1 month ago (2015-10-26 13:44:10 UTC) #15
haraken
LGTM from the perspective of bindings/ and Oilpan. https://codereview.chromium.org/1409243005/diff/140001/third_party/WebKit/Source/bindings/core/v8/ScriptValueSerializer.cpp File third_party/WebKit/Source/bindings/core/v8/ScriptValueSerializer.cpp (right): https://codereview.chromium.org/1409243005/diff/140001/third_party/WebKit/Source/bindings/core/v8/ScriptValueSerializer.cpp#newcode2116 third_party/WebKit/Source/bindings/core/v8/ScriptValueSerializer.cpp:2116: bool ...
5 years, 1 month ago (2015-10-26 14:57:40 UTC) #16
sof
https://codereview.chromium.org/1409243005/diff/140001/third_party/WebKit/Source/bindings/core/v8/ScriptValueSerializer.h File third_party/WebKit/Source/bindings/core/v8/ScriptValueSerializer.h (right): https://codereview.chromium.org/1409243005/diff/140001/third_party/WebKit/Source/bindings/core/v8/ScriptValueSerializer.h#newcode635 third_party/WebKit/Source/bindings/core/v8/ScriptValueSerializer.h:635: ImageBitmapArray* m_imageBitmaps; This works out overall, but it is ...
5 years, 1 month ago (2015-10-26 16:31:35 UTC) #18
haraken
https://codereview.chromium.org/1409243005/diff/140001/third_party/WebKit/Source/bindings/core/v8/ScriptValueSerializer.h File third_party/WebKit/Source/bindings/core/v8/ScriptValueSerializer.h (right): https://codereview.chromium.org/1409243005/diff/140001/third_party/WebKit/Source/bindings/core/v8/ScriptValueSerializer.h#newcode635 third_party/WebKit/Source/bindings/core/v8/ScriptValueSerializer.h:635: ImageBitmapArray* m_imageBitmaps; On 2015/10/26 16:31:35, sof wrote: > This ...
5 years, 1 month ago (2015-10-26 16:35:39 UTC) #20
sof
On 2015/10/26 16:35:39, haraken wrote: > https://codereview.chromium.org/1409243005/diff/140001/third_party/WebKit/Source/bindings/core/v8/ScriptValueSerializer.h > File third_party/WebKit/Source/bindings/core/v8/ScriptValueSerializer.h (right): > > https://codereview.chromium.org/1409243005/diff/140001/third_party/WebKit/Source/bindings/core/v8/ScriptValueSerializer.h#newcode635 > ...
5 years, 1 month ago (2015-10-26 16:39:22 UTC) #21
haraken
On 2015/10/26 16:39:22, sof wrote: > On 2015/10/26 16:35:39, haraken wrote: > > > https://codereview.chromium.org/1409243005/diff/140001/third_party/WebKit/Source/bindings/core/v8/ScriptValueSerializer.h ...
5 years, 1 month ago (2015-10-26 16:41:05 UTC) #22
Justin Novosad
lgtm for code under Source/core (modulo haraken's comments) and LayoutTests.
5 years, 1 month ago (2015-10-26 17:12:23 UTC) #23
xidachen
Hi everyone, I did a sync to the most recent code base today and my ...
5 years, 1 month ago (2015-10-26 19:04:07 UTC) #24
xidachen
https://codereview.chromium.org/1409243005/diff/140001/third_party/WebKit/Source/bindings/core/v8/ScriptValueSerializer.cpp File third_party/WebKit/Source/bindings/core/v8/ScriptValueSerializer.cpp (right): https://codereview.chromium.org/1409243005/diff/140001/third_party/WebKit/Source/bindings/core/v8/ScriptValueSerializer.cpp#newcode2116 third_party/WebKit/Source/bindings/core/v8/ScriptValueSerializer.cpp:2116: bool ScriptValueDeserializer::tryGetTransferredImageBitmap(uint32_t index, v8::Local<v8::Value>* object) This is a bit ...
5 years, 1 month ago (2015-10-27 12:23:24 UTC) #25
haraken
https://codereview.chromium.org/1409243005/diff/140001/third_party/WebKit/Source/bindings/core/v8/ScriptValueSerializer.cpp File third_party/WebKit/Source/bindings/core/v8/ScriptValueSerializer.cpp (right): https://codereview.chromium.org/1409243005/diff/140001/third_party/WebKit/Source/bindings/core/v8/ScriptValueSerializer.cpp#newcode2116 third_party/WebKit/Source/bindings/core/v8/ScriptValueSerializer.cpp:2116: bool ScriptValueDeserializer::tryGetTransferredImageBitmap(uint32_t index, v8::Local<v8::Value>* object) On 2015/10/27 12:23:24, xidachen ...
5 years, 1 month ago (2015-10-27 13:10:33 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1409243005/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1409243005/160001
5 years, 1 month ago (2015-10-28 15:20:54 UTC) #29
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/126928)
5 years, 1 month ago (2015-10-28 15:28:58 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1409243005/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1409243005/160001
5 years, 1 month ago (2015-10-28 15:49:16 UTC) #33
commit-bot: I haz the power
Committed patchset #9 (id:160001)
5 years, 1 month ago (2015-10-28 17:19:15 UTC) #34
commit-bot: I haz the power
Patchset 9 (id:??) landed as https://crrev.com/5d8ed50933226127fdc64744d86ab3d9b7d57276 Cr-Commit-Position: refs/heads/master@{#356575}
5 years, 1 month ago (2015-10-28 17:19:57 UTC) #35
sof
See https://storage.googleapis.com/chromium-layout-test-archives/WebKit_Linux_Oilpan_Leak/14727/layout-test-results/results.html for some relevant crashes. https://codereview.chromium.org/1409243005/diff/160001/third_party/WebKit/Source/bindings/core/v8/SerializedScriptValue.h File third_party/WebKit/Source/bindings/core/v8/SerializedScriptValue.h (right): https://codereview.chromium.org/1409243005/diff/160001/third_party/WebKit/Source/bindings/core/v8/SerializedScriptValue.h#newcode130 third_party/WebKit/Source/bindings/core/v8/SerializedScriptValue.h:130: OwnPtrWillBePersistent<ImageBitmapArray> m_imageBitmapsArray; How ...
5 years, 1 month ago (2015-10-28 21:44:13 UTC) #36
sof
+Cc: oilpan-reviews@
5 years, 1 month ago (2015-10-29 12:27:42 UTC) #37
xidachen
A revert of this CL (patchset #9 id:160001) has been created in https://codereview.chromium.org/1413723004/ by xidachen@chromium.org. ...
5 years, 1 month ago (2015-10-29 14:20:13 UTC) #38
Justin Novosad
On 2015/10/29 14:20:13, xidachen wrote: > A revert of this CL (patchset #9 id:160001) has ...
5 years, 1 month ago (2015-10-29 14:49:52 UTC) #39
sof
On 2015/10/29 14:49:52, Justin Novosad wrote: > On 2015/10/29 14:20:13, xidachen wrote: > > A ...
5 years, 1 month ago (2015-10-29 15:57:15 UTC) #40
xidachen
5 years, 1 month ago (2015-10-29 16:08:32 UTC) #41
Message was sent while issue was closed.
> I do hope that's feasible (but noticed m_imageElement on ImageBitmap, which
> seemed to survive the transfer.)
> 

This is a good point. I am trying to remove the m_imageElement, that would
simplify things as well.

Powered by Google App Engine
This is Rietveld 408576698