Changeset 112191 in webkit
- Timestamp:
- Mar 26, 2012 7:01:42 PM (12 years ago)
- Location:
- trunk/Source
- Files:
-
- 21 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/Platform/ChangeLog
r112059 r112191 1 2012-03-26 Nat Duca <nduca@chromium.org> 2 3 [chromium] Add isInputThrottled/didBecomeReadyForAdditionalInput to WebWidget 4 https://bugs.webkit.org/show_bug.cgi?id=82265 5 6 Reviewed by James Robinson. 7 8 * chromium/public/WebLayerTreeView.h: 9 (WebLayerTreeView): 10 * chromium/public/WebLayerTreeViewClient.h: 11 (WebLayerTreeViewClient): 12 (WebKit::WebLayerTreeViewClient::didCommit): 13 1 14 2012-03-25 Nat Duca <nduca@chromium.org> 2 15 -
trunk/Source/Platform/chromium/public/WebLayerTreeView.h
r110149 r112191 130 130 WEBKIT_EXPORT void setNeedsRedraw(); 131 131 132 // Indicates whether a commit is pending. 133 WEBKIT_EXPORT bool commitRequested() const; 134 132 135 // Triggers a compositing pass. If the compositor thread was not 133 136 // enabled via WebCompositor::initialize, the compositing pass happens -
trunk/Source/Platform/chromium/public/WebLayerTreeViewClient.h
r112059 r112191 60 60 virtual void didRebindGraphicsContext(bool success) = 0; 61 61 62 // Indicates that a frame was committed to the impl side of the compositor 63 // for rendering. 64 // 65 // FIXME: make this non-virtual when ui/compositor DEP is resolved. 66 virtual void didCommit() { } 67 68 // Indicates that a frame was committed to the impl side and drawing 69 // commands for it were issued to the GPU. 62 70 virtual void didCommitAndDrawFrame() = 0; 71 72 // Indicates that a frame previously issued to the GPU has completed 73 // rendering. 63 74 virtual void didCompleteSwapBuffers() = 0; 64 75 -
trunk/Source/WebCore/ChangeLog
r112190 r112191 1 2012-03-26 Nat Duca <nduca@chromium.org> 2 3 [chromium] Add isInputThrottled/didBecomeReadyForAdditionalInput to WebWidget 4 https://bugs.webkit.org/show_bug.cgi?id=82265 5 6 In threaded compositing mode, the WebWidget is self-scheduled, 7 receiving damage and processing it without forwarding that damage 8 up to the embedding WebWidgetClient. In Chromium's case, the 9 client uses the presence of damage to perform input flow 10 control. This patch exposes the need for input flow control to the 11 embedder, while keeping the actual logic about what exactly 12 warrants input flow control inside the implementation. 13 14 Reviewed by James Robinson. 15 16 * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: 17 (WebCore::CCLayerTreeHost::commitComplete): 18 (WebCore::CCLayerTreeHost::commitRequested): 19 (WebCore): 20 * platform/graphics/chromium/cc/CCLayerTreeHost.h: 21 (CCLayerTreeHostClient): 22 (CCLayerTreeHost): 23 * platform/graphics/chromium/cc/CCProxy.h: 24 (CCProxy): 25 * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp: 26 (WebCore::CCSingleThreadProxy::commitRequested): 27 (WebCore): 28 * platform/graphics/chromium/cc/CCSingleThreadProxy.h: 29 (CCSingleThreadProxy): 30 * platform/graphics/chromium/cc/CCThreadProxy.cpp: 31 (WebCore::CCThreadProxy::commitRequested): 32 (WebCore): 33 * platform/graphics/chromium/cc/CCThreadProxy.h: 34 (CCThreadProxy): 35 1 36 2012-03-26 Adam Barth <abarth@webkit.org> 2 37 -
trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.cpp
r112187 r112191 234 234 clearPendingUpdate(); 235 235 m_contentsTextureManager->unprotectAllTextures(); 236 m_client->didCommit(); 236 237 } 237 238 … … 309 310 if (!CCThreadProxy::implThread()) 310 311 m_client->scheduleComposite(); 312 } 313 314 bool CCLayerTreeHost::commitRequested() const 315 { 316 return m_proxy->commitRequested(); 311 317 } 312 318 -
trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.h
r112187 r112191 59 59 virtual PassRefPtr<GraphicsContext3D> createContext() = 0; 60 60 virtual void didRecreateContext(bool success) = 0; 61 virtual void didCommit() = 0; 61 62 virtual void didCommitAndDrawFrame() = 0; 62 63 virtual void didCompleteSwapBuffers() = 0; … … 185 186 virtual void setNeedsCommit(); 186 187 void setNeedsRedraw(); 188 bool commitRequested() const; 187 189 188 190 void setAnimationEvents(PassOwnPtr<CCAnimationEventsVector>, double wallClockTime); -
trunk/Source/WebCore/platform/graphics/chromium/cc/CCProxy.h
r110252 r112191 87 87 virtual void setVisible(bool) = 0; 88 88 89 virtual bool commitRequested() const = 0; 90 89 91 virtual void start() = 0; // Must be called before using the proxy. 90 92 virtual void stop() = 0; // Must be called before deleting the proxy. -
trunk/Source/WebCore/platform/graphics/chromium/cc/CCSingleThreadProxy.cpp
r111777 r112191 237 237 } 238 238 239 bool CCSingleThreadProxy::commitRequested() const 240 { 241 return false; 242 } 243 239 244 void CCSingleThreadProxy::setVisible(bool visible) 240 245 { -
trunk/Source/WebCore/platform/graphics/chromium/cc/CCSingleThreadProxy.h
r110299 r112191 57 57 virtual void setNeedsCommit(); 58 58 virtual void setNeedsRedraw(); 59 virtual bool commitRequested() const; 59 60 virtual void setVisible(bool); 60 61 virtual void start(); -
trunk/Source/WebCore/platform/graphics/chromium/cc/CCThreadProxy.cpp
r112187 r112191 315 315 } 316 316 317 bool CCThreadProxy::commitRequested() const 318 { 319 ASSERT(isMainThread()); 320 return m_commitRequested; 321 } 322 317 323 void CCThreadProxy::setVisible(bool visible) 318 324 { -
trunk/Source/WebCore/platform/graphics/chromium/cc/CCThreadProxy.h
r111805 r112191 66 66 virtual void setNeedsCommit(); 67 67 virtual void setNeedsRedraw(); 68 virtual bool commitRequested() const; 68 69 virtual void setVisible(bool); 69 70 virtual void start(); -
trunk/Source/WebKit/chromium/ChangeLog
r112182 r112191 1 2012-03-26 Nat Duca <nduca@chromium.org> 2 3 [chromium] Add isInputThrottled/didBecomeReadyForAdditionalInput to WebWidget 4 https://bugs.webkit.org/show_bug.cgi?id=82265 5 6 In threaded compositing mode, the WebWidget is self-scheduled, 7 receiving damage and processing it without forwarding that damage 8 up to the embedding WebWidgetClient. In Chromium's case, the 9 client uses the presence of damage to perform input flow 10 control. This patch exposes the need for input flow control to the 11 embedder, while keeping the actual logic about what exactly 12 warrants input flow control inside the implementation. 13 14 Reviewed by James Robinson. 15 16 * public/WebWidget.h: 17 (WebWidget): 18 (WebKit::WebWidget::isInputThrottled): 19 * public/WebWidgetClient.h: 20 (WebWidgetClient): 21 (WebKit::WebWidgetClient::didBecomeReadyForAdditionalInput): 22 * src/WebLayerTreeView.cpp: 23 (WebKit::WebLayerTreeView::commitRequested): 24 (WebKit): 25 * src/WebLayerTreeViewImpl.cpp: 26 (WebKit::WebLayerTreeViewImpl::didCommit): 27 (WebKit): 28 * src/WebLayerTreeViewImpl.h: 29 (WebLayerTreeViewImpl): 30 * src/WebViewImpl.cpp: 31 (WebKit::WebViewImpl::isInputThrottled): 32 (WebKit): 33 (WebKit::WebViewImpl::didCommit): 34 * src/WebViewImpl.h: 35 (WebViewImpl): 36 * tests/CCLayerTreeHostTest.cpp: 37 (WTF::MockLayerTreeHostClient::didCommit): 38 (MockLayerTreeHostClient): 39 * tests/FakeCCLayerTreeHostClient.h: 40 (FakeCCLayerTreeHostClient): 41 1 42 2012-03-26 Vangelis Kokkevis <vangelis@chromium.org> 2 43 -
trunk/Source/WebKit/chromium/public/WebWidget.h
r110706 r112191 113 113 virtual void setNeedsRedraw() { } 114 114 115 // Temporary method for the embedder to check for throttled input. When this 116 // is true, the WebWidget is indicating that it would prefer to not receive 117 // additional input events until 118 // WebWidgetClient::didBecomeReadyForAdditionalInput is called. 119 // 120 // This method will be removed when the WebWidget inversion patch lands --- 121 // http://crbug.com/112837 122 virtual bool isInputThrottled() const { return false; } 123 115 124 // Called to inform the WebWidget of a change in theme. 116 125 // Implementors that cache rendered copies of widgets need to re-render -
trunk/Source/WebKit/chromium/public/WebWidgetClient.h
r112059 r112191 68 68 // frame. This is primarily to signal to flow control mechanisms that a 69 69 // frame is beginning, not to perform actual painting work. 70 //71 // FIXME: Make pure virtual once upstream deps are satisfied.72 70 virtual void willBeginCompositorFrame() { } 71 72 // Indicates to the embedder that the WebWidget is ready for additional 73 // input. 74 virtual void didBecomeReadyForAdditionalInput() { } 73 75 74 76 // Called for compositing mode when the draw commands for a WebKit-side -
trunk/Source/WebKit/chromium/src/WebLayerTreeView.cpp
r109411 r112191 123 123 } 124 124 125 bool WebLayerTreeView::commitRequested() const 126 { 127 return m_private->commitRequested(); 128 } 129 125 130 void WebLayerTreeView::composite() 126 131 { -
trunk/Source/WebKit/chromium/src/WebLayerTreeViewImpl.cpp
r112059 r112191 102 102 } 103 103 104 void WebLayerTreeViewImpl::didCommit() 105 { 106 if (m_client) 107 m_client->didCommit(); 108 } 109 104 110 void WebLayerTreeViewImpl::didCommitAndDrawFrame() 105 111 { -
trunk/Source/WebKit/chromium/src/WebLayerTreeViewImpl.h
r112059 r112191 48 48 virtual PassRefPtr<WebCore::GraphicsContext3D> createContext(); 49 49 virtual void didRecreateContext(bool success); 50 virtual void didCommit(); 50 51 virtual void didCommitAndDrawFrame(); 51 52 virtual void didCompleteSwapBuffers(); -
trunk/Source/WebKit/chromium/src/WebViewImpl.cpp
r112059 r112191 1498 1498 } 1499 1499 1500 bool WebViewImpl::isInputThrottled() const 1501 { 1502 #if USE(ACCELERATED_COMPOSITING) 1503 if (!m_layerTreeView.isNull() && isAcceleratedCompositingActive()) 1504 return m_layerTreeView.commitRequested(); 1505 #endif 1506 return false; 1507 } 1508 1500 1509 void WebViewImpl::loseCompositorContext(int numTimes) 1501 1510 { … … 3350 3359 } 3351 3360 3361 void WebViewImpl::didCommit() 3362 { 3363 if (m_client) 3364 m_client->didBecomeReadyForAdditionalInput(); 3365 } 3366 3352 3367 void WebViewImpl::didCommitAndDrawFrame() 3353 3368 { -
trunk/Source/WebKit/chromium/src/WebViewImpl.h
r112059 r112191 123 123 virtual void composite(bool finish); 124 124 virtual void setNeedsRedraw(); 125 virtual bool isInputThrottled() const; 125 126 virtual bool handleInputEvent(const WebInputEvent&); 126 127 virtual void mouseCaptureLost(); … … 260 261 virtual WebGraphicsContext3D* createContext3D(); 261 262 virtual void didRebindGraphicsContext(bool); 263 virtual void didCommit(); 262 264 virtual void didCommitAndDrawFrame(); 263 265 virtual void didCompleteSwapBuffers(); -
trunk/Source/WebKit/chromium/tests/CCLayerTreeHostTest.cpp
r112059 r112191 250 250 } 251 251 252 virtual void didCommit() 253 { 254 } 255 252 256 virtual void didCommitAndDrawFrame() 253 257 { -
trunk/Source/WebKit/chromium/tests/FakeCCLayerTreeHostClient.h
r112059 r112191 45 45 } 46 46 virtual void didRecreateContext(bool success) { } 47 virtual void didCommit() { } 47 48 virtual void didCommitAndDrawFrame() { } 48 49 virtual void didCompleteSwapBuffers() { }
Note: See TracChangeset
for help on using the changeset viewer.