Title: [111226] trunk/Source
- Revision
- 111226
- Author
- [email protected]
- Date
- 2012-03-19 13:13:40 -0700 (Mon, 19 Mar 2012)
Log Message
Source/WebCore: Find in page highlights get out of place when scrolling
https://bugs.webkit.org/show_bug.cgi?id=81543
Reviewed by Sam Weinig.
Remove a now unused function from GraphicsLayer.
* platform/graphics/GraphicsLayer.h:
(GraphicsLayer):
* platform/graphics/ca/GraphicsLayerCA.h:
(GraphicsLayerCA):
Source/WebKit2: Find in page highlights get out of place when scrolling
https://bugs.webkit.org/show_bug.cgi?id=81543
<rdar://problem/10932590>
Reviewed by Sam Weinig.
When we have a page overlay layer, always force a full repaint of it whenever the page changes.
If this turns out to be a real performance problem (measurements suggest that it isn't), we could once
again try to figure out when a full page repaint is needed. Doing so could probably be more expensive than
simply repainting the page, given that a page overlay consists of a bunch of rect-fills mostly.
Also turn on accelerated drawing for the page overlay layer, since that cut CPU usage in half when scrolling
on a page that had a find overlay visible.
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
(TiledCoreAnimationDrawingArea):
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::flushLayers):
(WebKit::TiledCoreAnimationDrawingArea::createPageOverlayLayer):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (111225 => 111226)
--- trunk/Source/WebCore/ChangeLog 2012-03-19 20:12:24 UTC (rev 111225)
+++ trunk/Source/WebCore/ChangeLog 2012-03-19 20:13:40 UTC (rev 111226)
@@ -1,3 +1,17 @@
+2012-03-19 Anders Carlsson <[email protected]>
+
+ Find in page highlights get out of place when scrolling
+ https://bugs.webkit.org/show_bug.cgi?id=81543
+
+ Reviewed by Sam Weinig.
+
+ Remove a now unused function from GraphicsLayer.
+
+ * platform/graphics/GraphicsLayer.h:
+ (GraphicsLayer):
+ * platform/graphics/ca/GraphicsLayerCA.h:
+ (GraphicsLayerCA):
+
2012-03-19 David Hyatt <[email protected]>
https://bugs.webkit.org/show_bug.cgi?id=81534
Modified: trunk/Source/WebCore/platform/graphics/GraphicsLayer.h (111225 => 111226)
--- trunk/Source/WebCore/platform/graphics/GraphicsLayer.h 2012-03-19 20:12:24 UTC (rev 111225)
+++ trunk/Source/WebCore/platform/graphics/GraphicsLayer.h 2012-03-19 20:13:40 UTC (rev 111226)
@@ -343,7 +343,6 @@
virtual void setNeedsDisplay() = 0;
// mark the given rect (in layer coords) as needing dispay. Never goes deep.
virtual void setNeedsDisplayInRect(const FloatRect&) = 0;
- virtual bool needsDisplay() const { return false; }
virtual void setContentsNeedsDisplay() { };
Modified: trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h (111225 => 111226)
--- trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h 2012-03-19 20:12:24 UTC (rev 111225)
+++ trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h 2012-03-19 20:13:40 UTC (rev 111226)
@@ -103,7 +103,6 @@
virtual void setNeedsDisplay();
virtual void setNeedsDisplayInRect(const FloatRect&);
- virtual bool needsDisplay() const OVERRIDE { return !m_dirtyRects.isEmpty(); }
virtual void setContentsNeedsDisplay();
virtual void setContentsRect(const IntRect&);
Modified: trunk/Source/WebKit2/ChangeLog (111225 => 111226)
--- trunk/Source/WebKit2/ChangeLog 2012-03-19 20:12:24 UTC (rev 111225)
+++ trunk/Source/WebKit2/ChangeLog 2012-03-19 20:13:40 UTC (rev 111226)
@@ -1,5 +1,27 @@
2012-03-19 Anders Carlsson <[email protected]>
+ Find in page highlights get out of place when scrolling
+ https://bugs.webkit.org/show_bug.cgi?id=81543
+ <rdar://problem/10932590>
+
+ Reviewed by Sam Weinig.
+
+ When we have a page overlay layer, always force a full repaint of it whenever the page changes.
+ If this turns out to be a real performance problem (measurements suggest that it isn't), we could once
+ again try to figure out when a full page repaint is needed. Doing so could probably be more expensive than
+ simply repainting the page, given that a page overlay consists of a bunch of rect-fills mostly.
+
+ Also turn on accelerated drawing for the page overlay layer, since that cut CPU usage in half when scrolling
+ on a page that had a find overlay visible.
+
+ * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
+ (TiledCoreAnimationDrawingArea):
+ * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
+ (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
+ (WebKit::TiledCoreAnimationDrawingArea::createPageOverlayLayer):
+
+2012-03-19 Anders Carlsson <[email protected]>
+
When Find overlay first appears and the page scrolls, the scrolling happens through a fade
https://bugs.webkit.org/show_bug.cgi?id=81539
<rdar://problem/11031093>
Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h (111225 => 111226)
--- trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h 2012-03-19 20:12:24 UTC (rev 111225)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h 2012-03-19 20:13:40 UTC (rev 111226)
@@ -84,8 +84,6 @@
void createPageOverlayLayer();
void destroyPageOverlayLayer();
- bool shouldRepaintPageOverlayLayer();
-
bool m_layerTreeStateIsFrozen;
WebCore::LayerFlushScheduler m_layerFlushScheduler;
Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm (111225 => 111226)
--- trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm 2012-03-19 20:12:24 UTC (rev 111225)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm 2012-03-19 20:13:40 UTC (rev 111226)
@@ -253,9 +253,7 @@
}
if (m_pageOverlayLayer) {
- if (shouldRepaintPageOverlayLayer())
- m_pageOverlayLayer->setNeedsDisplay();
-
+ m_pageOverlayLayer->setNeedsDisplay();
m_pageOverlayLayer->syncCompositingStateForThisLayerOnly();
}
@@ -353,6 +351,7 @@
m_pageOverlayLayer->setName("page overlay content");
#endif
+ m_pageOverlayLayer->setAcceleratesDrawing(true);
m_pageOverlayLayer->setDrawsContent(true);
m_pageOverlayLayer->setSize(m_webPage->size());
@@ -372,20 +371,4 @@
m_pageOverlayLayer = nullptr;
}
-bool TiledCoreAnimationDrawingArea::shouldRepaintPageOverlayLayer()
-{
- RenderLayerCompositor* renderLayerCompositor = m_webPage->corePage()->mainFrame()->contentRenderer()->compositor();
- GraphicsLayer* scrollLayer = renderLayerCompositor->scrollLayer();
- if (m_mainFrameScrollLayerPosition != scrollLayer->position()) {
- m_mainFrameScrollLayerPosition = scrollLayer->position();
- return true;
- }
-
- GraphicsLayer* rootGraphicsLayer = renderLayerCompositor->rootRenderLayer()->backing()->graphicsLayer();
- if (rootGraphicsLayer->needsDisplay())
- return true;
-
- return false;
-}
-
} // namespace WebKit
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes