Chromium Code Reviews| Index: Source/WebKit/chromium/src/WebViewImpl.cpp |
| diff --git a/Source/WebKit/chromium/src/WebViewImpl.cpp b/Source/WebKit/chromium/src/WebViewImpl.cpp |
| index fb2c436f0da81dd0279aa62c4d84ef2be5ad5ce4..e6edcdddeecd4240bdff51338c28a790c8c83202 100644 |
| --- a/Source/WebKit/chromium/src/WebViewImpl.cpp |
| +++ b/Source/WebKit/chromium/src/WebViewImpl.cpp |
| @@ -82,7 +82,6 @@ |
| #include "LinkHighlight.h" |
| #include "MIMETypeRegistry.h" |
| #include "NodeRenderStyle.h" |
| -#include "NonCompositedContentHost.h" |
| #include "NotImplemented.h" |
| #include "Page.h" |
| #include "PageGroup.h" |
| @@ -2970,8 +2969,7 @@ void WebViewImpl::enableFixedLayoutMode(bool enable) |
| frame->view()->setUseFixedLayout(enable); |
| - // Also notify the base layer, which RenderLayerCompositor does not see. |
| - if (m_nonCompositedContentHost) |
| + if (m_isAcceleratedCompositingActive) |
| updateLayerTreeViewport(); |
| } |
| @@ -3558,9 +3556,6 @@ void WebViewImpl::setIsTransparent(bool isTransparent) |
| // Future frames check this to know whether to be transparent. |
| m_isTransparent = isTransparent; |
| - |
| - if (m_nonCompositedContentHost) |
| - m_nonCompositedContentHost->setOpaque(!isTransparent); |
| } |
| bool WebViewImpl::isTransparent() const |
| @@ -3862,16 +3857,6 @@ void WebViewImpl::setRootGraphicsLayer(GraphicsLayer* layer) |
| m_rootLayer = layer ? layer->platformLayer() : 0; |
| setIsAcceleratedCompositingActive(layer); |
| - if (m_nonCompositedContentHost) { |
| - GraphicsLayer* scrollLayer = 0; |
| - if (layer) { |
| - Document* document = page()->mainFrame()->document(); |
| - RenderView* renderView = document->renderView(); |
| - RenderLayerCompositor* compositor = renderView->compositor(); |
| - scrollLayer = compositor->scrollLayer(); |
| - } |
| - m_nonCompositedContentHost->setScrollLayer(scrollLayer); |
| - } |
| if (m_layerTreeView) { |
| if (m_rootLayer) |
| @@ -3908,27 +3893,18 @@ void WebViewImpl::invalidateRect(const IntRect& rect) |
| if (!page()) |
| return; |
| - FrameView* view = page()->mainFrame()->view(); |
| - IntRect dirtyRect = view->windowToContents(rect); |
| updateLayerTreeViewport(); |
| - m_nonCompositedContentHost->invalidateRect(dirtyRect); |
| } else if (m_client) |
| m_client->didInvalidateRect(rect); |
| } |
| -NonCompositedContentHost* WebViewImpl::nonCompositedContentHost() |
| -{ |
| - return m_nonCompositedContentHost.get(); |
| -} |
| - |
| void WebViewImpl::setBackgroundColor(const WebCore::Color& color) |
| { |
| - if (!m_nonCompositedContentHost) |
| + if (!m_layerTreeView) |
| return; |
| WebCore::Color documentBackgroundColor = color.isValid() ? color : WebCore::Color::white; |
| WebColor webDocumentBackgroundColor = documentBackgroundColor.rgb(); |
| - m_nonCompositedContentHost->setBackgroundColor(documentBackgroundColor); |
| m_layerTreeView->setBackgroundColor(webDocumentBackgroundColor); |
| } |
| @@ -3960,25 +3936,6 @@ void WebViewImpl::scheduleAnimation() |
| m_client->scheduleAnimation(); |
| } |
| -void WebViewImpl::paintRootLayer(GraphicsContext& context, const IntRect& contentRect) |
| -{ |
| - double paintStart = currentTime(); |
| - if (!page()) |
| - return; |
| - FrameView* view = page()->mainFrame()->view(); |
| - if (context.platformContext()) |
| - context.platformContext()->setDeviceScaleFactor(page()->deviceScaleFactor()); |
| - view->paintContents(&context, contentRect); |
| - double paintEnd = currentTime(); |
| - double pixelsPerSec = (contentRect.width() * contentRect.height()) / (paintEnd - paintStart); |
| - WebKit::Platform::current()->histogramCustomCounts("Renderer4.AccelRootPaintDurationMS", (paintEnd - paintStart) * 1000, 0, 120, 30); |
| - WebKit::Platform::current()->histogramCustomCounts("Renderer4.AccelRootPaintMegapixPerSecond", pixelsPerSec / 1000000, 10, 210, 30); |
| - // The background color should have been set already in order to show up with the correct color in the compositor |
| - // frame being painted currently. This verifies the view's background color was not changed without calling |
| - // setBackgroundColor() before this paint phase happened. |
| - ASSERT(m_nonCompositedContentHost->backgroundColor() == view->documentBackgroundColor()); |
| -} |
| - |
| void WebViewImpl::setIsAcceleratedCompositingActive(bool active) |
| { |
| WebKit::Platform::current()->histogramEnumeration("GPU.setIsAcceleratedCompositingActive", active * 2 + m_isAcceleratedCompositingActive, 4); |
| @@ -4011,10 +3968,6 @@ void WebViewImpl::setIsAcceleratedCompositingActive(bool active) |
| } else { |
| TRACE_EVENT0("webkit", "WebViewImpl::setIsAcceleratedCompositingActive(true)"); |
| - m_nonCompositedContentHost = NonCompositedContentHost::create(this, graphicsLayerFactory()); |
| - m_nonCompositedContentHost->setShowDebugBorders(page()->settings()->showDebugBorders()); |
| - m_nonCompositedContentHost->setOpaque(!isTransparent()); |
| - |
| m_client->initializeLayerTreeView(); |
| m_layerTreeView = m_client->layerTreeView(); |
| if (m_layerTreeView) { |
| @@ -4036,7 +3989,6 @@ void WebViewImpl::setIsAcceleratedCompositingActive(bool active) |
| m_layerTreeView->setShowDebugBorders(m_showDebugBorders); |
| m_layerTreeView->setContinuousPaintingEnabled(m_continuousPaintingEnabled); |
| } else { |
| - m_nonCompositedContentHost.clear(); |
| m_isAcceleratedCompositingActive = false; |
| m_client->didDeactivateCompositor(); |
| m_compositorCreationFailed = true; |
| @@ -4107,11 +4059,9 @@ void WebViewImpl::didExitCompositingMode() |
| void WebViewImpl::updateLayerTreeViewport() |
|
aelias_OOO_until_Jul13
2013/04/24 22:49:45
Looks like this method isn't needed anymore. Plea
|
| { |
| - if (!page() || !m_nonCompositedContentHost || !m_layerTreeView) |
| + if (!page() || !m_layerTreeView) |
| return; |
| - FrameView* view = page()->mainFrame()->view(); |
| - m_nonCompositedContentHost->setViewport(m_size, view->contentsSize(), view->scrollPosition(), view->scrollOrigin()); |
| m_layerTreeView->setPageScaleFactorAndLimits(pageScaleFactor(), m_minimumPageScaleFactor, m_maximumPageScaleFactor); |
| } |