|
Make OffscreenCanvas Transferable
At this moment, an offscreenCanvas could have an associated HTMLCanvasElement,
and we maintain a WeakPtr to that. Per discussion with esprehn@,
we change the strategy such that an offscreenCanvas holds a int which
is the DOMNodeId for its associated HTMLCanvasElement.
This change makes offscreenCanvas transferable much easier. In particular,
we just need to pass three int to deserializer, which are width, height
and DOMNodeId of for an offscreenCanvas.
A kayout test is included to test its correctness. The layout test
includes several things:
1). Transfer an offscreenCanvas to worker and transfer it back to main,
the width and height attributes should not change.
2). After transfer, the width/height should be 0.
3). Transfer a neutered offscreenCanvas should throw an exception.
4). After getting the offscreenCanvas back from the worker, call getContext('2d')
should work just fine.
5). Transfer an offscreenCanvas after calling getContext('2d')
should throw an exception.
BUG= 563845
Committed: https://crrev.com/47d06d097019e79f4f9a56068e086033ac72dba0
Cr-Commit-Position: refs/heads/master@{#388780}
Total comments: 14
Total comments: 9
Total comments: 23
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+415 lines, -72 lines) |
Patch |
|
A |
third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-transferable.html
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
1 chunk |
+37 lines, -0 lines |
0 comments
|
Download
|
|
A |
third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-transferable-exceptions.html
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
1 chunk |
+54 lines, -0 lines |
0 comments
|
Download
|
|
A |
third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-transferable-exceptions-expected.txt
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
1 chunk |
+15 lines, -0 lines |
0 comments
|
Download
|
|
A |
third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-transferable-expected.txt
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
1 chunk |
+15 lines, -0 lines |
0 comments
|
Download
|
|
A |
third_party/WebKit/LayoutTests/fast/canvas/resources/OffscreenCanvas-transferable.js
|
View
|
1
2
3
4
5
|
1 chunk |
+3 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
9
10
11
12
|
3 chunks |
+3 lines, -1 line |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/bindings/core/v8/ScriptValueSerializer.cpp
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/bindings/core/v8/SerializationTag.h
|
View
|
1
2
3
4
5
6
7
|
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
7
8
9
10
11
12
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/bindings/core/v8/SerializedScriptValue.cpp
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
2 chunks |
+3 lines, -36 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/bindings/core/v8/SerializedScriptValueFactory.h
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
2 chunks |
+3 lines, -1 line |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/bindings/core/v8/SerializedScriptValueFactory.cpp
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
4 chunks |
+48 lines, -2 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/bindings/core/v8/Transferables.h
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
1 chunk |
+4 lines, -5 lines |
0 comments
|
Download
|
|
A |
third_party/WebKit/Source/bindings/core/v8/Transferables.cpp
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
1 chunk |
+20 lines, -0 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/bindings/core/v8/custom/V8WindowCustom.cpp
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
2 chunks |
+4 lines, -4 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/bindings/core/v8/v8.gypi
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/bindings/modules/v8/ScriptValueSerializerForModules.h
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
3 chunks |
+8 lines, -1 line |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/bindings/modules/v8/ScriptValueSerializerForModules.cpp
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
6 chunks |
+70 lines, -2 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/bindings/modules/v8/SerializedScriptValueForModulesFactory.h
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
2 chunks |
+5 lines, -0 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/bindings/modules/v8/SerializedScriptValueForModulesFactory.cpp
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
4 chunks |
+47 lines, -1 line |
0 comments
|
Download
|
|
A |
third_party/WebKit/Source/bindings/modules/v8/TransferablesForModules.h
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
13
|
1 chunk |
+31 lines, -0 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/bindings/modules/v8/v8.gypi
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/bindings/templates/methods.cpp
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
1 chunk |
+4 lines, -4 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/bindings/tests/results/core/V8TestObject.cpp
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
1 chunk |
+4 lines, -4 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/modules/canvas/HTMLCanvasElementModule.cpp
|
View
|
1
2
3
4
5
6
7
|
2 chunks |
+2 lines, -1 line |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/modules/canvas/HTMLCanvasElementModuleTest.cpp
|
View
|
1
2
3
4
5
6
7
|
2 chunks |
+3 lines, -2 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/modules/offscreencanvas/OffscreenCanvas.h
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
2 chunks |
+7 lines, -4 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/modules/offscreencanvas/OffscreenCanvas.cpp
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
4 chunks |
+19 lines, -2 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/modules/offscreencanvas/OffscreenCanvas.idl
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
Total messages: 32 (15 generated)
|