2008-09-22 Darin Adler <darin@apple.com>
authoroliver@apple.com <oliver@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 23 Sep 2008 07:40:49 +0000 (07:40 +0000)
committeroliver@apple.com <oliver@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 23 Sep 2008 07:40:49 +0000 (07:40 +0000)
commit654fd6ae3d3bbeca3099d7df025c07f11dafce6c
tree15755f8ee543c503b7da7be94a87b2057491de44
parent791343ba1e401bd36225e2a9445f08ea35021203
2008-09-22  Darin Adler  <darin@apple.com>

- fix https://bugs.webkit.org/show_bug.cgi?id=21008
  getting pixels by index from CanvasPixelArray is unnecessarily slow

Reviewed by Oliver Hunt

* GNUmakefile.am: Added JSCanvasPixelArrayCustom.h.
* WebCore.vcproj/WebCore.vcproj: Ditto.
* WebCore.xcodeproj/project.pbxproj: Ditto.

* bindings/js/JSCanvasPixelArrayCustom.cpp: Removed indexGetter and
  indexSetter. These are now both inlined, so in the header.
* bindings/js/JSCanvasPixelArrayCustom.h: Added. The getByIndex
  function is what's used for HasCustomIndexGetter. Also moved the
  indexSetter function here.

* bindings/scripts/CodeGeneratorJS.pm: Changed HasCustomIndexGetter
  to use a getByIndex member function rather than an indexGetter stat
  member function in a property slot. This lets us avoid the property
  slot mechanism's rule where it turns numeric property names into
  strings in the identifier table, which is good because that's slow.
  Also added a new property CustomHeader that allows IDL files to
  introduce headers to be included -- useful when we have functions
  that we want to inline into the binding.

* html/CanvasPixelArray.idl: Added CustomHeader attribute.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@36801 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebCore/ChangeLog
WebCore/GNUmakefile.am
WebCore/WebCore.vcproj/WebCore.vcproj
WebCore/WebCore.xcodeproj/project.pbxproj
WebCore/bindings/js/JSCanvasPixelArrayCustom.cpp
WebCore/bindings/scripts/CodeGeneratorJS.pm
WebCore/html/CanvasPixelArray.idl