Changeset 141428 in webkit
- Timestamp:
- Jan 31, 2013 9:44:08 AM (11 years ago)
- Location:
- trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/chromium/ChangeLog
r141394 r141428 1 2013-01-31 James Robinson <jamesr@chromium.org> 2 3 [chromium] Remove dead transitional code from WebViewImpl 4 https://bugs.webkit.org/show_bug.cgi?id=107889 5 6 Reviewed by Adam Barth. 7 8 The chromium side of this landed at r178256 and seems stable. 9 10 * public/WebWidget.h: 11 (WebKit::WebWidget::setCompositorSurfaceReady): 12 * src/WebViewImpl.cpp: 13 (WebKit::WebViewImpl::WebViewImpl): 14 (WebKit::WebViewImpl::~WebViewImpl): 15 (WebKit): 16 (WebKit::WebViewImpl::setIsTransparent): 17 (WebKit::WebViewImpl::setIsAcceleratedCompositingActive): 18 * src/WebViewImpl.h: 19 * tests/ScrollingCoordinatorChromiumTest.cpp: 20 (WebKit::FakeWebViewClient::initializeLayerTreeView): 21 (FakeWebViewClient): 22 (WebKit::FakeWebViewClient::layerTreeView): 23 (WebKit::ScrollingCoordinatorChromiumTest::ScrollingCoordinatorChromiumTest): 24 (ScrollingCoordinatorChromiumTest): 25 1 26 2013-01-31 Kentaro Hara <haraken@chromium.org> 2 27 -
trunk/Source/WebKit/chromium/public/WebWidget.h
r140808 r141428 130 130 // Indicates that the compositing surface associated with this WebWidget is 131 131 // ready to use. 132 virtual void setCompositorSurfaceReady() = 0;132 virtual void setCompositorSurfaceReady() { } 133 133 134 134 // Temporary method for the embedder to notify the WebWidget that the widget … … 136 136 // removed when the WebWidget inversion patch lands --- http://crbug.com/112837 137 137 virtual void setNeedsRedraw() { } 138 139 // Temporary method for the embedder to check for throttled input. When this140 // is true, the WebWidget is indicating that it would prefer to not receive141 // additional input events until142 // WebWidgetClient::didBecomeReadyForAdditionalInput is called.143 //144 // This method will be removed when the WebWidget inversion patch lands ---145 // http://crbug.com/112837146 virtual bool isInputThrottled() const { return false; }147 138 148 139 // Called to inform the WebWidget of a change in theme. … … 248 239 virtual void instrumentCancelFrame() { } 249 240 250 // Fills in a WebRenderingStats struct containing information about rendering, e.g. count of frames rendered, time spent painting.251 // This call is relatively expensive in threaded compositing mode, as it blocks on the compositor thread.252 // It is safe to call in software mode, but will only give stats for rendering done in compositing mode.253 virtual void renderingStats(WebRenderingStats&) const { }254 255 241 // The page background color. Can be used for filling in areas without 256 242 // content. -
trunk/Source/WebKit/chromium/src/WebViewImpl.cpp
r141318 r141428 419 419 #if USE(ACCELERATED_COMPOSITING) 420 420 , m_layerTreeView(0) 421 , m_ownsLayerTreeView(false)422 421 , m_rootLayer(0) 423 422 , m_rootGraphicsLayer(0) … … 426 425 , m_compositorCreationFailed(false) 427 426 , m_recreatingGraphicsContext(false) 428 , m_compositorSurfaceReady(false)429 427 , m_inputHandlerIdentifier(-1) 430 428 #endif … … 512 510 WebViewImpl::~WebViewImpl() 513 511 { 514 if (m_ownsLayerTreeView)515 delete m_layerTreeView;516 512 ASSERT(!m_page); 517 513 } … … 839 835 m_gestureAnimation = WebActiveGestureAnimation::createWithTimeOffset(curve.release(), this, parameters.startTime); 840 836 scheduleAnimation(); 841 }842 843 void WebViewImpl::renderingStats(WebRenderingStats& stats) const844 {845 if (m_layerTreeView)846 m_layerTreeView->renderingStats(stats);847 837 } 848 838 … … 1792 1782 #endif 1793 1783 1794 void WebViewImpl::setCompositorSurfaceReady()1795 {1796 m_compositorSurfaceReady = true;1797 if (m_layerTreeView)1798 m_layerTreeView->setSurfaceReady();1799 }1800 1801 1784 void WebViewImpl::animate(double) 1802 1785 { … … 1976 1959 m_layerTreeView->setNeedsRedraw(); 1977 1960 #endif 1978 }1979 1980 bool WebViewImpl::isInputThrottled() const1981 {1982 #if USE(ACCELERATED_COMPOSITING)1983 if (m_layerTreeView && isAcceleratedCompositingActive())1984 return m_layerTreeView->commitRequested();1985 #endif1986 return false;1987 1961 } 1988 1962 … … 3646 3620 if (m_nonCompositedContentHost) 3647 3621 m_nonCompositedContentHost->setOpaque(!isTransparent); 3648 3649 if (m_layerTreeView)3650 m_layerTreeView->setHasTransparentBackground(isTransparent);3651 3622 } 3652 3623 … … 4128 4099 m_client->initializeLayerTreeView(this, *m_rootLayer, layerTreeViewSettings); 4129 4100 m_layerTreeView = m_client->layerTreeView(); 4130 if (!m_layerTreeView) {4131 m_layerTreeView = Platform::current()->compositorSupport()->createLayerTreeView(this, *m_rootLayer, layerTreeViewSettings);4132 m_ownsLayerTreeView = true;4133 }4134 4101 if (m_layerTreeView) { 4135 4102 if (m_webSettings->applyDeviceScaleFactorInCompositor() && page()->deviceScaleFactor() != 1) … … 4139 4106 m_layerTreeView->setVisible(visible); 4140 4107 m_layerTreeView->setPageScaleFactorAndLimits(pageScaleFactor(), m_minimumPageScaleFactor, m_maximumPageScaleFactor); 4141 if (m_compositorSurfaceReady)4142 m_layerTreeView->setSurfaceReady();4143 4108 m_layerTreeView->setHasTransparentBackground(isTransparent()); 4144 4109 updateLayerTreeViewport(); -
trunk/Source/WebKit/chromium/src/WebViewImpl.h
r141231 r141428 144 144 virtual void willExitFullScreen(); 145 145 virtual void didExitFullScreen(); 146 virtual void setCompositorSurfaceReady();147 146 virtual void animate(double); 148 147 virtual void layout(); // Also implements WebLayerTreeViewClient::layout() … … 153 152 virtual void composite(bool finish); 154 153 virtual void setNeedsRedraw(); 155 virtual bool isInputThrottled() const;156 154 virtual bool handleInputEvent(const WebInputEvent&); 157 155 virtual bool hasTouchEventHandlersAt(const WebPoint&); … … 185 183 virtual void instrumentBeginFrame(); 186 184 virtual void instrumentCancelFrame(); 187 virtual void renderingStats(WebRenderingStats&) const;188 185 189 186 // WebView methods: … … 851 848 OwnPtr<NonCompositedContentHost> m_nonCompositedContentHost; 852 849 WebLayerTreeView* m_layerTreeView; 853 bool m_ownsLayerTreeView;854 850 WebLayer* m_rootLayer; 855 851 WebCore::GraphicsLayer* m_rootGraphicsLayer; … … 859 855 // If true, the graphics context is being restored. 860 856 bool m_recreatingGraphicsContext; 861 bool m_compositorSurfaceReady;862 857 int m_inputHandlerIdentifier; 863 858 #endif -
trunk/Source/WebKit/chromium/tests/ScrollingCoordinatorChromiumTest.cpp
r137811 r141428 53 53 namespace { 54 54 55 class MockWebViewClient : public WebViewClient {55 class FakeWebViewClient : public WebViewClient { 56 56 public: 57 57 virtual WebCompositorOutputSurface* createOutputSurface() OVERRIDE … … 59 59 return Platform::current()->compositorSupport()->createOutputSurfaceFor3D(CompositorFakeWebGraphicsContext3D::create(WebGraphicsContext3D::Attributes()).leakPtr()); 60 60 } 61 62 virtual void initializeLayerTreeView(WebLayerTreeViewClient* client, const WebLayer& rootLayer, const WebLayerTreeView::Settings& settings) 63 { 64 m_layerTreeView = adoptPtr(Platform::current()->compositorSupport()->createLayerTreeView(client, rootLayer, settings)); 65 ASSERT(m_layerTreeView); 66 } 67 68 virtual WebLayerTreeView* layerTreeView() 69 { 70 return m_layerTreeView.get(); 71 } 72 73 private: 74 OwnPtr<WebLayerTreeView> m_layerTreeView; 61 75 }; 62 76 … … 68 82 ScrollingCoordinatorChromiumTest() 69 83 : m_baseURL("http://www.test.com/") 70 , m_webCompositorInitializer(0)71 84 { 72 85 Platform::current()->compositorSupport()->initialize(0); … … 116 129 std::string m_baseURL; 117 130 MockWebFrameClient m_mockWebFrameClient; 118 MockWebViewClient m_mockWebViewClient; 119 WebKitTests::WebCompositorInitializer m_webCompositorInitializer; 131 FakeWebViewClient m_mockWebViewClient; 120 132 WebViewImpl* m_webViewImpl; 121 133 }; -
trunk/Tools/ChangeLog
r141402 r141428 1 2013-01-31 James Robinson <jamesr@chromium.org> 2 3 [chromium] Remove dead transitional code from WebViewImpl 4 https://bugs.webkit.org/show_bug.cgi?id=107889 5 6 Reviewed by Adam Barth. 7 8 ScrollingCoordinatorChromiumTests need to initialize compositing, so its implementation of 9 WebWidgetClient has to support the new compositor initialization path. 10 11 * DumpRenderTree/chromium/WebViewHost.cpp: 12 (WebViewHost::initializeLayerTreeView): 13 (WebViewHost::setWebWidget): 14 1 15 2013-01-31 Gustavo Noronha Silva <gns@gnome.org> 2 16 -
trunk/Tools/DumpRenderTree/chromium/WebViewHost.cpp
r141392 r141428 350 350 { 351 351 m_layerTreeView = adoptPtr(Platform::current()->compositorSupport()->createLayerTreeView(client, rootLayer, settings)); 352 if (m_layerTreeView) 353 m_layerTreeView->setSurfaceReady(); 352 354 } 353 355 … … 1013 1015 webView()->setSpellCheckClient(proxy()->spellCheckClient()); 1014 1016 webView()->setPrerendererClient(this); 1015 webView()->setCompositorSurfaceReady();1016 1017 } 1017 1018
Note: See TracChangeset
for help on using the changeset viewer.