WebKit Bugzilla
Attachment 371120 Details for
Bug 198459
: Web Inspector: Canvas: split recording tests into separate files so they don't timeout
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-198459-20190601122708.patch (text/plain), 326.71 KB, created by
Devin Rousso
on 2019-06-01 12:27:09 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Devin Rousso
Created:
2019-06-01 12:27:09 PDT
Size:
326.71 KB
patch
obsolete
>diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index b258c5f1e81b1816d2352e9ec20a12d430b87628..e0f7972dd3c5b1335e73cb05a112a56a4cfefb5a 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,69 @@ >+2019-06-01 Devin Rousso <drousso@apple.com> >+ >+ Web Inspector: Canvas: split recording tests into separate files so they don't timeout >+ https://bugs.webkit.org/show_bug.cgi?id=198459 >+ <rdar://problem/51332026> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * inspector/canvas/recording.html: >+ * inspector/canvas/recording-expected.txt: >+ >+ * inspector/canvas/recording-2d.html: Removed. >+ * inspector/canvas/recording-2d-expected.txt: Removed. >+ * inspector/canvas/console-record-2d.html: Added. >+ * inspector/canvas/console-record-2d-expected.txt: Added. >+ * inspector/canvas/recording-2d-frameCount.html: Added. >+ * inspector/canvas/recording-2d-frameCount-expected.txt: Added. >+ * inspector/canvas/recording-2d-full.html: Added. >+ * inspector/canvas/recording-2d-full-expected.txt: Added. >+ * inspector/canvas/recording-2d-memoryLimit.html: Added. >+ * inspector/canvas/recording-2d-memoryLimit-expected.txt: Added. >+ * inspector/canvas/recording-2d-saves.html: Added. >+ * inspector/canvas/recording-2d-saves-expected.txt: Added. >+ * inspector/canvas/resources/recording-2d.js: Added. >+ >+ * inspector/canvas/recording-bitmaprenderer.html: Removed. >+ * inspector/canvas/recording-bitmaprenderer-expected.txt: Removed. >+ * inspector/canvas/console-record-bitmaprenderer.html: Added. >+ * inspector/canvas/console-record-bitmaprenderer-expected.txt: Added. >+ * inspector/canvas/recording-bitmaprenderer-frameCount.html: Added. >+ * inspector/canvas/recording-bitmaprenderer-frameCount-expected.txt: Added. >+ * inspector/canvas/recording-bitmaprenderer-full.html: Added. >+ * inspector/canvas/recording-bitmaprenderer-full-expected.txt: Added. >+ * inspector/canvas/recording-bitmaprenderer-memoryLimit.html: Added. >+ * inspector/canvas/recording-bitmaprenderer-memoryLimit-expected.txt: Added. >+ * inspector/canvas/resources/recording-bitmaprenderer.js: Added. >+ >+ * inspector/canvas/recording-webgl.html: Removed. >+ * inspector/canvas/recording-webgl-expected.txt: Removed. >+ * inspector/canvas/console-record-webgl.html: Added. >+ * inspector/canvas/console-record-webgl-expected.txt: Added. >+ * inspector/canvas/recording-webgl-frameCount.html: Added. >+ * inspector/canvas/recording-webgl-frameCount-expected.txt: Added. >+ * inspector/canvas/recording-webgl-full.html: Added. >+ * inspector/canvas/recording-webgl-full-expected.txt: Added. >+ * inspector/canvas/recording-webgl-memoryLimit.html: Added. >+ * inspector/canvas/recording-webgl-memoryLimit-expected.txt: Added. >+ * inspector/canvas/resources/recording-webgl.js: Added. >+ >+ * inspector/canvas/recording-webgl2.html: Removed. >+ * inspector/canvas/recording-webgl2-expected.txt: Removed. >+ * inspector/canvas/console-record-webgl2.html: Added. >+ * inspector/canvas/console-record-webgl2-expected.txt: Added. >+ * inspector/canvas/recording-webgl2-frameCount.html: Added. >+ * inspector/canvas/recording-webgl2-frameCount-expected.txt: Added. >+ * inspector/canvas/recording-webgl2-full.html: Added. >+ * inspector/canvas/recording-webgl2-full-expected.txt: Added. >+ * inspector/canvas/recording-webgl2-memoryLimit.html: Added. >+ * inspector/canvas/recording-webgl2-memoryLimit-expected.txt: Added. >+ * inspector/canvas/resources/recording-webgl2.js: Added. >+ >+ * TestExpectations: >+ * platform/gtk/TestExpectations: >+ * platform/mac/TestExpectations: >+ * platform/win/TestExpectations: >+ > 2019-05-31 Wenson Hsieh <wenson_hsieh@apple.com> > > Make tests that use UIHelper more robust under certain configurations >diff --git a/LayoutTests/TestExpectations b/LayoutTests/TestExpectations >index d9293c2a516e0e5a35a3d0fe7e6d1ccf706ec4e2..9febe3dc3d495f2568fe5d711e603c2a7f623041 100644 >--- a/LayoutTests/TestExpectations >+++ b/LayoutTests/TestExpectations >@@ -537,9 +537,6 @@ webkit.org/b/134982 inspector/debugger/setBreakpoint-dfg-and-modify-local.html [ > > # This test is fast enough in release but quite slow in debug builds. > [ Debug ] inspector/debugger/debugger-stack-overflow.html [ Skip ] >-[ Debug ] inspector/canvas/recording-2d.html [ Slow ] >-[ Debug ] inspector/canvas/recording-webgl.html [ Slow ] >-[ Debug ] inspector/canvas/recording-webgl2.html [ Slow ] > > # Debugger stepping tests can timeout if they run slowly due to a short timer scheduled in the frontend. > webkit.org/b/161951 [ Debug ] inspector/debugger/paused-scopes.html [ Skip ] >diff --git a/LayoutTests/inspector/canvas/console-record-2d-expected.txt b/LayoutTests/inspector/canvas/console-record-2d-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..27545f351984ec001d1d93b72421cb1e21d2cf06 >--- /dev/null >+++ b/LayoutTests/inspector/canvas/console-record-2d-expected.txt >@@ -0,0 +1,9 @@ >+Test that CanvasManager is able to record actions made to 2D canvas contexts. >+ >+ >+== Running test suite: Canvas.recording2D >+-- Running test case: Canvas.recording2D.Console >+PASS: The recording should have the name "TEST". >+PASS: The recording should have one frame. >+PASS: The first frame should have one action. >+ >diff --git a/LayoutTests/inspector/canvas/console-record-2d.html b/LayoutTests/inspector/canvas/console-record-2d.html >new file mode 100644 >index 0000000000000000000000000000000000000000..af6a43b0de31bb0abd87daef1dceae3ba33bbbb4 >--- /dev/null >+++ b/LayoutTests/inspector/canvas/console-record-2d.html >@@ -0,0 +1,26 @@ >+<!DOCTYPE html> >+<html> >+<head> >+<script src="../../http/tests/inspector/resources/inspector-test.js"></script> >+<script src="resources/recording-utilities.js"></script> >+<script src="resources/recording-2d.js"></script> >+<script> >+function test() { >+ let suite = InspectorTest.createAsyncSuite("Canvas.recording2D"); >+ >+ suite.addTestCase({ >+ name: "Canvas.recording2D.Console", >+ description: "Check that a recording can be triggered by console.record().", >+ test(resolve, reject) { >+ consoleRecord(WI.Canvas.ContextType.Canvas2D, resolve, reject); >+ }, >+ }); >+ >+ suite.runTestCasesAndFinish(); >+} >+</script> >+</head> >+<body onload="load()"> >+ <p>Test that CanvasManager is able to record actions made to 2D canvas contexts.</p> >+</body> >+</html> >diff --git a/LayoutTests/inspector/canvas/console-record-bitmaprenderer-expected.txt b/LayoutTests/inspector/canvas/console-record-bitmaprenderer-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..13ef4dce43bb69b3d0c5771eaa221279aa7b47c6 >--- /dev/null >+++ b/LayoutTests/inspector/canvas/console-record-bitmaprenderer-expected.txt >@@ -0,0 +1,9 @@ >+Test that CanvasManager is able to record actions made to BitmapRenderer canvas contexts. >+ >+ >+== Running test suite: Canvas.recordingBitmapRenderer >+-- Running test case: Canvas.recordingBitmapRenderer.Console >+PASS: The recording should have the name "TEST". >+PASS: The recording should have one frame. >+PASS: The first frame should have one action. >+ >diff --git a/LayoutTests/inspector/canvas/console-record-bitmaprenderer.html b/LayoutTests/inspector/canvas/console-record-bitmaprenderer.html >new file mode 100644 >index 0000000000000000000000000000000000000000..01240d62bda4285ae6d2413deed30b1c49a7d686 >--- /dev/null >+++ b/LayoutTests/inspector/canvas/console-record-bitmaprenderer.html >@@ -0,0 +1,26 @@ >+<!DOCTYPE html> >+<html> >+<head> >+<script src="../../http/tests/inspector/resources/inspector-test.js"></script> >+<script src="resources/recording-utilities.js"></script> >+<script src="resources/recording-bitmaprenderer.js"></script> >+<script> >+function test() { >+ let suite = InspectorTest.createAsyncSuite("Canvas.recordingBitmapRenderer"); >+ >+ suite.addTestCase({ >+ name: "Canvas.recordingBitmapRenderer.Console", >+ description: "Check that a recording can be triggered by console.record().", >+ test(resolve, reject) { >+ consoleRecord(WI.Canvas.ContextType.BitmapRenderer, resolve, reject); >+ }, >+ }); >+ >+ suite.runTestCasesAndFinish(); >+} >+</script> >+</head> >+<body onload="load()"> >+ <p>Test that CanvasManager is able to record actions made to BitmapRenderer canvas contexts.</p> >+</body> >+</html> >diff --git a/LayoutTests/inspector/canvas/console-record-webgl-expected.txt b/LayoutTests/inspector/canvas/console-record-webgl-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..61abc97b7f9f9ae20f5425b602cbdc3d539b785e >--- /dev/null >+++ b/LayoutTests/inspector/canvas/console-record-webgl-expected.txt >@@ -0,0 +1,9 @@ >+Test that CanvasManager is able to record actions made to WebGL canvas contexts. >+ >+ >+== Running test suite: Canvas.recordingWebGL >+-- Running test case: Canvas.recordingWebGL.Console >+PASS: The recording should have the name "TEST". >+PASS: The recording should have one frame. >+PASS: The first frame should have one action. >+ >diff --git a/LayoutTests/inspector/canvas/console-record-webgl.html b/LayoutTests/inspector/canvas/console-record-webgl.html >new file mode 100644 >index 0000000000000000000000000000000000000000..32f559bbac24d8913b4021253d8ccb7d96935ab2 >--- /dev/null >+++ b/LayoutTests/inspector/canvas/console-record-webgl.html >@@ -0,0 +1,40 @@ >+<!DOCTYPE html> >+<html> >+<head> >+<script src="../../http/tests/inspector/resources/inspector-test.js"></script> >+<script src="resources/recording-utilities.js"></script> >+<script src="resources/shaderProgram-utilities.js"></script> >+<script id="vertex-shader" type="x-shader/x-vertex"> >+ attribute vec4 test; >+ void main(void) { >+ gl_Position = test; >+ } >+</script> >+<script id="fragment-shader" type="x-shader/x-fragment"> >+ precision mediump float; >+ >+ void main(void) { >+ gl_FragColor = vec4(1.0, 1.0, 1.0, 1.0); >+ } >+</script> >+<script src="resources/recording-webgl.js"></script> >+<script> >+function test() { >+ let suite = InspectorTest.createAsyncSuite("Canvas.recordingWebGL"); >+ >+ suite.addTestCase({ >+ name: "Canvas.recordingWebGL.Console", >+ description: "Check that a recording can be triggered by console.record().", >+ test(resolve, reject) { >+ consoleRecord(WI.Canvas.ContextType.WebGL, resolve, reject); >+ }, >+ }); >+ >+ suite.runTestCasesAndFinish(); >+} >+</script> >+</head> >+<body onload="load()"> >+ <p>Test that CanvasManager is able to record actions made to WebGL canvas contexts.</p> >+</body> >+</html> >diff --git a/LayoutTests/inspector/canvas/console-record-webgl2-expected.txt b/LayoutTests/inspector/canvas/console-record-webgl2-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..276efdd44ada93dd8fc123438419f2aa22b360c8 >--- /dev/null >+++ b/LayoutTests/inspector/canvas/console-record-webgl2-expected.txt >@@ -0,0 +1,9 @@ >+Test that CanvasManager is able to record actions made to WebGL2 canvas contexts. >+ >+ >+== Running test suite: Canvas.recordingWebGL2 >+-- Running test case: Canvas.recordingWebGL2.Console >+PASS: The recording should have the name "TEST". >+PASS: The recording should have one frame. >+PASS: The first frame should have one action. >+ >diff --git a/LayoutTests/inspector/canvas/console-record-webgl2.html b/LayoutTests/inspector/canvas/console-record-webgl2.html >new file mode 100644 >index 0000000000000000000000000000000000000000..13e1a01e57bb01812a87a3fa84e22b5098e8cfbc >--- /dev/null >+++ b/LayoutTests/inspector/canvas/console-record-webgl2.html >@@ -0,0 +1,40 @@ >+<!DOCTYPE html> >+<html> >+<head> >+<script src="../../http/tests/inspector/resources/inspector-test.js"></script> >+<script src="resources/recording-utilities.js"></script> >+<script src="resources/shaderProgram-utilities.js"></script> >+<script id="vertex-shader" type="x-shader/x-vertex"> >+ attribute vec4 test; >+ void main(void) { >+ gl_Position = test; >+ } >+</script> >+<script id="fragment-shader" type="x-shader/x-fragment"> >+ precision mediump float; >+ >+ void main(void) { >+ gl_FragColor = vec4(1.0, 1.0, 1.0, 1.0); >+ } >+</script> >+<script src="resources/recording-webgl2.js"></script> >+<script> >+function test() { >+ let suite = InspectorTest.createAsyncSuite("Canvas.recordingWebGL2"); >+ >+ suite.addTestCase({ >+ name: "Canvas.recordingWebGL2.Console", >+ description: "Check that a recording can be triggered by console.record().", >+ test(resolve, reject) { >+ consoleRecord(WI.Canvas.ContextType.WebGL2, resolve, reject); >+ }, >+ }); >+ >+ suite.runTestCasesAndFinish(); >+} >+</script> >+</head> >+<body onload="load()"> >+ <p>Test that CanvasManager is able to record actions made to WebGL2 canvas contexts.</p> >+</body> >+</html> >diff --git a/LayoutTests/inspector/canvas/recording-2d-expected.txt b/LayoutTests/inspector/canvas/recording-2d-expected.txt >deleted file mode 100644 >index 50229d1a99f4c2ae8130135b323a5563091e82fb..0000000000000000000000000000000000000000 >--- a/LayoutTests/inspector/canvas/recording-2d-expected.txt >+++ /dev/null >@@ -1,1158 +0,0 @@ >-Test that CanvasManager is able to record actions made to 2D canvas contexts. >- >- >-== Running test suite: Canvas.recording2D >--- Running test case: Canvas.recording2D.singleFrame >-initialState: >- attributes: >- width: 2 >- height: 2 >- current state: >- setTransform: [[1,0,0,1,0,0]] >- globalAlpha: 1 >- globalCompositeOperation: "source-over" >- lineWidth: 1 >- lineCap: "butt" >- lineJoin: "miter" >- miterLimit: 10 >- shadowOffsetX: 0 >- shadowOffsetY: 0 >- shadowBlur: 0 >- shadowColor: "rgba(0, 0, 0, 0)" >- setLineDash: [[]] >- lineDashOffset: 0 >- font: "10px sans-serif" >- textAlign: "start" >- textBaseline: "alphabetic" >- direction: "ltr" >- strokeStyle: "#000000" >- fillStyle: "#000000" >- imageSmoothingEnabled: true >- imageSmoothingQuality: "low" >- setPath: [""] >- parameters: >- content: <filtered> >-frames: >- 0: (duration) >- 0: arc(1, 2, 3, 4, 5, false) >- swizzleTypes: [Number, Number, Number, Number, Number, Boolean] >- trace: >- 0: arc >- 1: (anonymous function) >- 2: ignoreException >- 3: (anonymous function) >- 4: executeFrameFunction >- 5: performActions >- 6: Global Code >- 7: evaluateWithScopeExtension >- 8: (anonymous function) >- 9: _wrapCall >- 1: arc(6, 7, 8, 9, 10, true) >- swizzleTypes: [Number, Number, Number, Number, Number, Boolean] >- trace: >- 0: arc >- 1: (anonymous function) >- 2: ignoreException >- 3: (anonymous function) >- 4: executeFrameFunction >- 5: performActions >- 6: Global Code >- 7: evaluateWithScopeExtension >- 8: (anonymous function) >- 9: _wrapCall >- >--- Running test case: Canvas.recording2D.multipleFrames >-initialState: >- attributes: >- width: 2 >- height: 2 >- current state: >- setTransform: [[1,0,0,1,0,0]] >- globalAlpha: 1 >- globalCompositeOperation: "source-over" >- lineWidth: 1 >- lineCap: "butt" >- lineJoin: "miter" >- miterLimit: 10 >- shadowOffsetX: 0 >- shadowOffsetY: 0 >- shadowBlur: 0 >- shadowColor: "rgba(0, 0, 0, 0)" >- setLineDash: [[]] >- lineDashOffset: 0 >- font: "10px sans-serif" >- textAlign: "start" >- textBaseline: "alphabetic" >- direction: "ltr" >- strokeStyle: "#000000" >- fillStyle: "#000000" >- imageSmoothingEnabled: true >- imageSmoothingQuality: "low" >- setPath: [""] >- parameters: >- content: <filtered> >-frames: >- 0: (duration) >- 0: arc(1, 2, 3, 4, 5, false) >- swizzleTypes: [Number, Number, Number, Number, Number, Boolean] >- trace: >- 0: arc >- 1: (anonymous function) >- 2: ignoreException >- 3: (anonymous function) >- 4: executeFrameFunction >- 5: performActions >- 6: Global Code >- 7: evaluateWithScopeExtension >- 8: (anonymous function) >- 9: _wrapCall >- 1: arc(6, 7, 8, 9, 10, true) >- swizzleTypes: [Number, Number, Number, Number, Number, Boolean] >- trace: >- 0: arc >- 1: (anonymous function) >- 2: ignoreException >- 3: (anonymous function) >- 4: executeFrameFunction >- 5: performActions >- 6: Global Code >- 7: evaluateWithScopeExtension >- 8: (anonymous function) >- 9: _wrapCall >- 1: (duration) >- 0: arcTo(1, 2, 3, 4, 5) >- swizzleTypes: [Number, Number, Number, Number, Number] >- trace: >- 0: arcTo >- 1: (anonymous function) >- 2: ignoreException >- 3: (anonymous function) >- 4: executeFrameFunction >- 2: (duration) >- 0: beginPath() >- trace: >- 0: beginPath >- 1: (anonymous function) >- 2: executeFrameFunction >- 3: (duration) >- 0: bezierCurveTo(1, 2, 3, 4, 5, 6) >- swizzleTypes: [Number, Number, Number, Number, Number, Number] >- trace: >- 0: bezierCurveTo >- 1: (anonymous function) >- 2: executeFrameFunction >- 4: (duration) >- 0: clearRect(1, 2, 3, 4) >- swizzleTypes: [Number, Number, Number, Number] >- trace: >- 0: clearRect >- 1: (anonymous function) >- 2: executeFrameFunction >- 5: (duration) >- 0: clearShadow() >- trace: >- 0: clearShadow >- 1: (anonymous function) >- 2: executeFrameFunction >- 6: (duration) >- 0: clip("nonzero") >- swizzleTypes: [String] >- trace: >- 0: clip >- 1: (anonymous function) >- 2: executeFrameFunction >- 1: clip("evenodd") >- swizzleTypes: [String] >- trace: >- 0: clip >- 1: (anonymous function) >- 2: executeFrameFunction >- 2: clip([object Path2D], "nonzero") >- swizzleTypes: [Path2D, String] >- trace: >- 0: clip >- 1: (anonymous function) >- 2: executeFrameFunction >- 3: clip([object Path2D], "evenodd") >- swizzleTypes: [Path2D, String] >- trace: >- 0: clip >- 1: (anonymous function) >- 2: executeFrameFunction >- 7: (duration) >- 0: closePath() >- trace: >- 0: closePath >- 1: (anonymous function) >- 2: executeFrameFunction >- 8: (duration) >- 0: createImageData([object ImageData]) >- swizzleTypes: [ImageData] >- trace: >- 0: createImageData >- 1: (anonymous function) >- 2: ignoreException >- 3: (anonymous function) >- 4: executeFrameFunction >- 1: createImageData(2, 3) >- swizzleTypes: [Number, Number] >- trace: >- 0: createImageData >- 1: (anonymous function) >- 2: ignoreException >- 3: (anonymous function) >- 4: executeFrameFunction >- 9: (duration) >- 0: createLinearGradient(1, 2, 3, 4) >- swizzleTypes: [Number, Number, Number, Number] >- trace: >- 0: createLinearGradient >- 1: (anonymous function) >- 2: ignoreException >- 3: (anonymous function) >- 4: executeFrameFunction >- 10: (duration) >- 0: createPattern([object HTMLImageElement], "testA") >- swizzleTypes: [Image, String] >- trace: >- 0: createPattern >- 1: (anonymous function) >- 2: ignoreException >- 3: (anonymous function) >- 4: executeFrameFunction >- 1: createPattern([object HTMLImageElement], "testB") >- swizzleTypes: [Image, String] >- trace: >- 0: createPattern >- 1: (anonymous function) >- 2: ignoreException >- 3: (anonymous function) >- 4: executeFrameFunction >- 2: createPattern([object HTMLImageElement], "testC") >- swizzleTypes: [Image, String] >- trace: >- 0: createPattern >- 1: (anonymous function) >- 2: ignoreException >- 3: (anonymous function) >- 4: executeFrameFunction >- 3: createPattern([object ImageBitmap], "testD") >- swizzleTypes: [ImageBitmap, String] >- trace: >- 0: createPattern >- 1: (anonymous function) >- 2: ignoreException >- 3: (anonymous function) >- 4: executeFrameFunction >- 11: (duration) >- 0: createRadialGradient(1, 2, 3, 4, 5, 6) >- swizzleTypes: [Number, Number, Number, Number, Number, Number] >- trace: >- 0: createRadialGradient >- 1: (anonymous function) >- 2: ignoreException >- 3: (anonymous function) >- 4: executeFrameFunction >- 12: (duration) >- 0: direction >- trace: >- 0: (anonymous function) >- 1: executeFrameFunction >- 13: (duration) >- 0: drawFocusIfNeeded("Element") >- swizzleTypes: [None] >- trace: >- 0: drawFocusIfNeeded >- 1: (anonymous function) >- 2: executeFrameFunction >- 1: drawFocusIfNeeded([object Path2D], "Element") >- swizzleTypes: [Path2D, None] >- trace: >- 0: drawFocusIfNeeded >- 1: (anonymous function) >- 2: executeFrameFunction >- 14: (duration) >- 0: drawImage([object HTMLImageElement], 11, 12) >- swizzleTypes: [Image, Number, Number] >- trace: >- 0: drawImage >- 1: (anonymous function) >- 2: ignoreException >- 3: (anonymous function) >- 4: executeFrameFunction >- 1: drawImage([object HTMLImageElement], 13, 14, 15, 16) >- swizzleTypes: [Image, Number, Number, Number, Number] >- trace: >- 0: drawImage >- 1: (anonymous function) >- 2: ignoreException >- 3: (anonymous function) >- 4: executeFrameFunction >- 2: drawImage([object HTMLImageElement], 17, 18, 19, 110, 111, 112, 113, 114) >- swizzleTypes: [Image, Number, Number, Number, Number, Number, Number, Number, Number] >- trace: >- 0: drawImage >- 1: (anonymous function) >- 2: ignoreException >- 3: (anonymous function) >- 4: executeFrameFunction >- 3: drawImage([object HTMLImageElement], 21, 22) >- swizzleTypes: [Image, Number, Number] >- trace: >- 0: drawImage >- 1: (anonymous function) >- 2: ignoreException >- 3: (anonymous function) >- 4: executeFrameFunction >- 4: drawImage([object HTMLImageElement], 23, 24, 25, 26) >- swizzleTypes: [Image, Number, Number, Number, Number] >- trace: >- 0: drawImage >- 1: (anonymous function) >- 2: ignoreException >- 3: (anonymous function) >- 4: executeFrameFunction >- 5: drawImage([object HTMLImageElement], 27, 28, 29, 210, 211, 212, 213, 214) >- swizzleTypes: [Image, Number, Number, Number, Number, Number, Number, Number, Number] >- trace: >- 0: drawImage >- 1: (anonymous function) >- 2: ignoreException >- 3: (anonymous function) >- 4: executeFrameFunction >- 6: drawImage([object HTMLImageElement], 31, 32) >- swizzleTypes: [Image, Number, Number] >- trace: >- 0: drawImage >- 1: (anonymous function) >- 2: ignoreException >- 3: (anonymous function) >- 4: executeFrameFunction >- 7: drawImage([object HTMLImageElement], 33, 34, 35, 36) >- swizzleTypes: [Image, Number, Number, Number, Number] >- trace: >- 0: drawImage >- 1: (anonymous function) >- 2: ignoreException >- 3: (anonymous function) >- 4: executeFrameFunction >- 8: drawImage([object HTMLImageElement], 37, 38, 39, 310, 311, 312, 313, 314) >- swizzleTypes: [Image, Number, Number, Number, Number, Number, Number, Number, Number] >- trace: >- 0: drawImage >- 1: (anonymous function) >- 2: ignoreException >- 3: (anonymous function) >- 4: executeFrameFunction >- 9: drawImage([object ImageBitmap], 41, 42) >- swizzleTypes: [ImageBitmap, Number, Number] >- trace: >- 0: drawImage >- 1: (anonymous function) >- 2: ignoreException >- 3: (anonymous function) >- 4: executeFrameFunction >- 10: drawImage([object ImageBitmap], 43, 44, 45, 46) >- swizzleTypes: [ImageBitmap, Number, Number, Number, Number] >- trace: >- 0: drawImage >- 1: (anonymous function) >- 2: ignoreException >- 3: (anonymous function) >- 4: executeFrameFunction >- 11: drawImage([object ImageBitmap], 47, 48, 49, 410, 411, 412, 413, 414) >- swizzleTypes: [ImageBitmap, Number, Number, Number, Number, Number, Number, Number, Number] >- trace: >- 0: drawImage >- 1: (anonymous function) >- 2: ignoreException >- 3: (anonymous function) >- 4: executeFrameFunction >- 15: (duration) >- 0: drawImageFromRect([object HTMLImageElement], 1, 2, 3, 4, 5, 6, 7, 8, "") >- swizzleTypes: [Image, Number, Number, Number, Number, Number, Number, Number, Number, String] >- trace: >- 0: drawImageFromRect >- 1: (anonymous function) >- 2: executeFrameFunction >- 1: drawImageFromRect([object HTMLImageElement], 9, 10, 11, 12, 13, 14, 15, 16, "test") >- swizzleTypes: [Image, Number, Number, Number, Number, Number, Number, Number, Number, String] >- trace: >- 0: drawImageFromRect >- 1: (anonymous function) >- 2: executeFrameFunction >- 16: (duration) >- 0: ellipse(1, 2, 3, 4, 5, 6, 7, false) >- swizzleTypes: [Number, Number, Number, Number, Number, Number, Number, Boolean] >- trace: >- 0: ellipse >- 1: (anonymous function) >- 2: ignoreException >- 3: (anonymous function) >- 4: executeFrameFunction >- 1: ellipse(8, 9, 10, 11, 12, 13, 14, true) >- swizzleTypes: [Number, Number, Number, Number, Number, Number, Number, Boolean] >- trace: >- 0: ellipse >- 1: (anonymous function) >- 2: ignoreException >- 3: (anonymous function) >- 4: executeFrameFunction >- 17: (duration) >- 0: fill("nonzero") >- swizzleTypes: [String] >- trace: >- 0: fill >- 1: (anonymous function) >- 2: executeFrameFunction >- 1: fill("evenodd") >- swizzleTypes: [String] >- trace: >- 0: fill >- 1: (anonymous function) >- 2: executeFrameFunction >- 2: fill([object Path2D], "nonzero") >- swizzleTypes: [Path2D, String] >- trace: >- 0: fill >- 1: (anonymous function) >- 2: executeFrameFunction >- 3: fill([object Path2D], "evenodd") >- swizzleTypes: [Path2D, String] >- trace: >- 0: fill >- 1: (anonymous function) >- 2: executeFrameFunction >- 18: (duration) >- 0: fillRect(1, 2, 3, 4) >- swizzleTypes: [Number, Number, Number, Number] >- trace: >- 0: fillRect >- 1: (anonymous function) >- 2: executeFrameFunction >- 19: (duration) >- 0: fillStyle >- trace: >- 0: (anonymous function) >- 1: executeFrameFunction >- 1: fillStyle = "test" >- swizzleTypes: [String] >- trace: >- 0: (anonymous function) >- 1: executeFrameFunction >- 2: fillStyle = [object CanvasGradient] >- swizzleTypes: [CanvasGradient] >- trace: >- 0: (anonymous function) >- 1: executeFrameFunction >- 3: fillStyle = [object CanvasGradient] >- swizzleTypes: [CanvasGradient] >- trace: >- 0: (anonymous function) >- 1: executeFrameFunction >- 4: fillStyle = [object CanvasPattern] >- swizzleTypes: [CanvasPattern] >- trace: >- 0: (anonymous function) >- 1: executeFrameFunction >- 20: (duration) >- 0: fillText("testA", 1, 2) >- swizzleTypes: [String, Number, Number] >- trace: >- 0: fillText >- 1: (anonymous function) >- 2: executeFrameFunction >- 1: fillText("testB", 3, 4, 5) >- swizzleTypes: [String, Number, Number, Number] >- trace: >- 0: fillText >- 1: (anonymous function) >- 2: executeFrameFunction >- 21: (duration) >- 0: font >- trace: >- 0: (anonymous function) >- 1: executeFrameFunction >- 1: font = "test" >- swizzleTypes: [String] >- trace: >- 0: (anonymous function) >- 1: executeFrameFunction >- 22: (duration) >- 0: getImageData(1, 2, 3, 4) >- swizzleTypes: [Number, Number, Number, Number] >- trace: >- 0: getImageData >- 1: (anonymous function) >- 2: ignoreException >- 3: (anonymous function) >- 4: executeFrameFunction >- 23: (duration) >- 0: getLineDash() >- trace: >- 0: getLineDash >- 1: (anonymous function) >- 2: executeFrameFunction >- 24: (duration) >- 0: getTransform() >- trace: >- 0: getTransform >- 1: (anonymous function) >- 2: executeFrameFunction >- 25: (duration) >- 0: globalAlpha >- trace: >- 0: (anonymous function) >- 1: executeFrameFunction >- 1: globalAlpha = 0 >- swizzleTypes: [Number] >- trace: >- 0: (anonymous function) >- 1: executeFrameFunction >- 26: (duration) >- 0: globalCompositeOperation >- trace: >- 0: (anonymous function) >- 1: executeFrameFunction >- 1: globalCompositeOperation = "test" >- swizzleTypes: [String] >- trace: >- 0: (anonymous function) >- 1: executeFrameFunction >- 27: (duration) >- 0: imageSmoothingEnabled >- trace: >- 0: (anonymous function) >- 1: executeFrameFunction >- 1: imageSmoothingEnabled = true >- swizzleTypes: [Boolean] >- trace: >- 0: (anonymous function) >- 1: executeFrameFunction >- 28: (duration) >- 0: imageSmoothingQuality >- trace: >- 0: (anonymous function) >- 1: executeFrameFunction >- 1: imageSmoothingQuality = "low" >- swizzleTypes: [String] >- trace: >- 0: (anonymous function) >- 1: executeFrameFunction >- 29: (duration) >- 0: isPointInPath([object Path2D], 5, 6, "nonzero") >- swizzleTypes: [Path2D, Number, Number, String] >- trace: >- 0: isPointInPath >- 1: (anonymous function) >- 2: executeFrameFunction >- 1: isPointInPath([object Path2D], 7, 8, "evenodd") >- swizzleTypes: [Path2D, Number, Number, String] >- trace: >- 0: isPointInPath >- 1: (anonymous function) >- 2: executeFrameFunction >- 2: isPointInPath(9, 10, "nonzero") >- swizzleTypes: [Number, Number, String] >- trace: >- 0: isPointInPath >- 1: (anonymous function) >- 2: executeFrameFunction >- 3: isPointInPath(11, 12, "evenodd") >- swizzleTypes: [Number, Number, String] >- trace: >- 0: isPointInPath >- 1: (anonymous function) >- 2: executeFrameFunction >- 30: (duration) >- 0: isPointInStroke([object Path2D], 3, 4) >- swizzleTypes: [Path2D, Number, Number] >- trace: >- 0: isPointInStroke >- 1: (anonymous function) >- 2: executeFrameFunction >- 1: isPointInStroke(5, 6) >- swizzleTypes: [Number, Number] >- trace: >- 0: isPointInStroke >- 1: (anonymous function) >- 2: executeFrameFunction >- 31: (duration) >- 0: lineCap >- trace: >- 0: (anonymous function) >- 1: executeFrameFunction >- 32: (duration) >- 0: lineDashOffset >- trace: >- 0: (anonymous function) >- 1: executeFrameFunction >- 1: lineDashOffset = 1 >- swizzleTypes: [Number] >- trace: >- 0: (anonymous function) >- 1: executeFrameFunction >- 33: (duration) >- 0: lineJoin >- trace: >- 0: (anonymous function) >- 1: executeFrameFunction >- 34: (duration) >- 0: lineTo(1, 2) >- swizzleTypes: [Number, Number] >- trace: >- 0: lineTo >- 1: (anonymous function) >- 2: executeFrameFunction >- 35: (duration) >- 0: lineWidth >- trace: >- 0: (anonymous function) >- 1: executeFrameFunction >- 1: lineWidth = 1 >- swizzleTypes: [Number] >- trace: >- 0: (anonymous function) >- 1: executeFrameFunction >- 36: (duration) >- 0: measureText("test") >- swizzleTypes: [String] >- trace: >- 0: measureText >- 1: (anonymous function) >- 2: executeFrameFunction >- 37: (duration) >- 0: miterLimit >- trace: >- 0: (anonymous function) >- 1: executeFrameFunction >- 1: miterLimit = 1 >- swizzleTypes: [Number] >- trace: >- 0: (anonymous function) >- 1: executeFrameFunction >- 38: (duration) >- 0: moveTo(1, 2) >- swizzleTypes: [Number, Number] >- trace: >- 0: moveTo >- 1: (anonymous function) >- 2: executeFrameFunction >- 39: (duration) >- 0: putImageData([object ImageData], 5, 6) >- swizzleTypes: [ImageData, Number, Number] >- trace: >- 0: putImageData >- 1: (anonymous function) >- 2: executeFrameFunction >- 1: putImageData([object ImageData], 7, 8, 9, 10, 11, 12) >- swizzleTypes: [ImageData, Number, Number, Number, Number, Number, Number] >- trace: >- 0: putImageData >- 1: (anonymous function) >- 2: executeFrameFunction >- 40: (duration) >- 0: quadraticCurveTo(1, 2, 3, 4) >- swizzleTypes: [Number, Number, Number, Number] >- trace: >- 0: quadraticCurveTo >- 1: (anonymous function) >- 2: executeFrameFunction >- 41: (duration) >- 0: rect(1, 2, 3, 4) >- swizzleTypes: [Number, Number, Number, Number] >- trace: >- 0: rect >- 1: (anonymous function) >- 2: executeFrameFunction >- 42: (duration) >- 0: resetTransform() >- trace: >- 0: resetTransform >- 1: (anonymous function) >- 2: executeFrameFunction >- 43: (duration) >- 0: restore() >- trace: >- 0: restore >- 1: (anonymous function) >- 2: executeFrameFunction >- 44: (duration) >- 0: rotate(1) >- swizzleTypes: [Number] >- trace: >- 0: rotate >- 1: (anonymous function) >- 2: executeFrameFunction >- 45: (duration) >- 0: save() >- trace: >- 0: save >- 1: (anonymous function) >- 2: executeFrameFunction >- 46: (duration) >- 0: scale(1, 2) >- swizzleTypes: [Number, Number] >- trace: >- 0: scale >- 1: (anonymous function) >- 2: executeFrameFunction >- 47: (duration) >- 0: setAlpha(null) >- swizzleTypes: [Number] >- trace: >- 0: setAlpha >- 1: (anonymous function) >- 2: executeFrameFunction >- 1: setAlpha(1) >- swizzleTypes: [Number] >- trace: >- 0: setAlpha >- 1: (anonymous function) >- 2: executeFrameFunction >- 48: (duration) >- 0: setCompositeOperation("undefined") >- swizzleTypes: [String] >- trace: >- 0: setCompositeOperation >- 1: (anonymous function) >- 2: executeFrameFunction >- 1: setCompositeOperation("test") >- swizzleTypes: [String] >- trace: >- 0: setCompositeOperation >- 1: (anonymous function) >- 2: executeFrameFunction >- 49: (duration) >- 0: setFillColor("testA") >- swizzleTypes: [String] >- trace: >- 0: setFillColor >- 1: (anonymous function) >- 2: executeFrameFunction >- 1: setFillColor("testB", 1) >- swizzleTypes: [String, Number] >- trace: >- 0: setFillColor >- 1: (anonymous function) >- 2: executeFrameFunction >- 2: setFillColor(2, 1) >- swizzleTypes: [Number, Number] >- trace: >- 0: setFillColor >- 1: (anonymous function) >- 2: executeFrameFunction >- 3: setFillColor(3, 4) >- swizzleTypes: [Number, Number] >- trace: >- 0: setFillColor >- 1: (anonymous function) >- 2: executeFrameFunction >- 4: setFillColor(5, 6, 7, 8) >- swizzleTypes: [Number, Number, Number, Number] >- trace: >- 0: setFillColor >- 1: (anonymous function) >- 2: executeFrameFunction >- 5: setFillColor(9, 10, 11, 12, 13) >- swizzleTypes: [Number, Number, Number, Number, Number] >- trace: >- 0: setFillColor >- 1: (anonymous function) >- 2: executeFrameFunction >- 50: (duration) >- 0: setLineCap("undefined") >- swizzleTypes: [String] >- trace: >- 0: setLineCap >- 1: (anonymous function) >- 2: executeFrameFunction >- 1: setLineCap("test") >- swizzleTypes: [String] >- trace: >- 0: setLineCap >- 1: (anonymous function) >- 2: executeFrameFunction >- 51: (duration) >- 0: setLineDash([1,2]) >- swizzleTypes: [Array] >- trace: >- 0: setLineDash >- 1: (anonymous function) >- 2: executeFrameFunction >- 52: (duration) >- 0: setLineJoin("undefined") >- swizzleTypes: [String] >- trace: >- 0: setLineJoin >- 1: (anonymous function) >- 2: executeFrameFunction >- 1: setLineJoin("test") >- swizzleTypes: [String] >- trace: >- 0: setLineJoin >- 1: (anonymous function) >- 2: executeFrameFunction >- 53: (duration) >- 0: setLineWidth(null) >- swizzleTypes: [Number] >- trace: >- 0: setLineWidth >- 1: (anonymous function) >- 2: executeFrameFunction >- 1: setLineWidth(1) >- swizzleTypes: [Number] >- trace: >- 0: setLineWidth >- 1: (anonymous function) >- 2: executeFrameFunction >- 54: (duration) >- 0: setMiterLimit(null) >- swizzleTypes: [Number] >- trace: >- 0: setMiterLimit >- 1: (anonymous function) >- 2: executeFrameFunction >- 1: setMiterLimit(1) >- swizzleTypes: [Number] >- trace: >- 0: setMiterLimit >- 1: (anonymous function) >- 2: executeFrameFunction >- 55: (duration) >- 0: setShadow(1, 2, 3, "") >- swizzleTypes: [Number, Number, Number, String] >- trace: >- 0: setShadow >- 1: (anonymous function) >- 2: executeFrameFunction >- 1: setShadow(4, 5, 6, "test", 7) >- swizzleTypes: [Number, Number, Number, String, Number] >- trace: >- 0: setShadow >- 1: (anonymous function) >- 2: executeFrameFunction >- 2: setShadow(8, 9, 10, 11, 1) >- swizzleTypes: [Number, Number, Number, Number, Number] >- trace: >- 0: setShadow >- 1: (anonymous function) >- 2: executeFrameFunction >- 3: setShadow(12, 13, 14, 15, 16) >- swizzleTypes: [Number, Number, Number, Number, Number] >- trace: >- 0: setShadow >- 1: (anonymous function) >- 2: executeFrameFunction >- 4: setShadow(17, 18, 19, 20, 21, 22, 23) >- swizzleTypes: [Number, Number, Number, Number, Number, Number, Number] >- trace: >- 0: setShadow >- 1: (anonymous function) >- 2: executeFrameFunction >- 5: setShadow(24, 25, 26, 27, 28, 29, 30, 31) >- swizzleTypes: [Number, Number, Number, Number, Number, Number, Number, Number] >- trace: >- 0: setShadow >- 1: (anonymous function) >- 2: executeFrameFunction >- 56: (duration) >- 0: setStrokeColor("testA") >- swizzleTypes: [String] >- trace: >- 0: setStrokeColor >- 1: (anonymous function) >- 2: executeFrameFunction >- 1: setStrokeColor("testB", 1) >- swizzleTypes: [String, Number] >- trace: >- 0: setStrokeColor >- 1: (anonymous function) >- 2: executeFrameFunction >- 2: setStrokeColor(2, 1) >- swizzleTypes: [Number, Number] >- trace: >- 0: setStrokeColor >- 1: (anonymous function) >- 2: executeFrameFunction >- 3: setStrokeColor(3, 4) >- swizzleTypes: [Number, Number] >- trace: >- 0: setStrokeColor >- 1: (anonymous function) >- 2: executeFrameFunction >- 4: setStrokeColor(5, 6, 7, 8) >- swizzleTypes: [Number, Number, Number, Number] >- trace: >- 0: setStrokeColor >- 1: (anonymous function) >- 2: executeFrameFunction >- 5: setStrokeColor(9, 10, 11, 12, 13) >- swizzleTypes: [Number, Number, Number, Number, Number] >- trace: >- 0: setStrokeColor >- 1: (anonymous function) >- 2: executeFrameFunction >- 57: (duration) >- 0: setTransform(1, 2, 3, 4, 5, 6) >- swizzleTypes: [Number, Number, Number, Number, Number, Number] >- trace: >- 0: setTransform >- 1: (anonymous function) >- 2: executeFrameFunction >- 1: setTransform(matrix(1, 0, 0, 1, 0, 0)) >- swizzleTypes: [DOMMatrix] >- trace: >- 0: setTransform >- 1: (anonymous function) >- 2: ignoreException >- 3: (anonymous function) >- 4: executeFrameFunction >- 2: setTransform(matrix(7, 8, 9, 10, 11, 12)) >- swizzleTypes: [DOMMatrix] >- trace: >- 0: setTransform >- 1: (anonymous function) >- 2: ignoreException >- 3: (anonymous function) >- 4: executeFrameFunction >- 58: (duration) >- 0: shadowBlur >- trace: >- 0: (anonymous function) >- 1: executeFrameFunction >- 1: shadowBlur = 1 >- swizzleTypes: [Number] >- trace: >- 0: (anonymous function) >- 1: executeFrameFunction >- 59: (duration) >- 0: shadowColor >- trace: >- 0: (anonymous function) >- 1: executeFrameFunction >- 1: shadowColor = "test" >- swizzleTypes: [String] >- trace: >- 0: (anonymous function) >- 1: executeFrameFunction >- 60: (duration) >- 0: shadowOffsetX >- trace: >- 0: (anonymous function) >- 1: executeFrameFunction >- 1: shadowOffsetX = 1 >- swizzleTypes: [Number] >- trace: >- 0: (anonymous function) >- 1: executeFrameFunction >- 61: (duration) >- 0: shadowOffsetY >- trace: >- 0: (anonymous function) >- 1: executeFrameFunction >- 1: shadowOffsetY = 1 >- swizzleTypes: [Number] >- trace: >- 0: (anonymous function) >- 1: executeFrameFunction >- 62: (duration) >- 0: stroke() >- trace: >- 0: stroke >- 1: (anonymous function) >- 2: executeFrameFunction >- 1: stroke([object Path2D]) >- swizzleTypes: [Path2D] >- trace: >- 0: stroke >- 1: (anonymous function) >- 2: executeFrameFunction >- 63: (duration) >- 0: strokeRect(1, 2, 3, 4) >- swizzleTypes: [Number, Number, Number, Number] >- trace: >- 0: strokeRect >- 1: (anonymous function) >- 2: executeFrameFunction >- 64: (duration) >- 0: strokeStyle >- trace: >- 0: (anonymous function) >- 1: executeFrameFunction >- 1: strokeStyle = "test" >- swizzleTypes: [String] >- trace: >- 0: (anonymous function) >- 1: executeFrameFunction >- 2: strokeStyle = [object CanvasGradient] >- swizzleTypes: [CanvasGradient] >- trace: >- 0: (anonymous function) >- 1: executeFrameFunction >- 3: strokeStyle = [object CanvasGradient] >- swizzleTypes: [CanvasGradient] >- trace: >- 0: (anonymous function) >- 1: executeFrameFunction >- 4: strokeStyle = [object CanvasPattern] >- swizzleTypes: [CanvasPattern] >- trace: >- 0: (anonymous function) >- 1: executeFrameFunction >- 65: (duration) >- 0: strokeText("testA", 1, 2) >- swizzleTypes: [String, Number, Number] >- trace: >- 0: strokeText >- 1: (anonymous function) >- 2: executeFrameFunction >- 1: strokeText("testB", 3, 4, 5) >- swizzleTypes: [String, Number, Number, Number] >- trace: >- 0: strokeText >- 1: (anonymous function) >- 2: executeFrameFunction >- 66: (duration) >- 0: textAlign >- trace: >- 0: (anonymous function) >- 1: executeFrameFunction >- 67: (duration) >- 0: textBaseline >- trace: >- 0: (anonymous function) >- 1: executeFrameFunction >- 68: (duration) >- 0: transform(1, 2, 3, 4, 5, 6) >- swizzleTypes: [Number, Number, Number, Number, Number, Number] >- trace: >- 0: transform >- 1: (anonymous function) >- 2: executeFrameFunction >- 69: (duration) >- 0: translate(1, 2) >- swizzleTypes: [Number, Number] >- trace: >- 0: translate >- 1: (anonymous function) >- 2: executeFrameFunction >- 70: (duration) >- 0: webkitImageSmoothingEnabled >- trace: >- 0: (anonymous function) >- 1: executeFrameFunction >- 1: webkitImageSmoothingEnabled = true >- swizzleTypes: [Boolean] >- trace: >- 0: (anonymous function) >- 1: executeFrameFunction >- 71: (duration) >- 0: webkitLineDash >- trace: >- 0: (anonymous function) >- 1: executeFrameFunction >- 1: webkitLineDash = [1,2] >- swizzleTypes: [Array] >- trace: >- 0: (anonymous function) >- 1: executeFrameFunction >- 72: (duration) >- 0: webkitLineDashOffset >- trace: >- 0: (anonymous function) >- 1: executeFrameFunction >- 1: webkitLineDashOffset = 1 >- swizzleTypes: [Number] >- trace: >- 0: (anonymous function) >- 1: executeFrameFunction >- 73: (duration) >- 0: width >- trace: >- 0: (anonymous function) >- 1: executeFrameFunction >- 1: width = 2 >- swizzleTypes: [Number] >- trace: >- 0: (anonymous function) >- 1: executeFrameFunction >- 74: (duration) >- 0: height >- trace: >- 0: (anonymous function) >- 1: executeFrameFunction >- 1: height = 2 >- swizzleTypes: [Number] >- trace: >- 0: (anonymous function) >- 1: executeFrameFunction >- >--- Running test case: Canvas.recording2D.memoryLimit >-initialState: >- attributes: >- width: 2 >- height: 2 >- current state: >- setTransform: [[1,0,0,1,0,0]] >- globalAlpha: 1 >- globalCompositeOperation: "source-over" >- lineWidth: 1 >- lineCap: "butt" >- lineJoin: "miter" >- miterLimit: 10 >- shadowOffsetX: 0 >- shadowOffsetY: 0 >- shadowBlur: 0 >- shadowColor: "rgba(0, 0, 0, 0)" >- setLineDash: [[]] >- lineDashOffset: 0 >- font: "10px sans-serif" >- textAlign: "start" >- textBaseline: "alphabetic" >- direction: "ltr" >- strokeStyle: "#000000" >- fillStyle: "#000000" >- imageSmoothingEnabled: true >- imageSmoothingQuality: "low" >- setPath: [""] >- parameters: >- content: <filtered> >-frames: >- 0: (duration) (incomplete) >- 0: arc(1, 2, 3, 4, 5, false) >- swizzleTypes: [Number, Number, Number, Number, Number, Boolean] >- trace: >- 0: arc >- 1: (anonymous function) >- 2: ignoreException >- 3: (anonymous function) >- 4: executeFrameFunction >- 5: performActions >- 6: Global Code >- 7: evaluateWithScopeExtension >- 8: (anonymous function) >- 9: _wrapCall >- >--- Running test case: Canvas.recording2D.Console >-PASS: The recording should have the name "TEST". >-PASS: The recording should have one frame. >-PASS: The first frame should have one action. >- >--- Running test case: Canvas.recording2D.ActionParameterNaN >-PASS: The recording should have 1 frame. >-PASS: The first frame should have 1 action. >-PASS: The action should have 1 parameter. >-PASS: The parameter should be null. >- >--- Running test case: Canvas.recording2D.ExistingSaves >-PASS: There should be 4 existing states. >-PASS: State 0 should match expected fillStyle value. >-PASS: State 1 should match expected fillStyle value. >-PASS: State 2 should match expected fillStyle value. >-PASS: State 3 should match expected fillStyle value. >- >--- Running test case: Canvas.recording2D.NoActions >-PASS: A recording should have been started and stopped once. >-PASS: A recording should have been started and stopped twice. >- >diff --git a/LayoutTests/inspector/canvas/recording-2d-frameCount-expected.txt b/LayoutTests/inspector/canvas/recording-2d-frameCount-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..b5188055291099f05e0826de6d9dd9a933582c45 >--- /dev/null >+++ b/LayoutTests/inspector/canvas/recording-2d-frameCount-expected.txt >@@ -0,0 +1,63 @@ >+Test that CanvasManager is able to record actions made to 2D canvas contexts. >+ >+ >+== Running test suite: Canvas.recording2D >+-- Running test case: Canvas.recording2D.singleFrame >+initialState: >+ attributes: >+ width: 2 >+ height: 2 >+ current state: >+ setTransform: [[1,0,0,1,0,0]] >+ globalAlpha: 1 >+ globalCompositeOperation: "source-over" >+ lineWidth: 1 >+ lineCap: "butt" >+ lineJoin: "miter" >+ miterLimit: 10 >+ shadowOffsetX: 0 >+ shadowOffsetY: 0 >+ shadowBlur: 0 >+ shadowColor: "rgba(0, 0, 0, 0)" >+ setLineDash: [[]] >+ lineDashOffset: 0 >+ font: "10px sans-serif" >+ textAlign: "start" >+ textBaseline: "alphabetic" >+ direction: "ltr" >+ strokeStyle: "#000000" >+ fillStyle: "#000000" >+ imageSmoothingEnabled: true >+ imageSmoothingQuality: "low" >+ setPath: [""] >+ parameters: >+ content: <filtered> >+frames: >+ 0: (duration) >+ 0: arc(1, 2, 3, 4, 5, false) >+ swizzleTypes: [Number, Number, Number, Number, Number, Boolean] >+ trace: >+ 0: arc >+ 1: (anonymous function) >+ 2: ignoreException >+ 3: (anonymous function) >+ 4: executeFrameFunction >+ 5: performActions >+ 6: Global Code >+ 7: evaluateWithScopeExtension >+ 8: (anonymous function) >+ 9: _wrapCall >+ 1: arc(6, 7, 8, 9, 10, true) >+ swizzleTypes: [Number, Number, Number, Number, Number, Boolean] >+ trace: >+ 0: arc >+ 1: (anonymous function) >+ 2: ignoreException >+ 3: (anonymous function) >+ 4: executeFrameFunction >+ 5: performActions >+ 6: Global Code >+ 7: evaluateWithScopeExtension >+ 8: (anonymous function) >+ 9: _wrapCall >+ >diff --git a/LayoutTests/inspector/canvas/recording-2d-frameCount.html b/LayoutTests/inspector/canvas/recording-2d-frameCount.html >new file mode 100644 >index 0000000000000000000000000000000000000000..1319def7ad99dad5b8cacceb6ec3432e0d1f1c04 >--- /dev/null >+++ b/LayoutTests/inspector/canvas/recording-2d-frameCount.html >@@ -0,0 +1,27 @@ >+<!DOCTYPE html> >+<html> >+<head> >+<script src="../../http/tests/inspector/resources/inspector-test.js"></script> >+<script src="resources/recording-utilities.js"></script> >+<script src="resources/recording-2d.js"></script> >+<script> >+function test() { >+ let suite = InspectorTest.createAsyncSuite("Canvas.recording2D"); >+ >+ suite.addTestCase({ >+ name: "Canvas.recording2D.singleFrame", >+ description: "Check that the recording is stopped after a single frame.", >+ test(resolve, reject) { >+ startRecording(WI.Canvas.ContextType.Canvas2D, resolve, reject, {frameCount: 1}); >+ }, >+ timeout: -1, >+ }); >+ >+ suite.runTestCasesAndFinish(); >+} >+</script> >+</head> >+<body onload="load()"> >+ <p>Test that CanvasManager is able to record actions made to 2D canvas contexts.</p> >+</body> >+</html> >diff --git a/LayoutTests/inspector/canvas/recording-2d-full-expected.txt b/LayoutTests/inspector/canvas/recording-2d-full-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..b7168a471660d2dd05b860d06e554da535499117 >--- /dev/null >+++ b/LayoutTests/inspector/canvas/recording-2d-full-expected.txt >@@ -0,0 +1,1031 @@ >+Test that CanvasManager is able to record actions made to 2D canvas contexts. >+ >+ >+== Running test suite: Canvas.recording2D >+-- Running test case: Canvas.recording2D.multipleFrames >+initialState: >+ attributes: >+ width: 2 >+ height: 2 >+ current state: >+ setTransform: [[1,0,0,1,0,0]] >+ globalAlpha: 1 >+ globalCompositeOperation: "source-over" >+ lineWidth: 1 >+ lineCap: "butt" >+ lineJoin: "miter" >+ miterLimit: 10 >+ shadowOffsetX: 0 >+ shadowOffsetY: 0 >+ shadowBlur: 0 >+ shadowColor: "rgba(0, 0, 0, 0)" >+ setLineDash: [[]] >+ lineDashOffset: 0 >+ font: "10px sans-serif" >+ textAlign: "start" >+ textBaseline: "alphabetic" >+ direction: "ltr" >+ strokeStyle: "#000000" >+ fillStyle: "#000000" >+ imageSmoothingEnabled: true >+ imageSmoothingQuality: "low" >+ setPath: [""] >+ parameters: >+ content: <filtered> >+frames: >+ 0: (duration) >+ 0: arc(1, 2, 3, 4, 5, false) >+ swizzleTypes: [Number, Number, Number, Number, Number, Boolean] >+ trace: >+ 0: arc >+ 1: (anonymous function) >+ 2: ignoreException >+ 3: (anonymous function) >+ 4: executeFrameFunction >+ 5: performActions >+ 6: Global Code >+ 7: evaluateWithScopeExtension >+ 8: (anonymous function) >+ 9: _wrapCall >+ 1: arc(6, 7, 8, 9, 10, true) >+ swizzleTypes: [Number, Number, Number, Number, Number, Boolean] >+ trace: >+ 0: arc >+ 1: (anonymous function) >+ 2: ignoreException >+ 3: (anonymous function) >+ 4: executeFrameFunction >+ 5: performActions >+ 6: Global Code >+ 7: evaluateWithScopeExtension >+ 8: (anonymous function) >+ 9: _wrapCall >+ 1: (duration) >+ 0: arcTo(1, 2, 3, 4, 5) >+ swizzleTypes: [Number, Number, Number, Number, Number] >+ trace: >+ 0: arcTo >+ 1: (anonymous function) >+ 2: ignoreException >+ 3: (anonymous function) >+ 4: executeFrameFunction >+ 2: (duration) >+ 0: beginPath() >+ trace: >+ 0: beginPath >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 3: (duration) >+ 0: bezierCurveTo(1, 2, 3, 4, 5, 6) >+ swizzleTypes: [Number, Number, Number, Number, Number, Number] >+ trace: >+ 0: bezierCurveTo >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 4: (duration) >+ 0: clearRect(1, 2, 3, 4) >+ swizzleTypes: [Number, Number, Number, Number] >+ trace: >+ 0: clearRect >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 5: (duration) >+ 0: clearShadow() >+ trace: >+ 0: clearShadow >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 6: (duration) >+ 0: clip("nonzero") >+ swizzleTypes: [String] >+ trace: >+ 0: clip >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 1: clip("evenodd") >+ swizzleTypes: [String] >+ trace: >+ 0: clip >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 2: clip([object Path2D], "nonzero") >+ swizzleTypes: [Path2D, String] >+ trace: >+ 0: clip >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 3: clip([object Path2D], "evenodd") >+ swizzleTypes: [Path2D, String] >+ trace: >+ 0: clip >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 7: (duration) >+ 0: closePath() >+ trace: >+ 0: closePath >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 8: (duration) >+ 0: createImageData([object ImageData]) >+ swizzleTypes: [ImageData] >+ trace: >+ 0: createImageData >+ 1: (anonymous function) >+ 2: ignoreException >+ 3: (anonymous function) >+ 4: executeFrameFunction >+ 1: createImageData(2, 3) >+ swizzleTypes: [Number, Number] >+ trace: >+ 0: createImageData >+ 1: (anonymous function) >+ 2: ignoreException >+ 3: (anonymous function) >+ 4: executeFrameFunction >+ 9: (duration) >+ 0: createLinearGradient(1, 2, 3, 4) >+ swizzleTypes: [Number, Number, Number, Number] >+ trace: >+ 0: createLinearGradient >+ 1: (anonymous function) >+ 2: ignoreException >+ 3: (anonymous function) >+ 4: executeFrameFunction >+ 10: (duration) >+ 0: createPattern([object HTMLImageElement], "testA") >+ swizzleTypes: [Image, String] >+ trace: >+ 0: createPattern >+ 1: (anonymous function) >+ 2: ignoreException >+ 3: (anonymous function) >+ 4: executeFrameFunction >+ 1: createPattern([object HTMLImageElement], "testB") >+ swizzleTypes: [Image, String] >+ trace: >+ 0: createPattern >+ 1: (anonymous function) >+ 2: ignoreException >+ 3: (anonymous function) >+ 4: executeFrameFunction >+ 2: createPattern([object HTMLImageElement], "testC") >+ swizzleTypes: [Image, String] >+ trace: >+ 0: createPattern >+ 1: (anonymous function) >+ 2: ignoreException >+ 3: (anonymous function) >+ 4: executeFrameFunction >+ 3: createPattern([object ImageBitmap], "testD") >+ swizzleTypes: [ImageBitmap, String] >+ trace: >+ 0: createPattern >+ 1: (anonymous function) >+ 2: ignoreException >+ 3: (anonymous function) >+ 4: executeFrameFunction >+ 11: (duration) >+ 0: createRadialGradient(1, 2, 3, 4, 5, 6) >+ swizzleTypes: [Number, Number, Number, Number, Number, Number] >+ trace: >+ 0: createRadialGradient >+ 1: (anonymous function) >+ 2: ignoreException >+ 3: (anonymous function) >+ 4: executeFrameFunction >+ 12: (duration) >+ 0: direction >+ trace: >+ 0: (anonymous function) >+ 1: executeFrameFunction >+ 13: (duration) >+ 0: drawFocusIfNeeded("Element") >+ swizzleTypes: [None] >+ trace: >+ 0: drawFocusIfNeeded >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 1: drawFocusIfNeeded([object Path2D], "Element") >+ swizzleTypes: [Path2D, None] >+ trace: >+ 0: drawFocusIfNeeded >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 14: (duration) >+ 0: drawImage([object HTMLImageElement], 11, 12) >+ swizzleTypes: [Image, Number, Number] >+ trace: >+ 0: drawImage >+ 1: (anonymous function) >+ 2: ignoreException >+ 3: (anonymous function) >+ 4: executeFrameFunction >+ 1: drawImage([object HTMLImageElement], 13, 14, 15, 16) >+ swizzleTypes: [Image, Number, Number, Number, Number] >+ trace: >+ 0: drawImage >+ 1: (anonymous function) >+ 2: ignoreException >+ 3: (anonymous function) >+ 4: executeFrameFunction >+ 2: drawImage([object HTMLImageElement], 17, 18, 19, 110, 111, 112, 113, 114) >+ swizzleTypes: [Image, Number, Number, Number, Number, Number, Number, Number, Number] >+ trace: >+ 0: drawImage >+ 1: (anonymous function) >+ 2: ignoreException >+ 3: (anonymous function) >+ 4: executeFrameFunction >+ 3: drawImage([object HTMLImageElement], 21, 22) >+ swizzleTypes: [Image, Number, Number] >+ trace: >+ 0: drawImage >+ 1: (anonymous function) >+ 2: ignoreException >+ 3: (anonymous function) >+ 4: executeFrameFunction >+ 4: drawImage([object HTMLImageElement], 23, 24, 25, 26) >+ swizzleTypes: [Image, Number, Number, Number, Number] >+ trace: >+ 0: drawImage >+ 1: (anonymous function) >+ 2: ignoreException >+ 3: (anonymous function) >+ 4: executeFrameFunction >+ 5: drawImage([object HTMLImageElement], 27, 28, 29, 210, 211, 212, 213, 214) >+ swizzleTypes: [Image, Number, Number, Number, Number, Number, Number, Number, Number] >+ trace: >+ 0: drawImage >+ 1: (anonymous function) >+ 2: ignoreException >+ 3: (anonymous function) >+ 4: executeFrameFunction >+ 6: drawImage([object HTMLImageElement], 31, 32) >+ swizzleTypes: [Image, Number, Number] >+ trace: >+ 0: drawImage >+ 1: (anonymous function) >+ 2: ignoreException >+ 3: (anonymous function) >+ 4: executeFrameFunction >+ 7: drawImage([object HTMLImageElement], 33, 34, 35, 36) >+ swizzleTypes: [Image, Number, Number, Number, Number] >+ trace: >+ 0: drawImage >+ 1: (anonymous function) >+ 2: ignoreException >+ 3: (anonymous function) >+ 4: executeFrameFunction >+ 8: drawImage([object HTMLImageElement], 37, 38, 39, 310, 311, 312, 313, 314) >+ swizzleTypes: [Image, Number, Number, Number, Number, Number, Number, Number, Number] >+ trace: >+ 0: drawImage >+ 1: (anonymous function) >+ 2: ignoreException >+ 3: (anonymous function) >+ 4: executeFrameFunction >+ 9: drawImage([object ImageBitmap], 41, 42) >+ swizzleTypes: [ImageBitmap, Number, Number] >+ trace: >+ 0: drawImage >+ 1: (anonymous function) >+ 2: ignoreException >+ 3: (anonymous function) >+ 4: executeFrameFunction >+ 10: drawImage([object ImageBitmap], 43, 44, 45, 46) >+ swizzleTypes: [ImageBitmap, Number, Number, Number, Number] >+ trace: >+ 0: drawImage >+ 1: (anonymous function) >+ 2: ignoreException >+ 3: (anonymous function) >+ 4: executeFrameFunction >+ 11: drawImage([object ImageBitmap], 47, 48, 49, 410, 411, 412, 413, 414) >+ swizzleTypes: [ImageBitmap, Number, Number, Number, Number, Number, Number, Number, Number] >+ trace: >+ 0: drawImage >+ 1: (anonymous function) >+ 2: ignoreException >+ 3: (anonymous function) >+ 4: executeFrameFunction >+ 15: (duration) >+ 0: drawImageFromRect([object HTMLImageElement], 1, 2, 3, 4, 5, 6, 7, 8, "") >+ swizzleTypes: [Image, Number, Number, Number, Number, Number, Number, Number, Number, String] >+ trace: >+ 0: drawImageFromRect >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 1: drawImageFromRect([object HTMLImageElement], 9, 10, 11, 12, 13, 14, 15, 16, "test") >+ swizzleTypes: [Image, Number, Number, Number, Number, Number, Number, Number, Number, String] >+ trace: >+ 0: drawImageFromRect >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 16: (duration) >+ 0: ellipse(1, 2, 3, 4, 5, 6, 7, false) >+ swizzleTypes: [Number, Number, Number, Number, Number, Number, Number, Boolean] >+ trace: >+ 0: ellipse >+ 1: (anonymous function) >+ 2: ignoreException >+ 3: (anonymous function) >+ 4: executeFrameFunction >+ 1: ellipse(8, 9, 10, 11, 12, 13, 14, true) >+ swizzleTypes: [Number, Number, Number, Number, Number, Number, Number, Boolean] >+ trace: >+ 0: ellipse >+ 1: (anonymous function) >+ 2: ignoreException >+ 3: (anonymous function) >+ 4: executeFrameFunction >+ 17: (duration) >+ 0: fill("nonzero") >+ swizzleTypes: [String] >+ trace: >+ 0: fill >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 1: fill("evenodd") >+ swizzleTypes: [String] >+ trace: >+ 0: fill >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 2: fill([object Path2D], "nonzero") >+ swizzleTypes: [Path2D, String] >+ trace: >+ 0: fill >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 3: fill([object Path2D], "evenodd") >+ swizzleTypes: [Path2D, String] >+ trace: >+ 0: fill >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 18: (duration) >+ 0: fillRect(1, 2, 3, 4) >+ swizzleTypes: [Number, Number, Number, Number] >+ trace: >+ 0: fillRect >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 19: (duration) >+ 0: fillStyle >+ trace: >+ 0: (anonymous function) >+ 1: executeFrameFunction >+ 1: fillStyle = "test" >+ swizzleTypes: [String] >+ trace: >+ 0: (anonymous function) >+ 1: executeFrameFunction >+ 2: fillStyle = [object CanvasGradient] >+ swizzleTypes: [CanvasGradient] >+ trace: >+ 0: (anonymous function) >+ 1: executeFrameFunction >+ 3: fillStyle = [object CanvasGradient] >+ swizzleTypes: [CanvasGradient] >+ trace: >+ 0: (anonymous function) >+ 1: executeFrameFunction >+ 4: fillStyle = [object CanvasPattern] >+ swizzleTypes: [CanvasPattern] >+ trace: >+ 0: (anonymous function) >+ 1: executeFrameFunction >+ 20: (duration) >+ 0: fillText("testA", 1, 2) >+ swizzleTypes: [String, Number, Number] >+ trace: >+ 0: fillText >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 1: fillText("testB", 3, 4, 5) >+ swizzleTypes: [String, Number, Number, Number] >+ trace: >+ 0: fillText >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 21: (duration) >+ 0: font >+ trace: >+ 0: (anonymous function) >+ 1: executeFrameFunction >+ 1: font = "test" >+ swizzleTypes: [String] >+ trace: >+ 0: (anonymous function) >+ 1: executeFrameFunction >+ 22: (duration) >+ 0: getImageData(1, 2, 3, 4) >+ swizzleTypes: [Number, Number, Number, Number] >+ trace: >+ 0: getImageData >+ 1: (anonymous function) >+ 2: ignoreException >+ 3: (anonymous function) >+ 4: executeFrameFunction >+ 23: (duration) >+ 0: getLineDash() >+ trace: >+ 0: getLineDash >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 24: (duration) >+ 0: getTransform() >+ trace: >+ 0: getTransform >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 25: (duration) >+ 0: globalAlpha >+ trace: >+ 0: (anonymous function) >+ 1: executeFrameFunction >+ 1: globalAlpha = 0 >+ swizzleTypes: [Number] >+ trace: >+ 0: (anonymous function) >+ 1: executeFrameFunction >+ 26: (duration) >+ 0: globalCompositeOperation >+ trace: >+ 0: (anonymous function) >+ 1: executeFrameFunction >+ 1: globalCompositeOperation = "test" >+ swizzleTypes: [String] >+ trace: >+ 0: (anonymous function) >+ 1: executeFrameFunction >+ 27: (duration) >+ 0: imageSmoothingEnabled >+ trace: >+ 0: (anonymous function) >+ 1: executeFrameFunction >+ 1: imageSmoothingEnabled = true >+ swizzleTypes: [Boolean] >+ trace: >+ 0: (anonymous function) >+ 1: executeFrameFunction >+ 28: (duration) >+ 0: imageSmoothingQuality >+ trace: >+ 0: (anonymous function) >+ 1: executeFrameFunction >+ 1: imageSmoothingQuality = "low" >+ swizzleTypes: [String] >+ trace: >+ 0: (anonymous function) >+ 1: executeFrameFunction >+ 29: (duration) >+ 0: isPointInPath([object Path2D], 5, 6, "nonzero") >+ swizzleTypes: [Path2D, Number, Number, String] >+ trace: >+ 0: isPointInPath >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 1: isPointInPath([object Path2D], 7, 8, "evenodd") >+ swizzleTypes: [Path2D, Number, Number, String] >+ trace: >+ 0: isPointInPath >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 2: isPointInPath(9, 10, "nonzero") >+ swizzleTypes: [Number, Number, String] >+ trace: >+ 0: isPointInPath >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 3: isPointInPath(11, 12, "evenodd") >+ swizzleTypes: [Number, Number, String] >+ trace: >+ 0: isPointInPath >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 30: (duration) >+ 0: isPointInStroke([object Path2D], 3, 4) >+ swizzleTypes: [Path2D, Number, Number] >+ trace: >+ 0: isPointInStroke >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 1: isPointInStroke(5, 6) >+ swizzleTypes: [Number, Number] >+ trace: >+ 0: isPointInStroke >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 31: (duration) >+ 0: lineCap >+ trace: >+ 0: (anonymous function) >+ 1: executeFrameFunction >+ 32: (duration) >+ 0: lineDashOffset >+ trace: >+ 0: (anonymous function) >+ 1: executeFrameFunction >+ 1: lineDashOffset = 1 >+ swizzleTypes: [Number] >+ trace: >+ 0: (anonymous function) >+ 1: executeFrameFunction >+ 33: (duration) >+ 0: lineJoin >+ trace: >+ 0: (anonymous function) >+ 1: executeFrameFunction >+ 34: (duration) >+ 0: lineTo(1, 2) >+ swizzleTypes: [Number, Number] >+ trace: >+ 0: lineTo >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 35: (duration) >+ 0: lineWidth >+ trace: >+ 0: (anonymous function) >+ 1: executeFrameFunction >+ 1: lineWidth = 1 >+ swizzleTypes: [Number] >+ trace: >+ 0: (anonymous function) >+ 1: executeFrameFunction >+ 36: (duration) >+ 0: measureText("test") >+ swizzleTypes: [String] >+ trace: >+ 0: measureText >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 37: (duration) >+ 0: miterLimit >+ trace: >+ 0: (anonymous function) >+ 1: executeFrameFunction >+ 1: miterLimit = 1 >+ swizzleTypes: [Number] >+ trace: >+ 0: (anonymous function) >+ 1: executeFrameFunction >+ 38: (duration) >+ 0: moveTo(1, 2) >+ swizzleTypes: [Number, Number] >+ trace: >+ 0: moveTo >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 39: (duration) >+ 0: putImageData([object ImageData], 5, 6) >+ swizzleTypes: [ImageData, Number, Number] >+ trace: >+ 0: putImageData >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 1: putImageData([object ImageData], 7, 8, 9, 10, 11, 12) >+ swizzleTypes: [ImageData, Number, Number, Number, Number, Number, Number] >+ trace: >+ 0: putImageData >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 40: (duration) >+ 0: quadraticCurveTo(1, 2, 3, 4) >+ swizzleTypes: [Number, Number, Number, Number] >+ trace: >+ 0: quadraticCurveTo >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 41: (duration) >+ 0: rect(1, 2, 3, 4) >+ swizzleTypes: [Number, Number, Number, Number] >+ trace: >+ 0: rect >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 42: (duration) >+ 0: resetTransform() >+ trace: >+ 0: resetTransform >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 43: (duration) >+ 0: restore() >+ trace: >+ 0: restore >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 44: (duration) >+ 0: rotate(1) >+ swizzleTypes: [Number] >+ trace: >+ 0: rotate >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 45: (duration) >+ 0: save() >+ trace: >+ 0: save >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 46: (duration) >+ 0: scale(1, 2) >+ swizzleTypes: [Number, Number] >+ trace: >+ 0: scale >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 47: (duration) >+ 0: setAlpha(null) >+ swizzleTypes: [Number] >+ trace: >+ 0: setAlpha >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 1: setAlpha(1) >+ swizzleTypes: [Number] >+ trace: >+ 0: setAlpha >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 48: (duration) >+ 0: setCompositeOperation("undefined") >+ swizzleTypes: [String] >+ trace: >+ 0: setCompositeOperation >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 1: setCompositeOperation("test") >+ swizzleTypes: [String] >+ trace: >+ 0: setCompositeOperation >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 49: (duration) >+ 0: setFillColor("testA") >+ swizzleTypes: [String] >+ trace: >+ 0: setFillColor >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 1: setFillColor("testB", 1) >+ swizzleTypes: [String, Number] >+ trace: >+ 0: setFillColor >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 2: setFillColor(2, 1) >+ swizzleTypes: [Number, Number] >+ trace: >+ 0: setFillColor >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 3: setFillColor(3, 4) >+ swizzleTypes: [Number, Number] >+ trace: >+ 0: setFillColor >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 4: setFillColor(5, 6, 7, 8) >+ swizzleTypes: [Number, Number, Number, Number] >+ trace: >+ 0: setFillColor >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 5: setFillColor(9, 10, 11, 12, 13) >+ swizzleTypes: [Number, Number, Number, Number, Number] >+ trace: >+ 0: setFillColor >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 50: (duration) >+ 0: setLineCap("undefined") >+ swizzleTypes: [String] >+ trace: >+ 0: setLineCap >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 1: setLineCap("test") >+ swizzleTypes: [String] >+ trace: >+ 0: setLineCap >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 51: (duration) >+ 0: setLineDash([1,2]) >+ swizzleTypes: [Array] >+ trace: >+ 0: setLineDash >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 52: (duration) >+ 0: setLineJoin("undefined") >+ swizzleTypes: [String] >+ trace: >+ 0: setLineJoin >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 1: setLineJoin("test") >+ swizzleTypes: [String] >+ trace: >+ 0: setLineJoin >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 53: (duration) >+ 0: setLineWidth(null) >+ swizzleTypes: [Number] >+ trace: >+ 0: setLineWidth >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 1: setLineWidth(1) >+ swizzleTypes: [Number] >+ trace: >+ 0: setLineWidth >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 54: (duration) >+ 0: setMiterLimit(null) >+ swizzleTypes: [Number] >+ trace: >+ 0: setMiterLimit >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 1: setMiterLimit(1) >+ swizzleTypes: [Number] >+ trace: >+ 0: setMiterLimit >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 55: (duration) >+ 0: setShadow(1, 2, 3, "") >+ swizzleTypes: [Number, Number, Number, String] >+ trace: >+ 0: setShadow >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 1: setShadow(4, 5, 6, "test", 7) >+ swizzleTypes: [Number, Number, Number, String, Number] >+ trace: >+ 0: setShadow >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 2: setShadow(8, 9, 10, 11, 1) >+ swizzleTypes: [Number, Number, Number, Number, Number] >+ trace: >+ 0: setShadow >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 3: setShadow(12, 13, 14, 15, 16) >+ swizzleTypes: [Number, Number, Number, Number, Number] >+ trace: >+ 0: setShadow >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 4: setShadow(17, 18, 19, 20, 21, 22, 23) >+ swizzleTypes: [Number, Number, Number, Number, Number, Number, Number] >+ trace: >+ 0: setShadow >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 5: setShadow(24, 25, 26, 27, 28, 29, 30, 31) >+ swizzleTypes: [Number, Number, Number, Number, Number, Number, Number, Number] >+ trace: >+ 0: setShadow >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 56: (duration) >+ 0: setStrokeColor("testA") >+ swizzleTypes: [String] >+ trace: >+ 0: setStrokeColor >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 1: setStrokeColor("testB", 1) >+ swizzleTypes: [String, Number] >+ trace: >+ 0: setStrokeColor >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 2: setStrokeColor(2, 1) >+ swizzleTypes: [Number, Number] >+ trace: >+ 0: setStrokeColor >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 3: setStrokeColor(3, 4) >+ swizzleTypes: [Number, Number] >+ trace: >+ 0: setStrokeColor >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 4: setStrokeColor(5, 6, 7, 8) >+ swizzleTypes: [Number, Number, Number, Number] >+ trace: >+ 0: setStrokeColor >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 5: setStrokeColor(9, 10, 11, 12, 13) >+ swizzleTypes: [Number, Number, Number, Number, Number] >+ trace: >+ 0: setStrokeColor >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 57: (duration) >+ 0: setTransform(1, 2, 3, 4, 5, 6) >+ swizzleTypes: [Number, Number, Number, Number, Number, Number] >+ trace: >+ 0: setTransform >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 1: setTransform(matrix(1, 0, 0, 1, 0, 0)) >+ swizzleTypes: [DOMMatrix] >+ trace: >+ 0: setTransform >+ 1: (anonymous function) >+ 2: ignoreException >+ 3: (anonymous function) >+ 4: executeFrameFunction >+ 2: setTransform(matrix(7, 8, 9, 10, 11, 12)) >+ swizzleTypes: [DOMMatrix] >+ trace: >+ 0: setTransform >+ 1: (anonymous function) >+ 2: ignoreException >+ 3: (anonymous function) >+ 4: executeFrameFunction >+ 58: (duration) >+ 0: shadowBlur >+ trace: >+ 0: (anonymous function) >+ 1: executeFrameFunction >+ 1: shadowBlur = 1 >+ swizzleTypes: [Number] >+ trace: >+ 0: (anonymous function) >+ 1: executeFrameFunction >+ 59: (duration) >+ 0: shadowColor >+ trace: >+ 0: (anonymous function) >+ 1: executeFrameFunction >+ 1: shadowColor = "test" >+ swizzleTypes: [String] >+ trace: >+ 0: (anonymous function) >+ 1: executeFrameFunction >+ 60: (duration) >+ 0: shadowOffsetX >+ trace: >+ 0: (anonymous function) >+ 1: executeFrameFunction >+ 1: shadowOffsetX = 1 >+ swizzleTypes: [Number] >+ trace: >+ 0: (anonymous function) >+ 1: executeFrameFunction >+ 61: (duration) >+ 0: shadowOffsetY >+ trace: >+ 0: (anonymous function) >+ 1: executeFrameFunction >+ 1: shadowOffsetY = 1 >+ swizzleTypes: [Number] >+ trace: >+ 0: (anonymous function) >+ 1: executeFrameFunction >+ 62: (duration) >+ 0: stroke() >+ trace: >+ 0: stroke >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 1: stroke([object Path2D]) >+ swizzleTypes: [Path2D] >+ trace: >+ 0: stroke >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 63: (duration) >+ 0: strokeRect(1, 2, 3, 4) >+ swizzleTypes: [Number, Number, Number, Number] >+ trace: >+ 0: strokeRect >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 64: (duration) >+ 0: strokeStyle >+ trace: >+ 0: (anonymous function) >+ 1: executeFrameFunction >+ 1: strokeStyle = "test" >+ swizzleTypes: [String] >+ trace: >+ 0: (anonymous function) >+ 1: executeFrameFunction >+ 2: strokeStyle = [object CanvasGradient] >+ swizzleTypes: [CanvasGradient] >+ trace: >+ 0: (anonymous function) >+ 1: executeFrameFunction >+ 3: strokeStyle = [object CanvasGradient] >+ swizzleTypes: [CanvasGradient] >+ trace: >+ 0: (anonymous function) >+ 1: executeFrameFunction >+ 4: strokeStyle = [object CanvasPattern] >+ swizzleTypes: [CanvasPattern] >+ trace: >+ 0: (anonymous function) >+ 1: executeFrameFunction >+ 65: (duration) >+ 0: strokeText("testA", 1, 2) >+ swizzleTypes: [String, Number, Number] >+ trace: >+ 0: strokeText >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 1: strokeText("testB", 3, 4, 5) >+ swizzleTypes: [String, Number, Number, Number] >+ trace: >+ 0: strokeText >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 66: (duration) >+ 0: textAlign >+ trace: >+ 0: (anonymous function) >+ 1: executeFrameFunction >+ 67: (duration) >+ 0: textBaseline >+ trace: >+ 0: (anonymous function) >+ 1: executeFrameFunction >+ 68: (duration) >+ 0: transform(1, 2, 3, 4, 5, 6) >+ swizzleTypes: [Number, Number, Number, Number, Number, Number] >+ trace: >+ 0: transform >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 69: (duration) >+ 0: translate(1, 2) >+ swizzleTypes: [Number, Number] >+ trace: >+ 0: translate >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 70: (duration) >+ 0: webkitImageSmoothingEnabled >+ trace: >+ 0: (anonymous function) >+ 1: executeFrameFunction >+ 1: webkitImageSmoothingEnabled = true >+ swizzleTypes: [Boolean] >+ trace: >+ 0: (anonymous function) >+ 1: executeFrameFunction >+ 71: (duration) >+ 0: webkitLineDash >+ trace: >+ 0: (anonymous function) >+ 1: executeFrameFunction >+ 1: webkitLineDash = [1,2] >+ swizzleTypes: [Array] >+ trace: >+ 0: (anonymous function) >+ 1: executeFrameFunction >+ 72: (duration) >+ 0: webkitLineDashOffset >+ trace: >+ 0: (anonymous function) >+ 1: executeFrameFunction >+ 1: webkitLineDashOffset = 1 >+ swizzleTypes: [Number] >+ trace: >+ 0: (anonymous function) >+ 1: executeFrameFunction >+ 73: (duration) >+ 0: width >+ trace: >+ 0: (anonymous function) >+ 1: executeFrameFunction >+ 1: width = 2 >+ swizzleTypes: [Number] >+ trace: >+ 0: (anonymous function) >+ 1: executeFrameFunction >+ 74: (duration) >+ 0: height >+ trace: >+ 0: (anonymous function) >+ 1: executeFrameFunction >+ 1: height = 2 >+ swizzleTypes: [Number] >+ trace: >+ 0: (anonymous function) >+ 1: executeFrameFunction >+ >diff --git a/LayoutTests/inspector/canvas/recording-2d-full.html b/LayoutTests/inspector/canvas/recording-2d-full.html >new file mode 100644 >index 0000000000000000000000000000000000000000..9b78fdd2413d85daeee79628d651d2c2da4a53ae >--- /dev/null >+++ b/LayoutTests/inspector/canvas/recording-2d-full.html >@@ -0,0 +1,63 @@ >+<!DOCTYPE html> >+<html> >+<head> >+<script src="../../http/tests/inspector/resources/inspector-test.js"></script> >+<script src="resources/recording-utilities.js"></script> >+<script src="resources/recording-2d.js"></script> >+<script> >+function test() { >+ let suite = InspectorTest.createAsyncSuite("Canvas.recording2D"); >+ >+ suite.addTestCase({ >+ name: "Canvas.recording2D.ExistingSaves", >+ description: "Check that existing save calls are sent to the frontend.", >+ test(resolve, reject) { >+ let canvas = getCanvas(WI.Canvas.ContextType.Canvas2D); >+ if (!canvas) { >+ reject("Missing 2D canvas."); >+ return; >+ } >+ >+ async function logStates(recording) { >+ async function compare(index, expected) { >+ let state = await WI.RecordingState.swizzleInitialState(recording, recording.initialState.states[index]); >+ InspectorTest.expectEqual(state.get("fillStyle"), expected, `State ${index} should match expected fillStyle value.`) >+ } >+ >+ await compare(0, "#000000"); >+ await compare(1, "#ff0000"); >+ await compare(2, "#00ff00"); >+ await compare(3, "#0000ff"); >+ } >+ >+ canvas.awaitEvent(WI.Canvas.Event.RecordingStopped) >+ .then((event) => { >+ let {recording} = event.data; >+ >+ InspectorTest.expectEqual(recording.initialState.states.length, 4, "There should be 4 existing states."); >+ >+ logStates(recording) >+ .then(resolve, reject); >+ }); >+ >+ canvas.awaitEvent(WI.Canvas.Event.RecordingStarted) >+ .then((event) => { >+ InspectorTest.evaluateInPage(`performSavePostActions()`).catch(reject); >+ }); >+ >+ InspectorTest.evaluateInPage(`performSavePreActions()`) >+ .then(() => { >+ const frameCount = 1; >+ CanvasAgent.startRecording(canvas.identifier, frameCount).catch(reject); >+ }, reject); >+ }, >+ }); >+ >+ suite.runTestCasesAndFinish(); >+} >+</script> >+</head> >+<body onload="load()"> >+ <p>Test that CanvasManager is able to record actions made to 2D canvas contexts.</p> >+</body> >+</html> >diff --git a/LayoutTests/inspector/canvas/recording-2d-memoryLimit-expected.txt b/LayoutTests/inspector/canvas/recording-2d-memoryLimit-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..854b0e4ec99cb373ace55cedd457f4544da61a51 >--- /dev/null >+++ b/LayoutTests/inspector/canvas/recording-2d-memoryLimit-expected.txt >@@ -0,0 +1,50 @@ >+Test that CanvasManager is able to record actions made to 2D canvas contexts. >+ >+ >+== Running test suite: Canvas.recording2D >+-- Running test case: Canvas.recording2D.memoryLimit >+initialState: >+ attributes: >+ width: 2 >+ height: 2 >+ current state: >+ setTransform: [[1,0,0,1,0,0]] >+ globalAlpha: 1 >+ globalCompositeOperation: "source-over" >+ lineWidth: 1 >+ lineCap: "butt" >+ lineJoin: "miter" >+ miterLimit: 10 >+ shadowOffsetX: 0 >+ shadowOffsetY: 0 >+ shadowBlur: 0 >+ shadowColor: "rgba(0, 0, 0, 0)" >+ setLineDash: [[]] >+ lineDashOffset: 0 >+ font: "10px sans-serif" >+ textAlign: "start" >+ textBaseline: "alphabetic" >+ direction: "ltr" >+ strokeStyle: "#000000" >+ fillStyle: "#000000" >+ imageSmoothingEnabled: true >+ imageSmoothingQuality: "low" >+ setPath: [""] >+ parameters: >+ content: <filtered> >+frames: >+ 0: (duration) (incomplete) >+ 0: arc(1, 2, 3, 4, 5, false) >+ swizzleTypes: [Number, Number, Number, Number, Number, Boolean] >+ trace: >+ 0: arc >+ 1: (anonymous function) >+ 2: ignoreException >+ 3: (anonymous function) >+ 4: executeFrameFunction >+ 5: performActions >+ 6: Global Code >+ 7: evaluateWithScopeExtension >+ 8: (anonymous function) >+ 9: _wrapCall >+ >diff --git a/LayoutTests/inspector/canvas/recording-2d-memoryLimit.html b/LayoutTests/inspector/canvas/recording-2d-memoryLimit.html >new file mode 100644 >index 0000000000000000000000000000000000000000..af4cf948bcb949aba16329c75129cd5347996aac >--- /dev/null >+++ b/LayoutTests/inspector/canvas/recording-2d-memoryLimit.html >@@ -0,0 +1,27 @@ >+<!DOCTYPE html> >+<html> >+<head> >+<script src="../../http/tests/inspector/resources/inspector-test.js"></script> >+<script src="resources/recording-utilities.js"></script> >+<script src="resources/recording-2d.js"></script> >+<script> >+function test() { >+ let suite = InspectorTest.createAsyncSuite("Canvas.recording2D"); >+ >+ suite.addTestCase({ >+ name: "Canvas.recording2D.memoryLimit", >+ description: "Check that the recording is stopped when it reaches the memory limit.", >+ test(resolve, reject) { >+ startRecording(WI.Canvas.ContextType.Canvas2D, resolve, reject, {memoryLimit: 10}); >+ }, >+ timeout: -1, >+ }); >+ >+ suite.runTestCasesAndFinish(); >+} >+</script> >+</head> >+<body onload="load()"> >+ <p>Test that CanvasManager is able to record actions made to 2D canvas contexts.</p> >+</body> >+</html> >diff --git a/LayoutTests/inspector/canvas/recording-2d.html b/LayoutTests/inspector/canvas/recording-2d.html >deleted file mode 100644 >index a412029af66ea224705bcf99f6e02e5da3727b78..0000000000000000000000000000000000000000 >--- a/LayoutTests/inspector/canvas/recording-2d.html >+++ /dev/null >@@ -1,597 +0,0 @@ >-<!DOCTYPE html> >-<html> >-<head> >-<script src="../../http/tests/inspector/resources/inspector-test.js"></script> >-<script src="resources/recording-utilities.js"></script> >-<script> >-let ctx = null; >- >-// 2x2 red square >-let image = document.createElement("img"); >-image.src = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAYAAABytg0kAAAAAXNSR0IArs4c6QAAABNJREFUCB1j/M/AAEQMDEwgAgQAHxcCAmtAm/sAAAAASUVORK5CYII="; >- >-// Invalid video >-let video = document.createElement("video"); >- >-// Blank canvas >-let canvas = document.createElement("canvas"); >-canvas.width = 2; >-canvas.height = 2; >- >-let linearGradient = null; >- >-let radialGradient = null; >- >-let pattern = null; >- >-let path12 = new Path2D("M 1 2"); >-let path34 = new Path2D("M 3 4"); >- >-let imageData14 = new ImageData(1, 4); >-let imageData23 = new ImageData(2, 3); >- >-let bitmap = null; >- >-async function load() { >- ctx = canvas.getContext("2d"); >- linearGradient = ctx.createLinearGradient(1, 2, 3, 4); >- radialGradient = ctx.createRadialGradient(1, 2, 3, 4, 5, 6); >- pattern = ctx.createPattern(image, "no-repeat"); >- bitmap = await createImageBitmap(image); >- >- ctx.save(); >- cancelActions(); >- >- runTest(); >-} >- >-function ignoreException(func){ >- try { >- func(); >- } catch (e) { } >-} >- >-let requestAnimationFrameId = NaN; >-let saveCount = 1; >- >-function cancelActions() { >- for (let i = 0; i < saveCount; ++i) >- ctx.restore(); >- ctx.restore(); // Ensures the state is reset between test cases. >- >- cancelAnimationFrame(requestAnimationFrameId); >- requestAnimationFrameId = NaN; >- >- ctx.save(); // Ensures the state is reset between test cases. >- ctx.save(); // This matches the `restore` call in `performActions`. >- saveCount = 1; >- >- ctx.resetTransform(); >- ctx.beginPath(); >- ctx.clearRect(0, 0, ctx.canvas.width, ctx.canvas.height); >-} >- >-function performActions() { >- let frames = [ >- () => { >- ignoreException(() => ctx.arc(1, 2, 3, 4, 5)); >- ignoreException(() => ctx.arc(6, 7, 8, 9, 10, true)); >- }, >- () => { >- ignoreException(() => ctx.arcTo(1, 2, 3, 4, 5)); >- }, >- () => { >- ctx.beginPath(); >- }, >- () => { >- ctx.bezierCurveTo(1, 2, 3, 4, 5, 6); >- }, >- () => { >- ctx.clearRect(1, 2, 3, 4); >- }, >- () => { >- ctx.clearShadow(); >- }, >- () => { >- ctx.clip(); >- ctx.clip("evenodd"); >- ctx.clip(path12); >- ctx.clip(path34, "evenodd"); >- }, >- () => { >- ctx.closePath(); >- }, >- () => { >- ignoreException(() => ctx.createImageData(imageData14)); >- ignoreException(() => ctx.createImageData(2, 3)); >- }, >- () => { >- ignoreException(() => ctx.createLinearGradient(1, 2, 3, 4)); >- }, >- () => { >- ignoreException(() => ctx.createPattern(image, "testA")); >- ignoreException(() => ctx.createPattern(video, "testB")); >- ignoreException(() => ctx.createPattern(canvas, "testC")); >- ignoreException(() => ctx.createPattern(bitmap, "testD")); >- }, >- () => { >- ignoreException(() => ctx.createRadialGradient(1, 2, 3, 4, 5, 6)); >- }, >- () => { >- ctx.direction; >- ctx.direction = "test"; >- }, >- () => { >- ctx.drawFocusIfNeeded(document.body); >- ctx.drawFocusIfNeeded(path12, document.body); >- }, >- () => { >- ignoreException(() => ctx.drawImage(image, 11, 12)); >- ignoreException(() => ctx.drawImage(image, 13, 14, 15, 16)); >- ignoreException(() => ctx.drawImage(image, 17, 18, 19, 110, 111, 112, 113, 114)); >- >- ignoreException(() => ctx.drawImage(video, 21, 22)); >- ignoreException(() => ctx.drawImage(video, 23, 24, 25, 26)); >- ignoreException(() => ctx.drawImage(video, 27, 28, 29, 210, 211, 212, 213, 214)); >- >- ignoreException(() => ctx.drawImage(canvas, 31, 32)); >- ignoreException(() => ctx.drawImage(canvas, 33, 34, 35, 36)); >- ignoreException(() => ctx.drawImage(canvas, 37, 38, 39, 310, 311, 312, 313, 314)); >- >- ignoreException(() => ctx.drawImage(bitmap, 41, 42)); >- ignoreException(() => ctx.drawImage(bitmap, 43, 44, 45, 46)); >- ignoreException(() => ctx.drawImage(bitmap, 47, 48, 49, 410, 411, 412, 413, 414)); >- }, >- () => { >- ctx.drawImageFromRect(image, 1, 2, 3, 4, 5, 6, 7, 8) >- ctx.drawImageFromRect(image, 9, 10, 11, 12, 13, 14, 15, 16, "test"); >- }, >- () => { >- ignoreException(() => ctx.ellipse(1, 2, 3, 4, 5, 6, 7)); >- ignoreException(() => ctx.ellipse(8, 9, 10, 11, 12, 13, 14, true)); >- }, >- () => { >- ctx.fill(); >- ctx.fill("evenodd"); >- ctx.fill(path12); >- ctx.fill(path34, "evenodd"); >- }, >- () => { >- ctx.fillRect(1, 2, 3, 4); >- }, >- () => { >- ctx.fillStyle; >- ctx.fillStyle = "test"; >- ctx.fillStyle = linearGradient; >- ctx.fillStyle = radialGradient; >- ctx.fillStyle = pattern; >- }, >- () => { >- ctx.fillText("testA", 1, 2); >- ctx.fillText("testB", 3, 4, 5); >- }, >- () => { >- ctx.font; >- ctx.font = "test"; >- }, >- () => { >- ignoreException(() => ctx.getImageData(1, 2, 3, 4)); >- }, >- () => { >- ctx.getLineDash(); >- }, >- () => { >- ctx.getTransform(); >- }, >- () => { >- ctx.globalAlpha; >- ctx.globalAlpha = 0; >- }, >- () => { >- ctx.globalCompositeOperation; >- ctx.globalCompositeOperation = "test"; >- }, >- () => { >- ctx.imageSmoothingEnabled; >- ctx.imageSmoothingEnabled = true; >- }, >- () => { >- ctx.imageSmoothingQuality; >- ctx.imageSmoothingQuality = "low"; >- }, >- () => { >- ctx.isPointInPath(path12, 5, 6); >- ctx.isPointInPath(path34, 7, 8, "evenodd"); >- ctx.isPointInPath(9, 10); >- ctx.isPointInPath(11, 12, "evenodd"); >- }, >- () => { >- ctx.isPointInStroke(path12, 3, 4); >- ctx.isPointInStroke(5, 6); >- }, >- () => { >- ctx.lineCap; >- ctx.lineCap = "test"; >- }, >- () => { >- ctx.lineDashOffset; >- ctx.lineDashOffset = 1; >- }, >- () => { >- ctx.lineJoin; >- ctx.lineJoin = "test"; >- }, >- () => { >- ctx.lineTo(1, 2); >- }, >- () => { >- ctx.lineWidth; >- ctx.lineWidth = 1; >- }, >- () => { >- ctx.measureText("test"); >- }, >- () => { >- ctx.miterLimit; >- ctx.miterLimit = 1; >- }, >- () => { >- ctx.moveTo(1, 2); >- }, >- () => { >- ctx.putImageData(imageData14, 5, 6); >- ctx.putImageData(imageData23, 7, 8, 9, 10, 11, 12); >- }, >- () => { >- ctx.quadraticCurveTo(1, 2, 3, 4); >- }, >- () => { >- ctx.rect(1, 2, 3, 4); >- }, >- () => { >- ctx.resetTransform(); >- }, >- () => { >- ctx.restore(); >- --saveCount; >- }, >- () => { >- ctx.rotate(1); >- }, >- () => { >- ctx.save(); >- ++saveCount; >- }, >- () => { >- ctx.scale(1, 2); >- }, >- () => { >- ctx.setAlpha(); >- ctx.setAlpha(1); >- }, >- () => { >- ctx.setCompositeOperation(); >- ctx.setCompositeOperation("test"); >- }, >- () => { >- ctx.setFillColor("testA"); >- ctx.setFillColor("testB", 1); >- ctx.setFillColor(2); >- ctx.setFillColor(3, 4); >- ctx.setFillColor(5, 6, 7, 8); >- ctx.setFillColor(9, 10, 11, 12, 13); >- }, >- () => { >- ctx.setLineCap(); >- ctx.setLineCap("test"); >- }, >- () => { >- ctx.setLineDash([1, 2]); >- }, >- () => { >- ctx.setLineJoin(); >- ctx.setLineJoin("test"); >- }, >- () => { >- ctx.setLineWidth(); >- ctx.setLineWidth(1); >- }, >- () => { >- ctx.setMiterLimit(); >- ctx.setMiterLimit(1); >- }, >- () => { >- ctx.setShadow(1, 2, 3); >- ctx.setShadow(4, 5, 6, "test", 7); >- ctx.setShadow(8, 9, 10, 11); >- ctx.setShadow(12, 13, 14, 15, 16); >- ctx.setShadow(17, 18, 19, 20, 21, 22, 23); >- ctx.setShadow(24, 25, 26, 27, 28, 29, 30, 31); >- }, >- () => { >- ctx.setStrokeColor("testA"); >- ctx.setStrokeColor("testB", 1); >- ctx.setStrokeColor(2); >- ctx.setStrokeColor(3, 4); >- ctx.setStrokeColor(5, 6, 7, 8); >- ctx.setStrokeColor(9, 10, 11, 12, 13); >- }, >- () => { >- ctx.setTransform(1, 2, 3, 4, 5, 6); >- ignoreException(() => ctx.setTransform()); >- ignoreException(() => ctx.setTransform(new DOMMatrix([7, 8, 9, 10, 11, 12]))); >- }, >- () => { >- ctx.shadowBlur; >- ctx.shadowBlur = 1; >- }, >- () => { >- ctx.shadowColor; >- ctx.shadowColor = "test"; >- }, >- () => { >- ctx.shadowOffsetX; >- ctx.shadowOffsetX = 1; >- }, >- () => { >- ctx.shadowOffsetY; >- ctx.shadowOffsetY = 1; >- }, >- () => { >- ctx.stroke(); >- ctx.stroke(path12); >- }, >- () => { >- ctx.strokeRect(1, 2, 3, 4); >- }, >- () => { >- ctx.strokeStyle; >- ctx.strokeStyle = "test"; >- ctx.strokeStyle = linearGradient; >- ctx.strokeStyle = radialGradient; >- ctx.strokeStyle = pattern; >- }, >- () => { >- ctx.strokeText("testA", 1, 2); >- ctx.strokeText("testB", 3, 4, 5); >- }, >- () => { >- ctx.textAlign; >- ctx.textAlign = "test"; >- }, >- () => { >- ctx.textBaseline; >- ctx.textBaseline = "test"; >- }, >- () => { >- ctx.transform(1, 2, 3, 4, 5, 6); >- }, >- () => { >- ctx.translate(1, 2); >- }, >- () => { >- ctx.webkitImageSmoothingEnabled; >- ctx.webkitImageSmoothingEnabled = true; >- }, >- () => { >- ctx.webkitLineDash; >- ctx.webkitLineDash = [1, 2]; >- }, >- () => { >- ctx.webkitLineDashOffset; >- ctx.webkitLineDashOffset = 1; >- }, >- () => { >- ctx.canvas.width; >- ctx.canvas.width = 2; >- }, >- () => { >- ctx.canvas.height; >- ctx.canvas.height = 2; >- }, >- () => { >- TestPage.dispatchEventToFrontend("LastFrame"); >- }, >- ]; >- let index = 0; >- function executeFrameFunction() { >- frames[index++](); >- if (index < frames.length) >- requestAnimationFrameId = requestAnimationFrame(executeFrameFunction); >- }; >- executeFrameFunction(); >-} >- >-function performConsoleActions() { >- console.record(ctx, {name: "TEST"}); >- >- ctx.fill(); >- >- console.recordEnd(ctx); >- >- ctx.stroke(); >-} >- >-function performSavePreActions() { >- cancelActions(); >- ctx.restore(); >- ctx.restore(); >- >- function saveFillStyle(value) { >- ctx.save(); >- ctx.fillStyle = value; >- } >- >- saveFillStyle("#ff0000"); >- saveFillStyle("#00ff00"); >- saveFillStyle("#0000ff"); >-} >- >-function performSavePostActions() { >- ctx.fill(); >-} >- >-function performNaNActions() { >- ctx.globalAlpha = NaN; >-} >- >-function test() { >- let suite = InspectorTest.createAsyncSuite("Canvas.recording2D"); >- >- suite.addTestCase({ >- name: "Canvas.recording2D.singleFrame", >- description: "Check that the recording is stopped after a single frame.", >- test(resolve, reject) { >- startRecording(WI.Canvas.ContextType.Canvas2D, resolve, reject, {frameCount: 1}); >- }, >- timeout: -1, >- }); >- >- suite.addTestCase({ >- name: "Canvas.recording2D.multipleFrames", >- description: "Check that recording data is serialized correctly for multiple frames.", >- test(resolve, reject) { >- startRecording(WI.Canvas.ContextType.Canvas2D, resolve, reject); >- }, >- timeout: -1, >- }); >- >- suite.addTestCase({ >- name: "Canvas.recording2D.memoryLimit", >- description: "Check that the recording is stopped when it reaches the memory limit.", >- test(resolve, reject) { >- startRecording(WI.Canvas.ContextType.Canvas2D, resolve, reject, {memoryLimit: 10}); >- }, >- timeout: -1, >- }); >- >- suite.addTestCase({ >- name: "Canvas.recording2D.Console", >- description: "Check that a recording can be triggered by console.record().", >- test(resolve, reject) { >- consoleRecord(WI.Canvas.ContextType.Canvas2D, resolve, reject); >- }, >- }); >- >- suite.addTestCase({ >- name: "Canvas.recording2D.ActionParameterNaN", >- description: "Check that NaN is converted into the proper value for serialization.", >- test(resolve, reject) { >- let canvas = getCanvas(WI.Canvas.ContextType.Canvas2D); >- if (!canvas) { >- reject("Missing 2D canvas."); >- return; >- } >- >- canvas.awaitEvent(WI.Canvas.Event.RecordingStopped) >- .then((event) => { >- let recording = event.data.recording.toJSON(); >- >- let frames = recording.frames; >- InspectorTest.expectEqual(frames.length, 1, "The recording should have 1 frame."); >- >- let actions = frames[0].actions; >- InspectorTest.expectEqual(actions.length, 1, "The first frame should have 1 action."); >- InspectorTest.expectEqual(actions[0][1].length, 1, "The action should have 1 parameter."); >- InspectorTest.expectEqual(actions[0][1][0], null, "The parameter should be null."); >- }) >- .then(resolve, reject); >- >- canvas.awaitEvent(WI.Canvas.Event.RecordingStarted) >- .then((event) => { >- InspectorTest.evaluateInPage(`performNaNActions()`); >- }); >- >- const frameCount = 1; >- CanvasAgent.startRecording(canvas.identifier, frameCount) >- .catch(reject); >- }, >- }); >- >- suite.addTestCase({ >- name: "Canvas.recording2D.ExistingSaves", >- description: "Check that existing save calls are sent to the frontend.", >- test(resolve, reject) { >- let canvas = getCanvas(WI.Canvas.ContextType.Canvas2D); >- if (!canvas) { >- reject("Missing 2D canvas."); >- return; >- } >- >- async function logStates(recording) { >- async function compare(index, expected) { >- let state = await WI.RecordingState.swizzleInitialState(recording, recording.initialState.states[index]); >- InspectorTest.expectEqual(state.get("fillStyle"), expected, `State ${index} should match expected fillStyle value.`) >- } >- >- await compare(0, "#000000"); >- await compare(1, "#ff0000"); >- await compare(2, "#00ff00"); >- await compare(3, "#0000ff"); >- } >- >- canvas.awaitEvent(WI.Canvas.Event.RecordingStopped) >- .then((event) => { >- let {recording} = event.data; >- >- InspectorTest.expectEqual(recording.initialState.states.length, 4, "There should be 4 existing states."); >- >- logStates(recording) >- .then(resolve, reject); >- }); >- >- canvas.awaitEvent(WI.Canvas.Event.RecordingStarted) >- .then((event) => { >- InspectorTest.evaluateInPage(`performSavePostActions()`).catch(reject); >- }); >- >- InspectorTest.evaluateInPage(`performSavePreActions()`) >- .then(() => { >- const frameCount = 1; >- CanvasAgent.startRecording(canvas.identifier, frameCount).catch(reject); >- }, reject); >- }, >- }); >- >- suite.addTestCase({ >- name: "Canvas.recording2D.NoActions", >- description: "Check that a canvas is still able to be recorded after stopping a recording with no actions.", >- test(resolve, reject) { >- let canvas = getCanvas(WI.Canvas.ContextType.Canvas2D); >- if (!canvas) { >- reject("Missing 2D canvas."); >- return; >- } >- >- let eventCount = 0; >- function handleRecordingStopped(event) { >- InspectorTest.assert(!event.data.recording, "The recording payload should be null."); >- >- ++eventCount; >- if (eventCount == 1) { >- InspectorTest.pass("A recording should have been started and stopped once."); >- >- canvas.startRecording(); >- canvas.stopRecording(); >- } else if (eventCount >= 2) { >- InspectorTest.pass("A recording should have been started and stopped twice."); >- >- canvas.removeEventListener(WI.Canvas.Event.RecordingStopped, handleRecordingStopped); >- resolve(); >- } >- } >- canvas.addEventListener(WI.Canvas.Event.RecordingStopped, handleRecordingStopped); >- >- canvas.startRecording(); >- canvas.stopRecording(); >- }, >- }); >- >- suite.runTestCasesAndFinish(); >-} >-</script> >-</head> >-<body onload="load()"> >- <p>Test that CanvasManager is able to record actions made to 2D canvas contexts.</p> >-</body> >-</html> >diff --git a/LayoutTests/inspector/canvas/recording-bitmaprenderer-expected.txt b/LayoutTests/inspector/canvas/recording-bitmaprenderer-expected.txt >deleted file mode 100644 >index ffece3e1471a930f46c7c2b845c3a7b1e0392180..0000000000000000000000000000000000000000 >--- a/LayoutTests/inspector/canvas/recording-bitmaprenderer-expected.txt >+++ /dev/null >@@ -1,92 +0,0 @@ >-Test that CanvasManager is able to record actions made to BitmapRenderer canvas contexts. >- >- >-== Running test suite: Canvas.recordingBitmapRenderer >--- Running test case: Canvas.recordingBitmapRenderer.singleFrame >-initialState: >- attributes: >- width: 2 >- height: 2 >- parameters: >- content: <filtered> >-frames: >- 0: (duration) >- 0: transferFromImageBitmap([object ImageBitmap]) >- swizzleTypes: [ImageBitmap] >- trace: >- 0: transferFromImageBitmap >- 1: (anonymous function) >- 2: executeFrameFunction >- 3: (anonymous function) >- 4: asyncFunctionResume >- 5: (anonymous function) >- 6: promiseReactionJob >- snapshot: <filtered> >- >--- Running test case: Canvas.recordingBitmapRenderer.multipleFrames >-initialState: >- attributes: >- width: 2 >- height: 2 >- parameters: >- content: <filtered> >-frames: >- 0: (duration) >- 0: transferFromImageBitmap([object ImageBitmap]) >- swizzleTypes: [ImageBitmap] >- trace: >- 0: transferFromImageBitmap >- 1: (anonymous function) >- 2: executeFrameFunction >- 3: (anonymous function) >- 4: asyncFunctionResume >- 5: (anonymous function) >- 6: promiseReactionJob >- snapshot: <filtered> >- 1: (duration) >- 0: width >- trace: >- 0: (anonymous function) >- 1: executeFrameFunction >- 1: width = 2 >- swizzleTypes: [Number] >- trace: >- 0: (anonymous function) >- 1: executeFrameFunction >- 2: (duration) >- 0: height >- trace: >- 0: (anonymous function) >- 1: executeFrameFunction >- 1: height = 2 >- swizzleTypes: [Number] >- trace: >- 0: (anonymous function) >- 1: executeFrameFunction >- >--- Running test case: Canvas.recordingBitmapRenderer.memoryLimit >-initialState: >- attributes: >- width: 2 >- height: 2 >- parameters: >- content: <filtered> >-frames: >- 0: (duration) (incomplete) >- 0: transferFromImageBitmap([object ImageBitmap]) >- swizzleTypes: [ImageBitmap] >- trace: >- 0: transferFromImageBitmap >- 1: (anonymous function) >- 2: executeFrameFunction >- 3: (anonymous function) >- 4: asyncFunctionResume >- 5: (anonymous function) >- 6: promiseReactionJob >- snapshot: <filtered> >- >--- Running test case: Canvas.recordingBitmapRenderer.Console >-PASS: The recording should have the name "TEST". >-PASS: The recording should have one frame. >-PASS: The first frame should have one action. >- >diff --git a/LayoutTests/inspector/canvas/recording-bitmaprenderer-frameCount-expected.txt b/LayoutTests/inspector/canvas/recording-bitmaprenderer-frameCount-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..0301131c87f5484d259f83fa6b8dff7bdfda80a1 >--- /dev/null >+++ b/LayoutTests/inspector/canvas/recording-bitmaprenderer-frameCount-expected.txt >@@ -0,0 +1,25 @@ >+Test that CanvasManager is able to record actions made to BitmapRenderer canvas contexts. >+ >+ >+== Running test suite: Canvas.recordingBitmapRenderer >+-- Running test case: Canvas.recordingBitmapRenderer.singleFrame >+initialState: >+ attributes: >+ width: 2 >+ height: 2 >+ parameters: >+ content: <filtered> >+frames: >+ 0: (duration) >+ 0: transferFromImageBitmap([object ImageBitmap]) >+ swizzleTypes: [ImageBitmap] >+ trace: >+ 0: transferFromImageBitmap >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 3: (anonymous function) >+ 4: asyncFunctionResume >+ 5: (anonymous function) >+ 6: promiseReactionJob >+ snapshot: <filtered> >+ >diff --git a/LayoutTests/inspector/canvas/recording-bitmaprenderer-frameCount.html b/LayoutTests/inspector/canvas/recording-bitmaprenderer-frameCount.html >new file mode 100644 >index 0000000000000000000000000000000000000000..7a4de9ceda35d4cafbdfbb3acc2c12c942b01b5f >--- /dev/null >+++ b/LayoutTests/inspector/canvas/recording-bitmaprenderer-frameCount.html >@@ -0,0 +1,26 @@ >+<!DOCTYPE html> >+<html> >+<head> >+<script src="../../http/tests/inspector/resources/inspector-test.js"></script> >+<script src="resources/recording-utilities.js"></script> >+<script src="resources/recording-bitmaprenderer.js"></script> >+<script> >+function test() { >+ let suite = InspectorTest.createAsyncSuite("Canvas.recordingBitmapRenderer"); >+ >+ suite.addTestCase({ >+ name: "Canvas.recordingBitmapRenderer.singleFrame", >+ description: "Check that the recording is stopped after a single frame.", >+ test(resolve, reject) { >+ startRecording(WI.Canvas.ContextType.BitmapRenderer, resolve, reject, {frameCount: 1}); >+ }, >+ }); >+ >+ suite.runTestCasesAndFinish(); >+} >+</script> >+</head> >+<body onload="load()"> >+ <p>Test that CanvasManager is able to record actions made to BitmapRenderer canvas contexts.</p> >+</body> >+</html> >diff --git a/LayoutTests/inspector/canvas/recording-bitmaprenderer-full-expected.txt b/LayoutTests/inspector/canvas/recording-bitmaprenderer-full-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..46b1a0d0269fb8e6b0753558b6deff00baa13c27 >--- /dev/null >+++ b/LayoutTests/inspector/canvas/recording-bitmaprenderer-full-expected.txt >@@ -0,0 +1,45 @@ >+Test that CanvasManager is able to record actions made to BitmapRenderer canvas contexts. >+ >+ >+== Running test suite: Canvas.recordingBitmapRenderer >+-- Running test case: Canvas.recordingBitmapRenderer.multipleFrames >+initialState: >+ attributes: >+ width: 2 >+ height: 2 >+ parameters: >+ content: <filtered> >+frames: >+ 0: (duration) >+ 0: transferFromImageBitmap([object ImageBitmap]) >+ swizzleTypes: [ImageBitmap] >+ trace: >+ 0: transferFromImageBitmap >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 3: (anonymous function) >+ 4: asyncFunctionResume >+ 5: (anonymous function) >+ 6: promiseReactionJob >+ snapshot: <filtered> >+ 1: (duration) >+ 0: width >+ trace: >+ 0: (anonymous function) >+ 1: executeFrameFunction >+ 1: width = 2 >+ swizzleTypes: [Number] >+ trace: >+ 0: (anonymous function) >+ 1: executeFrameFunction >+ 2: (duration) >+ 0: height >+ trace: >+ 0: (anonymous function) >+ 1: executeFrameFunction >+ 1: height = 2 >+ swizzleTypes: [Number] >+ trace: >+ 0: (anonymous function) >+ 1: executeFrameFunction >+ >diff --git a/LayoutTests/inspector/canvas/recording-bitmaprenderer-full.html b/LayoutTests/inspector/canvas/recording-bitmaprenderer-full.html >new file mode 100644 >index 0000000000000000000000000000000000000000..82a6b6769a4d38f185d93ea42a346d355b4839b5 >--- /dev/null >+++ b/LayoutTests/inspector/canvas/recording-bitmaprenderer-full.html >@@ -0,0 +1,26 @@ >+<!DOCTYPE html> >+<html> >+<head> >+<script src="../../http/tests/inspector/resources/inspector-test.js"></script> >+<script src="resources/recording-utilities.js"></script> >+<script src="resources/recording-bitmaprenderer.js"></script> >+<script> >+function test() { >+ let suite = InspectorTest.createAsyncSuite("Canvas.recordingBitmapRenderer"); >+ >+ suite.addTestCase({ >+ name: "Canvas.recordingBitmapRenderer.multipleFrames", >+ description: "Check that recording data is serialized correctly for multiple frames.", >+ test(resolve, reject) { >+ startRecording(WI.Canvas.ContextType.BitmapRenderer, resolve, reject); >+ }, >+ }); >+ >+ suite.runTestCasesAndFinish(); >+} >+</script> >+</head> >+<body onload="load()"> >+ <p>Test that CanvasManager is able to record actions made to BitmapRenderer canvas contexts.</p> >+</body> >+</html> >diff --git a/LayoutTests/inspector/canvas/recording-bitmaprenderer-memoryLimit-expected.txt b/LayoutTests/inspector/canvas/recording-bitmaprenderer-memoryLimit-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..412eaff6eb58f908a90b5d4ff7a08ea0333cbef0 >--- /dev/null >+++ b/LayoutTests/inspector/canvas/recording-bitmaprenderer-memoryLimit-expected.txt >@@ -0,0 +1,25 @@ >+Test that CanvasManager is able to record actions made to BitmapRenderer canvas contexts. >+ >+ >+== Running test suite: Canvas.recordingBitmapRenderer >+-- Running test case: Canvas.recordingBitmapRenderer.memoryLimit >+initialState: >+ attributes: >+ width: 2 >+ height: 2 >+ parameters: >+ content: <filtered> >+frames: >+ 0: (duration) (incomplete) >+ 0: transferFromImageBitmap([object ImageBitmap]) >+ swizzleTypes: [ImageBitmap] >+ trace: >+ 0: transferFromImageBitmap >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 3: (anonymous function) >+ 4: asyncFunctionResume >+ 5: (anonymous function) >+ 6: promiseReactionJob >+ snapshot: <filtered> >+ >diff --git a/LayoutTests/inspector/canvas/recording-bitmaprenderer-memoryLimit.html b/LayoutTests/inspector/canvas/recording-bitmaprenderer-memoryLimit.html >new file mode 100644 >index 0000000000000000000000000000000000000000..4c59efc456779802303c967ecbed4e7c5ad8b899 >--- /dev/null >+++ b/LayoutTests/inspector/canvas/recording-bitmaprenderer-memoryLimit.html >@@ -0,0 +1,26 @@ >+<!DOCTYPE html> >+<html> >+<head> >+<script src="../../http/tests/inspector/resources/inspector-test.js"></script> >+<script src="resources/recording-utilities.js"></script> >+<script src="resources/recording-bitmaprenderer.js"></script> >+<script> >+function test() { >+ let suite = InspectorTest.createAsyncSuite("Canvas.recordingBitmapRenderer"); >+ >+ suite.addTestCase({ >+ name: "Canvas.recordingBitmapRenderer.memoryLimit", >+ description: "Check that the recording is stopped when it reaches the memory limit.", >+ test(resolve, reject) { >+ startRecording(WI.Canvas.ContextType.BitmapRenderer, resolve, reject, {memoryLimit: 10}); >+ }, >+ }); >+ >+ suite.runTestCasesAndFinish(); >+} >+</script> >+</head> >+<body onload="load()"> >+ <p>Test that CanvasManager is able to record actions made to BitmapRenderer canvas contexts.</p> >+</body> >+</html> >diff --git a/LayoutTests/inspector/canvas/recording-bitmaprenderer.html b/LayoutTests/inspector/canvas/recording-bitmaprenderer.html >deleted file mode 100644 >index 5c1055f96099be78c68125f4da9678b9a14d6723..0000000000000000000000000000000000000000 >--- a/LayoutTests/inspector/canvas/recording-bitmaprenderer.html >+++ /dev/null >@@ -1,133 +0,0 @@ >-<!DOCTYPE html> >-<html> >-<head> >-<script src="../../http/tests/inspector/resources/inspector-test.js"></script> >-<script src="resources/recording-utilities.js"></script> >-<script> >-let ctx = null; >- >-let redImage = new Image; >-redImage.src = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAYAAABytg0kAAAAAXNSR0IArs4c6QAAABNJREFUCB1j/M/AAEQMDEwgAgQAHxcCAmtAm/sAAAAASUVORK5CYII="; >- >-let blueImage = new Image; >-blueImage.src = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAYAAABytg0kAAAAAXNSR0IArs4c6QAAABRJREFUCB1jZGD4/58BCJhABAgAAB0ZAgJSPDJ6AAAAAElFTkSuQmCC"; >- >-let transparentImage = new Image; >-transparentImage.src = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAYAAABytg0kAAAAAXNSR0IArs4c6QAAAAtJREFUCB1jYEAHAAASAAGAFMrMAAAAAElFTkSuQmCC"; >- >-// Blank canvas >-let canvas = document.createElement("canvas"); >-canvas.width = 2; >-canvas.height = 2; >- >-function load() { >- ctx = canvas.getContext("bitmaprenderer"); >- >- cancelActions(); >- >- runTest(); >-} >- >-function ignoreException(func){ >- try { >- func(); >- } catch (e) { } >-} >- >-let requestAnimationFrameId = NaN; >- >-function cancelActions() { >- cancelAnimationFrame(requestAnimationFrameId); >- requestAnimationFrameId = NaN; >- >- createImageBitmap(transparentImage).then((transparentBitmap) => { >- ctx.transferFromImageBitmap(transparentBitmap); >- }); >-} >- >-async function performActions() { >- let redBitmap = await createImageBitmap(redImage); >- >- let frames = [ >- () => { >- ctx.transferFromImageBitmap(redBitmap); >- }, >- () => { >- ctx.canvas.width; >- ctx.canvas.width = 2; >- }, >- () => { >- ctx.canvas.height; >- ctx.canvas.height = 2; >- }, >- () => { >- TestPage.dispatchEventToFrontend("LastFrame"); >- }, >- ]; >- let index = 0; >- function executeFrameFunction() { >- frames[index++](); >- if (index < frames.length) >- requestAnimationFrameId = requestAnimationFrame(executeFrameFunction); >- }; >- executeFrameFunction(); >-} >- >-async function performConsoleActions() { >- let [redBitmap, blueBitmap] = await Promise.all([ >- createImageBitmap(redImage), >- createImageBitmap(blueImage), >- ]); >- >- console.record(ctx, {name: "TEST"}); >- >- ctx.transferFromImageBitmap(redBitmap); >- >- console.recordEnd(ctx); >- >- ctx.transferFromImageBitmap(blueBitmap); >-} >- >-function test() { >- let suite = InspectorTest.createAsyncSuite("Canvas.recordingBitmapRenderer"); >- >- suite.addTestCase({ >- name: "Canvas.recordingBitmapRenderer.singleFrame", >- description: "Check that the recording is stopped after a single frame.", >- test(resolve, reject) { >- startRecording(WI.Canvas.ContextType.BitmapRenderer, resolve, reject, {frameCount: 1}); >- }, >- }); >- >- suite.addTestCase({ >- name: "Canvas.recordingBitmapRenderer.multipleFrames", >- description: "Check that recording data is serialized correctly for multiple frames.", >- test(resolve, reject) { >- startRecording(WI.Canvas.ContextType.BitmapRenderer, resolve, reject); >- }, >- }); >- >- suite.addTestCase({ >- name: "Canvas.recordingBitmapRenderer.memoryLimit", >- description: "Check that the recording is stopped when it reaches the memory limit.", >- test(resolve, reject) { >- startRecording(WI.Canvas.ContextType.BitmapRenderer, resolve, reject, {memoryLimit: 10}); >- }, >- }); >- >- suite.addTestCase({ >- name: "Canvas.recordingBitmapRenderer.Console", >- description: "Check that a recording can be triggered by console.record().", >- test(resolve, reject) { >- consoleRecord(WI.Canvas.ContextType.BitmapRenderer, resolve, reject); >- }, >- }); >- >- suite.runTestCasesAndFinish(); >-} >-</script> >-</head> >-<body onload="load()"> >- <p>Test that CanvasManager is able to record actions made to BitmapRenderer canvas contexts.</p> >-</body> >-</html> >diff --git a/LayoutTests/inspector/canvas/recording-expected.txt b/LayoutTests/inspector/canvas/recording-expected.txt >index 9e76eb5a7a2a33cdd9e2e0926a8f7e794319ca4d..81431f7995350e9a28d493d9a367e7abaf0c4f6b 100644 >--- a/LayoutTests/inspector/canvas/recording-expected.txt >+++ b/LayoutTests/inspector/canvas/recording-expected.txt >@@ -2,7 +2,13 @@ Test general cases of CanvasAgent recording calls. > > > == Running test suite: Canvas.recording >--- Running test case: Canvas.multipleRecording >+-- Running test case: Canvas.ActionParameterNaN >+PASS: The recording should have 1 frame. >+PASS: The first frame should have 1 action. >+PASS: The action should have 1 parameter. >+PASS: The parameter should be null. >+ >+-- Running test case: Canvas.MultipleRecording > Starting a recording of canvas 1... > PASS: Recording started of canvas 1 > Starting a recording of canvas 2... >@@ -14,6 +20,10 @@ PASS: There should be a recording for canvas 1. > Stopping the recording of canvas 2... > PASS: There should be a recording for canvas 2. > >+-- Running test case: Canvas.NoActions >+PASS: A recording should have been started and stopped once. >+PASS: A recording should have been started and stopped twice. >+ > -- Running test case: Canvas.startRecording.InvalidCanvasId > PASS: Should produce an error. > Error: No canvas for given identifier. >diff --git a/LayoutTests/inspector/canvas/recording-webgl-expected.txt b/LayoutTests/inspector/canvas/recording-webgl-expected.txt >deleted file mode 100644 >index 7ace5c2ec54567d18098b7d41815542dd99f5de1..0000000000000000000000000000000000000000 >--- a/LayoutTests/inspector/canvas/recording-webgl-expected.txt >+++ /dev/null >@@ -1,1056 +0,0 @@ >-Test that CanvasManager is able to record actions made to WebGL canvas contexts. >- >- >-== Running test suite: Canvas.recordingWebGL >--- Running test case: Canvas.recordingWebGL.singleFrame >-initialState: >- attributes: >- width: 2 >- height: 2 >- parameters: >- 0: {"alpha":true,"depth":true,"stencil":false,"antialias":true,"premultipliedAlpha":true,"preserveDrawingBuffer":false,"failIfMajorPerformanceCaveat":false} >- content: <filtered> >-frames: >- 0: (duration) >- 0: activeTexture(1) >- swizzleTypes: [Number] >- trace: >- 0: activeTexture >- 1: (anonymous function) >- 2: executeFrameFunction >- 3: performActions >- 4: Global Code >- 5: evaluateWithScopeExtension >- 6: (anonymous function) >- 7: _wrapCall >- >--- Running test case: Canvas.recordingWebGL.multipleFrames >-initialState: >- attributes: >- width: 2 >- height: 2 >- parameters: >- 0: {"alpha":true,"depth":true,"stencil":false,"antialias":true,"premultipliedAlpha":true,"preserveDrawingBuffer":false,"failIfMajorPerformanceCaveat":false} >- content: <filtered> >-frames: >- 0: (duration) >- 0: activeTexture(1) >- swizzleTypes: [Number] >- trace: >- 0: activeTexture >- 1: (anonymous function) >- 2: executeFrameFunction >- 3: performActions >- 4: Global Code >- 5: evaluateWithScopeExtension >- 6: (anonymous function) >- 7: _wrapCall >- 1: (duration) >- 0: attachShader(0, 0) >- swizzleTypes: [WebGLProgram, WebGLShader] >- trace: >- 0: attachShader >- 1: (anonymous function) >- 2: executeFrameFunction >- 2: (duration) >- 0: bindAttribLocation(0, 1, "test") >- swizzleTypes: [WebGLProgram, Number, String] >- trace: >- 0: bindAttribLocation >- 1: (anonymous function) >- 2: executeFrameFunction >- 3: (duration) >- 0: bindBuffer(1, 0) >- swizzleTypes: [Number, WebGLBuffer] >- trace: >- 0: bindBuffer >- 1: (anonymous function) >- 2: executeFrameFunction >- 4: (duration) >- 0: bindFramebuffer(1, 0) >- swizzleTypes: [Number, WebGLFramebuffer] >- trace: >- 0: bindFramebuffer >- 1: (anonymous function) >- 2: executeFrameFunction >- 5: (duration) >- 0: bindRenderbuffer(1, 0) >- swizzleTypes: [Number, WebGLRenderbuffer] >- trace: >- 0: bindRenderbuffer >- 1: (anonymous function) >- 2: executeFrameFunction >- 6: (duration) >- 0: bindTexture(1, 0) >- swizzleTypes: [Number, WebGLTexture] >- trace: >- 0: bindTexture >- 1: (anonymous function) >- 2: executeFrameFunction >- 7: (duration) >- 0: blendColor(1, 2, 3, 4) >- swizzleTypes: [Number, Number, Number, Number] >- trace: >- 0: blendColor >- 1: (anonymous function) >- 2: executeFrameFunction >- 8: (duration) >- 0: blendEquation(1) >- swizzleTypes: [Number] >- trace: >- 0: blendEquation >- 1: (anonymous function) >- 2: executeFrameFunction >- 9: (duration) >- 0: blendEquationSeparate(1, 2) >- swizzleTypes: [Number, Number] >- trace: >- 0: blendEquationSeparate >- 1: (anonymous function) >- 2: executeFrameFunction >- 10: (duration) >- 0: blendFunc(1, 2) >- swizzleTypes: [Number, Number] >- trace: >- 0: blendFunc >- 1: (anonymous function) >- 2: executeFrameFunction >- 11: (duration) >- 0: blendFuncSeparate(1, 2, 3, 4) >- swizzleTypes: [Number, Number, Number, Number] >- trace: >- 0: blendFuncSeparate >- 1: (anonymous function) >- 2: executeFrameFunction >- 12: (duration) >- 0: bufferData(1, 0, 2) >- swizzleTypes: [Number, TypedArray, Number] >- trace: >- 0: bufferData >- 1: (anonymous function) >- 2: executeFrameFunction >- 1: bufferData(3, 4, 5) >- swizzleTypes: [Number, Number, Number] >- trace: >- 0: bufferData >- 1: (anonymous function) >- 2: executeFrameFunction >- 13: (duration) >- 0: bufferSubData(1, 2, 0) >- swizzleTypes: [Number, Number, TypedArray] >- trace: >- 0: bufferSubData >- 1: (anonymous function) >- 2: executeFrameFunction >- 14: (duration) >- 0: checkFramebufferStatus(1) >- swizzleTypes: [Number] >- trace: >- 0: checkFramebufferStatus >- 1: (anonymous function) >- 2: executeFrameFunction >- 15: (duration) >- 0: clear(1) >- swizzleTypes: [Number] >- trace: >- 0: clear >- 1: (anonymous function) >- 2: executeFrameFunction >- snapshot: <filtered> >- 16: (duration) >- 0: clearColor(1, 2, 3, 4) >- swizzleTypes: [Number, Number, Number, Number] >- trace: >- 0: clearColor >- 1: (anonymous function) >- 2: executeFrameFunction >- 17: (duration) >- 0: clearDepth(1) >- swizzleTypes: [Number] >- trace: >- 0: clearDepth >- 1: (anonymous function) >- 2: executeFrameFunction >- 18: (duration) >- 0: clearStencil(1) >- swizzleTypes: [Number] >- trace: >- 0: clearStencil >- 1: (anonymous function) >- 2: executeFrameFunction >- 19: (duration) >- 0: colorMask(true, false, true, false) >- swizzleTypes: [Boolean, Boolean, Boolean, Boolean] >- trace: >- 0: colorMask >- 1: (anonymous function) >- 2: executeFrameFunction >- 20: (duration) >- 0: compileShader(0) >- swizzleTypes: [WebGLShader] >- trace: >- 0: compileShader >- 1: (anonymous function) >- 2: executeFrameFunction >- 21: (duration) >- 0: compressedTexImage2D(1, 2, 3, 4, 5, 6, 0) >- swizzleTypes: [Number, Number, Number, Number, Number, Number, TypedArray] >- trace: >- 0: compressedTexImage2D >- 1: (anonymous function) >- 2: executeFrameFunction >- 22: (duration) >- 0: compressedTexSubImage2D(1, 2, 3, 4, 5, 6, 7, 0) >- swizzleTypes: [Number, Number, Number, Number, Number, Number, Number, TypedArray] >- trace: >- 0: compressedTexSubImage2D >- 1: (anonymous function) >- 2: executeFrameFunction >- 23: (duration) >- 0: copyTexImage2D(1, 2, 3, 4, 5, 6, 7, 8) >- swizzleTypes: [Number, Number, Number, Number, Number, Number, Number, Number] >- trace: >- 0: copyTexImage2D >- 1: (anonymous function) >- 2: executeFrameFunction >- 24: (duration) >- 0: copyTexSubImage2D(1, 2, 3, 4, 5, 6, 7, 8) >- swizzleTypes: [Number, Number, Number, Number, Number, Number, Number, Number] >- trace: >- 0: copyTexSubImage2D >- 1: (anonymous function) >- 2: executeFrameFunction >- 25: (duration) >- 0: createBuffer() >- trace: >- 0: createBuffer >- 1: (anonymous function) >- 2: executeFrameFunction >- 26: (duration) >- 0: createFramebuffer() >- trace: >- 0: createFramebuffer >- 1: (anonymous function) >- 2: executeFrameFunction >- 27: (duration) >- 0: createProgram() >- trace: >- 0: createProgram >- 1: (anonymous function) >- 2: executeFrameFunction >- 28: (duration) >- 0: createRenderbuffer() >- trace: >- 0: createRenderbuffer >- 1: (anonymous function) >- 2: executeFrameFunction >- 29: (duration) >- 0: createShader(1) >- swizzleTypes: [Number] >- trace: >- 0: createShader >- 1: (anonymous function) >- 2: executeFrameFunction >- 30: (duration) >- 0: createTexture() >- trace: >- 0: createTexture >- 1: (anonymous function) >- 2: executeFrameFunction >- 31: (duration) >- 0: cullFace(1) >- swizzleTypes: [Number] >- trace: >- 0: cullFace >- 1: (anonymous function) >- 2: executeFrameFunction >- 32: (duration) >- 0: deleteBuffer(0) >- swizzleTypes: [WebGLBuffer] >- trace: >- 0: deleteBuffer >- 1: (anonymous function) >- 2: executeFrameFunction >- 33: (duration) >- 0: deleteFramebuffer(0) >- swizzleTypes: [WebGLFramebuffer] >- trace: >- 0: deleteFramebuffer >- 1: (anonymous function) >- 2: executeFrameFunction >- 34: (duration) >- 0: deleteProgram(0) >- swizzleTypes: [WebGLProgram] >- trace: >- 0: deleteProgram >- 1: (anonymous function) >- 2: executeFrameFunction >- 35: (duration) >- 0: deleteRenderbuffer(0) >- swizzleTypes: [WebGLRenderbuffer] >- trace: >- 0: deleteRenderbuffer >- 1: (anonymous function) >- 2: executeFrameFunction >- 36: (duration) >- 0: deleteShader(0) >- swizzleTypes: [WebGLShader] >- trace: >- 0: deleteShader >- 1: (anonymous function) >- 2: executeFrameFunction >- 37: (duration) >- 0: deleteTexture(0) >- swizzleTypes: [WebGLTexture] >- trace: >- 0: deleteTexture >- 1: (anonymous function) >- 2: executeFrameFunction >- 38: (duration) >- 0: depthFunc(1) >- swizzleTypes: [Number] >- trace: >- 0: depthFunc >- 1: (anonymous function) >- 2: executeFrameFunction >- 39: (duration) >- 0: depthMask(true) >- swizzleTypes: [Boolean] >- trace: >- 0: depthMask >- 1: (anonymous function) >- 2: executeFrameFunction >- 40: (duration) >- 0: depthRange(1, 2) >- swizzleTypes: [Number, Number] >- trace: >- 0: depthRange >- 1: (anonymous function) >- 2: executeFrameFunction >- 41: (duration) >- 0: detachShader(0, 0) >- swizzleTypes: [WebGLProgram, WebGLShader] >- trace: >- 0: detachShader >- 1: (anonymous function) >- 2: executeFrameFunction >- 42: (duration) >- 0: disable(1) >- swizzleTypes: [Number] >- trace: >- 0: disable >- 1: (anonymous function) >- 2: executeFrameFunction >- 43: (duration) >- 0: disableVertexAttribArray(1) >- swizzleTypes: [Number] >- trace: >- 0: disableVertexAttribArray >- 1: (anonymous function) >- 2: executeFrameFunction >- 44: (duration) >- 0: drawArrays(1, 2, 3) >- swizzleTypes: [Number, Number, Number] >- trace: >- 0: drawArrays >- 1: (anonymous function) >- 2: executeFrameFunction >- snapshot: <filtered> >- 45: (duration) >- 0: drawElements(1, 2, 3, 4) >- swizzleTypes: [Number, Number, Number, Number] >- trace: >- 0: drawElements >- 1: (anonymous function) >- 2: executeFrameFunction >- snapshot: <filtered> >- 46: (duration) >- 0: enable(1) >- swizzleTypes: [Number] >- trace: >- 0: enable >- 1: (anonymous function) >- 2: executeFrameFunction >- 47: (duration) >- 0: enableVertexAttribArray(1) >- swizzleTypes: [Number] >- trace: >- 0: enableVertexAttribArray >- 1: (anonymous function) >- 2: executeFrameFunction >- 48: (duration) >- 0: finish() >- trace: >- 0: finish >- 1: (anonymous function) >- 2: executeFrameFunction >- 49: (duration) >- 0: flush() >- trace: >- 0: flush >- 1: (anonymous function) >- 2: executeFrameFunction >- 50: (duration) >- 0: framebufferRenderbuffer(1, 2, 3, 0) >- swizzleTypes: [Number, Number, Number, WebGLRenderbuffer] >- trace: >- 0: framebufferRenderbuffer >- 1: (anonymous function) >- 2: executeFrameFunction >- 51: (duration) >- 0: framebufferTexture2D(1, 2, 3, 0, 4) >- swizzleTypes: [Number, Number, Number, WebGLTexture, Number] >- trace: >- 0: framebufferTexture2D >- 1: (anonymous function) >- 2: executeFrameFunction >- 52: (duration) >- 0: frontFace(1) >- swizzleTypes: [Number] >- trace: >- 0: frontFace >- 1: (anonymous function) >- 2: executeFrameFunction >- 53: (duration) >- 0: generateMipmap(1) >- swizzleTypes: [Number] >- trace: >- 0: generateMipmap >- 1: (anonymous function) >- 2: executeFrameFunction >- 54: (duration) >- 0: getActiveAttrib(0, 1) >- swizzleTypes: [WebGLProgram, Number] >- trace: >- 0: getActiveAttrib >- 1: (anonymous function) >- 2: executeFrameFunction >- 55: (duration) >- 0: getActiveUniform(0, 1) >- swizzleTypes: [WebGLProgram, Number] >- trace: >- 0: getActiveUniform >- 1: (anonymous function) >- 2: executeFrameFunction >- 56: (duration) >- 0: getAttachedShaders(0) >- swizzleTypes: [WebGLProgram] >- trace: >- 0: getAttachedShaders >- 1: (anonymous function) >- 2: executeFrameFunction >- 57: (duration) >- 0: getAttribLocation(0, "test") >- swizzleTypes: [WebGLProgram, String] >- trace: >- 0: getAttribLocation >- 1: (anonymous function) >- 2: executeFrameFunction >- 58: (duration) >- 0: getBufferParameter(1, 2) >- swizzleTypes: [Number, Number] >- trace: >- 0: getBufferParameter >- 1: (anonymous function) >- 2: executeFrameFunction >- 59: (duration) >- 0: getContextAttributes() >- trace: >- 0: getContextAttributes >- 1: (anonymous function) >- 2: executeFrameFunction >- 60: (duration) >- 0: getError() >- trace: >- 0: getError >- 1: (anonymous function) >- 2: executeFrameFunction >- 61: (duration) >- 0: getExtension("test") >- swizzleTypes: [String] >- trace: >- 0: getExtension >- 1: (anonymous function) >- 2: executeFrameFunction >- 62: (duration) >- 0: getFramebufferAttachmentParameter(1, 2, 3) >- swizzleTypes: [Number, Number, Number] >- trace: >- 0: getFramebufferAttachmentParameter >- 1: (anonymous function) >- 2: executeFrameFunction >- 63: (duration) >- 0: getParameter(1) >- swizzleTypes: [Number] >- trace: >- 0: getParameter >- 1: (anonymous function) >- 2: executeFrameFunction >- 64: (duration) >- 0: getProgramInfoLog(0) >- swizzleTypes: [WebGLProgram] >- trace: >- 0: getProgramInfoLog >- 1: (anonymous function) >- 2: executeFrameFunction >- 65: (duration) >- 0: getProgramParameter(0, 1) >- swizzleTypes: [WebGLProgram, Number] >- trace: >- 0: getProgramParameter >- 1: (anonymous function) >- 2: executeFrameFunction >- 66: (duration) >- 0: getRenderbufferParameter(1, 2) >- swizzleTypes: [Number, Number] >- trace: >- 0: getRenderbufferParameter >- 1: (anonymous function) >- 2: executeFrameFunction >- 67: (duration) >- 0: getShaderInfoLog(0) >- swizzleTypes: [WebGLShader] >- trace: >- 0: getShaderInfoLog >- 1: (anonymous function) >- 2: executeFrameFunction >- 68: (duration) >- 0: getShaderParameter(0, 1) >- swizzleTypes: [WebGLShader, Number] >- trace: >- 0: getShaderParameter >- 1: (anonymous function) >- 2: executeFrameFunction >- 69: (duration) >- 0: getShaderPrecisionFormat(1, 2) >- swizzleTypes: [Number, Number] >- trace: >- 0: getShaderPrecisionFormat >- 1: (anonymous function) >- 2: executeFrameFunction >- 70: (duration) >- 0: getShaderSource(0) >- swizzleTypes: [WebGLShader] >- trace: >- 0: getShaderSource >- 1: (anonymous function) >- 2: executeFrameFunction >- 71: (duration) >- 0: getSupportedExtensions() >- trace: >- 0: getSupportedExtensions >- 1: (anonymous function) >- 2: executeFrameFunction >- 72: (duration) >- 0: getTexParameter(1, 2) >- swizzleTypes: [Number, Number] >- trace: >- 0: getTexParameter >- 1: (anonymous function) >- 2: executeFrameFunction >- 73: (duration) >- 0: getUniform(0) >- swizzleTypes: [WebGLProgram] >- trace: >- 0: getUniform >- 1: (anonymous function) >- 2: executeFrameFunction >- 74: (duration) >- 0: getUniformLocation(0, "test") >- swizzleTypes: [WebGLProgram, String] >- trace: >- 0: getUniformLocation >- 1: (anonymous function) >- 2: executeFrameFunction >- 75: (duration) >- 0: getVertexAttrib(1, 2) >- swizzleTypes: [Number, Number] >- trace: >- 0: getVertexAttrib >- 1: (anonymous function) >- 2: executeFrameFunction >- 76: (duration) >- 0: getVertexAttribOffset(1, 2) >- swizzleTypes: [Number, Number] >- trace: >- 0: getVertexAttribOffset >- 1: (anonymous function) >- 2: executeFrameFunction >- 77: (duration) >- 0: hint(1, 2) >- swizzleTypes: [Number, Number] >- trace: >- 0: hint >- 1: (anonymous function) >- 2: executeFrameFunction >- 78: (duration) >- 0: isBuffer(0) >- swizzleTypes: [WebGLBuffer] >- trace: >- 0: isBuffer >- 1: (anonymous function) >- 2: executeFrameFunction >- 79: (duration) >- 0: isContextLost() >- trace: >- 0: isContextLost >- 1: (anonymous function) >- 2: executeFrameFunction >- 80: (duration) >- 0: isEnabled(1) >- swizzleTypes: [Number] >- trace: >- 0: isEnabled >- 1: (anonymous function) >- 2: executeFrameFunction >- 81: (duration) >- 0: isFramebuffer(0) >- swizzleTypes: [WebGLFramebuffer] >- trace: >- 0: isFramebuffer >- 1: (anonymous function) >- 2: executeFrameFunction >- 82: (duration) >- 0: isProgram(0) >- swizzleTypes: [WebGLProgram] >- trace: >- 0: isProgram >- 1: (anonymous function) >- 2: executeFrameFunction >- 83: (duration) >- 0: isRenderbuffer(0) >- swizzleTypes: [WebGLRenderbuffer] >- trace: >- 0: isRenderbuffer >- 1: (anonymous function) >- 2: executeFrameFunction >- 84: (duration) >- 0: isShader(0) >- swizzleTypes: [WebGLShader] >- trace: >- 0: isShader >- 1: (anonymous function) >- 2: executeFrameFunction >- 85: (duration) >- 0: isTexture(0) >- swizzleTypes: [WebGLTexture] >- trace: >- 0: isTexture >- 1: (anonymous function) >- 2: executeFrameFunction >- 86: (duration) >- 0: lineWidth(1) >- swizzleTypes: [Number] >- trace: >- 0: lineWidth >- 1: (anonymous function) >- 2: executeFrameFunction >- 87: (duration) >- 0: linkProgram(0) >- swizzleTypes: [WebGLProgram] >- trace: >- 0: linkProgram >- 1: (anonymous function) >- 2: executeFrameFunction >- 88: (duration) >- 0: pixelStorei(1, 2) >- swizzleTypes: [Number, Number] >- trace: >- 0: pixelStorei >- 1: (anonymous function) >- 2: executeFrameFunction >- 89: (duration) >- 0: polygonOffset(1, 2) >- swizzleTypes: [Number, Number] >- trace: >- 0: polygonOffset >- 1: (anonymous function) >- 2: executeFrameFunction >- 90: (duration) >- 0: readPixels(1, 2, 3, 4, 5, 6, 0) >- swizzleTypes: [Number, Number, Number, Number, Number, Number, TypedArray] >- trace: >- 0: readPixels >- 1: (anonymous function) >- 2: executeFrameFunction >- 91: (duration) >- 0: releaseShaderCompiler() >- trace: >- 0: releaseShaderCompiler >- 1: (anonymous function) >- 2: executeFrameFunction >- 92: (duration) >- 0: renderbufferStorage(1, 2, 3, 4) >- swizzleTypes: [Number, Number, Number, Number] >- trace: >- 0: renderbufferStorage >- 1: (anonymous function) >- 2: executeFrameFunction >- 93: (duration) >- 0: sampleCoverage(1, true) >- swizzleTypes: [Number, Boolean] >- trace: >- 0: sampleCoverage >- 1: (anonymous function) >- 2: executeFrameFunction >- 94: (duration) >- 0: scissor(1, 2, 3, 4) >- swizzleTypes: [Number, Number, Number, Number] >- trace: >- 0: scissor >- 1: (anonymous function) >- 2: executeFrameFunction >- 95: (duration) >- 0: shaderSource(0, "test") >- swizzleTypes: [WebGLShader, String] >- trace: >- 0: shaderSource >- 1: (anonymous function) >- 2: executeFrameFunction >- 96: (duration) >- 0: stencilFunc(1, 2, 3) >- swizzleTypes: [Number, Number, Number] >- trace: >- 0: stencilFunc >- 1: (anonymous function) >- 2: executeFrameFunction >- 97: (duration) >- 0: stencilFuncSeparate(1, 2, 3, 4) >- swizzleTypes: [Number, Number, Number, Number] >- trace: >- 0: stencilFuncSeparate >- 1: (anonymous function) >- 2: executeFrameFunction >- 98: (duration) >- 0: stencilMask(1) >- swizzleTypes: [Number] >- trace: >- 0: stencilMask >- 1: (anonymous function) >- 2: executeFrameFunction >- 99: (duration) >- 0: stencilMaskSeparate(1, 2) >- swizzleTypes: [Number, Number] >- trace: >- 0: stencilMaskSeparate >- 1: (anonymous function) >- 2: executeFrameFunction >- 100: (duration) >- 0: stencilOp(1, 2, 3) >- swizzleTypes: [Number, Number, Number] >- trace: >- 0: stencilOp >- 1: (anonymous function) >- 2: executeFrameFunction >- 101: (duration) >- 0: stencilOpSeparate(1, 2, 3, 4) >- swizzleTypes: [Number, Number, Number, Number] >- trace: >- 0: stencilOpSeparate >- 1: (anonymous function) >- 2: executeFrameFunction >- 102: (duration) >- 0: texImage2D(1, 2, 3, 4, 5, [object HTMLImageElement]) >- swizzleTypes: [Number, Number, Number, Number, Number, Image] >- trace: >- 0: texImage2D >- 1: (anonymous function) >- 2: executeFrameFunction >- 1: texImage2D(6, 7, 8, 9, 10, 11, 12, 13, 0) >- swizzleTypes: [Number, Number, Number, Number, Number, Number, Number, Number, TypedArray] >- trace: >- 0: texImage2D >- 1: (anonymous function) >- 2: executeFrameFunction >- 103: (duration) >- 0: texParameterf(1, 2, 3) >- swizzleTypes: [Number, Number, Number] >- trace: >- 0: texParameterf >- 1: (anonymous function) >- 2: executeFrameFunction >- 104: (duration) >- 0: texParameteri(1, 2, 3) >- swizzleTypes: [Number, Number, Number] >- trace: >- 0: texParameteri >- 1: (anonymous function) >- 2: executeFrameFunction >- 105: (duration) >- 0: texSubImage2D(1, 2, 3, 4, 5, 6, [object HTMLImageElement]) >- swizzleTypes: [Number, Number, Number, Number, Number, Number, Image] >- trace: >- 0: texSubImage2D >- 1: (anonymous function) >- 2: executeFrameFunction >- 1: texSubImage2D(7, 8, 9, 10, 11, 12, 13, 14, 0) >- swizzleTypes: [Number, Number, Number, Number, Number, Number, Number, Number, TypedArray] >- trace: >- 0: texSubImage2D >- 1: (anonymous function) >- 2: executeFrameFunction >- 106: (duration) >- 0: uniform1f(1) >- swizzleTypes: [Number] >- trace: >- 0: uniform1f >- 1: (anonymous function) >- 2: executeFrameFunction >- 107: (duration) >- 0: uniform1fv(0) >- swizzleTypes: [TypedArray] >- trace: >- 0: uniform1fv >- 1: (anonymous function) >- 2: executeFrameFunction >- 108: (duration) >- 0: uniform1i(1) >- swizzleTypes: [Number] >- trace: >- 0: uniform1i >- 1: (anonymous function) >- 2: executeFrameFunction >- 109: (duration) >- 0: uniform1iv(0) >- swizzleTypes: [TypedArray] >- trace: >- 0: uniform1iv >- 1: (anonymous function) >- 2: executeFrameFunction >- 110: (duration) >- 0: uniform2f(1, 2) >- swizzleTypes: [Number, Number] >- trace: >- 0: uniform2f >- 1: (anonymous function) >- 2: executeFrameFunction >- 111: (duration) >- 0: uniform2fv(0) >- swizzleTypes: [TypedArray] >- trace: >- 0: uniform2fv >- 1: (anonymous function) >- 2: executeFrameFunction >- 112: (duration) >- 0: uniform2i(1, 2) >- swizzleTypes: [Number, Number] >- trace: >- 0: uniform2i >- 1: (anonymous function) >- 2: executeFrameFunction >- 113: (duration) >- 0: uniform2iv(0) >- swizzleTypes: [TypedArray] >- trace: >- 0: uniform2iv >- 1: (anonymous function) >- 2: executeFrameFunction >- 114: (duration) >- 0: uniform3f(1, 2, 3) >- swizzleTypes: [Number, Number, Number] >- trace: >- 0: uniform3f >- 1: (anonymous function) >- 2: executeFrameFunction >- 115: (duration) >- 0: uniform3fv(0) >- swizzleTypes: [TypedArray] >- trace: >- 0: uniform3fv >- 1: (anonymous function) >- 2: executeFrameFunction >- 116: (duration) >- 0: uniform3i(1, 2, 3) >- swizzleTypes: [Number, Number, Number] >- trace: >- 0: uniform3i >- 1: (anonymous function) >- 2: executeFrameFunction >- 117: (duration) >- 0: uniform3iv(0) >- swizzleTypes: [TypedArray] >- trace: >- 0: uniform3iv >- 1: (anonymous function) >- 2: executeFrameFunction >- 118: (duration) >- 0: uniform4f(1, 2, 3, 4) >- swizzleTypes: [Number, Number, Number, Number] >- trace: >- 0: uniform4f >- 1: (anonymous function) >- 2: executeFrameFunction >- 119: (duration) >- 0: uniform4fv(0) >- swizzleTypes: [TypedArray] >- trace: >- 0: uniform4fv >- 1: (anonymous function) >- 2: executeFrameFunction >- 120: (duration) >- 0: uniform4i(1, 2, 3, 4) >- swizzleTypes: [Number, Number, Number, Number] >- trace: >- 0: uniform4i >- 1: (anonymous function) >- 2: executeFrameFunction >- 121: (duration) >- 0: uniform4iv(0) >- swizzleTypes: [TypedArray] >- trace: >- 0: uniform4iv >- 1: (anonymous function) >- 2: executeFrameFunction >- 122: (duration) >- 0: uniformMatrix2fv(true, 0) >- swizzleTypes: [Boolean, TypedArray] >- trace: >- 0: uniformMatrix2fv >- 1: (anonymous function) >- 2: executeFrameFunction >- 123: (duration) >- 0: uniformMatrix3fv(true, 0) >- swizzleTypes: [Boolean, TypedArray] >- trace: >- 0: uniformMatrix3fv >- 1: (anonymous function) >- 2: executeFrameFunction >- 124: (duration) >- 0: uniformMatrix4fv(true, 0) >- swizzleTypes: [Boolean, TypedArray] >- trace: >- 0: uniformMatrix4fv >- 1: (anonymous function) >- 2: executeFrameFunction >- 125: (duration) >- 0: useProgram(0) >- swizzleTypes: [WebGLProgram] >- trace: >- 0: useProgram >- 1: (anonymous function) >- 2: executeFrameFunction >- 126: (duration) >- 0: validateProgram(0) >- swizzleTypes: [WebGLProgram] >- trace: >- 0: validateProgram >- 1: (anonymous function) >- 2: executeFrameFunction >- 127: (duration) >- 0: vertexAttrib1f(1, 2) >- swizzleTypes: [Number, Number] >- trace: >- 0: vertexAttrib1f >- 1: (anonymous function) >- 2: executeFrameFunction >- 128: (duration) >- 0: vertexAttrib1fv(1, 0) >- swizzleTypes: [Number, TypedArray] >- trace: >- 0: vertexAttrib1fv >- 1: (anonymous function) >- 2: executeFrameFunction >- 129: (duration) >- 0: vertexAttrib2f(1, 2, 3) >- swizzleTypes: [Number, Number, Number] >- trace: >- 0: vertexAttrib2f >- 1: (anonymous function) >- 2: executeFrameFunction >- 130: (duration) >- 0: vertexAttrib2fv(1, 0) >- swizzleTypes: [Number, TypedArray] >- trace: >- 0: vertexAttrib2fv >- 1: (anonymous function) >- 2: executeFrameFunction >- 131: (duration) >- 0: vertexAttrib3f(1, 2, 3, 4) >- swizzleTypes: [Number, Number, Number, Number] >- trace: >- 0: vertexAttrib3f >- 1: (anonymous function) >- 2: executeFrameFunction >- 132: (duration) >- 0: vertexAttrib3fv(1, 0) >- swizzleTypes: [Number, TypedArray] >- trace: >- 0: vertexAttrib3fv >- 1: (anonymous function) >- 2: executeFrameFunction >- 133: (duration) >- 0: vertexAttrib4f(1, 2, 3, 4, 5) >- swizzleTypes: [Number, Number, Number, Number, Number] >- trace: >- 0: vertexAttrib4f >- 1: (anonymous function) >- 2: executeFrameFunction >- 134: (duration) >- 0: vertexAttrib4fv(1, 0) >- swizzleTypes: [Number, TypedArray] >- trace: >- 0: vertexAttrib4fv >- 1: (anonymous function) >- 2: executeFrameFunction >- 135: (duration) >- 0: vertexAttribPointer(1, 2, 3, true, 5, 6) >- swizzleTypes: [Number, Number, Number, Boolean, Number, Number] >- trace: >- 0: vertexAttribPointer >- 1: (anonymous function) >- 2: executeFrameFunction >- 136: (duration) >- 0: viewport(1, 2, 3, 4) >- swizzleTypes: [Number, Number, Number, Number] >- trace: >- 0: viewport >- 1: (anonymous function) >- 2: executeFrameFunction >- 137: (duration) >- 0: width >- trace: >- 0: (anonymous function) >- 1: executeFrameFunction >- 1: width = 2 >- swizzleTypes: [Number] >- trace: >- 0: (anonymous function) >- 1: executeFrameFunction >- 138: (duration) >- 0: height >- trace: >- 0: (anonymous function) >- 1: executeFrameFunction >- 1: height = 2 >- swizzleTypes: [Number] >- trace: >- 0: (anonymous function) >- 1: executeFrameFunction >- >--- Running test case: Canvas.recordingWebGL.memoryLimit >-initialState: >- attributes: >- width: 2 >- height: 2 >- parameters: >- 0: {"alpha":true,"depth":true,"stencil":false,"antialias":true,"premultipliedAlpha":true,"preserveDrawingBuffer":false,"failIfMajorPerformanceCaveat":false} >- content: <filtered> >-frames: >- 0: (duration) (incomplete) >- 0: activeTexture(1) >- swizzleTypes: [Number] >- trace: >- 0: activeTexture >- 1: (anonymous function) >- 2: executeFrameFunction >- 3: performActions >- 4: Global Code >- 5: evaluateWithScopeExtension >- 6: (anonymous function) >- 7: _wrapCall >- >--- Running test case: Canvas.recordingWebGL.Console >-PASS: The recording should have the name "TEST". >-PASS: The recording should have one frame. >-PASS: The first frame should have one action. >- >diff --git a/LayoutTests/inspector/canvas/recording-webgl-frameCount-expected.txt b/LayoutTests/inspector/canvas/recording-webgl-frameCount-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..9a2ce069881f68f60a4ed2b4fa623b2c462aad26 >--- /dev/null >+++ b/LayoutTests/inspector/canvas/recording-webgl-frameCount-expected.txt >@@ -0,0 +1,26 @@ >+Test that CanvasManager is able to record actions made to WebGL canvas contexts. >+ >+ >+== Running test suite: Canvas.recordingWebGL >+-- Running test case: Canvas.recordingWebGL.singleFrame >+initialState: >+ attributes: >+ width: 2 >+ height: 2 >+ parameters: >+ 0: {"alpha":true,"depth":true,"stencil":false,"antialias":true,"premultipliedAlpha":true,"preserveDrawingBuffer":false,"failIfMajorPerformanceCaveat":false} >+ content: <filtered> >+frames: >+ 0: (duration) >+ 0: activeTexture(1) >+ swizzleTypes: [Number] >+ trace: >+ 0: activeTexture >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 3: performActions >+ 4: Global Code >+ 5: evaluateWithScopeExtension >+ 6: (anonymous function) >+ 7: _wrapCall >+ >diff --git a/LayoutTests/inspector/canvas/recording-webgl-frameCount.html b/LayoutTests/inspector/canvas/recording-webgl-frameCount.html >new file mode 100644 >index 0000000000000000000000000000000000000000..f240276e81509e17a37f195d3fe27ae9c67bc960 >--- /dev/null >+++ b/LayoutTests/inspector/canvas/recording-webgl-frameCount.html >@@ -0,0 +1,41 @@ >+<!DOCTYPE html> >+<html> >+<head> >+<script src="../../http/tests/inspector/resources/inspector-test.js"></script> >+<script src="resources/recording-utilities.js"></script> >+<script src="resources/shaderProgram-utilities.js"></script> >+<script id="vertex-shader" type="x-shader/x-vertex"> >+ attribute vec4 test; >+ void main(void) { >+ gl_Position = test; >+ } >+</script> >+<script id="fragment-shader" type="x-shader/x-fragment"> >+ precision mediump float; >+ >+ void main(void) { >+ gl_FragColor = vec4(1.0, 1.0, 1.0, 1.0); >+ } >+</script> >+<script src="resources/recording-webgl.js"></script> >+<script> >+function test() { >+ let suite = InspectorTest.createAsyncSuite("Canvas.recordingWebGL"); >+ >+ suite.addTestCase({ >+ name: "Canvas.recordingWebGL.singleFrame", >+ description: "Check that the recording is stopped after a single frame.", >+ test(resolve, reject) { >+ startRecording(WI.Canvas.ContextType.WebGL, resolve, reject, {frameCount: 1}); >+ }, >+ timeout: -1, >+ }); >+ >+ suite.runTestCasesAndFinish(); >+} >+</script> >+</head> >+<body onload="load()"> >+ <p>Test that CanvasManager is able to record actions made to WebGL canvas contexts.</p> >+</body> >+</html> >diff --git a/LayoutTests/inspector/canvas/recording-webgl-full-expected.txt b/LayoutTests/inspector/canvas/recording-webgl-full-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..7de62e488284e0d3aa64ee8c86ba352f74f8318c >--- /dev/null >+++ b/LayoutTests/inspector/canvas/recording-webgl-full-expected.txt >@@ -0,0 +1,1007 @@ >+Test that CanvasManager is able to record actions made to WebGL canvas contexts. >+ >+ >+== Running test suite: Canvas.recordingWebGL >+-- Running test case: Canvas.recordingWebGL.multipleFrames >+initialState: >+ attributes: >+ width: 2 >+ height: 2 >+ parameters: >+ 0: {"alpha":true,"depth":true,"stencil":false,"antialias":true,"premultipliedAlpha":true,"preserveDrawingBuffer":false,"failIfMajorPerformanceCaveat":false} >+ content: <filtered> >+frames: >+ 0: (duration) >+ 0: activeTexture(1) >+ swizzleTypes: [Number] >+ trace: >+ 0: activeTexture >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 3: performActions >+ 4: Global Code >+ 5: evaluateWithScopeExtension >+ 6: (anonymous function) >+ 7: _wrapCall >+ 1: (duration) >+ 0: attachShader(0, 0) >+ swizzleTypes: [WebGLProgram, WebGLShader] >+ trace: >+ 0: attachShader >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 2: (duration) >+ 0: bindAttribLocation(0, 1, "test") >+ swizzleTypes: [WebGLProgram, Number, String] >+ trace: >+ 0: bindAttribLocation >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 3: (duration) >+ 0: bindBuffer(1, 0) >+ swizzleTypes: [Number, WebGLBuffer] >+ trace: >+ 0: bindBuffer >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 4: (duration) >+ 0: bindFramebuffer(1, 0) >+ swizzleTypes: [Number, WebGLFramebuffer] >+ trace: >+ 0: bindFramebuffer >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 5: (duration) >+ 0: bindRenderbuffer(1, 0) >+ swizzleTypes: [Number, WebGLRenderbuffer] >+ trace: >+ 0: bindRenderbuffer >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 6: (duration) >+ 0: bindTexture(1, 0) >+ swizzleTypes: [Number, WebGLTexture] >+ trace: >+ 0: bindTexture >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 7: (duration) >+ 0: blendColor(1, 2, 3, 4) >+ swizzleTypes: [Number, Number, Number, Number] >+ trace: >+ 0: blendColor >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 8: (duration) >+ 0: blendEquation(1) >+ swizzleTypes: [Number] >+ trace: >+ 0: blendEquation >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 9: (duration) >+ 0: blendEquationSeparate(1, 2) >+ swizzleTypes: [Number, Number] >+ trace: >+ 0: blendEquationSeparate >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 10: (duration) >+ 0: blendFunc(1, 2) >+ swizzleTypes: [Number, Number] >+ trace: >+ 0: blendFunc >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 11: (duration) >+ 0: blendFuncSeparate(1, 2, 3, 4) >+ swizzleTypes: [Number, Number, Number, Number] >+ trace: >+ 0: blendFuncSeparate >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 12: (duration) >+ 0: bufferData(1, 0, 2) >+ swizzleTypes: [Number, TypedArray, Number] >+ trace: >+ 0: bufferData >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 1: bufferData(3, 4, 5) >+ swizzleTypes: [Number, Number, Number] >+ trace: >+ 0: bufferData >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 13: (duration) >+ 0: bufferSubData(1, 2, 0) >+ swizzleTypes: [Number, Number, TypedArray] >+ trace: >+ 0: bufferSubData >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 14: (duration) >+ 0: checkFramebufferStatus(1) >+ swizzleTypes: [Number] >+ trace: >+ 0: checkFramebufferStatus >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 15: (duration) >+ 0: clear(1) >+ swizzleTypes: [Number] >+ trace: >+ 0: clear >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ snapshot: <filtered> >+ 16: (duration) >+ 0: clearColor(1, 2, 3, 4) >+ swizzleTypes: [Number, Number, Number, Number] >+ trace: >+ 0: clearColor >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 17: (duration) >+ 0: clearDepth(1) >+ swizzleTypes: [Number] >+ trace: >+ 0: clearDepth >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 18: (duration) >+ 0: clearStencil(1) >+ swizzleTypes: [Number] >+ trace: >+ 0: clearStencil >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 19: (duration) >+ 0: colorMask(true, false, true, false) >+ swizzleTypes: [Boolean, Boolean, Boolean, Boolean] >+ trace: >+ 0: colorMask >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 20: (duration) >+ 0: compileShader(0) >+ swizzleTypes: [WebGLShader] >+ trace: >+ 0: compileShader >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 21: (duration) >+ 0: compressedTexImage2D(1, 2, 3, 4, 5, 6, 0) >+ swizzleTypes: [Number, Number, Number, Number, Number, Number, TypedArray] >+ trace: >+ 0: compressedTexImage2D >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 22: (duration) >+ 0: compressedTexSubImage2D(1, 2, 3, 4, 5, 6, 7, 0) >+ swizzleTypes: [Number, Number, Number, Number, Number, Number, Number, TypedArray] >+ trace: >+ 0: compressedTexSubImage2D >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 23: (duration) >+ 0: copyTexImage2D(1, 2, 3, 4, 5, 6, 7, 8) >+ swizzleTypes: [Number, Number, Number, Number, Number, Number, Number, Number] >+ trace: >+ 0: copyTexImage2D >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 24: (duration) >+ 0: copyTexSubImage2D(1, 2, 3, 4, 5, 6, 7, 8) >+ swizzleTypes: [Number, Number, Number, Number, Number, Number, Number, Number] >+ trace: >+ 0: copyTexSubImage2D >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 25: (duration) >+ 0: createBuffer() >+ trace: >+ 0: createBuffer >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 26: (duration) >+ 0: createFramebuffer() >+ trace: >+ 0: createFramebuffer >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 27: (duration) >+ 0: createProgram() >+ trace: >+ 0: createProgram >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 28: (duration) >+ 0: createRenderbuffer() >+ trace: >+ 0: createRenderbuffer >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 29: (duration) >+ 0: createShader(1) >+ swizzleTypes: [Number] >+ trace: >+ 0: createShader >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 30: (duration) >+ 0: createTexture() >+ trace: >+ 0: createTexture >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 31: (duration) >+ 0: cullFace(1) >+ swizzleTypes: [Number] >+ trace: >+ 0: cullFace >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 32: (duration) >+ 0: deleteBuffer(0) >+ swizzleTypes: [WebGLBuffer] >+ trace: >+ 0: deleteBuffer >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 33: (duration) >+ 0: deleteFramebuffer(0) >+ swizzleTypes: [WebGLFramebuffer] >+ trace: >+ 0: deleteFramebuffer >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 34: (duration) >+ 0: deleteProgram(0) >+ swizzleTypes: [WebGLProgram] >+ trace: >+ 0: deleteProgram >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 35: (duration) >+ 0: deleteRenderbuffer(0) >+ swizzleTypes: [WebGLRenderbuffer] >+ trace: >+ 0: deleteRenderbuffer >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 36: (duration) >+ 0: deleteShader(0) >+ swizzleTypes: [WebGLShader] >+ trace: >+ 0: deleteShader >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 37: (duration) >+ 0: deleteTexture(0) >+ swizzleTypes: [WebGLTexture] >+ trace: >+ 0: deleteTexture >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 38: (duration) >+ 0: depthFunc(1) >+ swizzleTypes: [Number] >+ trace: >+ 0: depthFunc >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 39: (duration) >+ 0: depthMask(true) >+ swizzleTypes: [Boolean] >+ trace: >+ 0: depthMask >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 40: (duration) >+ 0: depthRange(1, 2) >+ swizzleTypes: [Number, Number] >+ trace: >+ 0: depthRange >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 41: (duration) >+ 0: detachShader(0, 0) >+ swizzleTypes: [WebGLProgram, WebGLShader] >+ trace: >+ 0: detachShader >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 42: (duration) >+ 0: disable(1) >+ swizzleTypes: [Number] >+ trace: >+ 0: disable >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 43: (duration) >+ 0: disableVertexAttribArray(1) >+ swizzleTypes: [Number] >+ trace: >+ 0: disableVertexAttribArray >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 44: (duration) >+ 0: drawArrays(1, 2, 3) >+ swizzleTypes: [Number, Number, Number] >+ trace: >+ 0: drawArrays >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ snapshot: <filtered> >+ 45: (duration) >+ 0: drawElements(1, 2, 3, 4) >+ swizzleTypes: [Number, Number, Number, Number] >+ trace: >+ 0: drawElements >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ snapshot: <filtered> >+ 46: (duration) >+ 0: enable(1) >+ swizzleTypes: [Number] >+ trace: >+ 0: enable >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 47: (duration) >+ 0: enableVertexAttribArray(1) >+ swizzleTypes: [Number] >+ trace: >+ 0: enableVertexAttribArray >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 48: (duration) >+ 0: finish() >+ trace: >+ 0: finish >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 49: (duration) >+ 0: flush() >+ trace: >+ 0: flush >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 50: (duration) >+ 0: framebufferRenderbuffer(1, 2, 3, 0) >+ swizzleTypes: [Number, Number, Number, WebGLRenderbuffer] >+ trace: >+ 0: framebufferRenderbuffer >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 51: (duration) >+ 0: framebufferTexture2D(1, 2, 3, 0, 4) >+ swizzleTypes: [Number, Number, Number, WebGLTexture, Number] >+ trace: >+ 0: framebufferTexture2D >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 52: (duration) >+ 0: frontFace(1) >+ swizzleTypes: [Number] >+ trace: >+ 0: frontFace >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 53: (duration) >+ 0: generateMipmap(1) >+ swizzleTypes: [Number] >+ trace: >+ 0: generateMipmap >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 54: (duration) >+ 0: getActiveAttrib(0, 1) >+ swizzleTypes: [WebGLProgram, Number] >+ trace: >+ 0: getActiveAttrib >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 55: (duration) >+ 0: getActiveUniform(0, 1) >+ swizzleTypes: [WebGLProgram, Number] >+ trace: >+ 0: getActiveUniform >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 56: (duration) >+ 0: getAttachedShaders(0) >+ swizzleTypes: [WebGLProgram] >+ trace: >+ 0: getAttachedShaders >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 57: (duration) >+ 0: getAttribLocation(0, "test") >+ swizzleTypes: [WebGLProgram, String] >+ trace: >+ 0: getAttribLocation >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 58: (duration) >+ 0: getBufferParameter(1, 2) >+ swizzleTypes: [Number, Number] >+ trace: >+ 0: getBufferParameter >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 59: (duration) >+ 0: getContextAttributes() >+ trace: >+ 0: getContextAttributes >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 60: (duration) >+ 0: getError() >+ trace: >+ 0: getError >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 61: (duration) >+ 0: getExtension("test") >+ swizzleTypes: [String] >+ trace: >+ 0: getExtension >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 62: (duration) >+ 0: getFramebufferAttachmentParameter(1, 2, 3) >+ swizzleTypes: [Number, Number, Number] >+ trace: >+ 0: getFramebufferAttachmentParameter >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 63: (duration) >+ 0: getParameter(1) >+ swizzleTypes: [Number] >+ trace: >+ 0: getParameter >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 64: (duration) >+ 0: getProgramInfoLog(0) >+ swizzleTypes: [WebGLProgram] >+ trace: >+ 0: getProgramInfoLog >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 65: (duration) >+ 0: getProgramParameter(0, 1) >+ swizzleTypes: [WebGLProgram, Number] >+ trace: >+ 0: getProgramParameter >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 66: (duration) >+ 0: getRenderbufferParameter(1, 2) >+ swizzleTypes: [Number, Number] >+ trace: >+ 0: getRenderbufferParameter >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 67: (duration) >+ 0: getShaderInfoLog(0) >+ swizzleTypes: [WebGLShader] >+ trace: >+ 0: getShaderInfoLog >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 68: (duration) >+ 0: getShaderParameter(0, 1) >+ swizzleTypes: [WebGLShader, Number] >+ trace: >+ 0: getShaderParameter >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 69: (duration) >+ 0: getShaderPrecisionFormat(1, 2) >+ swizzleTypes: [Number, Number] >+ trace: >+ 0: getShaderPrecisionFormat >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 70: (duration) >+ 0: getShaderSource(0) >+ swizzleTypes: [WebGLShader] >+ trace: >+ 0: getShaderSource >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 71: (duration) >+ 0: getSupportedExtensions() >+ trace: >+ 0: getSupportedExtensions >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 72: (duration) >+ 0: getTexParameter(1, 2) >+ swizzleTypes: [Number, Number] >+ trace: >+ 0: getTexParameter >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 73: (duration) >+ 0: getUniform(0) >+ swizzleTypes: [WebGLProgram] >+ trace: >+ 0: getUniform >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 74: (duration) >+ 0: getUniformLocation(0, "test") >+ swizzleTypes: [WebGLProgram, String] >+ trace: >+ 0: getUniformLocation >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 75: (duration) >+ 0: getVertexAttrib(1, 2) >+ swizzleTypes: [Number, Number] >+ trace: >+ 0: getVertexAttrib >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 76: (duration) >+ 0: getVertexAttribOffset(1, 2) >+ swizzleTypes: [Number, Number] >+ trace: >+ 0: getVertexAttribOffset >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 77: (duration) >+ 0: hint(1, 2) >+ swizzleTypes: [Number, Number] >+ trace: >+ 0: hint >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 78: (duration) >+ 0: isBuffer(0) >+ swizzleTypes: [WebGLBuffer] >+ trace: >+ 0: isBuffer >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 79: (duration) >+ 0: isContextLost() >+ trace: >+ 0: isContextLost >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 80: (duration) >+ 0: isEnabled(1) >+ swizzleTypes: [Number] >+ trace: >+ 0: isEnabled >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 81: (duration) >+ 0: isFramebuffer(0) >+ swizzleTypes: [WebGLFramebuffer] >+ trace: >+ 0: isFramebuffer >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 82: (duration) >+ 0: isProgram(0) >+ swizzleTypes: [WebGLProgram] >+ trace: >+ 0: isProgram >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 83: (duration) >+ 0: isRenderbuffer(0) >+ swizzleTypes: [WebGLRenderbuffer] >+ trace: >+ 0: isRenderbuffer >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 84: (duration) >+ 0: isShader(0) >+ swizzleTypes: [WebGLShader] >+ trace: >+ 0: isShader >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 85: (duration) >+ 0: isTexture(0) >+ swizzleTypes: [WebGLTexture] >+ trace: >+ 0: isTexture >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 86: (duration) >+ 0: lineWidth(1) >+ swizzleTypes: [Number] >+ trace: >+ 0: lineWidth >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 87: (duration) >+ 0: linkProgram(0) >+ swizzleTypes: [WebGLProgram] >+ trace: >+ 0: linkProgram >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 88: (duration) >+ 0: pixelStorei(1, 2) >+ swizzleTypes: [Number, Number] >+ trace: >+ 0: pixelStorei >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 89: (duration) >+ 0: polygonOffset(1, 2) >+ swizzleTypes: [Number, Number] >+ trace: >+ 0: polygonOffset >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 90: (duration) >+ 0: readPixels(1, 2, 3, 4, 5, 6, 0) >+ swizzleTypes: [Number, Number, Number, Number, Number, Number, TypedArray] >+ trace: >+ 0: readPixels >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 91: (duration) >+ 0: releaseShaderCompiler() >+ trace: >+ 0: releaseShaderCompiler >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 92: (duration) >+ 0: renderbufferStorage(1, 2, 3, 4) >+ swizzleTypes: [Number, Number, Number, Number] >+ trace: >+ 0: renderbufferStorage >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 93: (duration) >+ 0: sampleCoverage(1, true) >+ swizzleTypes: [Number, Boolean] >+ trace: >+ 0: sampleCoverage >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 94: (duration) >+ 0: scissor(1, 2, 3, 4) >+ swizzleTypes: [Number, Number, Number, Number] >+ trace: >+ 0: scissor >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 95: (duration) >+ 0: shaderSource(0, "test") >+ swizzleTypes: [WebGLShader, String] >+ trace: >+ 0: shaderSource >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 96: (duration) >+ 0: stencilFunc(1, 2, 3) >+ swizzleTypes: [Number, Number, Number] >+ trace: >+ 0: stencilFunc >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 97: (duration) >+ 0: stencilFuncSeparate(1, 2, 3, 4) >+ swizzleTypes: [Number, Number, Number, Number] >+ trace: >+ 0: stencilFuncSeparate >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 98: (duration) >+ 0: stencilMask(1) >+ swizzleTypes: [Number] >+ trace: >+ 0: stencilMask >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 99: (duration) >+ 0: stencilMaskSeparate(1, 2) >+ swizzleTypes: [Number, Number] >+ trace: >+ 0: stencilMaskSeparate >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 100: (duration) >+ 0: stencilOp(1, 2, 3) >+ swizzleTypes: [Number, Number, Number] >+ trace: >+ 0: stencilOp >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 101: (duration) >+ 0: stencilOpSeparate(1, 2, 3, 4) >+ swizzleTypes: [Number, Number, Number, Number] >+ trace: >+ 0: stencilOpSeparate >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 102: (duration) >+ 0: texImage2D(1, 2, 3, 4, 5, [object HTMLImageElement]) >+ swizzleTypes: [Number, Number, Number, Number, Number, Image] >+ trace: >+ 0: texImage2D >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 1: texImage2D(6, 7, 8, 9, 10, 11, 12, 13, 0) >+ swizzleTypes: [Number, Number, Number, Number, Number, Number, Number, Number, TypedArray] >+ trace: >+ 0: texImage2D >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 103: (duration) >+ 0: texParameterf(1, 2, 3) >+ swizzleTypes: [Number, Number, Number] >+ trace: >+ 0: texParameterf >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 104: (duration) >+ 0: texParameteri(1, 2, 3) >+ swizzleTypes: [Number, Number, Number] >+ trace: >+ 0: texParameteri >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 105: (duration) >+ 0: texSubImage2D(1, 2, 3, 4, 5, 6, [object HTMLImageElement]) >+ swizzleTypes: [Number, Number, Number, Number, Number, Number, Image] >+ trace: >+ 0: texSubImage2D >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 1: texSubImage2D(7, 8, 9, 10, 11, 12, 13, 14, 0) >+ swizzleTypes: [Number, Number, Number, Number, Number, Number, Number, Number, TypedArray] >+ trace: >+ 0: texSubImage2D >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 106: (duration) >+ 0: uniform1f(1) >+ swizzleTypes: [Number] >+ trace: >+ 0: uniform1f >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 107: (duration) >+ 0: uniform1fv(0) >+ swizzleTypes: [TypedArray] >+ trace: >+ 0: uniform1fv >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 108: (duration) >+ 0: uniform1i(1) >+ swizzleTypes: [Number] >+ trace: >+ 0: uniform1i >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 109: (duration) >+ 0: uniform1iv(0) >+ swizzleTypes: [TypedArray] >+ trace: >+ 0: uniform1iv >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 110: (duration) >+ 0: uniform2f(1, 2) >+ swizzleTypes: [Number, Number] >+ trace: >+ 0: uniform2f >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 111: (duration) >+ 0: uniform2fv(0) >+ swizzleTypes: [TypedArray] >+ trace: >+ 0: uniform2fv >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 112: (duration) >+ 0: uniform2i(1, 2) >+ swizzleTypes: [Number, Number] >+ trace: >+ 0: uniform2i >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 113: (duration) >+ 0: uniform2iv(0) >+ swizzleTypes: [TypedArray] >+ trace: >+ 0: uniform2iv >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 114: (duration) >+ 0: uniform3f(1, 2, 3) >+ swizzleTypes: [Number, Number, Number] >+ trace: >+ 0: uniform3f >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 115: (duration) >+ 0: uniform3fv(0) >+ swizzleTypes: [TypedArray] >+ trace: >+ 0: uniform3fv >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 116: (duration) >+ 0: uniform3i(1, 2, 3) >+ swizzleTypes: [Number, Number, Number] >+ trace: >+ 0: uniform3i >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 117: (duration) >+ 0: uniform3iv(0) >+ swizzleTypes: [TypedArray] >+ trace: >+ 0: uniform3iv >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 118: (duration) >+ 0: uniform4f(1, 2, 3, 4) >+ swizzleTypes: [Number, Number, Number, Number] >+ trace: >+ 0: uniform4f >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 119: (duration) >+ 0: uniform4fv(0) >+ swizzleTypes: [TypedArray] >+ trace: >+ 0: uniform4fv >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 120: (duration) >+ 0: uniform4i(1, 2, 3, 4) >+ swizzleTypes: [Number, Number, Number, Number] >+ trace: >+ 0: uniform4i >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 121: (duration) >+ 0: uniform4iv(0) >+ swizzleTypes: [TypedArray] >+ trace: >+ 0: uniform4iv >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 122: (duration) >+ 0: uniformMatrix2fv(true, 0) >+ swizzleTypes: [Boolean, TypedArray] >+ trace: >+ 0: uniformMatrix2fv >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 123: (duration) >+ 0: uniformMatrix3fv(true, 0) >+ swizzleTypes: [Boolean, TypedArray] >+ trace: >+ 0: uniformMatrix3fv >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 124: (duration) >+ 0: uniformMatrix4fv(true, 0) >+ swizzleTypes: [Boolean, TypedArray] >+ trace: >+ 0: uniformMatrix4fv >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 125: (duration) >+ 0: useProgram(0) >+ swizzleTypes: [WebGLProgram] >+ trace: >+ 0: useProgram >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 126: (duration) >+ 0: validateProgram(0) >+ swizzleTypes: [WebGLProgram] >+ trace: >+ 0: validateProgram >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 127: (duration) >+ 0: vertexAttrib1f(1, 2) >+ swizzleTypes: [Number, Number] >+ trace: >+ 0: vertexAttrib1f >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 128: (duration) >+ 0: vertexAttrib1fv(1, 0) >+ swizzleTypes: [Number, TypedArray] >+ trace: >+ 0: vertexAttrib1fv >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 129: (duration) >+ 0: vertexAttrib2f(1, 2, 3) >+ swizzleTypes: [Number, Number, Number] >+ trace: >+ 0: vertexAttrib2f >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 130: (duration) >+ 0: vertexAttrib2fv(1, 0) >+ swizzleTypes: [Number, TypedArray] >+ trace: >+ 0: vertexAttrib2fv >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 131: (duration) >+ 0: vertexAttrib3f(1, 2, 3, 4) >+ swizzleTypes: [Number, Number, Number, Number] >+ trace: >+ 0: vertexAttrib3f >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 132: (duration) >+ 0: vertexAttrib3fv(1, 0) >+ swizzleTypes: [Number, TypedArray] >+ trace: >+ 0: vertexAttrib3fv >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 133: (duration) >+ 0: vertexAttrib4f(1, 2, 3, 4, 5) >+ swizzleTypes: [Number, Number, Number, Number, Number] >+ trace: >+ 0: vertexAttrib4f >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 134: (duration) >+ 0: vertexAttrib4fv(1, 0) >+ swizzleTypes: [Number, TypedArray] >+ trace: >+ 0: vertexAttrib4fv >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 135: (duration) >+ 0: vertexAttribPointer(1, 2, 3, true, 5, 6) >+ swizzleTypes: [Number, Number, Number, Boolean, Number, Number] >+ trace: >+ 0: vertexAttribPointer >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 136: (duration) >+ 0: viewport(1, 2, 3, 4) >+ swizzleTypes: [Number, Number, Number, Number] >+ trace: >+ 0: viewport >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 137: (duration) >+ 0: width >+ trace: >+ 0: (anonymous function) >+ 1: executeFrameFunction >+ 1: width = 2 >+ swizzleTypes: [Number] >+ trace: >+ 0: (anonymous function) >+ 1: executeFrameFunction >+ 138: (duration) >+ 0: height >+ trace: >+ 0: (anonymous function) >+ 1: executeFrameFunction >+ 1: height = 2 >+ swizzleTypes: [Number] >+ trace: >+ 0: (anonymous function) >+ 1: executeFrameFunction >+ >diff --git a/LayoutTests/inspector/canvas/recording-webgl-full.html b/LayoutTests/inspector/canvas/recording-webgl-full.html >new file mode 100644 >index 0000000000000000000000000000000000000000..c74361bb59e7fdf09a5d5d0fd418a36c491e42e5 >--- /dev/null >+++ b/LayoutTests/inspector/canvas/recording-webgl-full.html >@@ -0,0 +1,41 @@ >+<!DOCTYPE html> >+<html> >+<head> >+<script src="../../http/tests/inspector/resources/inspector-test.js"></script> >+<script src="resources/recording-utilities.js"></script> >+<script src="resources/shaderProgram-utilities.js"></script> >+<script id="vertex-shader" type="x-shader/x-vertex"> >+ attribute vec4 test; >+ void main(void) { >+ gl_Position = test; >+ } >+</script> >+<script id="fragment-shader" type="x-shader/x-fragment"> >+ precision mediump float; >+ >+ void main(void) { >+ gl_FragColor = vec4(1.0, 1.0, 1.0, 1.0); >+ } >+</script> >+<script src="resources/recording-webgl.js"></script> >+<script> >+function test() { >+ let suite = InspectorTest.createAsyncSuite("Canvas.recordingWebGL"); >+ >+ suite.addTestCase({ >+ name: "Canvas.recordingWebGL.multipleFrames", >+ description: "Check that recording data is serialized correctly for multiple frames.", >+ test(resolve, reject) { >+ startRecording(WI.Canvas.ContextType.WebGL, resolve, reject); >+ }, >+ timeout: -1, >+ }); >+ >+ suite.runTestCasesAndFinish(); >+} >+</script> >+</head> >+<body onload="load()"> >+ <p>Test that CanvasManager is able to record actions made to WebGL canvas contexts.</p> >+</body> >+</html> >diff --git a/LayoutTests/inspector/canvas/recording-webgl-memoryLimit-expected.txt b/LayoutTests/inspector/canvas/recording-webgl-memoryLimit-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..72784fcc6d6cd578b7bae39e248366851127b8e9 >--- /dev/null >+++ b/LayoutTests/inspector/canvas/recording-webgl-memoryLimit-expected.txt >@@ -0,0 +1,26 @@ >+Test that CanvasManager is able to record actions made to WebGL canvas contexts. >+ >+ >+== Running test suite: Canvas.recordingWebGL >+-- Running test case: Canvas.recordingWebGL.memoryLimit >+initialState: >+ attributes: >+ width: 2 >+ height: 2 >+ parameters: >+ 0: {"alpha":true,"depth":true,"stencil":false,"antialias":true,"premultipliedAlpha":true,"preserveDrawingBuffer":false,"failIfMajorPerformanceCaveat":false} >+ content: <filtered> >+frames: >+ 0: (duration) (incomplete) >+ 0: activeTexture(1) >+ swizzleTypes: [Number] >+ trace: >+ 0: activeTexture >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 3: performActions >+ 4: Global Code >+ 5: evaluateWithScopeExtension >+ 6: (anonymous function) >+ 7: _wrapCall >+ >diff --git a/LayoutTests/inspector/canvas/recording-webgl-memoryLimit.html b/LayoutTests/inspector/canvas/recording-webgl-memoryLimit.html >new file mode 100644 >index 0000000000000000000000000000000000000000..64bff31c5da1f2b78b40ee9a91d399daeca592ae >--- /dev/null >+++ b/LayoutTests/inspector/canvas/recording-webgl-memoryLimit.html >@@ -0,0 +1,41 @@ >+<!DOCTYPE html> >+<html> >+<head> >+<script src="../../http/tests/inspector/resources/inspector-test.js"></script> >+<script src="resources/recording-utilities.js"></script> >+<script src="resources/shaderProgram-utilities.js"></script> >+<script id="vertex-shader" type="x-shader/x-vertex"> >+ attribute vec4 test; >+ void main(void) { >+ gl_Position = test; >+ } >+</script> >+<script id="fragment-shader" type="x-shader/x-fragment"> >+ precision mediump float; >+ >+ void main(void) { >+ gl_FragColor = vec4(1.0, 1.0, 1.0, 1.0); >+ } >+</script> >+<script src="resources/recording-webgl.js"></script> >+<script> >+function test() { >+ let suite = InspectorTest.createAsyncSuite("Canvas.recordingWebGL"); >+ >+ suite.addTestCase({ >+ name: "Canvas.recordingWebGL.memoryLimit", >+ description: "Check that the recording is stopped when it reaches the memory limit.", >+ test(resolve, reject) { >+ startRecording(WI.Canvas.ContextType.WebGL, resolve, reject, {memoryLimit: 10}); >+ }, >+ timeout: -1, >+ }); >+ >+ suite.runTestCasesAndFinish(); >+} >+</script> >+</head> >+<body onload="load()"> >+ <p>Test that CanvasManager is able to record actions made to WebGL canvas contexts.</p> >+</body> >+</html> >diff --git a/LayoutTests/inspector/canvas/recording-webgl.html b/LayoutTests/inspector/canvas/recording-webgl.html >deleted file mode 100644 >index 9e8109502c44904a03b1d8cb5e0ff82e1c5622b7..0000000000000000000000000000000000000000 >--- a/LayoutTests/inspector/canvas/recording-webgl.html >+++ /dev/null >@@ -1,565 +0,0 @@ >-<!DOCTYPE html> >-<html> >-<head> >-<script src="../../http/tests/inspector/resources/inspector-test.js"></script> >-<script src="resources/recording-utilities.js"></script> >-<script src="resources/shaderProgram-utilities.js"></script> >-<script id="vertex-shader" type="x-shader/x-vertex"> >- attribute vec4 test; >- void main(void) { >- gl_Position = test; >- } >-</script> >-<script id="fragment-shader" type="x-shader/x-fragment"> >- precision mediump float; >- >- void main(void) { >- gl_FragColor = vec4(1.0, 1.0, 1.0, 1.0); >- } >-</script> >-<script> >-if (window.internals) >- window.internals.settings.setWebGLErrorsToConsoleEnabled(false); >- >-// 2x2 red square >-let image = document.createElement("img"); >-image.src = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAYAAABytg0kAAAAAXNSR0IArs4c6QAAABNJREFUCB1j/M/AAEQMDEwgAgQAHxcCAmtAm/sAAAAASUVORK5CYII="; >- >-let float32Array = new Float32Array([0.1, 0.2]); >-let int32Array = new Int32Array([1, 2]); >- >-let buffer = null; >-let framebuffer = null; >-let uniformLocation = null; >-let renderbuffer = null; >-let shader = null; >-let texture = null; >- >-function load() { >- createProgram("webgl"); >- linkProgram("vertex-shader", "fragment-shader"); >- >- context.canvas.width = 2; >- context.canvas.height = 2; >- >- buffer = context.createBuffer(); >- framebuffer = context.createFramebuffer(); >- uniformLocation = context.getUniformLocation(program, "test"); >- renderbuffer = context.createRenderbuffer(); >- shader = context.createShader(context.VERTEX_SHADER); >- texture = context.createTexture(); >- >- cancelActions(); >- >- runTest(); >-} >- >-function ignoreException(func){ >- try { >- func(); >- } catch (e) { } >-} >- >-let requestAnimationFrameId = NaN; >- >-function cancelActions() { >- cancelAnimationFrame(requestAnimationFrameId); >- requestAnimationFrameId = NaN; >- >- context.clearColor(0.0, 0.0, 0.0, 0.0); >- context.clear(context.COLOR_BUFFER_BIT); >-} >- >-function performActions() { >- let frames = [ >- () => { >- context.activeTexture(1); >- }, >- () => { >- context.attachShader(program, shader); >- }, >- () => { >- context.bindAttribLocation(program, 1, "test"); >- }, >- () => { >- context.bindBuffer(1, buffer); >- }, >- () => { >- context.bindFramebuffer(1, framebuffer); >- }, >- () => { >- context.bindRenderbuffer(1, renderbuffer); >- }, >- () => { >- context.bindTexture(1, texture); >- }, >- () => { >- context.blendColor(1, 2, 3, 4); >- }, >- () => { >- context.blendEquation(1); >- }, >- () => { >- context.blendEquationSeparate(1, 2); >- }, >- () => { >- context.blendFunc(1, 2); >- }, >- () => { >- context.blendFuncSeparate(1, 2, 3, 4); >- }, >- () => { >- context.bufferData(1, float32Array, 2); >- context.bufferData(3, 4, 5); >- }, >- () => { >- context.bufferSubData(1, 2, float32Array); >- }, >- () => { >- context.checkFramebufferStatus(1); >- }, >- () => { >- context.clear(1); >- }, >- () => { >- context.clearColor(1, 2, 3, 4); >- }, >- () => { >- context.clearDepth(1); >- }, >- () => { >- context.clearStencil(1); >- }, >- () => { >- context.colorMask(true, false, true, false); >- }, >- () => { >- context.compileShader(shader); >- }, >- () => { >- context.compressedTexImage2D(1, 2, 3, 4, 5, 6, float32Array); >- }, >- () => { >- context.compressedTexSubImage2D(1, 2, 3, 4, 5, 6, 7, float32Array); >- }, >- () => { >- context.copyTexImage2D(1, 2, 3, 4, 5, 6, 7, 8); >- }, >- () => { >- context.copyTexSubImage2D(1, 2, 3, 4, 5, 6, 7, 8); >- }, >- () => { >- context.createBuffer(); >- }, >- () => { >- context.createFramebuffer(); >- }, >- () => { >- context.createProgram(); >- }, >- () => { >- context.createRenderbuffer(); >- }, >- () => { >- context.createShader(1); >- }, >- () => { >- context.createTexture(); >- }, >- () => { >- context.cullFace(1); >- }, >- () => { >- context.deleteBuffer(buffer); >- }, >- () => { >- context.deleteFramebuffer(framebuffer); >- }, >- () => { >- context.deleteProgram(program); >- }, >- () => { >- context.deleteRenderbuffer(renderbuffer); >- }, >- () => { >- context.deleteShader(shader); >- }, >- () => { >- context.deleteTexture(texture); >- }, >- () => { >- context.depthFunc(1); >- }, >- () => { >- context.depthMask(true); >- }, >- () => { >- context.depthRange(1, 2); >- }, >- () => { >- context.detachShader(program, shader); >- }, >- () => { >- context.disable(1); >- }, >- () => { >- context.disableVertexAttribArray(1); >- }, >- () => { >- context.drawArrays(1, 2, 3); >- }, >- () => { >- context.drawElements(1, 2, 3, 4); >- }, >- () => { >- context.enable(1); >- }, >- () => { >- context.enableVertexAttribArray(1); >- }, >- () => { >- context.finish(); >- }, >- () => { >- context.flush(); >- }, >- () => { >- context.framebufferRenderbuffer(1, 2, 3, renderbuffer); >- }, >- () => { >- context.framebufferTexture2D(1, 2, 3, texture, 4); >- }, >- () => { >- context.frontFace(1); >- }, >- () => { >- context.generateMipmap(1); >- }, >- () => { >- context.getActiveAttrib(program, 1); >- }, >- () => { >- context.getActiveUniform(program, 1); >- }, >- () => { >- context.getAttachedShaders(program); >- }, >- () => { >- context.getAttribLocation(program, "test"); >- }, >- () => { >- context.getBufferParameter(1, 2); >- }, >- () => { >- context.getContextAttributes(); >- }, >- () => { >- context.getError(); >- }, >- () => { >- context.getExtension("test"); >- }, >- () => { >- context.getFramebufferAttachmentParameter(1, 2, 3); >- }, >- () => { >- context.getParameter(1); >- }, >- () => { >- context.getProgramInfoLog(program); >- }, >- () => { >- context.getProgramParameter(program, 1); >- }, >- () => { >- context.getRenderbufferParameter(1, 2); >- }, >- () => { >- context.getShaderInfoLog(shader); >- }, >- () => { >- context.getShaderParameter(shader, 1); >- }, >- () => { >- context.getShaderPrecisionFormat(1, 2); >- }, >- () => { >- context.getShaderSource(shader); >- }, >- () => { >- context.getSupportedExtensions(); >- }, >- () => { >- context.getTexParameter(1, 2); >- }, >- () => { >- context.getUniform(program, uniformLocation); >- }, >- () => { >- context.getUniformLocation(program, "test"); >- }, >- () => { >- context.getVertexAttrib(1, 2); >- }, >- () => { >- context.getVertexAttribOffset(1, 2); >- }, >- () => { >- context.hint(1, 2); >- }, >- () => { >- context.isBuffer(buffer); >- }, >- () => { >- context.isContextLost(); >- }, >- () => { >- context.isEnabled(1); >- }, >- () => { >- context.isFramebuffer(framebuffer); >- }, >- () => { >- context.isProgram(program); >- }, >- () => { >- context.isRenderbuffer(renderbuffer); >- }, >- () => { >- context.isShader(shader); >- }, >- () => { >- context.isTexture(texture); >- }, >- () => { >- context.lineWidth(1); >- }, >- () => { >- context.linkProgram(program); >- }, >- () => { >- context.pixelStorei(1, 2); >- }, >- () => { >- context.polygonOffset(1, 2); >- }, >- () => { >- context.readPixels(1, 2, 3, 4, 5, 6, float32Array); >- }, >- () => { >- context.releaseShaderCompiler(); >- }, >- () => { >- context.renderbufferStorage(1, 2, 3, 4); >- }, >- () => { >- context.sampleCoverage(1, true); >- }, >- () => { >- context.scissor(1, 2, 3, 4); >- }, >- () => { >- context.shaderSource(shader, "test"); >- }, >- () => { >- context.stencilFunc(1, 2, 3); >- }, >- () => { >- context.stencilFuncSeparate(1, 2, 3, 4); >- }, >- () => { >- context.stencilMask(1); >- }, >- () => { >- context.stencilMaskSeparate(1, 2); >- }, >- () => { >- context.stencilOp(1, 2, 3); >- }, >- () => { >- context.stencilOpSeparate(1, 2, 3, 4); >- }, >- () => { >- context.texImage2D(1, 2, 3, 4, 5, image); >- context.texImage2D(6, 7, 8, 9, 10, 11, 12, 13, float32Array); >- }, >- () => { >- context.texParameterf(1, 2, 3); >- }, >- () => { >- context.texParameteri(1, 2, 3); >- }, >- () => { >- context.texSubImage2D(1, 2, 3, 4, 5, 6, image); >- context.texSubImage2D(7, 8, 9, 10, 11, 12, 13, 14, float32Array); >- }, >- () => { >- context.uniform1f(uniformLocation, 1); >- }, >- () => { >- context.uniform1fv(uniformLocation, float32Array); >- }, >- () => { >- context.uniform1i(uniformLocation, 1); >- }, >- () => { >- context.uniform1iv(uniformLocation, int32Array); >- }, >- () => { >- context.uniform2f(uniformLocation, 1, 2); >- }, >- () => { >- context.uniform2fv(uniformLocation, float32Array); >- }, >- () => { >- context.uniform2i(uniformLocation, 1, 2); >- }, >- () => { >- context.uniform2iv(uniformLocation, int32Array); >- }, >- () => { >- context.uniform3f(uniformLocation, 1, 2, 3); >- }, >- () => { >- context.uniform3fv(uniformLocation, float32Array); >- }, >- () => { >- context.uniform3i(uniformLocation, 1, 2, 3); >- }, >- () => { >- context.uniform3iv(uniformLocation, int32Array); >- }, >- () => { >- context.uniform4f(uniformLocation, 1, 2, 3, 4); >- }, >- () => { >- context.uniform4fv(uniformLocation, float32Array); >- }, >- () => { >- context.uniform4i(uniformLocation, 1, 2, 3, 4); >- }, >- () => { >- context.uniform4iv(uniformLocation, int32Array); >- }, >- () => { >- context.uniformMatrix2fv(uniformLocation, true, float32Array); >- }, >- () => { >- context.uniformMatrix3fv(uniformLocation, true, float32Array); >- }, >- () => { >- context.uniformMatrix4fv(uniformLocation, true, float32Array); >- }, >- () => { >- context.useProgram(program); >- }, >- () => { >- context.validateProgram(program); >- }, >- () => { >- context.vertexAttrib1f(1, 2); >- }, >- () => { >- context.vertexAttrib1fv(1, float32Array); >- }, >- () => { >- context.vertexAttrib2f(1, 2, 3); >- }, >- () => { >- context.vertexAttrib2fv(1, float32Array); >- }, >- () => { >- context.vertexAttrib3f(1, 2, 3, 4); >- }, >- () => { >- context.vertexAttrib3fv(1, float32Array); >- }, >- () => { >- context.vertexAttrib4f(1, 2, 3, 4, 5); >- }, >- () => { >- context.vertexAttrib4fv(1, float32Array); >- }, >- () => { >- context.vertexAttribPointer(1, 2, 3, 4, 5, 6); >- }, >- () => { >- context.viewport(1, 2, 3, 4); >- }, >- () => { >- context.canvas.width; >- context.canvas.width = 2; >- }, >- () => { >- context.canvas.height; >- context.canvas.height = 2; >- }, >- () => { >- TestPage.dispatchEventToFrontend("LastFrame"); >- }, >- ]; >- let index = 0; >- function executeFrameFunction() { >- frames[index++](); >- if (index < frames.length) >- requestAnimationFrameId = requestAnimationFrame(executeFrameFunction); >- }; >- executeFrameFunction(); >-} >- >-function performConsoleActions() { >- console.record(context, {name: "TEST"}); >- >- context.createTexture(); >- >- console.recordEnd(context); >- >- context.createBuffer(); >-} >- >-function test() { >- let suite = InspectorTest.createAsyncSuite("Canvas.recordingWebGL"); >- >- suite.addTestCase({ >- name: "Canvas.recordingWebGL.singleFrame", >- description: "Check that the recording is stopped after a single frame.", >- test(resolve, reject) { >- startRecording(WI.Canvas.ContextType.WebGL, resolve, reject, {frameCount: 1}); >- }, >- timeout: -1, >- }); >- >- suite.addTestCase({ >- name: "Canvas.recordingWebGL.multipleFrames", >- description: "Check that recording data is serialized correctly for multiple frames.", >- test(resolve, reject) { >- startRecording(WI.Canvas.ContextType.WebGL, resolve, reject); >- }, >- timeout: -1, >- }); >- >- suite.addTestCase({ >- name: "Canvas.recordingWebGL.memoryLimit", >- description: "Check that the recording is stopped when it reaches the memory limit.", >- test(resolve, reject) { >- startRecording(WI.Canvas.ContextType.WebGL, resolve, reject, {memoryLimit: 10}); >- }, >- timeout: -1, >- }); >- >- suite.addTestCase({ >- name: "Canvas.recordingWebGL.Console", >- description: "Check that a recording can be triggered by console.record().", >- test(resolve, reject) { >- consoleRecord(WI.Canvas.ContextType.WebGL, resolve, reject); >- }, >- }); >- >- suite.runTestCasesAndFinish(); >-} >-</script> >-</head> >-<body onload="load()"> >- <p>Test that CanvasManager is able to record actions made to WebGL canvas contexts.</p> >-</body> >-</html> >diff --git a/LayoutTests/inspector/canvas/recording-webgl2-expected.txt b/LayoutTests/inspector/canvas/recording-webgl2-expected.txt >deleted file mode 100644 >index 763c0d60dc142187168ed0f638f1756b6ad5fd62..0000000000000000000000000000000000000000 >--- a/LayoutTests/inspector/canvas/recording-webgl2-expected.txt >+++ /dev/null >@@ -1,1023 +0,0 @@ >-Test that CanvasManager is able to record actions made to WebGL2 canvas contexts. >- >- >-== Running test suite: Canvas.recordingWebGL2 >--- Running test case: Canvas.recordingWebGL2.singleFrame >-initialState: >- attributes: >- width: 2 >- height: 2 >- parameters: >- 0: {"alpha":true,"depth":true,"stencil":false,"antialias":false,"premultipliedAlpha":true,"preserveDrawingBuffer":false,"failIfMajorPerformanceCaveat":false} >- content: <filtered> >-frames: >- 0: (duration) >- 0: activeTexture(1) >- swizzleTypes: [Number] >- trace: >- 0: activeTexture >- 1: (anonymous function) >- 2: executeFrameFunction >- 3: performActions >- 4: Global Code >- 5: evaluateWithScopeExtension >- 6: (anonymous function) >- 7: _wrapCall >- >--- Running test case: Canvas.recordingWebGL2.multipleFrames >-initialState: >- attributes: >- width: 2 >- height: 2 >- parameters: >- 0: {"alpha":true,"depth":true,"stencil":false,"antialias":false,"premultipliedAlpha":true,"preserveDrawingBuffer":false,"failIfMajorPerformanceCaveat":false} >- content: <filtered> >-frames: >- 0: (duration) >- 0: activeTexture(1) >- swizzleTypes: [Number] >- trace: >- 0: activeTexture >- 1: (anonymous function) >- 2: executeFrameFunction >- 3: performActions >- 4: Global Code >- 5: evaluateWithScopeExtension >- 6: (anonymous function) >- 7: _wrapCall >- 1: (duration) >- 0: attachShader(0, 0) >- swizzleTypes: [WebGLProgram, WebGLShader] >- trace: >- 0: attachShader >- 1: (anonymous function) >- 2: executeFrameFunction >- 2: (duration) >- 0: bindAttribLocation(0, 1, "test") >- swizzleTypes: [WebGLProgram, Number, String] >- trace: >- 0: bindAttribLocation >- 1: (anonymous function) >- 2: executeFrameFunction >- 3: (duration) >- 0: bindBuffer(1, 0) >- swizzleTypes: [Number, WebGLBuffer] >- trace: >- 0: bindBuffer >- 1: (anonymous function) >- 2: executeFrameFunction >- 4: (duration) >- 0: bindFramebuffer(1, 0) >- swizzleTypes: [Number, WebGLFramebuffer] >- trace: >- 0: bindFramebuffer >- 1: (anonymous function) >- 2: executeFrameFunction >- 5: (duration) >- 0: bindRenderbuffer(1, 0) >- swizzleTypes: [Number, WebGLRenderbuffer] >- trace: >- 0: bindRenderbuffer >- 1: (anonymous function) >- 2: executeFrameFunction >- 6: (duration) >- 0: bindTexture(1, 0) >- swizzleTypes: [Number, WebGLTexture] >- trace: >- 0: bindTexture >- 1: (anonymous function) >- 2: executeFrameFunction >- 7: (duration) >- 0: blendColor(1, 2, 3, 4) >- swizzleTypes: [Number, Number, Number, Number] >- trace: >- 0: blendColor >- 1: (anonymous function) >- 2: executeFrameFunction >- 8: (duration) >- 0: blendEquation(1) >- swizzleTypes: [Number] >- trace: >- 0: blendEquation >- 1: (anonymous function) >- 2: executeFrameFunction >- 9: (duration) >- 0: blendEquationSeparate(1, 2) >- swizzleTypes: [Number, Number] >- trace: >- 0: blendEquationSeparate >- 1: (anonymous function) >- 2: executeFrameFunction >- 10: (duration) >- 0: blendFunc(1, 2) >- swizzleTypes: [Number, Number] >- trace: >- 0: blendFunc >- 1: (anonymous function) >- 2: executeFrameFunction >- 11: (duration) >- 0: blendFuncSeparate(1, 2, 3, 4) >- swizzleTypes: [Number, Number, Number, Number] >- trace: >- 0: blendFuncSeparate >- 1: (anonymous function) >- 2: executeFrameFunction >- 12: (duration) >- 0: bufferData(1, 0, 2) >- swizzleTypes: [Number, TypedArray, Number] >- trace: >- 0: bufferData >- 1: (anonymous function) >- 2: executeFrameFunction >- 1: bufferData(3, 4, 5) >- swizzleTypes: [Number, Number, Number] >- trace: >- 0: bufferData >- 1: (anonymous function) >- 2: executeFrameFunction >- 13: (duration) >- 0: bufferSubData(1, 2, 0) >- swizzleTypes: [Number, Number, TypedArray] >- trace: >- 0: bufferSubData >- 1: (anonymous function) >- 2: executeFrameFunction >- 14: (duration) >- 0: checkFramebufferStatus(1) >- swizzleTypes: [Number] >- trace: >- 0: checkFramebufferStatus >- 1: (anonymous function) >- 2: executeFrameFunction >- 15: (duration) >- 0: clear(1) >- swizzleTypes: [Number] >- trace: >- 0: clear >- 1: (anonymous function) >- 2: executeFrameFunction >- snapshot: <filtered> >- 16: (duration) >- 0: clearColor(1, 2, 3, 4) >- swizzleTypes: [Number, Number, Number, Number] >- trace: >- 0: clearColor >- 1: (anonymous function) >- 2: executeFrameFunction >- 17: (duration) >- 0: clearDepth(1) >- swizzleTypes: [Number] >- trace: >- 0: clearDepth >- 1: (anonymous function) >- 2: executeFrameFunction >- 18: (duration) >- 0: clearStencil(1) >- swizzleTypes: [Number] >- trace: >- 0: clearStencil >- 1: (anonymous function) >- 2: executeFrameFunction >- 19: (duration) >- 0: colorMask(true, false, true, false) >- swizzleTypes: [Boolean, Boolean, Boolean, Boolean] >- trace: >- 0: colorMask >- 1: (anonymous function) >- 2: executeFrameFunction >- 20: (duration) >- 0: compileShader(0) >- swizzleTypes: [WebGLShader] >- trace: >- 0: compileShader >- 1: (anonymous function) >- 2: executeFrameFunction >- 21: (duration) >- 0: compressedTexSubImage2D(1, 2, 3, 4, 5, 6, 7, 0) >- swizzleTypes: [Number, Number, Number, Number, Number, Number, Number, TypedArray] >- trace: >- 0: compressedTexSubImage2D >- 1: (anonymous function) >- 2: executeFrameFunction >- 22: (duration) >- 0: copyTexImage2D(1, 2, 3, 4, 5, 6, 7, 8) >- swizzleTypes: [Number, Number, Number, Number, Number, Number, Number, Number] >- trace: >- 0: copyTexImage2D >- 1: (anonymous function) >- 2: executeFrameFunction >- 23: (duration) >- 0: copyTexSubImage2D(1, 2, 3, 4, 5, 6, 7, 8) >- swizzleTypes: [Number, Number, Number, Number, Number, Number, Number, Number] >- trace: >- 0: copyTexSubImage2D >- 1: (anonymous function) >- 2: executeFrameFunction >- 24: (duration) >- 0: createBuffer() >- trace: >- 0: createBuffer >- 1: (anonymous function) >- 2: executeFrameFunction >- 25: (duration) >- 0: createFramebuffer() >- trace: >- 0: createFramebuffer >- 1: (anonymous function) >- 2: executeFrameFunction >- 26: (duration) >- 0: createProgram() >- trace: >- 0: createProgram >- 1: (anonymous function) >- 2: executeFrameFunction >- 27: (duration) >- 0: createRenderbuffer() >- trace: >- 0: createRenderbuffer >- 1: (anonymous function) >- 2: executeFrameFunction >- 28: (duration) >- 0: createShader(1) >- swizzleTypes: [Number] >- trace: >- 0: createShader >- 1: (anonymous function) >- 2: executeFrameFunction >- 29: (duration) >- 0: createTexture() >- trace: >- 0: createTexture >- 1: (anonymous function) >- 2: executeFrameFunction >- 30: (duration) >- 0: cullFace(1) >- swizzleTypes: [Number] >- trace: >- 0: cullFace >- 1: (anonymous function) >- 2: executeFrameFunction >- 31: (duration) >- 0: deleteBuffer(0) >- swizzleTypes: [WebGLBuffer] >- trace: >- 0: deleteBuffer >- 1: (anonymous function) >- 2: executeFrameFunction >- 32: (duration) >- 0: deleteFramebuffer(0) >- swizzleTypes: [WebGLFramebuffer] >- trace: >- 0: deleteFramebuffer >- 1: (anonymous function) >- 2: executeFrameFunction >- 33: (duration) >- 0: deleteProgram(0) >- swizzleTypes: [WebGLProgram] >- trace: >- 0: deleteProgram >- 1: (anonymous function) >- 2: executeFrameFunction >- 34: (duration) >- 0: deleteRenderbuffer(0) >- swizzleTypes: [WebGLRenderbuffer] >- trace: >- 0: deleteRenderbuffer >- 1: (anonymous function) >- 2: executeFrameFunction >- 35: (duration) >- 0: deleteShader(0) >- swizzleTypes: [WebGLShader] >- trace: >- 0: deleteShader >- 1: (anonymous function) >- 2: executeFrameFunction >- 36: (duration) >- 0: deleteTexture(0) >- swizzleTypes: [WebGLTexture] >- trace: >- 0: deleteTexture >- 1: (anonymous function) >- 2: executeFrameFunction >- 37: (duration) >- 0: depthFunc(1) >- swizzleTypes: [Number] >- trace: >- 0: depthFunc >- 1: (anonymous function) >- 2: executeFrameFunction >- 38: (duration) >- 0: depthMask(true) >- swizzleTypes: [Boolean] >- trace: >- 0: depthMask >- 1: (anonymous function) >- 2: executeFrameFunction >- 39: (duration) >- 0: depthRange(1, 2) >- swizzleTypes: [Number, Number] >- trace: >- 0: depthRange >- 1: (anonymous function) >- 2: executeFrameFunction >- 40: (duration) >- 0: detachShader(0, 0) >- swizzleTypes: [WebGLProgram, WebGLShader] >- trace: >- 0: detachShader >- 1: (anonymous function) >- 2: executeFrameFunction >- 41: (duration) >- 0: disable(1) >- swizzleTypes: [Number] >- trace: >- 0: disable >- 1: (anonymous function) >- 2: executeFrameFunction >- 42: (duration) >- 0: disableVertexAttribArray(1) >- swizzleTypes: [Number] >- trace: >- 0: disableVertexAttribArray >- 1: (anonymous function) >- 2: executeFrameFunction >- 43: (duration) >- 0: drawArrays(1, 2, 3) >- swizzleTypes: [Number, Number, Number] >- trace: >- 0: drawArrays >- 1: (anonymous function) >- 2: executeFrameFunction >- snapshot: <filtered> >- 44: (duration) >- 0: drawElements(1, 2, 3, 4) >- swizzleTypes: [Number, Number, Number, Number] >- trace: >- 0: drawElements >- 1: (anonymous function) >- 2: executeFrameFunction >- snapshot: <filtered> >- 45: (duration) >- 0: enable(1) >- swizzleTypes: [Number] >- trace: >- 0: enable >- 1: (anonymous function) >- 2: executeFrameFunction >- 46: (duration) >- 0: enableVertexAttribArray(1) >- swizzleTypes: [Number] >- trace: >- 0: enableVertexAttribArray >- 1: (anonymous function) >- 2: executeFrameFunction >- 47: (duration) >- 0: finish() >- trace: >- 0: finish >- 1: (anonymous function) >- 2: executeFrameFunction >- 48: (duration) >- 0: flush() >- trace: >- 0: flush >- 1: (anonymous function) >- 2: executeFrameFunction >- 49: (duration) >- 0: framebufferRenderbuffer(1, 2, 3, 0) >- swizzleTypes: [Number, Number, Number, WebGLRenderbuffer] >- trace: >- 0: framebufferRenderbuffer >- 1: (anonymous function) >- 2: executeFrameFunction >- 50: (duration) >- 0: framebufferTexture2D(1, 2, 3, 0, 4) >- swizzleTypes: [Number, Number, Number, WebGLTexture, Number] >- trace: >- 0: framebufferTexture2D >- 1: (anonymous function) >- 2: executeFrameFunction >- 51: (duration) >- 0: frontFace(1) >- swizzleTypes: [Number] >- trace: >- 0: frontFace >- 1: (anonymous function) >- 2: executeFrameFunction >- 52: (duration) >- 0: generateMipmap(1) >- swizzleTypes: [Number] >- trace: >- 0: generateMipmap >- 1: (anonymous function) >- 2: executeFrameFunction >- 53: (duration) >- 0: getActiveAttrib(0, 1) >- swizzleTypes: [WebGLProgram, Number] >- trace: >- 0: getActiveAttrib >- 1: (anonymous function) >- 2: executeFrameFunction >- 54: (duration) >- 0: getActiveUniform(0, 1) >- swizzleTypes: [WebGLProgram, Number] >- trace: >- 0: getActiveUniform >- 1: (anonymous function) >- 2: executeFrameFunction >- 55: (duration) >- 0: getAttachedShaders(0) >- swizzleTypes: [WebGLProgram] >- trace: >- 0: getAttachedShaders >- 1: (anonymous function) >- 2: executeFrameFunction >- 56: (duration) >- 0: getAttribLocation(0, "test") >- swizzleTypes: [WebGLProgram, String] >- trace: >- 0: getAttribLocation >- 1: (anonymous function) >- 2: executeFrameFunction >- 57: (duration) >- 0: getBufferParameter(1, 2) >- swizzleTypes: [Number, Number] >- trace: >- 0: getBufferParameter >- 1: (anonymous function) >- 2: executeFrameFunction >- 58: (duration) >- 0: getContextAttributes() >- trace: >- 0: getContextAttributes >- 1: (anonymous function) >- 2: executeFrameFunction >- 59: (duration) >- 0: getError() >- trace: >- 0: getError >- 1: (anonymous function) >- 2: executeFrameFunction >- 60: (duration) >- 0: getExtension("test") >- swizzleTypes: [String] >- trace: >- 0: getExtension >- 1: (anonymous function) >- 2: executeFrameFunction >- 61: (duration) >- 0: getFramebufferAttachmentParameter(1, 2, 3) >- swizzleTypes: [Number, Number, Number] >- trace: >- 0: getFramebufferAttachmentParameter >- 1: (anonymous function) >- 2: executeFrameFunction >- 62: (duration) >- 0: getParameter(1) >- swizzleTypes: [Number] >- trace: >- 0: getParameter >- 1: (anonymous function) >- 2: executeFrameFunction >- 63: (duration) >- 0: getProgramInfoLog(0) >- swizzleTypes: [WebGLProgram] >- trace: >- 0: getProgramInfoLog >- 1: (anonymous function) >- 2: executeFrameFunction >- 64: (duration) >- 0: getProgramParameter(0, 1) >- swizzleTypes: [WebGLProgram, Number] >- trace: >- 0: getProgramParameter >- 1: (anonymous function) >- 2: executeFrameFunction >- 65: (duration) >- 0: getRenderbufferParameter(1, 2) >- swizzleTypes: [Number, Number] >- trace: >- 0: getRenderbufferParameter >- 1: (anonymous function) >- 2: executeFrameFunction >- 66: (duration) >- 0: getShaderInfoLog(0) >- swizzleTypes: [WebGLShader] >- trace: >- 0: getShaderInfoLog >- 1: (anonymous function) >- 2: executeFrameFunction >- 67: (duration) >- 0: getShaderParameter(0, 1) >- swizzleTypes: [WebGLShader, Number] >- trace: >- 0: getShaderParameter >- 1: (anonymous function) >- 2: executeFrameFunction >- 68: (duration) >- 0: getShaderPrecisionFormat(1, 2) >- swizzleTypes: [Number, Number] >- trace: >- 0: getShaderPrecisionFormat >- 1: (anonymous function) >- 2: executeFrameFunction >- 69: (duration) >- 0: getShaderSource(0) >- swizzleTypes: [WebGLShader] >- trace: >- 0: getShaderSource >- 1: (anonymous function) >- 2: executeFrameFunction >- 70: (duration) >- 0: getSupportedExtensions() >- trace: >- 0: getSupportedExtensions >- 1: (anonymous function) >- 2: executeFrameFunction >- 71: (duration) >- 0: getTexParameter(1, 2) >- swizzleTypes: [Number, Number] >- trace: >- 0: getTexParameter >- 1: (anonymous function) >- 2: executeFrameFunction >- 72: (duration) >- 0: getUniform(0) >- swizzleTypes: [WebGLProgram] >- trace: >- 0: getUniform >- 1: (anonymous function) >- 2: executeFrameFunction >- 73: (duration) >- 0: getUniformLocation(0, "test") >- swizzleTypes: [WebGLProgram, String] >- trace: >- 0: getUniformLocation >- 1: (anonymous function) >- 2: executeFrameFunction >- 74: (duration) >- 0: getVertexAttrib(1, 2) >- swizzleTypes: [Number, Number] >- trace: >- 0: getVertexAttrib >- 1: (anonymous function) >- 2: executeFrameFunction >- 75: (duration) >- 0: getVertexAttribOffset(1, 2) >- swizzleTypes: [Number, Number] >- trace: >- 0: getVertexAttribOffset >- 1: (anonymous function) >- 2: executeFrameFunction >- 76: (duration) >- 0: hint(1, 2) >- swizzleTypes: [Number, Number] >- trace: >- 0: hint >- 1: (anonymous function) >- 2: executeFrameFunction >- 77: (duration) >- 0: isBuffer(0) >- swizzleTypes: [WebGLBuffer] >- trace: >- 0: isBuffer >- 1: (anonymous function) >- 2: executeFrameFunction >- 78: (duration) >- 0: isContextLost() >- trace: >- 0: isContextLost >- 1: (anonymous function) >- 2: executeFrameFunction >- 79: (duration) >- 0: isEnabled(1) >- swizzleTypes: [Number] >- trace: >- 0: isEnabled >- 1: (anonymous function) >- 2: executeFrameFunction >- 80: (duration) >- 0: isFramebuffer(0) >- swizzleTypes: [WebGLFramebuffer] >- trace: >- 0: isFramebuffer >- 1: (anonymous function) >- 2: executeFrameFunction >- 81: (duration) >- 0: isProgram(0) >- swizzleTypes: [WebGLProgram] >- trace: >- 0: isProgram >- 1: (anonymous function) >- 2: executeFrameFunction >- 82: (duration) >- 0: isRenderbuffer(0) >- swizzleTypes: [WebGLRenderbuffer] >- trace: >- 0: isRenderbuffer >- 1: (anonymous function) >- 2: executeFrameFunction >- 83: (duration) >- 0: isShader(0) >- swizzleTypes: [WebGLShader] >- trace: >- 0: isShader >- 1: (anonymous function) >- 2: executeFrameFunction >- 84: (duration) >- 0: isTexture(0) >- swizzleTypes: [WebGLTexture] >- trace: >- 0: isTexture >- 1: (anonymous function) >- 2: executeFrameFunction >- 85: (duration) >- 0: lineWidth(1) >- swizzleTypes: [Number] >- trace: >- 0: lineWidth >- 1: (anonymous function) >- 2: executeFrameFunction >- 86: (duration) >- 0: linkProgram(0) >- swizzleTypes: [WebGLProgram] >- trace: >- 0: linkProgram >- 1: (anonymous function) >- 2: executeFrameFunction >- 87: (duration) >- 0: pixelStorei(1, 2) >- swizzleTypes: [Number, Number] >- trace: >- 0: pixelStorei >- 1: (anonymous function) >- 2: executeFrameFunction >- 88: (duration) >- 0: polygonOffset(1, 2) >- swizzleTypes: [Number, Number] >- trace: >- 0: polygonOffset >- 1: (anonymous function) >- 2: executeFrameFunction >- 89: (duration) >- 0: readPixels(1, 2, 3, 4, 5, 6, 0) >- swizzleTypes: [Number, Number, Number, Number, Number, Number, TypedArray] >- trace: >- 0: readPixels >- 1: (anonymous function) >- 2: executeFrameFunction >- 90: (duration) >- 0: releaseShaderCompiler() >- trace: >- 0: releaseShaderCompiler >- 1: (anonymous function) >- 2: executeFrameFunction >- 91: (duration) >- 0: renderbufferStorage(1, 2, 3, 4) >- swizzleTypes: [Number, Number, Number, Number] >- trace: >- 0: renderbufferStorage >- 1: (anonymous function) >- 2: executeFrameFunction >- 92: (duration) >- 0: sampleCoverage(1, true) >- swizzleTypes: [Number, Boolean] >- trace: >- 0: sampleCoverage >- 1: (anonymous function) >- 2: executeFrameFunction >- 93: (duration) >- 0: scissor(1, 2, 3, 4) >- swizzleTypes: [Number, Number, Number, Number] >- trace: >- 0: scissor >- 1: (anonymous function) >- 2: executeFrameFunction >- 94: (duration) >- 0: shaderSource(0, "test") >- swizzleTypes: [WebGLShader, String] >- trace: >- 0: shaderSource >- 1: (anonymous function) >- 2: executeFrameFunction >- 95: (duration) >- 0: stencilFunc(1, 2, 3) >- swizzleTypes: [Number, Number, Number] >- trace: >- 0: stencilFunc >- 1: (anonymous function) >- 2: executeFrameFunction >- 96: (duration) >- 0: stencilFuncSeparate(1, 2, 3, 4) >- swizzleTypes: [Number, Number, Number, Number] >- trace: >- 0: stencilFuncSeparate >- 1: (anonymous function) >- 2: executeFrameFunction >- 97: (duration) >- 0: stencilMask(1) >- swizzleTypes: [Number] >- trace: >- 0: stencilMask >- 1: (anonymous function) >- 2: executeFrameFunction >- 98: (duration) >- 0: stencilMaskSeparate(1, 2) >- swizzleTypes: [Number, Number] >- trace: >- 0: stencilMaskSeparate >- 1: (anonymous function) >- 2: executeFrameFunction >- 99: (duration) >- 0: stencilOp(1, 2, 3) >- swizzleTypes: [Number, Number, Number] >- trace: >- 0: stencilOp >- 1: (anonymous function) >- 2: executeFrameFunction >- 100: (duration) >- 0: stencilOpSeparate(1, 2, 3, 4) >- swizzleTypes: [Number, Number, Number, Number] >- trace: >- 0: stencilOpSeparate >- 1: (anonymous function) >- 2: executeFrameFunction >- 101: (duration) >- 0: texParameterf(1, 2, 3) >- swizzleTypes: [Number, Number, Number] >- trace: >- 0: texParameterf >- 1: (anonymous function) >- 2: executeFrameFunction >- 102: (duration) >- 0: texParameteri(1, 2, 3) >- swizzleTypes: [Number, Number, Number] >- trace: >- 0: texParameteri >- 1: (anonymous function) >- 2: executeFrameFunction >- 103: (duration) >- 0: uniform1f(1) >- swizzleTypes: [Number] >- trace: >- 0: uniform1f >- 1: (anonymous function) >- 2: executeFrameFunction >- 104: (duration) >- 0: uniform1fv(0) >- swizzleTypes: [TypedArray] >- trace: >- 0: uniform1fv >- 1: (anonymous function) >- 2: executeFrameFunction >- 105: (duration) >- 0: uniform1i(1) >- swizzleTypes: [Number] >- trace: >- 0: uniform1i >- 1: (anonymous function) >- 2: executeFrameFunction >- 106: (duration) >- 0: uniform1iv(0) >- swizzleTypes: [TypedArray] >- trace: >- 0: uniform1iv >- 1: (anonymous function) >- 2: executeFrameFunction >- 107: (duration) >- 0: uniform2f(1, 2) >- swizzleTypes: [Number, Number] >- trace: >- 0: uniform2f >- 1: (anonymous function) >- 2: executeFrameFunction >- 108: (duration) >- 0: uniform2fv(0) >- swizzleTypes: [TypedArray] >- trace: >- 0: uniform2fv >- 1: (anonymous function) >- 2: executeFrameFunction >- 109: (duration) >- 0: uniform2i(1, 2) >- swizzleTypes: [Number, Number] >- trace: >- 0: uniform2i >- 1: (anonymous function) >- 2: executeFrameFunction >- 110: (duration) >- 0: uniform2iv(0) >- swizzleTypes: [TypedArray] >- trace: >- 0: uniform2iv >- 1: (anonymous function) >- 2: executeFrameFunction >- 111: (duration) >- 0: uniform3f(1, 2, 3) >- swizzleTypes: [Number, Number, Number] >- trace: >- 0: uniform3f >- 1: (anonymous function) >- 2: executeFrameFunction >- 112: (duration) >- 0: uniform3fv(0) >- swizzleTypes: [TypedArray] >- trace: >- 0: uniform3fv >- 1: (anonymous function) >- 2: executeFrameFunction >- 113: (duration) >- 0: uniform3i(1, 2, 3) >- swizzleTypes: [Number, Number, Number] >- trace: >- 0: uniform3i >- 1: (anonymous function) >- 2: executeFrameFunction >- 114: (duration) >- 0: uniform3iv(0) >- swizzleTypes: [TypedArray] >- trace: >- 0: uniform3iv >- 1: (anonymous function) >- 2: executeFrameFunction >- 115: (duration) >- 0: uniform4f(1, 2, 3, 4) >- swizzleTypes: [Number, Number, Number, Number] >- trace: >- 0: uniform4f >- 1: (anonymous function) >- 2: executeFrameFunction >- 116: (duration) >- 0: uniform4fv(0) >- swizzleTypes: [TypedArray] >- trace: >- 0: uniform4fv >- 1: (anonymous function) >- 2: executeFrameFunction >- 117: (duration) >- 0: uniform4i(1, 2, 3, 4) >- swizzleTypes: [Number, Number, Number, Number] >- trace: >- 0: uniform4i >- 1: (anonymous function) >- 2: executeFrameFunction >- 118: (duration) >- 0: uniform4iv(0) >- swizzleTypes: [TypedArray] >- trace: >- 0: uniform4iv >- 1: (anonymous function) >- 2: executeFrameFunction >- 119: (duration) >- 0: uniformMatrix2fv(true, 0) >- swizzleTypes: [Boolean, TypedArray] >- trace: >- 0: uniformMatrix2fv >- 1: (anonymous function) >- 2: executeFrameFunction >- 120: (duration) >- 0: uniformMatrix3fv(true, 0) >- swizzleTypes: [Boolean, TypedArray] >- trace: >- 0: uniformMatrix3fv >- 1: (anonymous function) >- 2: executeFrameFunction >- 121: (duration) >- 0: uniformMatrix4fv(true, 0) >- swizzleTypes: [Boolean, TypedArray] >- trace: >- 0: uniformMatrix4fv >- 1: (anonymous function) >- 2: executeFrameFunction >- 122: (duration) >- 0: useProgram(0) >- swizzleTypes: [WebGLProgram] >- trace: >- 0: useProgram >- 1: (anonymous function) >- 2: executeFrameFunction >- 123: (duration) >- 0: validateProgram(0) >- swizzleTypes: [WebGLProgram] >- trace: >- 0: validateProgram >- 1: (anonymous function) >- 2: executeFrameFunction >- 124: (duration) >- 0: vertexAttrib1f(1, 2) >- swizzleTypes: [Number, Number] >- trace: >- 0: vertexAttrib1f >- 1: (anonymous function) >- 2: executeFrameFunction >- 125: (duration) >- 0: vertexAttrib1fv(1, 0) >- swizzleTypes: [Number, TypedArray] >- trace: >- 0: vertexAttrib1fv >- 1: (anonymous function) >- 2: executeFrameFunction >- 126: (duration) >- 0: vertexAttrib2f(1, 2, 3) >- swizzleTypes: [Number, Number, Number] >- trace: >- 0: vertexAttrib2f >- 1: (anonymous function) >- 2: executeFrameFunction >- 127: (duration) >- 0: vertexAttrib2fv(1, 0) >- swizzleTypes: [Number, TypedArray] >- trace: >- 0: vertexAttrib2fv >- 1: (anonymous function) >- 2: executeFrameFunction >- 128: (duration) >- 0: vertexAttrib3f(1, 2, 3, 4) >- swizzleTypes: [Number, Number, Number, Number] >- trace: >- 0: vertexAttrib3f >- 1: (anonymous function) >- 2: executeFrameFunction >- 129: (duration) >- 0: vertexAttrib3fv(1, 0) >- swizzleTypes: [Number, TypedArray] >- trace: >- 0: vertexAttrib3fv >- 1: (anonymous function) >- 2: executeFrameFunction >- 130: (duration) >- 0: vertexAttrib4f(1, 2, 3, 4, 5) >- swizzleTypes: [Number, Number, Number, Number, Number] >- trace: >- 0: vertexAttrib4f >- 1: (anonymous function) >- 2: executeFrameFunction >- 131: (duration) >- 0: vertexAttrib4fv(1, 0) >- swizzleTypes: [Number, TypedArray] >- trace: >- 0: vertexAttrib4fv >- 1: (anonymous function) >- 2: executeFrameFunction >- 132: (duration) >- 0: vertexAttribPointer(1, 2, 3, true, 5, 6) >- swizzleTypes: [Number, Number, Number, Boolean, Number, Number] >- trace: >- 0: vertexAttribPointer >- 1: (anonymous function) >- 2: executeFrameFunction >- 133: (duration) >- 0: viewport(1, 2, 3, 4) >- swizzleTypes: [Number, Number, Number, Number] >- trace: >- 0: viewport >- 1: (anonymous function) >- 2: executeFrameFunction >- 134: (duration) >- 0: width >- trace: >- 0: (anonymous function) >- 1: executeFrameFunction >- 1: width = 2 >- swizzleTypes: [Number] >- trace: >- 0: (anonymous function) >- 1: executeFrameFunction >- 135: (duration) >- 0: height >- trace: >- 0: (anonymous function) >- 1: executeFrameFunction >- 1: height = 2 >- swizzleTypes: [Number] >- trace: >- 0: (anonymous function) >- 1: executeFrameFunction >- >--- Running test case: Canvas.recordingWebGL2.memoryLimit >-initialState: >- attributes: >- width: 2 >- height: 2 >- parameters: >- 0: {"alpha":true,"depth":true,"stencil":false,"antialias":false,"premultipliedAlpha":true,"preserveDrawingBuffer":false,"failIfMajorPerformanceCaveat":false} >- content: <filtered> >-frames: >- 0: (duration) (incomplete) >- 0: activeTexture(1) >- swizzleTypes: [Number] >- trace: >- 0: activeTexture >- 1: (anonymous function) >- 2: executeFrameFunction >- 3: performActions >- 4: Global Code >- 5: evaluateWithScopeExtension >- 6: (anonymous function) >- 7: _wrapCall >- >--- Running test case: Canvas.recordingWebGL2.Console >-PASS: The recording should have the name "TEST". >-PASS: The recording should have one frame. >-PASS: The first frame should have one action. >- >diff --git a/LayoutTests/inspector/canvas/recording-webgl2-frameCount-expected.txt b/LayoutTests/inspector/canvas/recording-webgl2-frameCount-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..29bf6d1fad9c2c798cf5f6543125eb86c8bf88dd >--- /dev/null >+++ b/LayoutTests/inspector/canvas/recording-webgl2-frameCount-expected.txt >@@ -0,0 +1,26 @@ >+Test that CanvasManager is able to record actions made to WebGL2 canvas contexts. >+ >+ >+== Running test suite: Canvas.recordingWebGL2 >+-- Running test case: Canvas.recordingWebGL2.singleFrame >+initialState: >+ attributes: >+ width: 2 >+ height: 2 >+ parameters: >+ 0: {"alpha":true,"depth":true,"stencil":false,"antialias":false,"premultipliedAlpha":true,"preserveDrawingBuffer":false,"failIfMajorPerformanceCaveat":false} >+ content: <filtered> >+frames: >+ 0: (duration) >+ 0: activeTexture(1) >+ swizzleTypes: [Number] >+ trace: >+ 0: activeTexture >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 3: performActions >+ 4: Global Code >+ 5: evaluateWithScopeExtension >+ 6: (anonymous function) >+ 7: _wrapCall >+ >diff --git a/LayoutTests/inspector/canvas/recording-webgl2-frameCount.html b/LayoutTests/inspector/canvas/recording-webgl2-frameCount.html >new file mode 100644 >index 0000000000000000000000000000000000000000..4ca7c1d905d09f353b644bc950954deb09b0eb8a >--- /dev/null >+++ b/LayoutTests/inspector/canvas/recording-webgl2-frameCount.html >@@ -0,0 +1,41 @@ >+<!DOCTYPE html> >+<html> >+<head> >+<script src="../../http/tests/inspector/resources/inspector-test.js"></script> >+<script src="resources/recording-utilities.js"></script> >+<script src="resources/shaderProgram-utilities.js"></script> >+<script id="vertex-shader" type="x-shader/x-vertex"> >+ attribute vec4 test; >+ void main(void) { >+ gl_Position = test; >+ } >+</script> >+<script id="fragment-shader" type="x-shader/x-fragment"> >+ precision mediump float; >+ >+ void main(void) { >+ gl_FragColor = vec4(1.0, 1.0, 1.0, 1.0); >+ } >+</script> >+<script src="resources/recording-webgl2.js"></script> >+<script> >+function test() { >+ let suite = InspectorTest.createAsyncSuite("Canvas.recordingWebGL2"); >+ >+ suite.addTestCase({ >+ name: "Canvas.recordingWebGL2.singleFrame", >+ description: "Check that the recording is stopped after a single frame.", >+ test(resolve, reject) { >+ startRecording(WI.Canvas.ContextType.WebGL2, resolve, reject, {frameCount: 1}); >+ }, >+ timeout: -1, >+ }); >+ >+ suite.runTestCasesAndFinish(); >+} >+</script> >+</head> >+<body onload="load()"> >+ <p>Test that CanvasManager is able to record actions made to WebGL2 canvas contexts.</p> >+</body> >+</html> >diff --git a/LayoutTests/inspector/canvas/recording-webgl2-full-expected.txt b/LayoutTests/inspector/canvas/recording-webgl2-full-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..7e96e3b334662c12756441b0cd42f73901706603 >--- /dev/null >+++ b/LayoutTests/inspector/canvas/recording-webgl2-full-expected.txt >@@ -0,0 +1,974 @@ >+Test that CanvasManager is able to record actions made to WebGL2 canvas contexts. >+ >+ >+== Running test suite: Canvas.recordingWebGL2 >+-- Running test case: Canvas.recordingWebGL2.multipleFrames >+initialState: >+ attributes: >+ width: 2 >+ height: 2 >+ parameters: >+ 0: {"alpha":true,"depth":true,"stencil":false,"antialias":false,"premultipliedAlpha":true,"preserveDrawingBuffer":false,"failIfMajorPerformanceCaveat":false} >+ content: <filtered> >+frames: >+ 0: (duration) >+ 0: activeTexture(1) >+ swizzleTypes: [Number] >+ trace: >+ 0: activeTexture >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 3: performActions >+ 4: Global Code >+ 5: evaluateWithScopeExtension >+ 6: (anonymous function) >+ 7: _wrapCall >+ 1: (duration) >+ 0: attachShader(0, 0) >+ swizzleTypes: [WebGLProgram, WebGLShader] >+ trace: >+ 0: attachShader >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 2: (duration) >+ 0: bindAttribLocation(0, 1, "test") >+ swizzleTypes: [WebGLProgram, Number, String] >+ trace: >+ 0: bindAttribLocation >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 3: (duration) >+ 0: bindBuffer(1, 0) >+ swizzleTypes: [Number, WebGLBuffer] >+ trace: >+ 0: bindBuffer >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 4: (duration) >+ 0: bindFramebuffer(1, 0) >+ swizzleTypes: [Number, WebGLFramebuffer] >+ trace: >+ 0: bindFramebuffer >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 5: (duration) >+ 0: bindRenderbuffer(1, 0) >+ swizzleTypes: [Number, WebGLRenderbuffer] >+ trace: >+ 0: bindRenderbuffer >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 6: (duration) >+ 0: bindTexture(1, 0) >+ swizzleTypes: [Number, WebGLTexture] >+ trace: >+ 0: bindTexture >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 7: (duration) >+ 0: blendColor(1, 2, 3, 4) >+ swizzleTypes: [Number, Number, Number, Number] >+ trace: >+ 0: blendColor >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 8: (duration) >+ 0: blendEquation(1) >+ swizzleTypes: [Number] >+ trace: >+ 0: blendEquation >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 9: (duration) >+ 0: blendEquationSeparate(1, 2) >+ swizzleTypes: [Number, Number] >+ trace: >+ 0: blendEquationSeparate >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 10: (duration) >+ 0: blendFunc(1, 2) >+ swizzleTypes: [Number, Number] >+ trace: >+ 0: blendFunc >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 11: (duration) >+ 0: blendFuncSeparate(1, 2, 3, 4) >+ swizzleTypes: [Number, Number, Number, Number] >+ trace: >+ 0: blendFuncSeparate >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 12: (duration) >+ 0: bufferData(1, 0, 2) >+ swizzleTypes: [Number, TypedArray, Number] >+ trace: >+ 0: bufferData >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 1: bufferData(3, 4, 5) >+ swizzleTypes: [Number, Number, Number] >+ trace: >+ 0: bufferData >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 13: (duration) >+ 0: bufferSubData(1, 2, 0) >+ swizzleTypes: [Number, Number, TypedArray] >+ trace: >+ 0: bufferSubData >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 14: (duration) >+ 0: checkFramebufferStatus(1) >+ swizzleTypes: [Number] >+ trace: >+ 0: checkFramebufferStatus >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 15: (duration) >+ 0: clear(1) >+ swizzleTypes: [Number] >+ trace: >+ 0: clear >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ snapshot: <filtered> >+ 16: (duration) >+ 0: clearColor(1, 2, 3, 4) >+ swizzleTypes: [Number, Number, Number, Number] >+ trace: >+ 0: clearColor >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 17: (duration) >+ 0: clearDepth(1) >+ swizzleTypes: [Number] >+ trace: >+ 0: clearDepth >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 18: (duration) >+ 0: clearStencil(1) >+ swizzleTypes: [Number] >+ trace: >+ 0: clearStencil >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 19: (duration) >+ 0: colorMask(true, false, true, false) >+ swizzleTypes: [Boolean, Boolean, Boolean, Boolean] >+ trace: >+ 0: colorMask >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 20: (duration) >+ 0: compileShader(0) >+ swizzleTypes: [WebGLShader] >+ trace: >+ 0: compileShader >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 21: (duration) >+ 0: compressedTexSubImage2D(1, 2, 3, 4, 5, 6, 7, 0) >+ swizzleTypes: [Number, Number, Number, Number, Number, Number, Number, TypedArray] >+ trace: >+ 0: compressedTexSubImage2D >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 22: (duration) >+ 0: copyTexImage2D(1, 2, 3, 4, 5, 6, 7, 8) >+ swizzleTypes: [Number, Number, Number, Number, Number, Number, Number, Number] >+ trace: >+ 0: copyTexImage2D >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 23: (duration) >+ 0: copyTexSubImage2D(1, 2, 3, 4, 5, 6, 7, 8) >+ swizzleTypes: [Number, Number, Number, Number, Number, Number, Number, Number] >+ trace: >+ 0: copyTexSubImage2D >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 24: (duration) >+ 0: createBuffer() >+ trace: >+ 0: createBuffer >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 25: (duration) >+ 0: createFramebuffer() >+ trace: >+ 0: createFramebuffer >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 26: (duration) >+ 0: createProgram() >+ trace: >+ 0: createProgram >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 27: (duration) >+ 0: createRenderbuffer() >+ trace: >+ 0: createRenderbuffer >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 28: (duration) >+ 0: createShader(1) >+ swizzleTypes: [Number] >+ trace: >+ 0: createShader >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 29: (duration) >+ 0: createTexture() >+ trace: >+ 0: createTexture >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 30: (duration) >+ 0: cullFace(1) >+ swizzleTypes: [Number] >+ trace: >+ 0: cullFace >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 31: (duration) >+ 0: deleteBuffer(0) >+ swizzleTypes: [WebGLBuffer] >+ trace: >+ 0: deleteBuffer >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 32: (duration) >+ 0: deleteFramebuffer(0) >+ swizzleTypes: [WebGLFramebuffer] >+ trace: >+ 0: deleteFramebuffer >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 33: (duration) >+ 0: deleteProgram(0) >+ swizzleTypes: [WebGLProgram] >+ trace: >+ 0: deleteProgram >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 34: (duration) >+ 0: deleteRenderbuffer(0) >+ swizzleTypes: [WebGLRenderbuffer] >+ trace: >+ 0: deleteRenderbuffer >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 35: (duration) >+ 0: deleteShader(0) >+ swizzleTypes: [WebGLShader] >+ trace: >+ 0: deleteShader >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 36: (duration) >+ 0: deleteTexture(0) >+ swizzleTypes: [WebGLTexture] >+ trace: >+ 0: deleteTexture >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 37: (duration) >+ 0: depthFunc(1) >+ swizzleTypes: [Number] >+ trace: >+ 0: depthFunc >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 38: (duration) >+ 0: depthMask(true) >+ swizzleTypes: [Boolean] >+ trace: >+ 0: depthMask >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 39: (duration) >+ 0: depthRange(1, 2) >+ swizzleTypes: [Number, Number] >+ trace: >+ 0: depthRange >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 40: (duration) >+ 0: detachShader(0, 0) >+ swizzleTypes: [WebGLProgram, WebGLShader] >+ trace: >+ 0: detachShader >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 41: (duration) >+ 0: disable(1) >+ swizzleTypes: [Number] >+ trace: >+ 0: disable >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 42: (duration) >+ 0: disableVertexAttribArray(1) >+ swizzleTypes: [Number] >+ trace: >+ 0: disableVertexAttribArray >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 43: (duration) >+ 0: drawArrays(1, 2, 3) >+ swizzleTypes: [Number, Number, Number] >+ trace: >+ 0: drawArrays >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ snapshot: <filtered> >+ 44: (duration) >+ 0: drawElements(1, 2, 3, 4) >+ swizzleTypes: [Number, Number, Number, Number] >+ trace: >+ 0: drawElements >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ snapshot: <filtered> >+ 45: (duration) >+ 0: enable(1) >+ swizzleTypes: [Number] >+ trace: >+ 0: enable >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 46: (duration) >+ 0: enableVertexAttribArray(1) >+ swizzleTypes: [Number] >+ trace: >+ 0: enableVertexAttribArray >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 47: (duration) >+ 0: finish() >+ trace: >+ 0: finish >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 48: (duration) >+ 0: flush() >+ trace: >+ 0: flush >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 49: (duration) >+ 0: framebufferRenderbuffer(1, 2, 3, 0) >+ swizzleTypes: [Number, Number, Number, WebGLRenderbuffer] >+ trace: >+ 0: framebufferRenderbuffer >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 50: (duration) >+ 0: framebufferTexture2D(1, 2, 3, 0, 4) >+ swizzleTypes: [Number, Number, Number, WebGLTexture, Number] >+ trace: >+ 0: framebufferTexture2D >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 51: (duration) >+ 0: frontFace(1) >+ swizzleTypes: [Number] >+ trace: >+ 0: frontFace >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 52: (duration) >+ 0: generateMipmap(1) >+ swizzleTypes: [Number] >+ trace: >+ 0: generateMipmap >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 53: (duration) >+ 0: getActiveAttrib(0, 1) >+ swizzleTypes: [WebGLProgram, Number] >+ trace: >+ 0: getActiveAttrib >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 54: (duration) >+ 0: getActiveUniform(0, 1) >+ swizzleTypes: [WebGLProgram, Number] >+ trace: >+ 0: getActiveUniform >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 55: (duration) >+ 0: getAttachedShaders(0) >+ swizzleTypes: [WebGLProgram] >+ trace: >+ 0: getAttachedShaders >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 56: (duration) >+ 0: getAttribLocation(0, "test") >+ swizzleTypes: [WebGLProgram, String] >+ trace: >+ 0: getAttribLocation >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 57: (duration) >+ 0: getBufferParameter(1, 2) >+ swizzleTypes: [Number, Number] >+ trace: >+ 0: getBufferParameter >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 58: (duration) >+ 0: getContextAttributes() >+ trace: >+ 0: getContextAttributes >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 59: (duration) >+ 0: getError() >+ trace: >+ 0: getError >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 60: (duration) >+ 0: getExtension("test") >+ swizzleTypes: [String] >+ trace: >+ 0: getExtension >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 61: (duration) >+ 0: getFramebufferAttachmentParameter(1, 2, 3) >+ swizzleTypes: [Number, Number, Number] >+ trace: >+ 0: getFramebufferAttachmentParameter >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 62: (duration) >+ 0: getParameter(1) >+ swizzleTypes: [Number] >+ trace: >+ 0: getParameter >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 63: (duration) >+ 0: getProgramInfoLog(0) >+ swizzleTypes: [WebGLProgram] >+ trace: >+ 0: getProgramInfoLog >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 64: (duration) >+ 0: getProgramParameter(0, 1) >+ swizzleTypes: [WebGLProgram, Number] >+ trace: >+ 0: getProgramParameter >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 65: (duration) >+ 0: getRenderbufferParameter(1, 2) >+ swizzleTypes: [Number, Number] >+ trace: >+ 0: getRenderbufferParameter >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 66: (duration) >+ 0: getShaderInfoLog(0) >+ swizzleTypes: [WebGLShader] >+ trace: >+ 0: getShaderInfoLog >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 67: (duration) >+ 0: getShaderParameter(0, 1) >+ swizzleTypes: [WebGLShader, Number] >+ trace: >+ 0: getShaderParameter >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 68: (duration) >+ 0: getShaderPrecisionFormat(1, 2) >+ swizzleTypes: [Number, Number] >+ trace: >+ 0: getShaderPrecisionFormat >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 69: (duration) >+ 0: getShaderSource(0) >+ swizzleTypes: [WebGLShader] >+ trace: >+ 0: getShaderSource >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 70: (duration) >+ 0: getSupportedExtensions() >+ trace: >+ 0: getSupportedExtensions >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 71: (duration) >+ 0: getTexParameter(1, 2) >+ swizzleTypes: [Number, Number] >+ trace: >+ 0: getTexParameter >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 72: (duration) >+ 0: getUniform(0) >+ swizzleTypes: [WebGLProgram] >+ trace: >+ 0: getUniform >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 73: (duration) >+ 0: getUniformLocation(0, "test") >+ swizzleTypes: [WebGLProgram, String] >+ trace: >+ 0: getUniformLocation >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 74: (duration) >+ 0: getVertexAttrib(1, 2) >+ swizzleTypes: [Number, Number] >+ trace: >+ 0: getVertexAttrib >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 75: (duration) >+ 0: getVertexAttribOffset(1, 2) >+ swizzleTypes: [Number, Number] >+ trace: >+ 0: getVertexAttribOffset >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 76: (duration) >+ 0: hint(1, 2) >+ swizzleTypes: [Number, Number] >+ trace: >+ 0: hint >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 77: (duration) >+ 0: isBuffer(0) >+ swizzleTypes: [WebGLBuffer] >+ trace: >+ 0: isBuffer >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 78: (duration) >+ 0: isContextLost() >+ trace: >+ 0: isContextLost >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 79: (duration) >+ 0: isEnabled(1) >+ swizzleTypes: [Number] >+ trace: >+ 0: isEnabled >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 80: (duration) >+ 0: isFramebuffer(0) >+ swizzleTypes: [WebGLFramebuffer] >+ trace: >+ 0: isFramebuffer >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 81: (duration) >+ 0: isProgram(0) >+ swizzleTypes: [WebGLProgram] >+ trace: >+ 0: isProgram >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 82: (duration) >+ 0: isRenderbuffer(0) >+ swizzleTypes: [WebGLRenderbuffer] >+ trace: >+ 0: isRenderbuffer >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 83: (duration) >+ 0: isShader(0) >+ swizzleTypes: [WebGLShader] >+ trace: >+ 0: isShader >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 84: (duration) >+ 0: isTexture(0) >+ swizzleTypes: [WebGLTexture] >+ trace: >+ 0: isTexture >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 85: (duration) >+ 0: lineWidth(1) >+ swizzleTypes: [Number] >+ trace: >+ 0: lineWidth >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 86: (duration) >+ 0: linkProgram(0) >+ swizzleTypes: [WebGLProgram] >+ trace: >+ 0: linkProgram >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 87: (duration) >+ 0: pixelStorei(1, 2) >+ swizzleTypes: [Number, Number] >+ trace: >+ 0: pixelStorei >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 88: (duration) >+ 0: polygonOffset(1, 2) >+ swizzleTypes: [Number, Number] >+ trace: >+ 0: polygonOffset >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 89: (duration) >+ 0: readPixels(1, 2, 3, 4, 5, 6, 0) >+ swizzleTypes: [Number, Number, Number, Number, Number, Number, TypedArray] >+ trace: >+ 0: readPixels >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 90: (duration) >+ 0: releaseShaderCompiler() >+ trace: >+ 0: releaseShaderCompiler >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 91: (duration) >+ 0: renderbufferStorage(1, 2, 3, 4) >+ swizzleTypes: [Number, Number, Number, Number] >+ trace: >+ 0: renderbufferStorage >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 92: (duration) >+ 0: sampleCoverage(1, true) >+ swizzleTypes: [Number, Boolean] >+ trace: >+ 0: sampleCoverage >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 93: (duration) >+ 0: scissor(1, 2, 3, 4) >+ swizzleTypes: [Number, Number, Number, Number] >+ trace: >+ 0: scissor >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 94: (duration) >+ 0: shaderSource(0, "test") >+ swizzleTypes: [WebGLShader, String] >+ trace: >+ 0: shaderSource >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 95: (duration) >+ 0: stencilFunc(1, 2, 3) >+ swizzleTypes: [Number, Number, Number] >+ trace: >+ 0: stencilFunc >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 96: (duration) >+ 0: stencilFuncSeparate(1, 2, 3, 4) >+ swizzleTypes: [Number, Number, Number, Number] >+ trace: >+ 0: stencilFuncSeparate >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 97: (duration) >+ 0: stencilMask(1) >+ swizzleTypes: [Number] >+ trace: >+ 0: stencilMask >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 98: (duration) >+ 0: stencilMaskSeparate(1, 2) >+ swizzleTypes: [Number, Number] >+ trace: >+ 0: stencilMaskSeparate >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 99: (duration) >+ 0: stencilOp(1, 2, 3) >+ swizzleTypes: [Number, Number, Number] >+ trace: >+ 0: stencilOp >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 100: (duration) >+ 0: stencilOpSeparate(1, 2, 3, 4) >+ swizzleTypes: [Number, Number, Number, Number] >+ trace: >+ 0: stencilOpSeparate >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 101: (duration) >+ 0: texParameterf(1, 2, 3) >+ swizzleTypes: [Number, Number, Number] >+ trace: >+ 0: texParameterf >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 102: (duration) >+ 0: texParameteri(1, 2, 3) >+ swizzleTypes: [Number, Number, Number] >+ trace: >+ 0: texParameteri >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 103: (duration) >+ 0: uniform1f(1) >+ swizzleTypes: [Number] >+ trace: >+ 0: uniform1f >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 104: (duration) >+ 0: uniform1fv(0) >+ swizzleTypes: [TypedArray] >+ trace: >+ 0: uniform1fv >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 105: (duration) >+ 0: uniform1i(1) >+ swizzleTypes: [Number] >+ trace: >+ 0: uniform1i >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 106: (duration) >+ 0: uniform1iv(0) >+ swizzleTypes: [TypedArray] >+ trace: >+ 0: uniform1iv >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 107: (duration) >+ 0: uniform2f(1, 2) >+ swizzleTypes: [Number, Number] >+ trace: >+ 0: uniform2f >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 108: (duration) >+ 0: uniform2fv(0) >+ swizzleTypes: [TypedArray] >+ trace: >+ 0: uniform2fv >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 109: (duration) >+ 0: uniform2i(1, 2) >+ swizzleTypes: [Number, Number] >+ trace: >+ 0: uniform2i >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 110: (duration) >+ 0: uniform2iv(0) >+ swizzleTypes: [TypedArray] >+ trace: >+ 0: uniform2iv >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 111: (duration) >+ 0: uniform3f(1, 2, 3) >+ swizzleTypes: [Number, Number, Number] >+ trace: >+ 0: uniform3f >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 112: (duration) >+ 0: uniform3fv(0) >+ swizzleTypes: [TypedArray] >+ trace: >+ 0: uniform3fv >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 113: (duration) >+ 0: uniform3i(1, 2, 3) >+ swizzleTypes: [Number, Number, Number] >+ trace: >+ 0: uniform3i >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 114: (duration) >+ 0: uniform3iv(0) >+ swizzleTypes: [TypedArray] >+ trace: >+ 0: uniform3iv >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 115: (duration) >+ 0: uniform4f(1, 2, 3, 4) >+ swizzleTypes: [Number, Number, Number, Number] >+ trace: >+ 0: uniform4f >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 116: (duration) >+ 0: uniform4fv(0) >+ swizzleTypes: [TypedArray] >+ trace: >+ 0: uniform4fv >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 117: (duration) >+ 0: uniform4i(1, 2, 3, 4) >+ swizzleTypes: [Number, Number, Number, Number] >+ trace: >+ 0: uniform4i >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 118: (duration) >+ 0: uniform4iv(0) >+ swizzleTypes: [TypedArray] >+ trace: >+ 0: uniform4iv >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 119: (duration) >+ 0: uniformMatrix2fv(true, 0) >+ swizzleTypes: [Boolean, TypedArray] >+ trace: >+ 0: uniformMatrix2fv >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 120: (duration) >+ 0: uniformMatrix3fv(true, 0) >+ swizzleTypes: [Boolean, TypedArray] >+ trace: >+ 0: uniformMatrix3fv >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 121: (duration) >+ 0: uniformMatrix4fv(true, 0) >+ swizzleTypes: [Boolean, TypedArray] >+ trace: >+ 0: uniformMatrix4fv >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 122: (duration) >+ 0: useProgram(0) >+ swizzleTypes: [WebGLProgram] >+ trace: >+ 0: useProgram >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 123: (duration) >+ 0: validateProgram(0) >+ swizzleTypes: [WebGLProgram] >+ trace: >+ 0: validateProgram >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 124: (duration) >+ 0: vertexAttrib1f(1, 2) >+ swizzleTypes: [Number, Number] >+ trace: >+ 0: vertexAttrib1f >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 125: (duration) >+ 0: vertexAttrib1fv(1, 0) >+ swizzleTypes: [Number, TypedArray] >+ trace: >+ 0: vertexAttrib1fv >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 126: (duration) >+ 0: vertexAttrib2f(1, 2, 3) >+ swizzleTypes: [Number, Number, Number] >+ trace: >+ 0: vertexAttrib2f >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 127: (duration) >+ 0: vertexAttrib2fv(1, 0) >+ swizzleTypes: [Number, TypedArray] >+ trace: >+ 0: vertexAttrib2fv >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 128: (duration) >+ 0: vertexAttrib3f(1, 2, 3, 4) >+ swizzleTypes: [Number, Number, Number, Number] >+ trace: >+ 0: vertexAttrib3f >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 129: (duration) >+ 0: vertexAttrib3fv(1, 0) >+ swizzleTypes: [Number, TypedArray] >+ trace: >+ 0: vertexAttrib3fv >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 130: (duration) >+ 0: vertexAttrib4f(1, 2, 3, 4, 5) >+ swizzleTypes: [Number, Number, Number, Number, Number] >+ trace: >+ 0: vertexAttrib4f >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 131: (duration) >+ 0: vertexAttrib4fv(1, 0) >+ swizzleTypes: [Number, TypedArray] >+ trace: >+ 0: vertexAttrib4fv >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 132: (duration) >+ 0: vertexAttribPointer(1, 2, 3, true, 5, 6) >+ swizzleTypes: [Number, Number, Number, Boolean, Number, Number] >+ trace: >+ 0: vertexAttribPointer >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 133: (duration) >+ 0: viewport(1, 2, 3, 4) >+ swizzleTypes: [Number, Number, Number, Number] >+ trace: >+ 0: viewport >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 134: (duration) >+ 0: width >+ trace: >+ 0: (anonymous function) >+ 1: executeFrameFunction >+ 1: width = 2 >+ swizzleTypes: [Number] >+ trace: >+ 0: (anonymous function) >+ 1: executeFrameFunction >+ 135: (duration) >+ 0: height >+ trace: >+ 0: (anonymous function) >+ 1: executeFrameFunction >+ 1: height = 2 >+ swizzleTypes: [Number] >+ trace: >+ 0: (anonymous function) >+ 1: executeFrameFunction >+ >diff --git a/LayoutTests/inspector/canvas/recording-webgl2-full.html b/LayoutTests/inspector/canvas/recording-webgl2-full.html >new file mode 100644 >index 0000000000000000000000000000000000000000..ba68e1754a49c515c6360bef551d82351478a190 >--- /dev/null >+++ b/LayoutTests/inspector/canvas/recording-webgl2-full.html >@@ -0,0 +1,41 @@ >+<!DOCTYPE html> >+<html> >+<head> >+<script src="../../http/tests/inspector/resources/inspector-test.js"></script> >+<script src="resources/recording-utilities.js"></script> >+<script src="resources/shaderProgram-utilities.js"></script> >+<script id="vertex-shader" type="x-shader/x-vertex"> >+ attribute vec4 test; >+ void main(void) { >+ gl_Position = test; >+ } >+</script> >+<script id="fragment-shader" type="x-shader/x-fragment"> >+ precision mediump float; >+ >+ void main(void) { >+ gl_FragColor = vec4(1.0, 1.0, 1.0, 1.0); >+ } >+</script> >+<script src="resources/recording-webgl2.js"></script> >+<script> >+function test() { >+ let suite = InspectorTest.createAsyncSuite("Canvas.recordingWebGL2"); >+ >+ suite.addTestCase({ >+ name: "Canvas.recordingWebGL2.multipleFrames", >+ description: "Check that recording data is serialized correctly for multiple frames.", >+ test(resolve, reject) { >+ startRecording(WI.Canvas.ContextType.WebGL2, resolve, reject); >+ }, >+ timeout: -1, >+ }); >+ >+ suite.runTestCasesAndFinish(); >+} >+</script> >+</head> >+<body onload="load()"> >+ <p>Test that CanvasManager is able to record actions made to WebGL2 canvas contexts.</p> >+</body> >+</html> >diff --git a/LayoutTests/inspector/canvas/recording-webgl2-memoryLimit-expected.txt b/LayoutTests/inspector/canvas/recording-webgl2-memoryLimit-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..2c9d9de2e3ed077c49f7f2253ef2ef15b027d596 >--- /dev/null >+++ b/LayoutTests/inspector/canvas/recording-webgl2-memoryLimit-expected.txt >@@ -0,0 +1,26 @@ >+Test that CanvasManager is able to record actions made to WebGL2 canvas contexts. >+ >+ >+== Running test suite: Canvas.recordingWebGL2 >+-- Running test case: Canvas.recordingWebGL2.memoryLimit >+initialState: >+ attributes: >+ width: 2 >+ height: 2 >+ parameters: >+ 0: {"alpha":true,"depth":true,"stencil":false,"antialias":false,"premultipliedAlpha":true,"preserveDrawingBuffer":false,"failIfMajorPerformanceCaveat":false} >+ content: <filtered> >+frames: >+ 0: (duration) (incomplete) >+ 0: activeTexture(1) >+ swizzleTypes: [Number] >+ trace: >+ 0: activeTexture >+ 1: (anonymous function) >+ 2: executeFrameFunction >+ 3: performActions >+ 4: Global Code >+ 5: evaluateWithScopeExtension >+ 6: (anonymous function) >+ 7: _wrapCall >+ >diff --git a/LayoutTests/inspector/canvas/recording-webgl2-memoryLimit.html b/LayoutTests/inspector/canvas/recording-webgl2-memoryLimit.html >new file mode 100644 >index 0000000000000000000000000000000000000000..0174b0acc3e1475213aefeaccbf437008172685c >--- /dev/null >+++ b/LayoutTests/inspector/canvas/recording-webgl2-memoryLimit.html >@@ -0,0 +1,41 @@ >+<!DOCTYPE html> >+<html> >+<head> >+<script src="../../http/tests/inspector/resources/inspector-test.js"></script> >+<script src="resources/recording-utilities.js"></script> >+<script src="resources/shaderProgram-utilities.js"></script> >+<script id="vertex-shader" type="x-shader/x-vertex"> >+ attribute vec4 test; >+ void main(void) { >+ gl_Position = test; >+ } >+</script> >+<script id="fragment-shader" type="x-shader/x-fragment"> >+ precision mediump float; >+ >+ void main(void) { >+ gl_FragColor = vec4(1.0, 1.0, 1.0, 1.0); >+ } >+</script> >+<script src="resources/recording-webgl2.js"></script> >+<script> >+function test() { >+ let suite = InspectorTest.createAsyncSuite("Canvas.recordingWebGL2"); >+ >+ suite.addTestCase({ >+ name: "Canvas.recordingWebGL2.memoryLimit", >+ description: "Check that the recording is stopped when it reaches the memory limit.", >+ test(resolve, reject) { >+ startRecording(WI.Canvas.ContextType.WebGL2, resolve, reject, {memoryLimit: 10}); >+ }, >+ timeout: -1, >+ }); >+ >+ suite.runTestCasesAndFinish(); >+} >+</script> >+</head> >+<body onload="load()"> >+ <p>Test that CanvasManager is able to record actions made to WebGL2 canvas contexts.</p> >+</body> >+</html> >diff --git a/LayoutTests/inspector/canvas/recording-webgl2.html b/LayoutTests/inspector/canvas/recording-webgl2.html >deleted file mode 100644 >index e92a86fa9e1bcc83f61275c5c4d11cb085f6e432..0000000000000000000000000000000000000000 >--- a/LayoutTests/inspector/canvas/recording-webgl2.html >+++ /dev/null >@@ -1,556 +0,0 @@ >-<!DOCTYPE html> >-<html> >-<head> >-<script src="../../http/tests/inspector/resources/inspector-test.js"></script> >-<script src="resources/recording-utilities.js"></script> >-<script src="resources/shaderProgram-utilities.js"></script> >-<script id="vertex-shader" type="x-shader/x-vertex"> >- attribute vec4 test; >- void main(void) { >- gl_Position = test; >- } >-</script> >-<script id="fragment-shader" type="x-shader/x-fragment"> >- precision mediump float; >- >- void main(void) { >- gl_FragColor = vec4(1.0, 1.0, 1.0, 1.0); >- } >-</script> >-<script> >-if (window.internals) { >- window.internals.settings.setWebGLErrorsToConsoleEnabled(false); >- window.internals.settings.setWebGL2Enabled(true); >-} >- >-// 2x2 red square >-let image = document.createElement("img"); >-image.src = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAYAAABytg0kAAAAAXNSR0IArs4c6QAAABNJREFUCB1j/M/AAEQMDEwgAgQAHxcCAmtAm/sAAAAASUVORK5CYII="; >- >-let float32Array = new Float32Array([0.1, 0.2]); >-let int32Array = new Int32Array([1, 2]); >- >-let buffer = null; >-let framebuffer = null; >-let uniformLocation = null; >-let renderbuffer = null; >-let shader = null; >-let texture = null; >- >-function load() { >- createProgram("webgl2"); >- linkProgram("vertex-shader", "fragment-shader"); >- >- context.canvas.width = 2; >- context.canvas.height = 2; >- >- buffer = context.createBuffer(); >- framebuffer = context.createFramebuffer(); >- uniformLocation = context.getUniformLocation(program, "test"); >- renderbuffer = context.createRenderbuffer(); >- shader = context.createShader(context.VERTEX_SHADER); >- texture = context.createTexture(); >- >- cancelActions(); >- >- runTest(); >-} >- >-function ignoreException(func){ >- try { >- func(); >- } catch (e) { } >-} >- >-let requestAnimationFrameId = NaN; >- >-function cancelActions() { >- cancelAnimationFrame(requestAnimationFrameId); >- requestAnimationFrameId = NaN; >- >- context.clearColor(0.0, 0.0, 0.0, 0.0); >- context.clear(context.COLOR_BUFFER_BIT); >-} >- >-function performActions() { >- let frames = [ >- () => { >- context.activeTexture(1); >- }, >- () => { >- context.attachShader(program, shader); >- }, >- () => { >- context.bindAttribLocation(program, 1, "test"); >- }, >- () => { >- context.bindBuffer(1, buffer); >- }, >- () => { >- context.bindFramebuffer(1, framebuffer); >- }, >- () => { >- context.bindRenderbuffer(1, renderbuffer); >- }, >- () => { >- context.bindTexture(1, texture); >- }, >- () => { >- context.blendColor(1, 2, 3, 4); >- }, >- () => { >- context.blendEquation(1); >- }, >- () => { >- context.blendEquationSeparate(1, 2); >- }, >- () => { >- context.blendFunc(1, 2); >- }, >- () => { >- context.blendFuncSeparate(1, 2, 3, 4); >- }, >- () => { >- context.bufferData(1, float32Array, 2); >- context.bufferData(3, 4, 5); >- }, >- () => { >- context.bufferSubData(1, 2, float32Array); >- }, >- () => { >- context.checkFramebufferStatus(1); >- }, >- () => { >- context.clear(1); >- }, >- () => { >- context.clearColor(1, 2, 3, 4); >- }, >- () => { >- context.clearDepth(1); >- }, >- () => { >- context.clearStencil(1); >- }, >- () => { >- context.colorMask(true, false, true, false); >- }, >- () => { >- context.compileShader(shader); >- }, >- () => { >- context.compressedTexSubImage2D(1, 2, 3, 4, 5, 6, 7, float32Array); >- }, >- () => { >- context.copyTexImage2D(1, 2, 3, 4, 5, 6, 7, 8); >- }, >- () => { >- context.copyTexSubImage2D(1, 2, 3, 4, 5, 6, 7, 8); >- }, >- () => { >- context.createBuffer(); >- }, >- () => { >- context.createFramebuffer(); >- }, >- () => { >- context.createProgram(); >- }, >- () => { >- context.createRenderbuffer(); >- }, >- () => { >- context.createShader(1); >- }, >- () => { >- context.createTexture(); >- }, >- () => { >- context.cullFace(1); >- }, >- () => { >- context.deleteBuffer(buffer); >- }, >- () => { >- context.deleteFramebuffer(framebuffer); >- }, >- () => { >- context.deleteProgram(program); >- }, >- () => { >- context.deleteRenderbuffer(renderbuffer); >- }, >- () => { >- context.deleteShader(shader); >- }, >- () => { >- context.deleteTexture(texture); >- }, >- () => { >- context.depthFunc(1); >- }, >- () => { >- context.depthMask(true); >- }, >- () => { >- context.depthRange(1, 2); >- }, >- () => { >- context.detachShader(program, shader); >- }, >- () => { >- context.disable(1); >- }, >- () => { >- context.disableVertexAttribArray(1); >- }, >- () => { >- context.drawArrays(1, 2, 3); >- }, >- () => { >- context.drawElements(1, 2, 3, 4); >- }, >- () => { >- context.enable(1); >- }, >- () => { >- context.enableVertexAttribArray(1); >- }, >- () => { >- context.finish(); >- }, >- () => { >- context.flush(); >- }, >- () => { >- context.framebufferRenderbuffer(1, 2, 3, renderbuffer); >- }, >- () => { >- context.framebufferTexture2D(1, 2, 3, texture, 4); >- }, >- () => { >- context.frontFace(1); >- }, >- () => { >- context.generateMipmap(1); >- }, >- () => { >- context.getActiveAttrib(program, 1); >- }, >- () => { >- context.getActiveUniform(program, 1); >- }, >- () => { >- context.getAttachedShaders(program); >- }, >- () => { >- context.getAttribLocation(program, "test"); >- }, >- () => { >- context.getBufferParameter(1, 2); >- }, >- () => { >- context.getContextAttributes(); >- }, >- () => { >- context.getError(); >- }, >- () => { >- context.getExtension("test"); >- }, >- () => { >- context.getFramebufferAttachmentParameter(1, 2, 3); >- }, >- () => { >- context.getParameter(1); >- }, >- () => { >- context.getProgramInfoLog(program); >- }, >- () => { >- context.getProgramParameter(program, 1); >- }, >- () => { >- context.getRenderbufferParameter(1, 2); >- }, >- () => { >- context.getShaderInfoLog(shader); >- }, >- () => { >- context.getShaderParameter(shader, 1); >- }, >- () => { >- context.getShaderPrecisionFormat(1, 2); >- }, >- () => { >- context.getShaderSource(shader); >- }, >- () => { >- context.getSupportedExtensions(); >- }, >- () => { >- context.getTexParameter(1, 2); >- }, >- () => { >- context.getUniform(program, uniformLocation); >- }, >- () => { >- context.getUniformLocation(program, "test"); >- }, >- () => { >- context.getVertexAttrib(1, 2); >- }, >- () => { >- context.getVertexAttribOffset(1, 2); >- }, >- () => { >- context.hint(1, 2); >- }, >- () => { >- context.isBuffer(buffer); >- }, >- () => { >- context.isContextLost(); >- }, >- () => { >- context.isEnabled(1); >- }, >- () => { >- context.isFramebuffer(framebuffer); >- }, >- () => { >- context.isProgram(program); >- }, >- () => { >- context.isRenderbuffer(renderbuffer); >- }, >- () => { >- context.isShader(shader); >- }, >- () => { >- context.isTexture(texture); >- }, >- () => { >- context.lineWidth(1); >- }, >- () => { >- context.linkProgram(program); >- }, >- () => { >- context.pixelStorei(1, 2); >- }, >- () => { >- context.polygonOffset(1, 2); >- }, >- () => { >- context.readPixels(1, 2, 3, 4, 5, 6, float32Array); >- }, >- () => { >- context.releaseShaderCompiler(); >- }, >- () => { >- context.renderbufferStorage(1, 2, 3, 4); >- }, >- () => { >- context.sampleCoverage(1, true); >- }, >- () => { >- context.scissor(1, 2, 3, 4); >- }, >- () => { >- context.shaderSource(shader, "test"); >- }, >- () => { >- context.stencilFunc(1, 2, 3); >- }, >- () => { >- context.stencilFuncSeparate(1, 2, 3, 4); >- }, >- () => { >- context.stencilMask(1); >- }, >- () => { >- context.stencilMaskSeparate(1, 2); >- }, >- () => { >- context.stencilOp(1, 2, 3); >- }, >- () => { >- context.stencilOpSeparate(1, 2, 3, 4); >- }, >- () => { >- context.texParameterf(1, 2, 3); >- }, >- () => { >- context.texParameteri(1, 2, 3); >- }, >- () => { >- context.uniform1f(uniformLocation, 1); >- }, >- () => { >- context.uniform1fv(uniformLocation, float32Array); >- }, >- () => { >- context.uniform1i(uniformLocation, 1); >- }, >- () => { >- context.uniform1iv(uniformLocation, int32Array); >- }, >- () => { >- context.uniform2f(uniformLocation, 1, 2); >- }, >- () => { >- context.uniform2fv(uniformLocation, float32Array); >- }, >- () => { >- context.uniform2i(uniformLocation, 1, 2); >- }, >- () => { >- context.uniform2iv(uniformLocation, int32Array); >- }, >- () => { >- context.uniform3f(uniformLocation, 1, 2, 3); >- }, >- () => { >- context.uniform3fv(uniformLocation, float32Array); >- }, >- () => { >- context.uniform3i(uniformLocation, 1, 2, 3); >- }, >- () => { >- context.uniform3iv(uniformLocation, int32Array); >- }, >- () => { >- context.uniform4f(uniformLocation, 1, 2, 3, 4); >- }, >- () => { >- context.uniform4fv(uniformLocation, float32Array); >- }, >- () => { >- context.uniform4i(uniformLocation, 1, 2, 3, 4); >- }, >- () => { >- context.uniform4iv(uniformLocation, int32Array); >- }, >- () => { >- context.uniformMatrix2fv(uniformLocation, true, float32Array); >- }, >- () => { >- context.uniformMatrix3fv(uniformLocation, true, float32Array); >- }, >- () => { >- context.uniformMatrix4fv(uniformLocation, true, float32Array); >- }, >- () => { >- context.useProgram(program); >- }, >- () => { >- context.validateProgram(program); >- }, >- () => { >- context.vertexAttrib1f(1, 2); >- }, >- () => { >- context.vertexAttrib1fv(1, float32Array); >- }, >- () => { >- context.vertexAttrib2f(1, 2, 3); >- }, >- () => { >- context.vertexAttrib2fv(1, float32Array); >- }, >- () => { >- context.vertexAttrib3f(1, 2, 3, 4); >- }, >- () => { >- context.vertexAttrib3fv(1, float32Array); >- }, >- () => { >- context.vertexAttrib4f(1, 2, 3, 4, 5); >- }, >- () => { >- context.vertexAttrib4fv(1, float32Array); >- }, >- () => { >- context.vertexAttribPointer(1, 2, 3, 4, 5, 6); >- }, >- () => { >- context.viewport(1, 2, 3, 4); >- }, >- () => { >- context.canvas.width; >- context.canvas.width = 2; >- }, >- () => { >- context.canvas.height; >- context.canvas.height = 2; >- }, >- () => { >- TestPage.dispatchEventToFrontend("LastFrame"); >- }, >- ]; >- let index = 0; >- function executeFrameFunction() { >- frames[index++](); >- if (index < frames.length) >- requestAnimationFrameId = requestAnimationFrame(executeFrameFunction); >- }; >- executeFrameFunction(); >-} >- >-function performConsoleActions() { >- console.record(context, {name: "TEST"}); >- >- context.createTexture(); >- >- console.recordEnd(context); >- >- context.createBuffer(); >-} >- >-function test() { >- let suite = InspectorTest.createAsyncSuite("Canvas.recordingWebGL2"); >- >- suite.addTestCase({ >- name: "Canvas.recordingWebGL2.singleFrame", >- description: "Check that the recording is stopped after a single frame.", >- test(resolve, reject) { >- startRecording(WI.Canvas.ContextType.WebGL2, resolve, reject, {frameCount: 1}); >- }, >- timeout: -1, >- }); >- >- suite.addTestCase({ >- name: "Canvas.recordingWebGL2.multipleFrames", >- description: "Check that recording data is serialized correctly for multiple frames.", >- test(resolve, reject) { >- startRecording(WI.Canvas.ContextType.WebGL2, resolve, reject); >- }, >- timeout: -1, >- }); >- >- suite.addTestCase({ >- name: "Canvas.recordingWebGL2.memoryLimit", >- description: "Check that the recording is stopped when it reaches the memory limit.", >- test(resolve, reject) { >- startRecording(WI.Canvas.ContextType.WebGL2, resolve, reject, {memoryLimit: 10}); >- }, >- timeout: -1, >- }); >- >- suite.addTestCase({ >- name: "Canvas.recordingWebGL2.Console", >- description: "Check that a recording can be triggered by console.record().", >- test(resolve, reject) { >- consoleRecord(WI.Canvas.ContextType.WebGL2, resolve, reject); >- }, >- }); >- >- suite.runTestCasesAndFinish(); >-} >-</script> >-</head> >-<body onload="load()"> >- <p>Test that CanvasManager is able to record actions made to WebGL2 canvas contexts.</p> >-</body> >-</html> >diff --git a/LayoutTests/inspector/canvas/recording.html b/LayoutTests/inspector/canvas/recording.html >index 9dc73ebdc96632f11976f3ada5d345b069744907..25c6fbc78c480bb96b7c992ff78ce1c86660fede 100644 >--- a/LayoutTests/inspector/canvas/recording.html >+++ b/LayoutTests/inspector/canvas/recording.html >@@ -6,18 +6,54 @@ > let contextA = document.createElement("canvas").getContext("2d"); > let contextB = document.createElement("canvas").getContext("2d"); > >-function performActions() { >+function performActionsNaN() { >+ contextA.globalAlpha = NaN; >+} >+ >+function performActionsMultiple() { > contextA.fill(); > contextB.fill(); > >- TestPage.dispatchEventToFrontend("TestPage-performActions"); >+ TestPage.dispatchEventToFrontend("TestPage-performActionsMultiple"); > } > > function test() { > let suite = InspectorTest.createAsyncSuite("Canvas.recording"); > > suite.addTestCase({ >- name: "Canvas.multipleRecording", >+ name: "Canvas.ActionParameterNaN", >+ description: "Check that NaN is converted into the proper value for serialization.", >+ test(resolve, reject) { >+ let canvas = WI.canvasManager.canvases[0]; >+ InspectorTest.assert(canvas, "There should be at least one canvas context."); >+ >+ canvas.awaitEvent(WI.Canvas.Event.RecordingStopped) >+ .then((event) => { >+ let recording = event.data.recording.toJSON(); >+ >+ let frames = recording.frames; >+ InspectorTest.expectEqual(frames.length, 1, "The recording should have 1 frame."); >+ >+ let actions = frames[0].actions; >+ InspectorTest.expectEqual(actions.length, 1, "The first frame should have 1 action."); >+ InspectorTest.expectEqual(actions[0][1].length, 1, "The action should have 1 parameter."); >+ InspectorTest.expectEqual(actions[0][1][0], null, "The parameter should be null."); >+ }) >+ .then(resolve, reject); >+ >+ canvas.awaitEvent(WI.Canvas.Event.RecordingStarted) >+ .then((event) => { >+ InspectorTest.evaluateInPage(`performActionsNaN()`); >+ }); >+ >+ const frameCount = 1; >+ CanvasAgent.startRecording(canvas.identifier, frameCount) >+ .catch(reject); >+ }, >+ }); >+ >+ suite.addTestCase({ >+ name: "Canvas.MultipleRecording", > description: "Check that multiple recordings are able to be started/stopped at the same time.", > test(resolve, reject) { > const singleFrame = false; >@@ -39,7 +75,7 @@ function test() { > canvases[1].stopRecording(); > }); > >- InspectorTest.awaitEvent("TestPage-performActions") >+ InspectorTest.awaitEvent("TestPage-performActionsMultiple") > .then((event) => { > InspectorTest.pass("Actions performed."); > >@@ -52,7 +88,7 @@ function test() { > InspectorTest.expectThat(canvases[1].recordingActive, "Recording started of canvas 2"); > > InspectorTest.log("Performing actions..."); >- InspectorTest.evaluateInPage(`performActions()`); >+ InspectorTest.evaluateInPage(`performActionsMultiple()`); > }); > > canvases[0].awaitEvent(WI.Canvas.Event.RecordingStarted) >@@ -68,6 +104,37 @@ function test() { > }, > }); > >+ suite.addTestCase({ >+ name: "Canvas.NoActions", >+ description: "Check that a canvas is still able to be recorded after stopping a recording with no actions.", >+ test(resolve, reject) { >+ let canvas = WI.canvasManager.canvases[0]; >+ InspectorTest.assert(canvas, "There should be at least one canvas context."); >+ >+ let eventCount = 0; >+ function handleRecordingStopped(event) { >+ InspectorTest.assert(!event.data.recording, "The recording payload should be null."); >+ >+ ++eventCount; >+ if (eventCount == 1) { >+ InspectorTest.pass("A recording should have been started and stopped once."); >+ >+ canvas.startRecording(); >+ canvas.stopRecording(); >+ } else if (eventCount >= 2) { >+ InspectorTest.pass("A recording should have been started and stopped twice."); >+ >+ canvas.removeEventListener(WI.Canvas.Event.RecordingStopped, handleRecordingStopped); >+ resolve(); >+ } >+ } >+ canvas.addEventListener(WI.Canvas.Event.RecordingStopped, handleRecordingStopped); >+ >+ canvas.startRecording(); >+ canvas.stopRecording(); >+ }, >+ }); >+ > suite.addTestCase({ > name: "Canvas.startRecording.InvalidCanvasId", > description: "Invalid canvas identifiers should cause an error.", >diff --git a/LayoutTests/inspector/canvas/resources/recording-2d.js b/LayoutTests/inspector/canvas/resources/recording-2d.js >new file mode 100644 >index 0000000000000000000000000000000000000000..7e87df205449883ff21e70426fa767c8b5b32c88 >--- /dev/null >+++ b/LayoutTests/inspector/canvas/resources/recording-2d.js >@@ -0,0 +1,426 @@ >+let ctx = null; >+ >+// 2x2 red square >+let image = document.createElement("img"); >+image.src = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAYAAABytg0kAAAAAXNSR0IArs4c6QAAABNJREFUCB1j/M/AAEQMDEwgAgQAHxcCAmtAm/sAAAAASUVORK5CYII="; >+ >+// Invalid video >+let video = document.createElement("video"); >+ >+// Blank canvas >+let canvas = document.createElement("canvas"); >+canvas.width = 2; >+canvas.height = 2; >+ >+let linearGradient = null; >+ >+let radialGradient = null; >+ >+let pattern = null; >+ >+let path12 = new Path2D("M 1 2"); >+let path34 = new Path2D("M 3 4"); >+ >+let imageData14 = new ImageData(1, 4); >+let imageData23 = new ImageData(2, 3); >+ >+let bitmap = null; >+ >+async function load() { >+ ctx = canvas.getContext("2d"); >+ linearGradient = ctx.createLinearGradient(1, 2, 3, 4); >+ radialGradient = ctx.createRadialGradient(1, 2, 3, 4, 5, 6); >+ pattern = ctx.createPattern(image, "no-repeat"); >+ bitmap = await createImageBitmap(image); >+ >+ ctx.save(); >+ cancelActions(); >+ >+ runTest(); >+} >+ >+function ignoreException(func){ >+ try { >+ func(); >+ } catch (e) { } >+} >+ >+let requestAnimationFrameId = NaN; >+let saveCount = 1; >+ >+function cancelActions() { >+ for (let i = 0; i < saveCount; ++i) >+ ctx.restore(); >+ ctx.restore(); // Ensures the state is reset between test cases. >+ >+ cancelAnimationFrame(requestAnimationFrameId); >+ requestAnimationFrameId = NaN; >+ >+ ctx.save(); // Ensures the state is reset between test cases. >+ ctx.save(); // This matches the `restore` call in `performActions`. >+ saveCount = 1; >+ >+ ctx.resetTransform(); >+ ctx.beginPath(); >+ ctx.clearRect(0, 0, ctx.canvas.width, ctx.canvas.height); >+} >+ >+function performActions() { >+ let frames = [ >+ () => { >+ ignoreException(() => ctx.arc(1, 2, 3, 4, 5)); >+ ignoreException(() => ctx.arc(6, 7, 8, 9, 10, true)); >+ }, >+ () => { >+ ignoreException(() => ctx.arcTo(1, 2, 3, 4, 5)); >+ }, >+ () => { >+ ctx.beginPath(); >+ }, >+ () => { >+ ctx.bezierCurveTo(1, 2, 3, 4, 5, 6); >+ }, >+ () => { >+ ctx.clearRect(1, 2, 3, 4); >+ }, >+ () => { >+ ctx.clearShadow(); >+ }, >+ () => { >+ ctx.clip(); >+ ctx.clip("evenodd"); >+ ctx.clip(path12); >+ ctx.clip(path34, "evenodd"); >+ }, >+ () => { >+ ctx.closePath(); >+ }, >+ () => { >+ ignoreException(() => ctx.createImageData(imageData14)); >+ ignoreException(() => ctx.createImageData(2, 3)); >+ }, >+ () => { >+ ignoreException(() => ctx.createLinearGradient(1, 2, 3, 4)); >+ }, >+ () => { >+ ignoreException(() => ctx.createPattern(image, "testA")); >+ ignoreException(() => ctx.createPattern(video, "testB")); >+ ignoreException(() => ctx.createPattern(canvas, "testC")); >+ ignoreException(() => ctx.createPattern(bitmap, "testD")); >+ }, >+ () => { >+ ignoreException(() => ctx.createRadialGradient(1, 2, 3, 4, 5, 6)); >+ }, >+ () => { >+ ctx.direction; >+ ctx.direction = "test"; >+ }, >+ () => { >+ ctx.drawFocusIfNeeded(document.body); >+ ctx.drawFocusIfNeeded(path12, document.body); >+ }, >+ () => { >+ ignoreException(() => ctx.drawImage(image, 11, 12)); >+ ignoreException(() => ctx.drawImage(image, 13, 14, 15, 16)); >+ ignoreException(() => ctx.drawImage(image, 17, 18, 19, 110, 111, 112, 113, 114)); >+ >+ ignoreException(() => ctx.drawImage(video, 21, 22)); >+ ignoreException(() => ctx.drawImage(video, 23, 24, 25, 26)); >+ ignoreException(() => ctx.drawImage(video, 27, 28, 29, 210, 211, 212, 213, 214)); >+ >+ ignoreException(() => ctx.drawImage(canvas, 31, 32)); >+ ignoreException(() => ctx.drawImage(canvas, 33, 34, 35, 36)); >+ ignoreException(() => ctx.drawImage(canvas, 37, 38, 39, 310, 311, 312, 313, 314)); >+ >+ ignoreException(() => ctx.drawImage(bitmap, 41, 42)); >+ ignoreException(() => ctx.drawImage(bitmap, 43, 44, 45, 46)); >+ ignoreException(() => ctx.drawImage(bitmap, 47, 48, 49, 410, 411, 412, 413, 414)); >+ }, >+ () => { >+ ctx.drawImageFromRect(image, 1, 2, 3, 4, 5, 6, 7, 8) >+ ctx.drawImageFromRect(image, 9, 10, 11, 12, 13, 14, 15, 16, "test"); >+ }, >+ () => { >+ ignoreException(() => ctx.ellipse(1, 2, 3, 4, 5, 6, 7)); >+ ignoreException(() => ctx.ellipse(8, 9, 10, 11, 12, 13, 14, true)); >+ }, >+ () => { >+ ctx.fill(); >+ ctx.fill("evenodd"); >+ ctx.fill(path12); >+ ctx.fill(path34, "evenodd"); >+ }, >+ () => { >+ ctx.fillRect(1, 2, 3, 4); >+ }, >+ () => { >+ ctx.fillStyle; >+ ctx.fillStyle = "test"; >+ ctx.fillStyle = linearGradient; >+ ctx.fillStyle = radialGradient; >+ ctx.fillStyle = pattern; >+ }, >+ () => { >+ ctx.fillText("testA", 1, 2); >+ ctx.fillText("testB", 3, 4, 5); >+ }, >+ () => { >+ ctx.font; >+ ctx.font = "test"; >+ }, >+ () => { >+ ignoreException(() => ctx.getImageData(1, 2, 3, 4)); >+ }, >+ () => { >+ ctx.getLineDash(); >+ }, >+ () => { >+ ctx.getTransform(); >+ }, >+ () => { >+ ctx.globalAlpha; >+ ctx.globalAlpha = 0; >+ }, >+ () => { >+ ctx.globalCompositeOperation; >+ ctx.globalCompositeOperation = "test"; >+ }, >+ () => { >+ ctx.imageSmoothingEnabled; >+ ctx.imageSmoothingEnabled = true; >+ }, >+ () => { >+ ctx.imageSmoothingQuality; >+ ctx.imageSmoothingQuality = "low"; >+ }, >+ () => { >+ ctx.isPointInPath(path12, 5, 6); >+ ctx.isPointInPath(path34, 7, 8, "evenodd"); >+ ctx.isPointInPath(9, 10); >+ ctx.isPointInPath(11, 12, "evenodd"); >+ }, >+ () => { >+ ctx.isPointInStroke(path12, 3, 4); >+ ctx.isPointInStroke(5, 6); >+ }, >+ () => { >+ ctx.lineCap; >+ ctx.lineCap = "test"; >+ }, >+ () => { >+ ctx.lineDashOffset; >+ ctx.lineDashOffset = 1; >+ }, >+ () => { >+ ctx.lineJoin; >+ ctx.lineJoin = "test"; >+ }, >+ () => { >+ ctx.lineTo(1, 2); >+ }, >+ () => { >+ ctx.lineWidth; >+ ctx.lineWidth = 1; >+ }, >+ () => { >+ ctx.measureText("test"); >+ }, >+ () => { >+ ctx.miterLimit; >+ ctx.miterLimit = 1; >+ }, >+ () => { >+ ctx.moveTo(1, 2); >+ }, >+ () => { >+ ctx.putImageData(imageData14, 5, 6); >+ ctx.putImageData(imageData23, 7, 8, 9, 10, 11, 12); >+ }, >+ () => { >+ ctx.quadraticCurveTo(1, 2, 3, 4); >+ }, >+ () => { >+ ctx.rect(1, 2, 3, 4); >+ }, >+ () => { >+ ctx.resetTransform(); >+ }, >+ () => { >+ ctx.restore(); >+ --saveCount; >+ }, >+ () => { >+ ctx.rotate(1); >+ }, >+ () => { >+ ctx.save(); >+ ++saveCount; >+ }, >+ () => { >+ ctx.scale(1, 2); >+ }, >+ () => { >+ ctx.setAlpha(); >+ ctx.setAlpha(1); >+ }, >+ () => { >+ ctx.setCompositeOperation(); >+ ctx.setCompositeOperation("test"); >+ }, >+ () => { >+ ctx.setFillColor("testA"); >+ ctx.setFillColor("testB", 1); >+ ctx.setFillColor(2); >+ ctx.setFillColor(3, 4); >+ ctx.setFillColor(5, 6, 7, 8); >+ ctx.setFillColor(9, 10, 11, 12, 13); >+ }, >+ () => { >+ ctx.setLineCap(); >+ ctx.setLineCap("test"); >+ }, >+ () => { >+ ctx.setLineDash([1, 2]); >+ }, >+ () => { >+ ctx.setLineJoin(); >+ ctx.setLineJoin("test"); >+ }, >+ () => { >+ ctx.setLineWidth(); >+ ctx.setLineWidth(1); >+ }, >+ () => { >+ ctx.setMiterLimit(); >+ ctx.setMiterLimit(1); >+ }, >+ () => { >+ ctx.setShadow(1, 2, 3); >+ ctx.setShadow(4, 5, 6, "test", 7); >+ ctx.setShadow(8, 9, 10, 11); >+ ctx.setShadow(12, 13, 14, 15, 16); >+ ctx.setShadow(17, 18, 19, 20, 21, 22, 23); >+ ctx.setShadow(24, 25, 26, 27, 28, 29, 30, 31); >+ }, >+ () => { >+ ctx.setStrokeColor("testA"); >+ ctx.setStrokeColor("testB", 1); >+ ctx.setStrokeColor(2); >+ ctx.setStrokeColor(3, 4); >+ ctx.setStrokeColor(5, 6, 7, 8); >+ ctx.setStrokeColor(9, 10, 11, 12, 13); >+ }, >+ () => { >+ ctx.setTransform(1, 2, 3, 4, 5, 6); >+ ignoreException(() => ctx.setTransform()); >+ ignoreException(() => ctx.setTransform(new DOMMatrix([7, 8, 9, 10, 11, 12]))); >+ }, >+ () => { >+ ctx.shadowBlur; >+ ctx.shadowBlur = 1; >+ }, >+ () => { >+ ctx.shadowColor; >+ ctx.shadowColor = "test"; >+ }, >+ () => { >+ ctx.shadowOffsetX; >+ ctx.shadowOffsetX = 1; >+ }, >+ () => { >+ ctx.shadowOffsetY; >+ ctx.shadowOffsetY = 1; >+ }, >+ () => { >+ ctx.stroke(); >+ ctx.stroke(path12); >+ }, >+ () => { >+ ctx.strokeRect(1, 2, 3, 4); >+ }, >+ () => { >+ ctx.strokeStyle; >+ ctx.strokeStyle = "test"; >+ ctx.strokeStyle = linearGradient; >+ ctx.strokeStyle = radialGradient; >+ ctx.strokeStyle = pattern; >+ }, >+ () => { >+ ctx.strokeText("testA", 1, 2); >+ ctx.strokeText("testB", 3, 4, 5); >+ }, >+ () => { >+ ctx.textAlign; >+ ctx.textAlign = "test"; >+ }, >+ () => { >+ ctx.textBaseline; >+ ctx.textBaseline = "test"; >+ }, >+ () => { >+ ctx.transform(1, 2, 3, 4, 5, 6); >+ }, >+ () => { >+ ctx.translate(1, 2); >+ }, >+ () => { >+ ctx.webkitImageSmoothingEnabled; >+ ctx.webkitImageSmoothingEnabled = true; >+ }, >+ () => { >+ ctx.webkitLineDash; >+ ctx.webkitLineDash = [1, 2]; >+ }, >+ () => { >+ ctx.webkitLineDashOffset; >+ ctx.webkitLineDashOffset = 1; >+ }, >+ () => { >+ ctx.canvas.width; >+ ctx.canvas.width = 2; >+ }, >+ () => { >+ ctx.canvas.height; >+ ctx.canvas.height = 2; >+ }, >+ () => { >+ TestPage.dispatchEventToFrontend("LastFrame"); >+ }, >+ ]; >+ let index = 0; >+ function executeFrameFunction() { >+ frames[index++](); >+ if (index < frames.length) >+ requestAnimationFrameId = requestAnimationFrame(executeFrameFunction); >+ }; >+ executeFrameFunction(); >+} >+ >+function performConsoleActions() { >+ console.record(ctx, {name: "TEST"}); >+ >+ ctx.fill(); >+ >+ console.recordEnd(ctx); >+ >+ ctx.stroke(); >+} >+ >+function performSavePreActions() { >+ cancelActions(); >+ ctx.restore(); >+ ctx.restore(); >+ >+ function saveFillStyle(value) { >+ ctx.save(); >+ ctx.fillStyle = value; >+ } >+ >+ saveFillStyle("#ff0000"); >+ saveFillStyle("#00ff00"); >+ saveFillStyle("#0000ff"); >+} >+ >+function performSavePostActions() { >+ ctx.fill(); >+} >diff --git a/LayoutTests/inspector/canvas/resources/recording-bitmaprenderer.js b/LayoutTests/inspector/canvas/resources/recording-bitmaprenderer.js >new file mode 100644 >index 0000000000000000000000000000000000000000..963b184444de2740eba6ba0bcda7028895fce4f4 >--- /dev/null >+++ b/LayoutTests/inspector/canvas/resources/recording-bitmaprenderer.js >@@ -0,0 +1,83 @@ >+let ctx = null; >+ >+let redImage = new Image; >+redImage.src = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAYAAABytg0kAAAAAXNSR0IArs4c6QAAABNJREFUCB1j/M/AAEQMDEwgAgQAHxcCAmtAm/sAAAAASUVORK5CYII="; >+ >+let blueImage = new Image; >+blueImage.src = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAYAAABytg0kAAAAAXNSR0IArs4c6QAAABRJREFUCB1jZGD4/58BCJhABAgAAB0ZAgJSPDJ6AAAAAElFTkSuQmCC"; >+ >+let transparentImage = new Image; >+transparentImage.src = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAYAAABytg0kAAAAAXNSR0IArs4c6QAAAAtJREFUCB1jYEAHAAASAAGAFMrMAAAAAElFTkSuQmCC"; >+ >+// Blank canvas >+let canvas = document.createElement("canvas"); >+canvas.width = 2; >+canvas.height = 2; >+ >+function load() { >+ ctx = canvas.getContext("bitmaprenderer"); >+ >+ cancelActions(); >+ >+ runTest(); >+} >+ >+function ignoreException(func){ >+ try { >+ func(); >+ } catch (e) { } >+} >+ >+let requestAnimationFrameId = NaN; >+ >+function cancelActions() { >+ cancelAnimationFrame(requestAnimationFrameId); >+ requestAnimationFrameId = NaN; >+ >+ createImageBitmap(transparentImage).then((transparentBitmap) => { >+ ctx.transferFromImageBitmap(transparentBitmap); >+ }); >+} >+ >+async function performActions() { >+ let redBitmap = await createImageBitmap(redImage); >+ >+ let frames = [ >+ () => { >+ ctx.transferFromImageBitmap(redBitmap); >+ }, >+ () => { >+ ctx.canvas.width; >+ ctx.canvas.width = 2; >+ }, >+ () => { >+ ctx.canvas.height; >+ ctx.canvas.height = 2; >+ }, >+ () => { >+ TestPage.dispatchEventToFrontend("LastFrame"); >+ }, >+ ]; >+ let index = 0; >+ function executeFrameFunction() { >+ frames[index++](); >+ if (index < frames.length) >+ requestAnimationFrameId = requestAnimationFrame(executeFrameFunction); >+ }; >+ executeFrameFunction(); >+} >+ >+async function performConsoleActions() { >+ let [redBitmap, blueBitmap] = await Promise.all([ >+ createImageBitmap(redImage), >+ createImageBitmap(blueImage), >+ ]); >+ >+ console.record(ctx, {name: "TEST"}); >+ >+ ctx.transferFromImageBitmap(redBitmap); >+ >+ console.recordEnd(ctx); >+ >+ ctx.transferFromImageBitmap(blueBitmap); >+} >diff --git a/LayoutTests/inspector/canvas/resources/recording-webgl.js b/LayoutTests/inspector/canvas/resources/recording-webgl.js >new file mode 100644 >index 0000000000000000000000000000000000000000..11d4a67f7145c0c9506b931afe567e1db8072d3a >--- /dev/null >+++ b/LayoutTests/inspector/canvas/resources/recording-webgl.js >@@ -0,0 +1,498 @@ >+if (window.internals) >+ window.internals.settings.setWebGLErrorsToConsoleEnabled(false); >+ >+// 2x2 red square >+let image = document.createElement("img"); >+image.src = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAYAAABytg0kAAAAAXNSR0IArs4c6QAAABNJREFUCB1j/M/AAEQMDEwgAgQAHxcCAmtAm/sAAAAASUVORK5CYII="; >+ >+let float32Array = new Float32Array([0.1, 0.2]); >+let int32Array = new Int32Array([1, 2]); >+ >+let buffer = null; >+let framebuffer = null; >+let uniformLocation = null; >+let renderbuffer = null; >+let shader = null; >+let texture = null; >+ >+function load() { >+ createProgram("webgl"); >+ linkProgram("vertex-shader", "fragment-shader"); >+ >+ context.canvas.width = 2; >+ context.canvas.height = 2; >+ >+ buffer = context.createBuffer(); >+ framebuffer = context.createFramebuffer(); >+ uniformLocation = context.getUniformLocation(program, "test"); >+ renderbuffer = context.createRenderbuffer(); >+ shader = context.createShader(context.VERTEX_SHADER); >+ texture = context.createTexture(); >+ >+ cancelActions(); >+ >+ runTest(); >+} >+ >+function ignoreException(func){ >+ try { >+ func(); >+ } catch (e) { } >+} >+ >+let requestAnimationFrameId = NaN; >+ >+function cancelActions() { >+ cancelAnimationFrame(requestAnimationFrameId); >+ requestAnimationFrameId = NaN; >+ >+ context.clearColor(0.0, 0.0, 0.0, 0.0); >+ context.clear(context.COLOR_BUFFER_BIT); >+} >+ >+function performActions() { >+ let frames = [ >+ () => { >+ context.activeTexture(1); >+ }, >+ () => { >+ context.attachShader(program, shader); >+ }, >+ () => { >+ context.bindAttribLocation(program, 1, "test"); >+ }, >+ () => { >+ context.bindBuffer(1, buffer); >+ }, >+ () => { >+ context.bindFramebuffer(1, framebuffer); >+ }, >+ () => { >+ context.bindRenderbuffer(1, renderbuffer); >+ }, >+ () => { >+ context.bindTexture(1, texture); >+ }, >+ () => { >+ context.blendColor(1, 2, 3, 4); >+ }, >+ () => { >+ context.blendEquation(1); >+ }, >+ () => { >+ context.blendEquationSeparate(1, 2); >+ }, >+ () => { >+ context.blendFunc(1, 2); >+ }, >+ () => { >+ context.blendFuncSeparate(1, 2, 3, 4); >+ }, >+ () => { >+ context.bufferData(1, float32Array, 2); >+ context.bufferData(3, 4, 5); >+ }, >+ () => { >+ context.bufferSubData(1, 2, float32Array); >+ }, >+ () => { >+ context.checkFramebufferStatus(1); >+ }, >+ () => { >+ context.clear(1); >+ }, >+ () => { >+ context.clearColor(1, 2, 3, 4); >+ }, >+ () => { >+ context.clearDepth(1); >+ }, >+ () => { >+ context.clearStencil(1); >+ }, >+ () => { >+ context.colorMask(true, false, true, false); >+ }, >+ () => { >+ context.compileShader(shader); >+ }, >+ () => { >+ context.compressedTexImage2D(1, 2, 3, 4, 5, 6, float32Array); >+ }, >+ () => { >+ context.compressedTexSubImage2D(1, 2, 3, 4, 5, 6, 7, float32Array); >+ }, >+ () => { >+ context.copyTexImage2D(1, 2, 3, 4, 5, 6, 7, 8); >+ }, >+ () => { >+ context.copyTexSubImage2D(1, 2, 3, 4, 5, 6, 7, 8); >+ }, >+ () => { >+ context.createBuffer(); >+ }, >+ () => { >+ context.createFramebuffer(); >+ }, >+ () => { >+ context.createProgram(); >+ }, >+ () => { >+ context.createRenderbuffer(); >+ }, >+ () => { >+ context.createShader(1); >+ }, >+ () => { >+ context.createTexture(); >+ }, >+ () => { >+ context.cullFace(1); >+ }, >+ () => { >+ context.deleteBuffer(buffer); >+ }, >+ () => { >+ context.deleteFramebuffer(framebuffer); >+ }, >+ () => { >+ context.deleteProgram(program); >+ }, >+ () => { >+ context.deleteRenderbuffer(renderbuffer); >+ }, >+ () => { >+ context.deleteShader(shader); >+ }, >+ () => { >+ context.deleteTexture(texture); >+ }, >+ () => { >+ context.depthFunc(1); >+ }, >+ () => { >+ context.depthMask(true); >+ }, >+ () => { >+ context.depthRange(1, 2); >+ }, >+ () => { >+ context.detachShader(program, shader); >+ }, >+ () => { >+ context.disable(1); >+ }, >+ () => { >+ context.disableVertexAttribArray(1); >+ }, >+ () => { >+ context.drawArrays(1, 2, 3); >+ }, >+ () => { >+ context.drawElements(1, 2, 3, 4); >+ }, >+ () => { >+ context.enable(1); >+ }, >+ () => { >+ context.enableVertexAttribArray(1); >+ }, >+ () => { >+ context.finish(); >+ }, >+ () => { >+ context.flush(); >+ }, >+ () => { >+ context.framebufferRenderbuffer(1, 2, 3, renderbuffer); >+ }, >+ () => { >+ context.framebufferTexture2D(1, 2, 3, texture, 4); >+ }, >+ () => { >+ context.frontFace(1); >+ }, >+ () => { >+ context.generateMipmap(1); >+ }, >+ () => { >+ context.getActiveAttrib(program, 1); >+ }, >+ () => { >+ context.getActiveUniform(program, 1); >+ }, >+ () => { >+ context.getAttachedShaders(program); >+ }, >+ () => { >+ context.getAttribLocation(program, "test"); >+ }, >+ () => { >+ context.getBufferParameter(1, 2); >+ }, >+ () => { >+ context.getContextAttributes(); >+ }, >+ () => { >+ context.getError(); >+ }, >+ () => { >+ context.getExtension("test"); >+ }, >+ () => { >+ context.getFramebufferAttachmentParameter(1, 2, 3); >+ }, >+ () => { >+ context.getParameter(1); >+ }, >+ () => { >+ context.getProgramInfoLog(program); >+ }, >+ () => { >+ context.getProgramParameter(program, 1); >+ }, >+ () => { >+ context.getRenderbufferParameter(1, 2); >+ }, >+ () => { >+ context.getShaderInfoLog(shader); >+ }, >+ () => { >+ context.getShaderParameter(shader, 1); >+ }, >+ () => { >+ context.getShaderPrecisionFormat(1, 2); >+ }, >+ () => { >+ context.getShaderSource(shader); >+ }, >+ () => { >+ context.getSupportedExtensions(); >+ }, >+ () => { >+ context.getTexParameter(1, 2); >+ }, >+ () => { >+ context.getUniform(program, uniformLocation); >+ }, >+ () => { >+ context.getUniformLocation(program, "test"); >+ }, >+ () => { >+ context.getVertexAttrib(1, 2); >+ }, >+ () => { >+ context.getVertexAttribOffset(1, 2); >+ }, >+ () => { >+ context.hint(1, 2); >+ }, >+ () => { >+ context.isBuffer(buffer); >+ }, >+ () => { >+ context.isContextLost(); >+ }, >+ () => { >+ context.isEnabled(1); >+ }, >+ () => { >+ context.isFramebuffer(framebuffer); >+ }, >+ () => { >+ context.isProgram(program); >+ }, >+ () => { >+ context.isRenderbuffer(renderbuffer); >+ }, >+ () => { >+ context.isShader(shader); >+ }, >+ () => { >+ context.isTexture(texture); >+ }, >+ () => { >+ context.lineWidth(1); >+ }, >+ () => { >+ context.linkProgram(program); >+ }, >+ () => { >+ context.pixelStorei(1, 2); >+ }, >+ () => { >+ context.polygonOffset(1, 2); >+ }, >+ () => { >+ context.readPixels(1, 2, 3, 4, 5, 6, float32Array); >+ }, >+ () => { >+ context.releaseShaderCompiler(); >+ }, >+ () => { >+ context.renderbufferStorage(1, 2, 3, 4); >+ }, >+ () => { >+ context.sampleCoverage(1, true); >+ }, >+ () => { >+ context.scissor(1, 2, 3, 4); >+ }, >+ () => { >+ context.shaderSource(shader, "test"); >+ }, >+ () => { >+ context.stencilFunc(1, 2, 3); >+ }, >+ () => { >+ context.stencilFuncSeparate(1, 2, 3, 4); >+ }, >+ () => { >+ context.stencilMask(1); >+ }, >+ () => { >+ context.stencilMaskSeparate(1, 2); >+ }, >+ () => { >+ context.stencilOp(1, 2, 3); >+ }, >+ () => { >+ context.stencilOpSeparate(1, 2, 3, 4); >+ }, >+ () => { >+ context.texImage2D(1, 2, 3, 4, 5, image); >+ context.texImage2D(6, 7, 8, 9, 10, 11, 12, 13, float32Array); >+ }, >+ () => { >+ context.texParameterf(1, 2, 3); >+ }, >+ () => { >+ context.texParameteri(1, 2, 3); >+ }, >+ () => { >+ context.texSubImage2D(1, 2, 3, 4, 5, 6, image); >+ context.texSubImage2D(7, 8, 9, 10, 11, 12, 13, 14, float32Array); >+ }, >+ () => { >+ context.uniform1f(uniformLocation, 1); >+ }, >+ () => { >+ context.uniform1fv(uniformLocation, float32Array); >+ }, >+ () => { >+ context.uniform1i(uniformLocation, 1); >+ }, >+ () => { >+ context.uniform1iv(uniformLocation, int32Array); >+ }, >+ () => { >+ context.uniform2f(uniformLocation, 1, 2); >+ }, >+ () => { >+ context.uniform2fv(uniformLocation, float32Array); >+ }, >+ () => { >+ context.uniform2i(uniformLocation, 1, 2); >+ }, >+ () => { >+ context.uniform2iv(uniformLocation, int32Array); >+ }, >+ () => { >+ context.uniform3f(uniformLocation, 1, 2, 3); >+ }, >+ () => { >+ context.uniform3fv(uniformLocation, float32Array); >+ }, >+ () => { >+ context.uniform3i(uniformLocation, 1, 2, 3); >+ }, >+ () => { >+ context.uniform3iv(uniformLocation, int32Array); >+ }, >+ () => { >+ context.uniform4f(uniformLocation, 1, 2, 3, 4); >+ }, >+ () => { >+ context.uniform4fv(uniformLocation, float32Array); >+ }, >+ () => { >+ context.uniform4i(uniformLocation, 1, 2, 3, 4); >+ }, >+ () => { >+ context.uniform4iv(uniformLocation, int32Array); >+ }, >+ () => { >+ context.uniformMatrix2fv(uniformLocation, true, float32Array); >+ }, >+ () => { >+ context.uniformMatrix3fv(uniformLocation, true, float32Array); >+ }, >+ () => { >+ context.uniformMatrix4fv(uniformLocation, true, float32Array); >+ }, >+ () => { >+ context.useProgram(program); >+ }, >+ () => { >+ context.validateProgram(program); >+ }, >+ () => { >+ context.vertexAttrib1f(1, 2); >+ }, >+ () => { >+ context.vertexAttrib1fv(1, float32Array); >+ }, >+ () => { >+ context.vertexAttrib2f(1, 2, 3); >+ }, >+ () => { >+ context.vertexAttrib2fv(1, float32Array); >+ }, >+ () => { >+ context.vertexAttrib3f(1, 2, 3, 4); >+ }, >+ () => { >+ context.vertexAttrib3fv(1, float32Array); >+ }, >+ () => { >+ context.vertexAttrib4f(1, 2, 3, 4, 5); >+ }, >+ () => { >+ context.vertexAttrib4fv(1, float32Array); >+ }, >+ () => { >+ context.vertexAttribPointer(1, 2, 3, 4, 5, 6); >+ }, >+ () => { >+ context.viewport(1, 2, 3, 4); >+ }, >+ () => { >+ context.canvas.width; >+ context.canvas.width = 2; >+ }, >+ () => { >+ context.canvas.height; >+ context.canvas.height = 2; >+ }, >+ () => { >+ TestPage.dispatchEventToFrontend("LastFrame"); >+ }, >+ ]; >+ let index = 0; >+ function executeFrameFunction() { >+ frames[index++](); >+ if (index < frames.length) >+ requestAnimationFrameId = requestAnimationFrame(executeFrameFunction); >+ }; >+ executeFrameFunction(); >+} >+ >+function performConsoleActions() { >+ console.record(context, {name: "TEST"}); >+ >+ context.createTexture(); >+ >+ console.recordEnd(context); >+ >+ context.createBuffer(); >+} >diff --git a/LayoutTests/inspector/canvas/resources/recording-webgl2.js b/LayoutTests/inspector/canvas/resources/recording-webgl2.js >new file mode 100644 >index 0000000000000000000000000000000000000000..c6a87d35a37cbd900b7ce49dc9153e47251e8a85 >--- /dev/null >+++ b/LayoutTests/inspector/canvas/resources/recording-webgl2.js >@@ -0,0 +1,489 @@ >+if (window.internals) { >+ window.internals.settings.setWebGLErrorsToConsoleEnabled(false); >+ window.internals.settings.setWebGL2Enabled(true); >+} >+ >+// 2x2 red square >+let image = document.createElement("img"); >+image.src = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAYAAABytg0kAAAAAXNSR0IArs4c6QAAABNJREFUCB1j/M/AAEQMDEwgAgQAHxcCAmtAm/sAAAAASUVORK5CYII="; >+ >+let float32Array = new Float32Array([0.1, 0.2]); >+let int32Array = new Int32Array([1, 2]); >+ >+let buffer = null; >+let framebuffer = null; >+let uniformLocation = null; >+let renderbuffer = null; >+let shader = null; >+let texture = null; >+ >+function load() { >+ createProgram("webgl2"); >+ linkProgram("vertex-shader", "fragment-shader"); >+ >+ context.canvas.width = 2; >+ context.canvas.height = 2; >+ >+ buffer = context.createBuffer(); >+ framebuffer = context.createFramebuffer(); >+ uniformLocation = context.getUniformLocation(program, "test"); >+ renderbuffer = context.createRenderbuffer(); >+ shader = context.createShader(context.VERTEX_SHADER); >+ texture = context.createTexture(); >+ >+ cancelActions(); >+ >+ runTest(); >+} >+ >+function ignoreException(func){ >+ try { >+ func(); >+ } catch (e) { } >+} >+ >+let requestAnimationFrameId = NaN; >+ >+function cancelActions() { >+ cancelAnimationFrame(requestAnimationFrameId); >+ requestAnimationFrameId = NaN; >+ >+ context.clearColor(0.0, 0.0, 0.0, 0.0); >+ context.clear(context.COLOR_BUFFER_BIT); >+} >+ >+function performActions() { >+ let frames = [ >+ () => { >+ context.activeTexture(1); >+ }, >+ () => { >+ context.attachShader(program, shader); >+ }, >+ () => { >+ context.bindAttribLocation(program, 1, "test"); >+ }, >+ () => { >+ context.bindBuffer(1, buffer); >+ }, >+ () => { >+ context.bindFramebuffer(1, framebuffer); >+ }, >+ () => { >+ context.bindRenderbuffer(1, renderbuffer); >+ }, >+ () => { >+ context.bindTexture(1, texture); >+ }, >+ () => { >+ context.blendColor(1, 2, 3, 4); >+ }, >+ () => { >+ context.blendEquation(1); >+ }, >+ () => { >+ context.blendEquationSeparate(1, 2); >+ }, >+ () => { >+ context.blendFunc(1, 2); >+ }, >+ () => { >+ context.blendFuncSeparate(1, 2, 3, 4); >+ }, >+ () => { >+ context.bufferData(1, float32Array, 2); >+ context.bufferData(3, 4, 5); >+ }, >+ () => { >+ context.bufferSubData(1, 2, float32Array); >+ }, >+ () => { >+ context.checkFramebufferStatus(1); >+ }, >+ () => { >+ context.clear(1); >+ }, >+ () => { >+ context.clearColor(1, 2, 3, 4); >+ }, >+ () => { >+ context.clearDepth(1); >+ }, >+ () => { >+ context.clearStencil(1); >+ }, >+ () => { >+ context.colorMask(true, false, true, false); >+ }, >+ () => { >+ context.compileShader(shader); >+ }, >+ () => { >+ context.compressedTexSubImage2D(1, 2, 3, 4, 5, 6, 7, float32Array); >+ }, >+ () => { >+ context.copyTexImage2D(1, 2, 3, 4, 5, 6, 7, 8); >+ }, >+ () => { >+ context.copyTexSubImage2D(1, 2, 3, 4, 5, 6, 7, 8); >+ }, >+ () => { >+ context.createBuffer(); >+ }, >+ () => { >+ context.createFramebuffer(); >+ }, >+ () => { >+ context.createProgram(); >+ }, >+ () => { >+ context.createRenderbuffer(); >+ }, >+ () => { >+ context.createShader(1); >+ }, >+ () => { >+ context.createTexture(); >+ }, >+ () => { >+ context.cullFace(1); >+ }, >+ () => { >+ context.deleteBuffer(buffer); >+ }, >+ () => { >+ context.deleteFramebuffer(framebuffer); >+ }, >+ () => { >+ context.deleteProgram(program); >+ }, >+ () => { >+ context.deleteRenderbuffer(renderbuffer); >+ }, >+ () => { >+ context.deleteShader(shader); >+ }, >+ () => { >+ context.deleteTexture(texture); >+ }, >+ () => { >+ context.depthFunc(1); >+ }, >+ () => { >+ context.depthMask(true); >+ }, >+ () => { >+ context.depthRange(1, 2); >+ }, >+ () => { >+ context.detachShader(program, shader); >+ }, >+ () => { >+ context.disable(1); >+ }, >+ () => { >+ context.disableVertexAttribArray(1); >+ }, >+ () => { >+ context.drawArrays(1, 2, 3); >+ }, >+ () => { >+ context.drawElements(1, 2, 3, 4); >+ }, >+ () => { >+ context.enable(1); >+ }, >+ () => { >+ context.enableVertexAttribArray(1); >+ }, >+ () => { >+ context.finish(); >+ }, >+ () => { >+ context.flush(); >+ }, >+ () => { >+ context.framebufferRenderbuffer(1, 2, 3, renderbuffer); >+ }, >+ () => { >+ context.framebufferTexture2D(1, 2, 3, texture, 4); >+ }, >+ () => { >+ context.frontFace(1); >+ }, >+ () => { >+ context.generateMipmap(1); >+ }, >+ () => { >+ context.getActiveAttrib(program, 1); >+ }, >+ () => { >+ context.getActiveUniform(program, 1); >+ }, >+ () => { >+ context.getAttachedShaders(program); >+ }, >+ () => { >+ context.getAttribLocation(program, "test"); >+ }, >+ () => { >+ context.getBufferParameter(1, 2); >+ }, >+ () => { >+ context.getContextAttributes(); >+ }, >+ () => { >+ context.getError(); >+ }, >+ () => { >+ context.getExtension("test"); >+ }, >+ () => { >+ context.getFramebufferAttachmentParameter(1, 2, 3); >+ }, >+ () => { >+ context.getParameter(1); >+ }, >+ () => { >+ context.getProgramInfoLog(program); >+ }, >+ () => { >+ context.getProgramParameter(program, 1); >+ }, >+ () => { >+ context.getRenderbufferParameter(1, 2); >+ }, >+ () => { >+ context.getShaderInfoLog(shader); >+ }, >+ () => { >+ context.getShaderParameter(shader, 1); >+ }, >+ () => { >+ context.getShaderPrecisionFormat(1, 2); >+ }, >+ () => { >+ context.getShaderSource(shader); >+ }, >+ () => { >+ context.getSupportedExtensions(); >+ }, >+ () => { >+ context.getTexParameter(1, 2); >+ }, >+ () => { >+ context.getUniform(program, uniformLocation); >+ }, >+ () => { >+ context.getUniformLocation(program, "test"); >+ }, >+ () => { >+ context.getVertexAttrib(1, 2); >+ }, >+ () => { >+ context.getVertexAttribOffset(1, 2); >+ }, >+ () => { >+ context.hint(1, 2); >+ }, >+ () => { >+ context.isBuffer(buffer); >+ }, >+ () => { >+ context.isContextLost(); >+ }, >+ () => { >+ context.isEnabled(1); >+ }, >+ () => { >+ context.isFramebuffer(framebuffer); >+ }, >+ () => { >+ context.isProgram(program); >+ }, >+ () => { >+ context.isRenderbuffer(renderbuffer); >+ }, >+ () => { >+ context.isShader(shader); >+ }, >+ () => { >+ context.isTexture(texture); >+ }, >+ () => { >+ context.lineWidth(1); >+ }, >+ () => { >+ context.linkProgram(program); >+ }, >+ () => { >+ context.pixelStorei(1, 2); >+ }, >+ () => { >+ context.polygonOffset(1, 2); >+ }, >+ () => { >+ context.readPixels(1, 2, 3, 4, 5, 6, float32Array); >+ }, >+ () => { >+ context.releaseShaderCompiler(); >+ }, >+ () => { >+ context.renderbufferStorage(1, 2, 3, 4); >+ }, >+ () => { >+ context.sampleCoverage(1, true); >+ }, >+ () => { >+ context.scissor(1, 2, 3, 4); >+ }, >+ () => { >+ context.shaderSource(shader, "test"); >+ }, >+ () => { >+ context.stencilFunc(1, 2, 3); >+ }, >+ () => { >+ context.stencilFuncSeparate(1, 2, 3, 4); >+ }, >+ () => { >+ context.stencilMask(1); >+ }, >+ () => { >+ context.stencilMaskSeparate(1, 2); >+ }, >+ () => { >+ context.stencilOp(1, 2, 3); >+ }, >+ () => { >+ context.stencilOpSeparate(1, 2, 3, 4); >+ }, >+ () => { >+ context.texParameterf(1, 2, 3); >+ }, >+ () => { >+ context.texParameteri(1, 2, 3); >+ }, >+ () => { >+ context.uniform1f(uniformLocation, 1); >+ }, >+ () => { >+ context.uniform1fv(uniformLocation, float32Array); >+ }, >+ () => { >+ context.uniform1i(uniformLocation, 1); >+ }, >+ () => { >+ context.uniform1iv(uniformLocation, int32Array); >+ }, >+ () => { >+ context.uniform2f(uniformLocation, 1, 2); >+ }, >+ () => { >+ context.uniform2fv(uniformLocation, float32Array); >+ }, >+ () => { >+ context.uniform2i(uniformLocation, 1, 2); >+ }, >+ () => { >+ context.uniform2iv(uniformLocation, int32Array); >+ }, >+ () => { >+ context.uniform3f(uniformLocation, 1, 2, 3); >+ }, >+ () => { >+ context.uniform3fv(uniformLocation, float32Array); >+ }, >+ () => { >+ context.uniform3i(uniformLocation, 1, 2, 3); >+ }, >+ () => { >+ context.uniform3iv(uniformLocation, int32Array); >+ }, >+ () => { >+ context.uniform4f(uniformLocation, 1, 2, 3, 4); >+ }, >+ () => { >+ context.uniform4fv(uniformLocation, float32Array); >+ }, >+ () => { >+ context.uniform4i(uniformLocation, 1, 2, 3, 4); >+ }, >+ () => { >+ context.uniform4iv(uniformLocation, int32Array); >+ }, >+ () => { >+ context.uniformMatrix2fv(uniformLocation, true, float32Array); >+ }, >+ () => { >+ context.uniformMatrix3fv(uniformLocation, true, float32Array); >+ }, >+ () => { >+ context.uniformMatrix4fv(uniformLocation, true, float32Array); >+ }, >+ () => { >+ context.useProgram(program); >+ }, >+ () => { >+ context.validateProgram(program); >+ }, >+ () => { >+ context.vertexAttrib1f(1, 2); >+ }, >+ () => { >+ context.vertexAttrib1fv(1, float32Array); >+ }, >+ () => { >+ context.vertexAttrib2f(1, 2, 3); >+ }, >+ () => { >+ context.vertexAttrib2fv(1, float32Array); >+ }, >+ () => { >+ context.vertexAttrib3f(1, 2, 3, 4); >+ }, >+ () => { >+ context.vertexAttrib3fv(1, float32Array); >+ }, >+ () => { >+ context.vertexAttrib4f(1, 2, 3, 4, 5); >+ }, >+ () => { >+ context.vertexAttrib4fv(1, float32Array); >+ }, >+ () => { >+ context.vertexAttribPointer(1, 2, 3, 4, 5, 6); >+ }, >+ () => { >+ context.viewport(1, 2, 3, 4); >+ }, >+ () => { >+ context.canvas.width; >+ context.canvas.width = 2; >+ }, >+ () => { >+ context.canvas.height; >+ context.canvas.height = 2; >+ }, >+ () => { >+ TestPage.dispatchEventToFrontend("LastFrame"); >+ }, >+ ]; >+ let index = 0; >+ function executeFrameFunction() { >+ frames[index++](); >+ if (index < frames.length) >+ requestAnimationFrameId = requestAnimationFrame(executeFrameFunction); >+ }; >+ executeFrameFunction(); >+} >+ >+function performConsoleActions() { >+ console.record(context, {name: "TEST"}); >+ >+ context.createTexture(); >+ >+ console.recordEnd(context); >+ >+ context.createBuffer(); >+} >diff --git a/LayoutTests/platform/gtk/TestExpectations b/LayoutTests/platform/gtk/TestExpectations >index 562b6db1e27b3f0471ea44bbe454c7158b96cd0f..abb0469bbad62a9259760d8524daf943c82bb367 100644 >--- a/LayoutTests/platform/gtk/TestExpectations >+++ b/LayoutTests/platform/gtk/TestExpectations >@@ -543,7 +543,10 @@ webkit.org/b/166536 fast/canvas/webgl/webgl2-runtime-flag.html [ Skip ] > webkit.org/b/166536 fast/canvas/webgl/webgl2-texStorage.html [ Skip ] > webkit.org/b/166536 fast/canvas/webgl/webgl2-texture-upload-enums.html [ Skip ] > webkit.org/b/166536 inspector/canvas/create-context-webgl2.html [ Skip ] >-webkit.org/b/166536 inspector/canvas/recording-webgl2.html [ Skip ] >+webkit.org/b/166536 inspector/canvas/console-record-webgl2.html [ Skip ] >+webkit.org/b/166536 inspector/canvas/recording-webgl2-frameCount.html [ Skip ] >+webkit.org/b/166536 inspector/canvas/recording-webgl2-full.html [ Skip ] >+webkit.org/b/166536 inspector/canvas/recording-webgl2-memoryLimit.html [ Skip ] > webkit.org/b/166536 inspector/canvas/recording-webgl2-snapshots.html [ Skip ] > webkit.org/b/166536 inspector/canvas/requestContent-webgl2.html [ Skip ] > webkit.org/b/166536 inspector/canvas/resolveCanvasContext-webgl2.html [ Skip ] >@@ -2192,7 +2195,11 @@ webkit.org/b/197507 legacy-animation-engine/animations/animation-multiple-callba > webkit.org/b/197507 legacy-animation-engine/imported/blink/css3/calc/transition-asan-crash.html [ Timeout Pass ] > webkit.org/b/197507 media/destructor-logging-crash.html [ Timeout Pass ] > >-webkit.org/b/175662 inspector/canvas/recording-2d.html [ Failure Timeout ] >+webkit.org/b/175662 inspector/canvas/console-record-2d.html [ Failure Timeout ] >+webkit.org/b/175662 inspector/canvas/recording-2d-frameCount.html [ Failure Timeout ] >+webkit.org/b/175662 inspector/canvas/recording-2d-full.html [ Failure Timeout ] >+webkit.org/b/175662 inspector/canvas/recording-2d-memoryLimit.html [ Failure Timeout ] >+webkit.org/b/175662 inspector/canvas/recording-2d-saves.html [ Failure Timeout ] > > webkit.org/b/197711 imported/w3c/web-platform-tests/media-source/mediasource-correct-frames.html [ Pass Failure ] > >@@ -3765,7 +3772,10 @@ webkit.org/b/193632 fast/text/narrow-non-breaking-space.html [ ImageOnlyFailure > > webkit.org/b/193323 http/wpt/cache-storage/cache-quota.any.html [ Failure ] > >-webkit.org/b/193637 inspector/canvas/recording-bitmaprenderer.html [ Failure ] >+webkit.org/b/193637 inspector/canvas/console-record-bitmaprenderer.html [ Failure ] >+webkit.org/b/193637 inspector/canvas/recording-bitmaprenderer-frameCount.html [ Failure ] >+webkit.org/b/193637 inspector/canvas/recording-bitmaprenderer-full.html [ Failure ] >+webkit.org/b/193637 inspector/canvas/recording-bitmaprenderer-memoryLimit.html [ Failure ] > > webkit.org/b/193638 media/video-webkit-playsinline.html [ Failure ] > >diff --git a/LayoutTests/platform/mac/TestExpectations b/LayoutTests/platform/mac/TestExpectations >index 4171f1051c73eeff1bf7d9f3a41af38971b033e8..06b7fd3e41f1d63c7efddce99dddb78a56e0879b 100644 >--- a/LayoutTests/platform/mac/TestExpectations >+++ b/LayoutTests/platform/mac/TestExpectations >@@ -1027,11 +1027,14 @@ http/tests/security/contentSecurityPolicy/media-src-allowed.html [ Skip ] > > webkit.org/b/150978 fast/canvas/webgl/oes-texture-half-float-linear.html [ Pass Failure ] > >+webkit.org/b/174066 inspector/canvas/console-record-webgl2.html [ Pass Timeout ] > webkit.org/b/173931 inspector/canvas/context-attributes.html [ Pass Timeout ] > webkit.org/b/178028 inspector/canvas/create-context-2d.html [ Pass Timeout ] > webkit.org/b/174066 inspector/canvas/create-context-webgl2.html [ Pass Timeout ] > webkit.org/b/174272 inspector/canvas/css-canvas-clients.html [ Pass Failure ] >-webkit.org/b/174066 inspector/canvas/recording-webgl2.html [ Pass Failure Timeout ] >+webkit.org/b/174066 inspector/canvas/recording-webgl2-frameCount.html [ Pass Failure Timeout ] >+webkit.org/b/174066 inspector/canvas/recording-webgl2-full.html [ Pass Failure Timeout ] >+webkit.org/b/174066 inspector/canvas/recording-webgl2-memoryLimit.html [ Pass Failure Timeout ] > webkit.org/b/174066 inspector/canvas/recording-webgl2-snapshots.html [ Pass Failure Timeout ] > webkit.org/b/174066 inspector/canvas/shaderProgram-add-remove-webgl2.html [ Pass Failure Timeout ] > webkit.org/b/160048 [ Debug ] inspector/codemirror/prettyprinting-javascript.html [ Pass Timeout ] >diff --git a/LayoutTests/platform/win/TestExpectations b/LayoutTests/platform/win/TestExpectations >index 81da55afb520ad3f87210136589447736137da75..c2e781abe1b91c91fa523d2b4ef66bfdc8a0386b 100644 >--- a/LayoutTests/platform/win/TestExpectations >+++ b/LayoutTests/platform/win/TestExpectations >@@ -1979,11 +1979,17 @@ fast/images/webgl-teximage2d.html [ Skip ] > http/tests/security/webgl-remote-read-remote-image-allowed.html [ Skip ] > http/tests/security/webgl-remote-read-remote-image-allowed-with-credentials.html [ Skip ] > http/tests/security/webgl-remote-read-remote-image-blocked-no-crossorigin.html [ Skip ] >+inspector/canvas/console-record-webgl.html [ Skip ] > inspector/canvas/create-context-webgl.html [ Skip ] >+inspector/canvas/console-record-webgl2.html [ Skip ] > inspector/canvas/create-context-webgl2.html [ Skip ] >-inspector/canvas/recording-webgl.html [ Skip ] >+inspector/canvas/recording-webgl-frameCount.html [ Skip ] >+inspector/canvas/recording-webgl-full.html [ Skip ] >+inspector/canvas/recording-webgl-memoryLimit.html [ Skip ] > inspector/canvas/recording-webgl-snapshots.html [ Skip ] >-inspector/canvas/recording-webgl2.html [ Skip ] >+inspector/canvas/recording-webgl2-frameCount.html [ Skip ] >+inspector/canvas/recording-webgl2-full.html [ Skip ] >+inspector/canvas/recording-webgl2-memoryLimit.html [ Skip ] > inspector/canvas/recording-webgl2-snapshots.html [ Skip ] > inspector/canvas/requestContent-webgl.html [ Skip ] > inspector/canvas/requestContent-webgl2.html [ Skip ]
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 198459
:
371120
|
371121