Changeset 185799 in webkit
- Timestamp:
- Jun 20, 2015, 1:50:35 PM (11 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 7 edited
-
ChangeLog (modified) (1 diff)
-
UIProcess/API/Cocoa/WKWebView.mm (modified) (1 diff)
-
UIProcess/API/Cocoa/WKWebViewPrivate.h (modified) (1 diff)
-
UIProcess/DrawingAreaProxy.h (modified) (1 diff)
-
UIProcess/WebPageProxy.cpp (modified) (1 diff)
-
UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h (modified) (2 diffs)
-
UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r185795 r185799 1 2015-06-20 Chris Dumez <cdumez@apple.com> 2 3 [WK2][iOS] Avoid synchronous IPC on view state change when the content is not visible 4 https://bugs.webkit.org/show_bug.cgi?id=146179 5 <rdar://problem/20923432> 6 7 Reviewed by Tim Horton. 8 9 After r170787, viewStateChange() would cause a synchronous IPC between 10 the UIProcess and the WebProcess when the view becomes visible. This 11 was to avoid painting empty / black tiles when unsuspending the 12 WebProcess on tab switch, in the event volatile IOSurfaces were purged. 13 14 However, this sync IPC can have performance implications and is not 15 needed when the content is not actually visible yet (e.g. 16 hideContentUntilNextUpdate() was called, or the tab was killed). 17 18 This patch avoids the synchronous IPC when the content is hidden and 19 exposes a private API on WKWebView so that clients can ask for the 20 content to be hidden until the next update. This would allow for 21 clients to avoid the synchronous IPC if they don't need the content 22 to be displayed synchronously (e.g. the view is obscured). 23 24 * UIProcess/API/Cocoa/WKWebView.mm: 25 (-[WKWebView _hideContentUntilNextUpdate]): 26 * UIProcess/API/Cocoa/WKWebViewPrivate.h: 27 * UIProcess/DrawingAreaProxy.h: 28 (WebKit::DrawingAreaProxy::hasVisibleContent): 29 * UIProcess/WebPageProxy.cpp: 30 (WebKit::WebPageProxy::dispatchViewStateChange): 31 * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h: 32 * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm: 33 (WebKit::RemoteLayerTreeDrawingAreaProxy::isContentHidden): 34 1 35 2015-06-20 Michael Catanzaro <mcatanzaro@igalia.com> 2 36 -
trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm
r185727 r185799 2592 2592 } 2593 2593 2594 - (void)_hideContentUntilNextUpdate 2595 { 2596 if (auto* area = _page->drawingArea()) 2597 area->hideContentUntilNextUpdate(); 2598 } 2599 2594 2600 - (void)_beginAnimatedResizeWithUpdates:(void (^)(void))updateBlock 2595 2601 { -
trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewPrivate.h
r185331 r185799 135 135 - (void)_beginInteractiveObscuredInsetsChange; 136 136 - (void)_endInteractiveObscuredInsetsChange; 137 - (void)_hideContentUntilNextUpdate; 137 138 138 139 - (void)_beginAnimatedResizeWithUpdates:(void (^)(void))updateBlock; -
trunk/Source/WebKit2/UIProcess/DrawingAreaProxy.h
r183841 r185799 91 91 92 92 virtual void hideContentUntilNextUpdate() { ASSERT_NOT_REACHED(); } 93 virtual bool hasVisibleContent() const { return true; } 93 94 94 95 virtual void willSendUpdateGeometry() { } -
trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp
r185795 r185799 1373 1373 1374 1374 // We always want to wait for the Web process to reply if we've been in-window before and are coming back in-window. 1375 if (m_viewWasEverInWindow && (changed & ViewState::IsInWindow) && isInWindow() )1375 if (m_viewWasEverInWindow && (changed & ViewState::IsInWindow) && isInWindow() && m_drawingArea->hasVisibleContent()) 1376 1376 m_viewStateChangeWantsSynchronousReply = true; 1377 1377 -
trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h
r183841 r185799 40 40 class RemoteScrollingCoordinatorTransaction; 41 41 42 class RemoteLayerTreeDrawingAreaProxy : public DrawingAreaProxy {42 class RemoteLayerTreeDrawingAreaProxy final : public DrawingAreaProxy { 43 43 public: 44 44 explicit RemoteLayerTreeDrawingAreaProxy(WebPageProxy&); … … 78 78 virtual void waitForDidUpdateViewState() override; 79 79 virtual void hideContentUntilNextUpdate() override; 80 virtual bool hasVisibleContent() const override; 80 81 81 82 WebCore::FloatPoint indicatorLocation() const; -
trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm
r184679 r185799 422 422 } 423 423 424 bool RemoteLayerTreeDrawingAreaProxy::hasVisibleContent() const 425 { 426 return m_remoteLayerTreeHost.rootLayer(); 427 } 428 424 429 } // namespace WebKit
Note:
See TracChangeset
for help on using the changeset viewer.