Ask CG to not parse image metadata
authorpsolanki@apple.com <psolanki@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 27 Oct 2011 23:24:59 +0000 (23:24 +0000)
committerpsolanki@apple.com <psolanki@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 27 Oct 2011 23:24:59 +0000 (23:24 +0000)
commit26c957367338853817af5c951d9b21a607211b4a
tree3d763350339ba3d93fee94ce4ec5c587fac59114
parentb3890fbf3b569bdacaee2eeefcec4007ef30ab56
Ask CG to not parse image metadata
https://bugs.webkit.org/show_bug.cgi?id=71029

Reviewed by Simon Fraser.

We don't need CG to parse the image metadata since WebCore never uses it. Passing this
option shaves off time spent under CGImageSourceCopyPropertiesAtIndex. Under Instruments I
saw the time drop from ~75ms to ~25ms when loading http://boston.com/bigpicture and the
first link on that page.

No new tests because no change in functionality.

* platform/graphics/ImageSource.h:
* platform/graphics/cg/ImageSourceCG.cpp:
(WebCore::imageSourceOptions):
(WebCore::ImageSource::isSizeAvailable):
(WebCore::ImageSource::frameSizeAtIndex):
(WebCore::ImageSource::getHotSpot):
(WebCore::ImageSource::repetitionCount):
(WebCore::ImageSource::createFrameAtIndex):
(WebCore::ImageSource::frameDurationAtIndex):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@98657 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/ImageSource.h
Source/WebCore/platform/graphics/cg/ImageSourceCG.cpp