Changeset 88127 in webkit
- Timestamp:
- Jun 4, 2011 7:08:54 PM (13 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r88123 r88127 1 2011-06-04 Sam Weinig <sam@webkit.org> 2 3 Reviewed by Anders Carlsson. 4 5 Disable WebProcess side display throttling when in a user scroll 6 <rdar://problem/9517175> 7 https://bugs.webkit.org/show_bug.cgi?id=62095 8 9 Add the ability to disable WebProcess side display throttling that 10 takes place in DrawingAreaImpl::displayTimerFired. Disable the throttling 11 when in a user or animated scroll. 12 13 * WebProcess/WebCoreSupport/WebChromeClient.cpp: 14 (WebKit::WebChromeClient::didStartRubberBandForFrame): 15 (WebKit::WebChromeClient::didCompleteRubberBandForFrame): 16 (WebKit::WebChromeClient::didStartAnimatedScroll): 17 (WebKit::WebChromeClient::didCompleteAnimatedScroll): 18 * WebProcess/WebPage/DrawingArea.h: 19 (WebKit::DrawingArea::enableDisplayThrottling): 20 (WebKit::DrawingArea::disableDisplayThrottling): 21 * WebProcess/WebPage/DrawingAreaImpl.cpp: 22 (WebKit::DrawingAreaImpl::DrawingAreaImpl): 23 (WebKit::DrawingAreaImpl::enableDisplayThrottling): 24 (WebKit::DrawingAreaImpl::disableDisplayThrottling): 25 (WebKit::DrawingAreaImpl::displayTimerFired): 26 * WebProcess/WebPage/DrawingAreaImpl.h: 27 * WebProcess/WebPage/WebPage.cpp: 28 (WebKit::WebPage::wheelEvent): 29 1 30 2011-06-04 Darin Adler <darin@apple.com> 2 31 -
trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp
r88121 r88127 771 771 void WebChromeClient::didStartRubberBandForFrame(Frame*, const IntSize&) const 772 772 { 773 m_page->drawingArea()->disableDisplayThrottling(); 773 774 } 774 775 775 776 void WebChromeClient::didCompleteRubberBandForFrame(Frame* frame, const IntSize& initialOverhang) const 776 777 { 778 m_page->drawingArea()->enableDisplayThrottling(); 779 777 780 if (frame != frame->page()->mainFrame()) 778 781 return; … … 782 785 void WebChromeClient::didStartAnimatedScroll() const 783 786 { 787 m_page->drawingArea()->disableDisplayThrottling(); 784 788 } 785 789 786 790 void WebChromeClient::didCompleteAnimatedScroll() const 787 791 { 792 m_page->drawingArea()->enableDisplayThrottling(); 788 793 } 789 794 -
trunk/Source/WebKit2/WebProcess/WebPage/DrawingArea.h
r87806 r88127 64 64 65 65 // FIXME: These should be pure virtual. 66 virtual void enableDisplayThrottling() { } 67 virtual void disableDisplayThrottling() { } 66 68 virtual void pageBackgroundTransparencyChanged() { } 67 69 virtual void forceRepaint() { } -
trunk/Source/WebKit2/WebProcess/WebPage/DrawingAreaImpl.cpp
r87832 r88127 65 65 , m_isPaintingSuspended(!parameters.isVisible) 66 66 , m_alwaysUseCompositing(false) 67 , m_shouldThrottleDisplay(true) 67 68 , m_lastDisplayTime(0) 68 69 , m_displayTimer(WebProcess::shared().runLoop(), this, &DrawingAreaImpl::displayTimerFired) … … 191 192 m_isWaitingForDidUpdate = false; 192 193 display(); 194 } 195 196 void DrawingAreaImpl::enableDisplayThrottling() 197 { 198 m_shouldThrottleDisplay = true; 199 } 200 201 void DrawingAreaImpl::disableDisplayThrottling() 202 { 203 m_shouldThrottleDisplay = false; 193 204 } 194 205 … … 515 526 #endif 516 527 517 double timeSinceLastDisplay = currentTime() - m_lastDisplayTime; 518 double timeUntilNextDisplay = minimumFrameInterval - timeSinceLastDisplay; 519 520 if (timeUntilNextDisplay > 0) { 521 m_displayTimer.startOneShot(timeUntilNextDisplay); 522 return; 528 if (m_shouldThrottleDisplay) { 529 double timeSinceLastDisplay = currentTime() - m_lastDisplayTime; 530 double timeUntilNextDisplay = minimumFrameInterval - timeSinceLastDisplay; 531 532 if (timeUntilNextDisplay > 0) { 533 m_displayTimer.startOneShot(timeUntilNextDisplay); 534 return; 535 } 523 536 } 524 537 -
trunk/Source/WebKit2/WebProcess/WebPage/DrawingAreaImpl.h
r87832 r88127 51 51 virtual void setLayerTreeStateIsFrozen(bool); 52 52 virtual void forceRepaint(); 53 54 virtual void enableDisplayThrottling(); 55 virtual void disableDisplayThrottling(); 53 56 54 57 virtual void didInstallPageOverlay(); … … 116 119 bool m_alwaysUseCompositing; 117 120 121 // Whether we should throttle displays to a set update rate on the WebProcess side. 122 bool m_shouldThrottleDisplay; 123 118 124 double m_lastDisplayTime; 119 125 -
trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp
r87458 r88127 1070 1070 CurrentEvent currentEvent(wheelEvent); 1071 1071 1072 #if PLATFORM(MAC) 1073 if (wheelEvent.momentumPhase() == WebWheelEvent::PhaseBegan || wheelEvent.phase() == WebWheelEvent::PhaseBegan) 1074 m_drawingArea->disableDisplayThrottling(); 1075 else if (wheelEvent.momentumPhase() == WebWheelEvent::PhaseEnded || wheelEvent.phase() == WebWheelEvent::PhaseEnded) 1076 m_drawingArea->enableDisplayThrottling(); 1077 #endif 1078 1072 1079 bool handled = handleWheelEvent(wheelEvent, m_page.get()); 1073 1080 send(Messages::WebPageProxy::DidReceiveEvent(static_cast<uint32_t>(wheelEvent.type()), handled));
Note: See TracChangeset
for help on using the changeset viewer.