-
schenney@chromium.org authored
https://bugs.webkit.org/show_bug.cgi?id=80321 Reviewed by Dirk Schulze. Source/WebCore: The code in ImageBuffer::transformColorSpace had two problems that are fixed by this patch. First, it was using member variables for data that is static constant. This is incredibly wasteful, as every ImageBuffer that is created (and we make a lot of them) gets its own copy of the LUT and the table is initialized again and again. The patch replaces this with a static local, with lazy evaluation, in the method that uses the tables. Second, the code for filling the table was mapping 255 to 254, thus reducing the intensity and alpha of every image it pushed through a color transform. Test: svg/filters/color-space-conversion.svg * platform/graphics/ImageBuffer.cpp: (WebCore::ImageBuffer::transformColorSpace): * platform/graphics/ImageBuffer.h: (ImageBuffer): LayoutTests: Temporarily marking Chromium tests expected to fail as a result of this patch. And a new test. * platform/chromium/TestExpectations: * svg/filters/color-space-conversion.svg: * svg/filters/color-space-conversion-expected.svg: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@119831 268f45cc-cd09-0410-ab3c-d52691b4dbfc
c38c0b3b