Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(613)

Unified Diff: sky/engine/web/WebViewImpl.cpp

Issue 687003002: Remove PageOverlays. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sky/engine/web/WebViewImpl.h ('k') | sky/engine/web/painting/ContinuousPainter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/web/WebViewImpl.cpp
diff --git a/sky/engine/web/WebViewImpl.cpp b/sky/engine/web/WebViewImpl.cpp
index f533ce8a768ff2240b8ede6912c25c743df47f7f..954be58c5fd5e17deb3a783dd6f4dc366b97b9eb 100644
--- a/sky/engine/web/WebViewImpl.cpp
+++ b/sky/engine/web/WebViewImpl.cpp
@@ -995,7 +995,7 @@ void WebViewImpl::beginFrame(const WebBeginFrameArgs& frameTime)
PageWidgetDelegate::animate(m_page.get(), validFrameTime.lastFrameTimeMonotonic);
if (m_continuousPaintingEnabled) {
- ContinuousPainter::setNeedsDisplayRecursive(m_rootGraphicsLayer, m_pageOverlays.get());
+ ContinuousPainter::setNeedsDisplayRecursive(m_rootGraphicsLayer);
m_client->scheduleAnimation();
}
}
@@ -1024,7 +1024,7 @@ void WebViewImpl::paint(WebCanvas* canvas, const WebRect& rect)
ASSERT(!isAcceleratedCompositingActive());
double paintStart = currentTime();
- PageWidgetDelegate::paint(m_page.get(), pageOverlays(), canvas, rect, isTransparent() ? PageWidgetDelegate::Translucent : PageWidgetDelegate::Opaque);
+ PageWidgetDelegate::paint(m_page.get(), canvas, rect, isTransparent() ? PageWidgetDelegate::Translucent : PageWidgetDelegate::Opaque);
double paintEnd = currentTime();
double pixelsPerSec = (rect.width * rect.height) / (paintEnd - paintStart);
Platform::current()->histogramCustomCounts("Renderer4.SoftwarePaintDurationMS", (paintEnd - paintStart) * 1000, 0, 120, 30);
@@ -1043,7 +1043,7 @@ void WebViewImpl::paintCompositedDeprecated(WebCanvas* canvas, const WebRect& re
PaintBehavior oldPaintBehavior = view->paintBehavior();
view->setPaintBehavior(oldPaintBehavior | PaintBehaviorFlattenCompositingLayers);
- PageWidgetDelegate::paint(m_page.get(), pageOverlays(), canvas, rect, isTransparent() ? PageWidgetDelegate::Translucent : PageWidgetDelegate::Opaque);
+ PageWidgetDelegate::paint(m_page.get(), canvas, rect, isTransparent() ? PageWidgetDelegate::Translucent : PageWidgetDelegate::Opaque);
view->setPaintBehavior(oldPaintBehavior);
}
@@ -2000,9 +2000,6 @@ void WebViewImpl::sendResizeEventAndRepaint()
WebRect damagedRect(0, 0, m_size.width, m_size.height);
m_client->didInvalidateRect(damagedRect);
}
-
- if (m_pageOverlays)
- m_pageOverlays->update();
}
void WebViewImpl::setCompositorDeviceScaleFactorOverride(float deviceScaleFactor)
@@ -2145,20 +2142,6 @@ void WebViewImpl::setZoomFactorOverride(float zoomFactor)
setZoomLevel(zoomLevel());
}
-void WebViewImpl::addPageOverlay(WebPageOverlay* overlay, int zOrder)
-{
- if (!m_pageOverlays)
- m_pageOverlays = PageOverlayList::create(this);
-
- m_pageOverlays->add(overlay, zOrder);
-}
-
-void WebViewImpl::removePageOverlay(WebPageOverlay* overlay)
-{
- if (m_pageOverlays && m_pageOverlays->remove(overlay) && m_pageOverlays->empty())
- m_pageOverlays = nullptr;
-}
-
void WebViewImpl::setOverlayLayer(GraphicsLayer* layer)
{
if (!m_rootGraphicsLayer)
@@ -2324,8 +2307,6 @@ void WebViewImpl::setIsAcceleratedCompositingActive(bool active)
updateLayerTreeBackgroundColor();
m_layerTreeView->setHasTransparentBackground(isTransparent());
m_isAcceleratedCompositingActive = true;
- if (m_pageOverlays)
- m_pageOverlays->update();
m_layerTreeView->setShowFPSCounter(m_showFPSCounter);
m_layerTreeView->setShowPaintRects(m_showPaintRects);
m_layerTreeView->setShowDebugBorders(m_showDebugBorders);
« no previous file with comments | « sky/engine/web/WebViewImpl.h ('k') | sky/engine/web/painting/ContinuousPainter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698