JavaScriptCore: Safari pegs CPU and drops tons of frames using HTML5 Vimeo player
<https://bugs.webkit.org/show_bug.cgi?id=34005>
<rdar://problem/7569713>
Reviewed by Maciej Stachowiak
Added cancelCallOnMainThread. callOnMainThread should always now be paired
with cancelCallOnMainThread in situations where the refcon passed to callOnMainThread
may be dealloced before the main thread function can be dispatched.
(WTF::FunctionWithContext::operator == ): Supports the FunctionWithContextFinder predicate functor.
(WTF::FunctionWithContextFinder::FunctionWithContextFinder): Predicate functor for use with Dequeue::findIf
(WTF::FunctionWithContextFinder::operator()):
(WTF::cancelCallOnMainThread):
WebCore: Safari pegs CPU and drops tons of frames using HTML5 Vimeo player
<https://bugs.webkit.org/show_bug.cgi?id=34005>
<rdar://problem/7569713>
Reviewed by Eric Carlson
The original functionality of QTMovieWin has been split between QTMovieGWorld,
and a new class: QTMovie. QTMovie contains all the "controller" parts (changing
the rate, seeking, etc) while QTMovieGWorld retains all the drawing code. QTMovieGWorld
now takes a QTMovie, and as such QTMovie is now retainable. QTMovieGWorld registers
itself as a client of QTMovie, so that it can receive load-state notifications,
and thus QTMovie must now support multiple clients. Movie tasking timer support
has been moved into its own class (QTMovieTask) and will be addressed in a future
patch. Most of the functions listed below only changed so much as their class name changed.
- platform/graphics/win/QTMovie.cpp: Copied from WebCore/platform/graphics/win/QTMovieWin.cpp.
(QTMoviePrivate::QTMoviePrivate):
(QTMoviePrivate::~QTMoviePrivate):
(QTMoviePrivate::startTask):
(QTMoviePrivate::endTask):
(QTMoviePrivate::task):
(QTMoviePrivate::createMovieController):
(QTMovie::QTMovie):
(QTMovie::~QTMovie):
(QTMovie::addClient):
(QTMovie::removeClient):
(QTMovie::play):
(QTMovie::pause):
(QTMovie::rate):
(QTMovie::setRate):
(QTMovie::duration):
(QTMovie::currentTime):
(QTMovie::setCurrentTime):
(QTMovie::setVolume):
(QTMovie::setPreservesPitch):
(QTMovie::dataSize):
(QTMovie::maxTimeLoaded):
(QTMovie::loadState):
(QTMovie::getNaturalSize):
(QTMovie::load):
(QTMovie::disableUnsupportedTracks):
(QTMovie::isDisabled):
(QTMovie::setDisabled):
(QTMovie::hasVideo):
(QTMovie::hasAudio):
(QTMovie::hasClosedCaptions):
(QTMovie::setClosedCaptionsVisible):
(QTMovie::countSupportedTypes):
(QTMovie::getSupportedType):
(QTMovie::initializeQuickTime):
(QTMovie::getMovieHandle):
- platform/graphics/win/QTMovie.h: Copied from WebCore/platform/graphics/win/QTMovieWin.h.
- platform/graphics/win/QTMovieGWorld.cpp: Copied from WebCore/platform/graphics/win/QTMovieWin.cpp.
(QTMovieGWorldPrivate::QTMovieGWorldPrivate):
(QTMovieGWorldPrivate::~QTMovieGWorldPrivate):
(QTMovieGWorldPrivate::cacheMovieScale):
(movieDrawingCompleteProc):
(QTMovieGWorldPrivate::registerDrawingCallback):
(QTMovieGWorldPrivate::unregisterDrawingCallback):
(QTMovieGWorldPrivate::drawingComplete):
(QTMovieGWorldPrivate::updateGWorld):
(QTMovieGWorldPrivate::createGWorld):
(QTMovieGWorldPrivate::clearGWorld):
(QTMovieGWorldPrivate::setSize):
(QTMovieGWorldPrivate::updateMovieSize):
(QTMovieGWorldPrivate::deleteGWorld):
(QTMovieGWorldPrivate::movieEnded):
(QTMovieGWorldPrivate::movieLoadStateChanged):
(QTMovieGWorldPrivate::movieTimeChanged):
(QTMovieGWorld::QTMovieGWorld):
(QTMovieGWorld::~QTMovieGWorld):
(QTMovieGWorld::setSize):
(QTMovieGWorld::setVisible):
(QTMovieGWorld::getCurrentFrameInfo):
(QTMovieGWorld::paint):
(QTMovieGWorld::setDisabled):
(QTMovieGWorld::isDisabled):
(QTMovieGWorld::fullscreenWndProc):
(QTMovieGWorld::enterFullscreen):
(QTMovieGWorld::exitFullscreen):
(QTMovieGWorld::setMovie):
(QTMovieGWorld::movie):
- platform/graphics/win/QTMovieGWorld.h: Copied from WebCore/platform/graphics/win/QTMovieWin.h.
- platform/graphics/win/QTMovieTask.cpp: Added.
(QTMovieTask::QTMovieTask):
(QTMovieTask::~QTMovieTask):
(QTMovieTask::sharedTask):
(QTMovieTask::updateTaskTimer):
(QTMovieTask::fireTaskClients):
(QTMovieTask::addTaskClient):
(QTMovieTask::removeTaskClient):
(QTMovieTask::setTaskTimerFuncs):
- platform/graphics/win/QTMovieTask.h: Added.
WebKit/win: Safari pegs CPU and drops tons of frames using HTML5 Vimeo player
https://bugs.webkit.org/show_bug.cgi?id=34005
Reviewed by Adele Peterson.
QTMovieWin is now QTMovieGWorld.
- FullscreenVideoController.cpp:
(FullscreenVideoController::movie):
- FullscreenVideoController.h: