WebCore:
authorrjw <rjw@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 7 Dec 2004 23:06:24 +0000 (23:06 +0000)
committerrjw <rjw@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 7 Dec 2004 23:06:24 +0000 (23:06 +0000)
commit642b53e9a037cc96ba26491146ec54e9265f5039
treeb490e36a35a1e18314e946c529ca873d83144c60
parentd8677b8e8a64d2e2387396de5e846d9b269dff3a
WebCore:
Support threaded image decoding on machines w/ > 2 CPUs.

        Reviewed by Maciej and Chris.

        * khtml/misc/loader.cpp:
        (CachedImageCallback::notifyUpdate):
        (CachedImageCallback::notifyFinished):
        (CachedImageCallback::notifyDecodingError):
        (CachedImageCallback::handleError):
        (CachedImageCallback::clear):
        (CachedImage::CachedImage):
        (CachedImage::clear):
        (CachedImage::data):
        (CachedImage::checkNotify):
        (Loader::servePendingRequests):
        (Loader::slotFinished):
        (Loader::numRequests):
        (Loader::cancelRequests):
        (Loader::removeBackgroundDecodingRequest):
        * khtml/misc/loader.h:
        (khtml::CachedImageCallback::CachedImageCallback):
        (khtml::CachedImageCallback::ref):
        (khtml::CachedImageCallback::deref):
        (khtml::CachedImage::decoderCallback):
        * khtml/rendering/render_object.cpp:
        (RenderObject::setPixmap):
        * kwq/KWQPixmap.h:
        * kwq/KWQPixmap.mm:
        (-[WebImageCallback initWithCallback:khtml::]):
        (-[WebImageCallback _commonTermination]):
        (-[WebImageCallback dealloc]):
        (-[WebImageCallback finalize]):
        (-[WebImageCallback notify]):
        (-[WebImageCallback setImageSourceStatus:]):
        (-[WebImageCallback status]):
        (QPixmap::shouldUseThreadedDecoding):
        (QPixmap::receivedData):
        * kwq/WebCoreImageRenderer.h:
        * kwq/WebCoreImageRendererFactory.h:
        * kwq/WebCoreImageRendererFactory.m:
        (+[WebCoreImageRendererFactory shouldUseThreadedDecoding]):
        (+[WebCoreImageRendererFactory setShouldUseThreadedDecoding:]):

WebKit:
Support threaded image decoding on machines w/ > 2 CPUs.

        Reviewed by Maciej and Chris.

        * Misc.subproj/WebKitSystemBits.h:
        * Misc.subproj/WebKitSystemBits.m:
        (WebSystemMainMemory):
        (WebNumberOfCPUs):
        * WebCoreSupport.subproj/WebImageData.h:
        * WebCoreSupport.subproj/WebImageData.m:
        (+[WebImageData initialize]):
        (-[WebImageData init]):
        (-[WebImageData _commonTermination]):
        (-[WebImageData dealloc]):
        (-[WebImageData _invalidateImages]):
        (-[WebImageData _imageSourceOptions]):
        (-[WebImageData imageAtIndex:]):
        (-[WebImageData propertiesAtIndex:]):
        (-[WebImageData _createImages]):
        (-[WebImageData decodeData:isComplete:callback:]):
        (-[WebImageData incrementalLoadWithBytes:length:complete:callback:]):
        (drawPattern):
        (-[WebImageData tileInRect:fromPoint:context:]):
        (-[WebImageData isNull]):
        (-[WebImageData size]):
        (-[WebImageData _frameDurationAt:]):
        (-[WebImageData _frameDuration]):
        (+[WebImageData stopAnimationsInView:]):
        (-[WebImageData addAnimatingRenderer:inView:]):
        (-[WebImageData removeAnimatingRenderer:]):
        * WebCoreSupport.subproj/WebImageDecodeItem.h: Added.
        * WebCoreSupport.subproj/WebImageDecodeItem.m: Added.
        (+[WebImageDecodeItem decodeItemWithImage:data:isComplete:callback:]):
        (-[WebImageDecodeItem initWithImage:data:isComplete:callback:]):
        (-[WebImageDecodeItem finalize]):
        (-[WebImageDecodeItem dealloc]):
        * WebCoreSupport.subproj/WebImageDecoder.h: Added.
        * WebCoreSupport.subproj/WebImageDecoder.m: Added.
        (decoderNotifications):
        (+[WebImageDecoder initialize]):
        (+[WebImageDecoder notifyMainThread]):
        (+[WebImageDecoder sharedDecoder]):
        (+[WebImageDecoder performDecodeWithImage:data:isComplete:callback:]):
        (+[WebImageDecoder imageDecodesPending]):
        (+[WebImageDecoder decodeComplete:status:]):
        (-[WebImageDecoder init]):
        (-[WebImageDecoder dealloc]):
        (-[WebImageDecoder finalize]):
        (-[WebImageDecoder removeItem]):
        (-[WebImageDecoder addItem:]):
        (-[WebImageDecoder decodeItem:]):
        (decoderThread):
        (startDecoderThread):
        * WebCoreSupport.subproj/WebImageRenderer.m:
        (-[WebImageRenderer initWithData:MIMEType:]):
        (-[WebImageRenderer initWithContentsOfFile:]):
        (-[WebImageRenderer incrementalLoadWithBytes:length:complete:callback:]):
        (-[WebInternalImage incrementalLoadWithBytes:length:complete:callback:]):
        * WebKit.pbproj/project.pbxproj:
        * WebView.subproj/WebImageRepresentation.m:
        (-[WebImageRepresentation receivedData:withDataSource:]):
        (-[WebImageRepresentation receivedError:withDataSource:]):
        (-[WebImageRepresentation finishedLoadingWithDataSource:]):

WebBrowser:
Added a menu item to enable/disable threaded image decoding.

        Reviewed by Maciej and Chris.

        * Debug/DebugUtilities.m:
        (-[DebugUtilities createDebugMenu]):
        (-[BrowserDocument toggleUseATSUForAllTextDrawing:]):
        (-[BrowserDocument toggleUseThreadedImageDecoding:]):
        (-[BrowserDocument validate_toggleUseThreadedImageDecoding:]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8153 268f45cc-cd09-0410-ab3c-d52691b4dbfc
21 files changed:
WebCore/ChangeLog-2005-08-23
WebCore/khtml/misc/loader.cpp
WebCore/khtml/misc/loader.h
WebCore/khtml/rendering/render_object.cpp
WebCore/kwq/KWQPixmap.h
WebCore/kwq/KWQPixmap.mm
WebCore/kwq/WebCoreImageRenderer.h
WebCore/kwq/WebCoreImageRendererFactory.h
WebCore/kwq/WebCoreImageRendererFactory.m
WebKit/ChangeLog
WebKit/Misc.subproj/WebKitSystemBits.h
WebKit/Misc.subproj/WebKitSystemBits.m
WebKit/WebCoreSupport.subproj/WebImageData.h
WebKit/WebCoreSupport.subproj/WebImageData.m
WebKit/WebCoreSupport.subproj/WebImageDecodeItem.h [new file with mode: 0644]
WebKit/WebCoreSupport.subproj/WebImageDecodeItem.m [new file with mode: 0644]
WebKit/WebCoreSupport.subproj/WebImageDecoder.h [new file with mode: 0644]
WebKit/WebCoreSupport.subproj/WebImageDecoder.m [new file with mode: 0644]
WebKit/WebCoreSupport.subproj/WebImageRenderer.m
WebKit/WebKit.pbproj/project.pbxproj
WebKit/WebView.subproj/WebImageRepresentation.m