RESOLVED INVALID 39212
Window object should have a CanvasPixelArray
https://bugs.webkit.org/show_bug.cgi?id=39212
Summary Window object should have a CanvasPixelArray
Andreas Kling
Reported 2010-05-17 02:59:40 PDT
Attachments
Proposed patch, first stab (20.18 KB, patch)
2010-05-17 03:59 PDT, Andreas Kling
no flags
Proposed patch, first stab (20.18 KB, patch)
2010-05-17 04:03 PDT, Andreas Kling
oliver: review-
Andreas Kling
Comment 1 2010-05-17 03:59:26 PDT
Created attachment 56233 [details] Proposed patch, first stab
WebKit Review Bot
Comment 2 2010-05-17 04:01:51 PDT
Attachment 56233 [details] did not pass style-queue: Failed to run "['WebKitTools/Scripts/check-webkit-style', '--no-squash']" exit_code: 1 WebCore/bindings/js/JSCanvasPixelArrayCustom.cpp:27: You should add a blank line after implementation file's own header. [build/include_order] [4] Total errors found: 1 in 18 files If any of these errors are false positives, please file a bug against check-webkit-style.
Andreas Kling
Comment 3 2010-05-17 04:03:41 PDT
Created attachment 56234 [details] Proposed patch, first stab
Oliver Hunt
Comment 4 2010-05-17 15:32:03 PDT
Comment on attachment 56234 [details] Proposed patch, first stab This patch would destroy pixel array performance -- what is the bug you are seeing?
Oliver Hunt
Comment 5 2010-05-17 15:37:17 PDT
On the assumption that you're wanting to make a CPA instance claim to be an instanceof CanvasPixelArray you'll just want to make the logic that creates a CPA specify use the prototype from the CanvasPixelArray constructor, and set the constructor property on the CPA appropriately. That said, you clearly are not testing performance of your change -- even the most rudimentary tests would have shown a huge (if memory serves ~5-10x) regression in read/write access to the cpa data.
Andreas Kling
Comment 6 2010-05-17 23:36:13 PDT
(In reply to comment #5) > On the assumption that you're wanting to make a CPA instance claim to be an instanceof CanvasPixelArray you'll just want to make the logic that creates a CPA specify use the prototype from the CanvasPixelArray constructor, and set the constructor property on the CPA appropriately. Your assumption is correct. I'll update the patch once I wrap my head around it. > That said, you clearly are not testing performance of your change -- even the most rudimentary tests would have shown a huge (if memory serves ~5-10x) regression in read/write access to the cpa data. Indeed true, this was merely a first (rather naive) shot at getting a "correct" implementation. :-)
Andreas Kling
Comment 7 2010-07-12 15:02:50 PDT
Right. The claim-to-be-a-CanvasPixelArray part is already covered by finagling in JSImageDataCustom.cpp The missing thing is a CanvasPixelArray constructor on the window object. Tests failing because of this: - canvas/philip/tests/2d.imageData.create1.type.html - canvas/philip/tests/2d.imageData.create2.type.html - canvas/philip/tests/2d.imageData.get.type.html
Joshua Bell
Comment 8 2012-05-25 11:40:55 PDT
Some of these have recently started passing on chromium mac: 10.6 debug circa http://trac.webkit.org/log/?verbose=on&rev=117893&stop_rev=117815 and http://build.chromium.org/f/chromium/perf/dashboard/ui/changelog.html?url=/trunk/src&mode=html&range=138206:138138 All mac variations circa http://trac.webkit.org/log/?verbose=on&rev=118542&stop_rev=118542 and http://build.chromium.org/f/chromium/perf/dashboard/ui/changelog.html?url=/trunk/src&mode=html&range=139078:139073 canvas/philip/tests/2d.imageData.create1.type.html,canvas/philip/tests/2d.imageData.create2.type.html,media/video-volume-slider.html,platform/chromium/virtual/gpu/canvas/philip/tests/2d.imageData.create1.type.html,platform/chromium/virtual/gpu/canvas/philip/tests/2d.imageData.create2.type.html
Joshua Bell
Comment 9 2012-05-25 11:43:02 PDT
Whoops, that passing test list should be: canvas/philip/tests/2d.imageData.create1.type.html canvas/philip/tests/2d.imageData.create2.type.html platform/chromium/virtual/gpu/canvas/philip/tests/2d.imageData.create1.type.html platform/chromium/virtual/gpu/canvas/philip/tests/2d.imageData.create2.type.html
Joshua Bell
Comment 10 2012-05-25 11:48:29 PDT
Ah, due to rebaseline from http://trac.webkit.org/changeset/117818/ That rebaseline is probably incorrect and should be removed.
Thiago Marcos P. Santos
Comment 11 2012-08-20 05:59:05 PDT
CanvasPixelArray is deprecated. Layout tests will be updated at bug 94474.
Note You need to log in before you can comment on or make changes to this bug.