Fix layer borders to cleaning appear and disappear on switching
authorsimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 5 Nov 2012 21:07:33 +0000 (21:07 +0000)
committersimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 5 Nov 2012 21:07:33 +0000 (21:07 +0000)
https://bugs.webkit.org/show_bug.cgi?id=101136

Source/WebCore:

Reviewed by Sam Weinig.

GraphicsLayers decided whether to show layer borders based
on a callback through the GraphicsLayerClient. This made it
hard to manage state, resulting in a failure to cleanly
hide layers when toggled off via the preference.

Changed the layer border and repaint counter visibility to be bits
stored on GraphicsLayer just like other properties, with getters
and setters. RenderLayerBacking now updates these debug
indicators when we update other compositing layer properties.

In GraphicsLayerCA, avoid calling updateDebugIndicators() explicitly
in several places by setting the change flag DebugIndicatorsChanged
for properties whose values affect the appearance of the debug border.

Removed the GraphicsLayerClient methods showDebugBorders() and
showRepaintCounter() which are no longer required.

* platform/graphics/GraphicsLayer.cpp:
(WebCore::GraphicsLayer::GraphicsLayer):
(WebCore::GraphicsLayer::updateDebugIndicators):
* platform/graphics/GraphicsLayer.h:
(WebCore::GraphicsLayer::setShowDebugBorder):
(WebCore::GraphicsLayer::isShowingDebugBorder):
(WebCore::GraphicsLayer::setShowRepaintCounter):
(WebCore::GraphicsLayer::isShowingRepaintCounter):
(WebCore::GraphicsLayer::repaintCount):
(WebCore::GraphicsLayer::incrementRepaintCount):
* platform/graphics/GraphicsLayerClient.h:
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::GraphicsLayerCA):
(WebCore::GraphicsLayerCA::setMasksToBounds):
(WebCore::GraphicsLayerCA::setDrawsContent):
(WebCore::GraphicsLayerCA::platformCALayerShowRepaintCounter):
(WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
(WebCore::GraphicsLayerCA::updateMasksToBounds):
(WebCore::GraphicsLayerCA::updateLayerDrawsContent):
(WebCore::GraphicsLayerCA::updateDebugBorder):
(WebCore::GraphicsLayerCA::setShowDebugBorder):
(WebCore::GraphicsLayerCA::setShowRepaintCounter):
(WebCore::GraphicsLayerCA::swapFromOrToTiledLayer):
(WebCore::GraphicsLayerCA::setupContentsLayer):
(WebCore::GraphicsLayerCA::cloneLayer):
* platform/graphics/ca/GraphicsLayerCA.h:
(GraphicsLayerCA):
(WebCore::GraphicsLayerCA::platformCALayerShowDebugBorders):
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateDebugIndicators):
* rendering/RenderLayerBacking.h:
(RenderLayerBacking):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateBacking):
* rendering/RenderLayerCompositor.h:
(RenderLayerCompositor):

Source/WebKit/blackberry:

Reviewed by Sam Weinig.

Remove the GraphicsLayerClient methods showDebugBorders() and
showRepaintCounter().

* Api/WebOverlay_p.h:
(WebOverlayPrivateWebKitThread):
* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::notifyFlushRequired):
* Api/WebPage_p.h:
* WebKitSupport/DefaultTapHighlight.cpp:
* WebKitSupport/DefaultTapHighlight.h:
(DefaultTapHighlight):
* WebKitSupport/InspectorOverlayBlackBerry.cpp:
* WebKitSupport/InspectorOverlayBlackBerry.h:
(InspectorOverlay):
* WebKitSupport/SelectionOverlay.cpp:
* WebKitSupport/SelectionOverlay.h:
(SelectionOverlay):

Source/WebKit/chromium:

Reviewed by Sam Weinig.

Remove the GraphicsLayerClient methods showDebugBorders() and
showRepaintCounter().

* src/NonCompositedContentHost.cpp:
* src/NonCompositedContentHost.h:
(NonCompositedContentHost):
* src/PageOverlay.cpp:
* tests/GraphicsLayerChromiumTest.cpp:
* tests/ImageLayerChromiumTest.cpp:

Source/WebKit/gtk:

Reviewed by Sam Weinig.

Remove the GraphicsLayerClient methods showDebugBorders() and
showRepaintCounter().

* WebCoreSupport/AcceleratedCompositingContext.h:
(AcceleratedCompositingContext):
* WebCoreSupport/AcceleratedCompositingContextCairo.cpp:
* WebCoreSupport/AcceleratedCompositingContextClutter.cpp:
* WebCoreSupport/AcceleratedCompositingContextGL.cpp:

Source/WebKit/win:

Reviewed by Sam Weinig.

Remove the GraphicsLayerClient methods showDebugBorders() and
showRepaintCounter().

* WebView.cpp:
* WebView.h:

Source/WebKit2:

Reviewed by Sam Weinig.

Remove the GraphicsLayerClient methods showDebugBorders() and
showRepaintCounter().

* UIProcess/CoordinatedGraphics/LayerTreeRenderer.h:
* WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp:
* WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.h:
(LayerTreeCoordinator):
* WebProcess/WebPage/ca/LayerTreeHostCA.cpp:
* WebProcess/WebPage/ca/LayerTreeHostCA.h:
(LayerTreeHostCA):
* WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
* WebProcess/WebPage/gtk/LayerTreeHostGtk.h:
(LayerTreeHostGtk):
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
(TiledCoreAnimationDrawingArea):
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@133517 268f45cc-cd09-0410-ab3c-d52691b4dbfc

46 files changed:
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/GraphicsLayer.cpp
Source/WebCore/platform/graphics/GraphicsLayer.h
Source/WebCore/platform/graphics/GraphicsLayerClient.h
Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp
Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h
Source/WebCore/platform/graphics/chromium/GraphicsLayerChromium.cpp
Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp
Source/WebCore/rendering/RenderLayerBacking.cpp
Source/WebCore/rendering/RenderLayerBacking.h
Source/WebCore/rendering/RenderLayerCompositor.cpp
Source/WebCore/rendering/RenderLayerCompositor.h
Source/WebKit/blackberry/Api/WebOverlay_p.h
Source/WebKit/blackberry/Api/WebPage.cpp
Source/WebKit/blackberry/Api/WebPage_p.h
Source/WebKit/blackberry/ChangeLog
Source/WebKit/blackberry/WebKitSupport/DefaultTapHighlight.cpp
Source/WebKit/blackberry/WebKitSupport/DefaultTapHighlight.h
Source/WebKit/blackberry/WebKitSupport/InspectorOverlayBlackBerry.cpp
Source/WebKit/blackberry/WebKitSupport/InspectorOverlayBlackBerry.h
Source/WebKit/blackberry/WebKitSupport/SelectionOverlay.cpp
Source/WebKit/blackberry/WebKitSupport/SelectionOverlay.h
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/src/NonCompositedContentHost.cpp
Source/WebKit/chromium/src/NonCompositedContentHost.h
Source/WebKit/chromium/src/PageOverlay.cpp
Source/WebKit/chromium/tests/GraphicsLayerChromiumTest.cpp
Source/WebKit/chromium/tests/ImageLayerChromiumTest.cpp
Source/WebKit/gtk/ChangeLog
Source/WebKit/gtk/WebCoreSupport/AcceleratedCompositingContext.h
Source/WebKit/gtk/WebCoreSupport/AcceleratedCompositingContextCairo.cpp
Source/WebKit/gtk/WebCoreSupport/AcceleratedCompositingContextClutter.cpp
Source/WebKit/gtk/WebCoreSupport/AcceleratedCompositingContextGL.cpp
Source/WebKit/win/ChangeLog
Source/WebKit/win/WebView.cpp
Source/WebKit/win/WebView.h
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/CoordinatedGraphics/LayerTreeRenderer.h
Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp
Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.h
Source/WebKit2/WebProcess/WebPage/ca/LayerTreeHostCA.cpp
Source/WebKit2/WebProcess/WebPage/ca/LayerTreeHostCA.h
Source/WebKit2/WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp
Source/WebKit2/WebProcess/WebPage/gtk/LayerTreeHostGtk.h
Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h
Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm

index f64a140..ea99041 100644 (file)
@@ -1,3 +1,64 @@
+2012-11-05  Simon Fraser  <simon.fraser@apple.com>
+
+        Fix layer borders to cleaning appear and disappear on switching
+        https://bugs.webkit.org/show_bug.cgi?id=101136
+
+        Reviewed by Sam Weinig.
+
+        GraphicsLayers decided whether to show layer borders based
+        on a callback through the GraphicsLayerClient. This made it
+        hard to manage state, resulting in a failure to cleanly
+        hide layers when toggled off via the preference.
+        
+        Changed the layer border and repaint counter visibility to be bits
+        stored on GraphicsLayer just like other properties, with getters
+        and setters. RenderLayerBacking now updates these debug
+        indicators when we update other compositing layer properties.
+        
+        In GraphicsLayerCA, avoid calling updateDebugIndicators() explicitly
+        in several places by setting the change flag DebugIndicatorsChanged
+        for properties whose values affect the appearance of the debug border.
+
+        Removed the GraphicsLayerClient methods showDebugBorders() and
+        showRepaintCounter() which are no longer required.
+
+        * platform/graphics/GraphicsLayer.cpp:
+        (WebCore::GraphicsLayer::GraphicsLayer):
+        (WebCore::GraphicsLayer::updateDebugIndicators):
+        * platform/graphics/GraphicsLayer.h:
+        (WebCore::GraphicsLayer::setShowDebugBorder):
+        (WebCore::GraphicsLayer::isShowingDebugBorder):
+        (WebCore::GraphicsLayer::setShowRepaintCounter):
+        (WebCore::GraphicsLayer::isShowingRepaintCounter):
+        (WebCore::GraphicsLayer::repaintCount):
+        (WebCore::GraphicsLayer::incrementRepaintCount):
+        * platform/graphics/GraphicsLayerClient.h:
+        * platform/graphics/ca/GraphicsLayerCA.cpp:
+        (WebCore::GraphicsLayerCA::GraphicsLayerCA):
+        (WebCore::GraphicsLayerCA::setMasksToBounds):
+        (WebCore::GraphicsLayerCA::setDrawsContent):
+        (WebCore::GraphicsLayerCA::platformCALayerShowRepaintCounter):
+        (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
+        (WebCore::GraphicsLayerCA::updateMasksToBounds):
+        (WebCore::GraphicsLayerCA::updateLayerDrawsContent):
+        (WebCore::GraphicsLayerCA::updateDebugBorder):
+        (WebCore::GraphicsLayerCA::setShowDebugBorder):
+        (WebCore::GraphicsLayerCA::setShowRepaintCounter):
+        (WebCore::GraphicsLayerCA::swapFromOrToTiledLayer):
+        (WebCore::GraphicsLayerCA::setupContentsLayer):
+        (WebCore::GraphicsLayerCA::cloneLayer):
+        * platform/graphics/ca/GraphicsLayerCA.h:
+        (GraphicsLayerCA):
+        (WebCore::GraphicsLayerCA::platformCALayerShowDebugBorders):
+        * rendering/RenderLayerBacking.cpp:
+        (WebCore::RenderLayerBacking::updateDebugIndicators):
+        * rendering/RenderLayerBacking.h:
+        (RenderLayerBacking):
+        * rendering/RenderLayerCompositor.cpp:
+        (WebCore::RenderLayerCompositor::updateBacking):
+        * rendering/RenderLayerCompositor.h:
+        (RenderLayerCompositor):
+
 2012-11-05  Genevieve Mak  <gmak@rim.com>
 
         [BLACKBERRY] Update touch code to reflect touch refactor
index 0db2499..dd3b7a9 100644 (file)
@@ -89,6 +89,8 @@ GraphicsLayer::GraphicsLayer(GraphicsLayerClient* client)
     , m_acceleratesDrawing(false)
     , m_maintainsPixelAlignment(false)
     , m_appliesPageScale(false)
+    , m_showDebugBorder(false)
+    , m_showRepaintCounter(false)
     , m_paintingPhase(GraphicsLayerPaintAllWithOverflowClip)
     , m_contentsOrientation(CompositingCoordinatesTopDown)
     , m_parent(0)
@@ -374,7 +376,7 @@ void GraphicsLayer::getDebugBorderInfo(Color& color, float& width) const
 
 void GraphicsLayer::updateDebugIndicators()
 {
-    if (!GraphicsLayer::showDebugBorders())
+    if (!isShowingDebugBorder())
         return;
 
     Color borderColor;
index e937ca5..e2c82ba 100644 (file)
@@ -352,24 +352,26 @@ public:
     // For hosting this GraphicsLayer in a native layer hierarchy.
     virtual PlatformLayer* platformLayer() const { return 0; }
     
-    void dumpLayer(TextStream&, int indent = 0, LayerTreeAsTextBehavior = LayerTreeAsTextBehaviorNormal) const;
-
-    int repaintCount() const { return m_repaintCount; }
-    int incrementRepaintCount() { return ++m_repaintCount; }
-
     enum CompositingCoordinatesOrientation { CompositingCoordinatesTopDown, CompositingCoordinatesBottomUp };
 
     // Flippedness of the contents of this layer. Does not affect sublayer geometry.
     virtual void setContentsOrientation(CompositingCoordinatesOrientation orientation) { m_contentsOrientation = orientation; }
     CompositingCoordinatesOrientation contentsOrientation() const { return m_contentsOrientation; }
 
-    bool showDebugBorders() const { return m_client ? m_client->showDebugBorders(this) : false; }
-    bool showRepaintCounter() const { return m_client ? m_client->showRepaintCounter(this) : false; }
-    
-    void updateDebugIndicators();
-    
+    void dumpLayer(TextStream&, int indent = 0, LayerTreeAsTextBehavior = LayerTreeAsTextBehaviorNormal) const;
+
+    virtual void setShowDebugBorder(bool show) { m_showDebugBorder = show; }
+    bool isShowingDebugBorder() const { return m_showDebugBorder; }
+
+    virtual void setShowRepaintCounter(bool show) { m_showRepaintCounter = show; }
+    bool isShowingRepaintCounter() const { return m_showRepaintCounter; }
+
+    int repaintCount() const { return m_repaintCount; }
+    int incrementRepaintCount() { return ++m_repaintCount; }
+
     virtual void setDebugBackgroundColor(const Color&) { }
     virtual void setDebugBorder(const Color&, float /*borderWidth*/) { }
+
     // z-position is the z-equivalent of position(). It's only used for debugging purposes.
     virtual float zPosition() const { return m_zPosition; }
     virtual void setZPosition(float);
@@ -416,6 +418,8 @@ public:
     static void setGraphicsLayerFactory(GraphicsLayerFactoryCallback);
 #endif
 
+    void updateDebugIndicators();
+
 protected:
     // Should be called from derived class destructors. Should call willBeDestroyed() on super.
     virtual void willBeDestroyed();
@@ -486,7 +490,9 @@ protected:
     bool m_acceleratesDrawing : 1;
     bool m_maintainsPixelAlignment : 1;
     bool m_appliesPageScale : 1; // Set for the layer which has the page scale applied to it.
-
+    bool m_showDebugBorder : 1;
+    bool m_showRepaintCounter : 1;
+    
     GraphicsLayerPaintingPhase m_paintingPhase;
     CompositingCoordinatesOrientation m_contentsOrientation; // affects orientation of layer contents
 
index 06ffb8a..8b6bffd 100644 (file)
@@ -82,9 +82,6 @@ public:
     // Page scale factor.
     virtual float pageScaleFactor() const { return 1; }
 
-    virtual bool showDebugBorders(const GraphicsLayer*) const = 0;
-    virtual bool showRepaintCounter(const GraphicsLayer*) const = 0;
-
     virtual bool isTrackingRepaints() const { return false; }
 
 #ifndef NDEBUG
index a58837c..e36b5e7 100644 (file)
@@ -286,8 +286,6 @@ GraphicsLayerCA::GraphicsLayerCA(GraphicsLayerClient* client)
     }
 
     m_layer = PlatformCALayer::create(layerType, this);
-
-    updateDebugIndicators();
     noteLayerPropertyChanged(ContentsScaleChanged);
 }
 
@@ -520,7 +518,7 @@ void GraphicsLayerCA::setMasksToBounds(bool masksToBounds)
         return;
 
     GraphicsLayer::setMasksToBounds(masksToBounds);
-    noteLayerPropertyChanged(MasksToBoundsChanged);
+    noteLayerPropertyChanged(MasksToBoundsChanged | DebugIndicatorsChanged);
 }
 
 void GraphicsLayerCA::setDrawsContent(bool drawsContent)
@@ -529,7 +527,7 @@ void GraphicsLayerCA::setDrawsContent(bool drawsContent)
         return;
 
     GraphicsLayer::setDrawsContent(drawsContent);
-    noteLayerPropertyChanged(DrawsContentChanged);
+    noteLayerPropertyChanged(DrawsContentChanged | DebugIndicatorsChanged);
 }
 
 void GraphicsLayerCA::setContentsVisible(bool contentsVisible)
@@ -1044,7 +1042,7 @@ bool GraphicsLayerCA::platformCALayerShowRepaintCounter(PlatformCALayer* platfor
     if (m_isPageTileCacheLayer && platformLayer)
         return false;
     
-    return showRepaintCounter();
+    return isShowingRepaintCounter();
 }
 
 void GraphicsLayerCA::platformCALayerPaintContents(GraphicsContext& context, const IntRect& clip)
@@ -1151,6 +1149,9 @@ void GraphicsLayerCA::commitLayerChangesBeforeSublayers(float pageScaleFactor, c
     if (m_uncommittedChanges & AcceleratesDrawingChanged)
         updateAcceleratesDrawing();
 
+    if (m_uncommittedChanges & DebugIndicatorsChanged)
+        updateDebugBorder();
+
     if (m_uncommittedChanges & ChildrenChanged) {
         updateSublayerList();
         // Sublayers may set this flag again, so clear it to avoid always updating sublayers in commitLayerChangesAfterSublayers().
@@ -1343,8 +1344,6 @@ void GraphicsLayerCA::updateMasksToBounds()
         for (LayerMap::const_iterator it = layerCloneMap->begin(); it != end; ++it)
             it->value->setMasksToBounds(m_masksToBounds);
     }
-
-    updateDebugIndicators();
 }
 
 void GraphicsLayerCA::updateContentsVisibility()
@@ -1528,7 +1527,6 @@ void GraphicsLayerCA::updateLayerDrawsContent(float pageScaleFactor, const Float
                 it->value->setContents(0);
         }
     }
-    updateDebugIndicators();
 }
 
 void GraphicsLayerCA::updateAcceleratesDrawing()
@@ -1536,6 +1534,14 @@ void GraphicsLayerCA::updateAcceleratesDrawing()
     m_layer->setAcceleratesDrawing(m_acceleratesDrawing);
 }
 
+void GraphicsLayerCA::updateDebugBorder()
+{
+    if (isShowingDebugBorder())
+        updateDebugIndicators();
+    else
+        m_layer->setBorderWidth(0);
+}
+
 FloatRect GraphicsLayerCA::adjustTiledLayerVisibleRect(TiledBacking* tiledBacking, const FloatRect& oldVisibleRect, const FloatSize& oldSize) const
 {
     // If the old visible rect is empty, we have no information about how the visible area is changing
@@ -2498,6 +2504,24 @@ void GraphicsLayerCA::updateContentsScale(float pageScaleFactor, const FloatPoin
         m_layer->setNeedsDisplay();
 }
 
+void GraphicsLayerCA::setShowDebugBorder(bool showBorder)
+{
+    if (showBorder == m_showDebugBorder)
+        return;
+
+    GraphicsLayer::setShowDebugBorder(showBorder);
+    noteLayerPropertyChanged(DebugIndicatorsChanged);
+}
+
+void GraphicsLayerCA::setShowRepaintCounter(bool showCounter)
+{
+    if (showCounter == m_showRepaintCounter)
+        return;
+
+    GraphicsLayer::setShowRepaintCounter(showCounter);
+    noteLayerPropertyChanged(DebugIndicatorsChanged);
+}
+
 void GraphicsLayerCA::setDebugBackgroundColor(const Color& color)
 {    
     if (color.isValid())
@@ -2611,10 +2635,9 @@ void GraphicsLayerCA::swapFromOrToTiledLayer(bool useTiledLayer, float /*pageSca
         | BackgroundColorChanged
         | ContentsScaleChanged
         | AcceleratesDrawingChanged
-#if ENABLE(CSS_FILTERS)
         | FiltersChanged
-#endif
-        | OpacityChanged;
+        | OpacityChanged
+        | DebugIndicatorsChanged;
     
 #ifndef NDEBUG
     String name = String::format("%sCALayer(%p) GraphicsLayer(%p) ", (m_layer->layerType() == PlatformCALayer::LayerTypeWebTiledLayer) ? "Tiled " : "", m_layer->platformLayer(), this) + m_name;
@@ -2626,8 +2649,6 @@ void GraphicsLayerCA::swapFromOrToTiledLayer(bool useTiledLayer, float /*pageSca
     
     // need to tell new layer to draw itself
     setNeedsDisplay();
-    
-    updateDebugIndicators();
 }
 
 GraphicsLayer::CompositingCoordinatesOrientation GraphicsLayerCA::defaultContentsOrientation() const
@@ -2651,7 +2672,7 @@ void GraphicsLayerCA::setupContentsLayer(PlatformCALayer* contentsLayer)
     } else
         contentsLayer->setAnchorPoint(FloatPoint3D());
 
-    if (showDebugBorders()) {
+    if (isShowingDebugBorder()) {
         contentsLayer->setBorderColor(Color(0, 0, 128, 180));
         contentsLayer->setBorderWidth(1.0f);
     }
@@ -2846,7 +2867,7 @@ PassRefPtr<PlatformCALayer> GraphicsLayerCA::cloneLayer(PlatformCALayer *layer,
         moveOrCopyAnimations(Copy, layer, newLayer.get());
     }
     
-    if (showDebugBorders()) {
+    if (isShowingDebugBorder()) {
         newLayer->setBorderColor(Color(255, 122, 251));
         newLayer->setBorderWidth(2);
     }
index 00ca62e..2deb2e2 100644 (file)
@@ -121,6 +121,9 @@ public:
 
     virtual bool hasContentsLayer() const { return m_contentsLayer; }
     
+    virtual void setShowDebugBorder(bool) OVERRIDE;
+    virtual void setShowRepaintCounter(bool) OVERRIDE;
+
     virtual void setDebugBackgroundColor(const Color&);
     virtual void setDebugBorder(const Color&, float borderWidth);
 
@@ -152,7 +155,7 @@ private:
     virtual void platformCALayerAnimationStarted(CFTimeInterval beginTime);
     virtual CompositingCoordinatesOrientation platformCALayerContentsOrientation() const { return contentsOrientation(); }
     virtual void platformCALayerPaintContents(GraphicsContext&, const IntRect& clip);
-    virtual bool platformCALayerShowDebugBorders() const { return showDebugBorders(); }
+    virtual bool platformCALayerShowDebugBorders() const { return isShowingDebugBorder(); }
     virtual bool platformCALayerShowRepaintCounter(PlatformCALayer*) const;
     virtual int platformCALayerIncrementRepaintCount() { return incrementRepaintCount(); }
 
@@ -326,6 +329,7 @@ private:
     void updateLayerAnimations();
     void updateContentsNeedsDisplay();
     void updateAcceleratesDrawing();
+    void updateDebugBorder();
     void updateVisibleRect(const FloatRect& oldVisibleRect);
     void updateContentsScale(float pixelAlignmentScale, const FloatPoint& positionRelativeToBase);
     
@@ -377,9 +381,8 @@ private:
         ContentsScaleChanged = 1 << 23,
         ContentsVisibilityChanged = 1 << 24,
         VisibleRectChanged = 1 << 25,
-#if ENABLE(CSS_FILTERS)
         FiltersChanged = 1 << 26,
-#endif
+        DebugIndicatorsChanged = 1 << 27
     };
     typedef unsigned LayerChangeFlags;
     void noteLayerPropertyChanged(LayerChangeFlags flags);
index b527da8..48fb673 100644 (file)
@@ -848,7 +848,7 @@ void GraphicsLayerChromium::setupContentsLayer(WebLayer* contentsLayer)
         // shadow content that must display in front of the video.
         m_layer->layer()->insertChild(m_contentsLayer, 0);
 
-        if (showDebugBorders()) {
+        if (isShowingDebugBorder()) {
             m_contentsLayer->setDebugBorderColor(Color(0, 0, 128, 180).rgb());
             m_contentsLayer->setDebugBorderWidth(1);
         }
index 11a5d58..401af8c 100644 (file)
@@ -129,7 +129,7 @@ void TextureMapperLayer::updateBackingStore(TextureMapper* textureMapper, Graphi
     context->translate(-dirtyRect.x(), -dirtyRect.y());
     layer->paintGraphicsLayerContents(*context, dirtyRect);
 
-    if (layer->showRepaintCounter()) {
+    if (layer->isShowingRepaintCounter()) {
         layer->incrementRepaintCount();
         drawRepaintCounter(context, layer);
     }
@@ -138,7 +138,7 @@ void TextureMapperLayer::updateBackingStore(TextureMapper* textureMapper, Graphi
     TextureMapperTiledBackingStore* backingStore = static_cast<TextureMapperTiledBackingStore*>(m_backingStore.get());
     backingStore->updateContents(textureMapper, image.get(), m_size, dirtyRect, BitmapTexture::UpdateCanModifyOriginalImageData);
 
-    backingStore->setShowDebugBorders(layer->showDebugBorders());
+    backingStore->setShowDebugBorders(layer->isShowingDebugBorder());
     backingStore->setDebugBorder(m_debugBorderColor, m_debugBorderWidth);
 
     m_state.needsDisplay = false;
@@ -617,7 +617,7 @@ void TextureMapperLayer::drawRepaintCounter(GraphicsContext* context, GraphicsLa
     cairo_text_extents(cr, repaintCount.data(), &repaintTextExtents);
 
     static const int repaintCountBorderWidth = 10;
-    setSourceRGBAFromColor(cr, layer->showDebugBorders() ? m_debugBorderColor : Color(0, 255, 0, 127));
+    setSourceRGBAFromColor(cr, layer->isShowingDebugBorder() ? m_debugBorderColor : Color(0, 255, 0, 127));
     cairo_rectangle(cr, 0, 0,
                     repaintTextExtents.width + (repaintCountBorderWidth * 2),
                     repaintTextExtents.height + (repaintCountBorderWidth * 2));
index 556909e..8267bc3 100644 (file)
@@ -203,6 +203,31 @@ void RenderLayerBacking::adjustTileCacheCoverage()
     tiledBacking()->setTileCoverage(tileCoverage);
 }
 
+void RenderLayerBacking::updateDebugIndicators(bool showBorder, bool showRepaintCounter)
+{
+    m_graphicsLayer->setShowDebugBorder(showBorder);
+    m_graphicsLayer->setShowRepaintCounter(showRepaintCounter);
+    
+    if (m_ancestorClippingLayer)
+        m_ancestorClippingLayer->setShowDebugBorder(showBorder);
+
+    if (m_foregroundLayer) {
+        m_foregroundLayer->setShowDebugBorder(showBorder);
+        m_foregroundLayer->setShowRepaintCounter(showRepaintCounter);
+    }
+
+    if (m_maskLayer) {
+        m_maskLayer->setShowDebugBorder(showBorder);
+        m_maskLayer->setShowRepaintCounter(showRepaintCounter);
+    }
+
+    if (m_scrollingLayer)
+        m_scrollingLayer->setShowDebugBorder(showBorder);
+
+    if (m_scrollingContentsLayer)
+        m_scrollingContentsLayer->setShowDebugBorder(showBorder);
+}
+
 void RenderLayerBacking::createPrimaryGraphicsLayer()
 {
     String layerName;
@@ -1586,16 +1611,6 @@ bool RenderLayerBacking::getCurrentTransform(const GraphicsLayer* graphicsLayer,
     return false;
 }
 
-bool RenderLayerBacking::showDebugBorders(const GraphicsLayer*) const
-{
-    return compositor() ? compositor()->compositorShowDebugBorders() : false;
-}
-
-bool RenderLayerBacking::showRepaintCounter(const GraphicsLayer*) const
-{
-    return compositor() ? compositor()->compositorShowRepaintCounter() : false;
-}
-
 bool RenderLayerBacking::isTrackingRepaints() const
 {
     GraphicsLayerClient* client = compositor();
index 22fb889..39abaea 100644 (file)
@@ -141,6 +141,8 @@ public:
     TiledBacking* tiledBacking() const;
     void adjustTileCacheCoverage();
     
+    void updateDebugIndicators(bool showBorder, bool showRepaintCounter);
+    
     // GraphicsLayerClient interface
     virtual bool shouldUseTileCache(const GraphicsLayer*) const OVERRIDE;
     virtual void notifyAnimationStarted(const GraphicsLayer*, double startTime) OVERRIDE;
@@ -154,9 +156,6 @@ public:
     virtual void didCommitChangesForLayer(const GraphicsLayer*) const OVERRIDE;
     virtual bool getCurrentTransform(const GraphicsLayer*, TransformationMatrix&) const OVERRIDE;
 
-    virtual bool showDebugBorders(const GraphicsLayer*) const OVERRIDE;
-    virtual bool showRepaintCounter(const GraphicsLayer*) const OVERRIDE;
-
     virtual bool isTrackingRepaints() const OVERRIDE;
 
 #ifndef NDEBUG
index 6aa3851..d02e5e4 100644 (file)
@@ -583,6 +583,10 @@ bool RenderLayerCompositor::updateBacking(RenderLayer* layer, CompositingChangeR
         if (ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordinator())
             scrollingCoordinator->frameViewFixedObjectsDidChange(m_renderView->frameView());
     }
+    
+    if (layer->backing())
+        layer->backing()->updateDebugIndicators(m_showDebugBorders, m_showRepaintCounter);
+
     return layerChanged;
 }
 
@@ -2044,22 +2048,6 @@ void RenderLayerCompositor::setTracksRepaints(bool tracksRepaints)
     m_isTrackingRepaints = tracksRepaints;
 }
 
-bool RenderLayerCompositor::showDebugBorders(const GraphicsLayer* layer) const
-{
-    if (layer == m_layerForHorizontalScrollbar || layer == m_layerForVerticalScrollbar || layer == m_layerForScrollCorner)
-        return m_showDebugBorders;
-
-    return false;
-}
-
-bool RenderLayerCompositor::showRepaintCounter(const GraphicsLayer* layer) const
-{
-    if (layer == m_layerForHorizontalScrollbar || layer == m_layerForVerticalScrollbar || layer == m_layerForScrollCorner)
-        return m_showDebugBorders;
-
-    return false;
-}
-
 bool RenderLayerCompositor::isTrackingRepaints() const
 {
     return m_isTrackingRepaints;
index e58aa3a..81aaf41 100644 (file)
@@ -202,11 +202,6 @@ public:
 
     String layerTreeAsText(LayerTreeFlags);
 
-    // These are named to avoid conflicts with the functions in GraphicsLayerClient
-    // These return the actual internal variables.
-    bool compositorShowDebugBorders() const { return m_showDebugBorders; }
-    bool compositorShowRepaintCounter() const { return m_showRepaintCounter; }
-
     virtual float deviceScaleFactor() const OVERRIDE;
     virtual float pageScaleFactor() const OVERRIDE;
     virtual void didCommitChangesForLayer(const GraphicsLayer*) const OVERRIDE;
@@ -239,9 +234,6 @@ private:
     virtual void notifyFlushRequired(const GraphicsLayer*) OVERRIDE { scheduleLayerFlush(); }
     virtual void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsLayerPaintingPhase, const IntRect&) OVERRIDE;
 
-    virtual bool showDebugBorders(const GraphicsLayer*) const OVERRIDE;
-    virtual bool showRepaintCounter(const GraphicsLayer*) const OVERRIDE;
-
     virtual bool isTrackingRepaints() const OVERRIDE;
     
     // GraphicsLayerUpdaterClient implementation
index 846e5cc..742fe0b 100644 (file)
@@ -167,8 +167,6 @@ public:
     virtual void notifyAnimationStarted(const WebCore::GraphicsLayer*, double time) { }
     virtual void notifyFlushRequired(const WebCore::GraphicsLayer*);
     virtual void paintContents(const WebCore::GraphicsLayer*, WebCore::GraphicsContext&, WebCore::GraphicsLayerPaintingPhase, const WebCore::IntRect& inClip);
-    virtual bool showDebugBorders(const WebCore::GraphicsLayer*) const { return false; }
-    virtual bool showRepaintCounter(const WebCore::GraphicsLayer*) const { return false; }
     virtual bool contentsVisible(const WebCore::GraphicsLayer*, const WebCore::IntRect& contentRect) const { return true; }
 
 private:
index 1152eab..e2677c5 100644 (file)
@@ -5733,16 +5733,6 @@ void WebPagePrivate::notifyFlushRequired(const GraphicsLayer*)
 {
     scheduleRootLayerCommit();
 }
-
-bool WebPagePrivate::showDebugBorders(const GraphicsLayer*) const
-{
-    return m_page->settings()->showDebugBorders();
-}
-
-bool WebPagePrivate::showRepaintCounter(const GraphicsLayer*) const
-{
-    return m_page->settings()->showRepaintCounter();
-}
 #endif // USE(ACCELERATED_COMPOSITING)
 
 void WebPagePrivate::enterFullscreenForNode(Node* node)
index 44fc1af..de32128 100644 (file)
@@ -401,8 +401,6 @@ public:
     virtual void notifyAnimationStarted(const WebCore::GraphicsLayer*, double time) { }
     virtual void notifyFlushRequired(const WebCore::GraphicsLayer*);
     virtual void paintContents(const WebCore::GraphicsLayer*, WebCore::GraphicsContext&, WebCore::GraphicsLayerPaintingPhase, const WebCore::IntRect& inClip) { }
-    virtual bool showDebugBorders(const WebCore::GraphicsLayer*) const;
-    virtual bool showRepaintCounter(const WebCore::GraphicsLayer*) const;
 
     // WebKit thread, plumbed through from ChromeClientBlackBerry.
     void setRootLayerWebKitThread(WebCore::Frame*, WebCore::LayerWebKitThread*);
index a73cdc9..4a398e4 100644 (file)
@@ -1,3 +1,28 @@
+2012-11-05  Simon Fraser  <simon.fraser@apple.com>
+
+        Fix layer borders to cleaning appear and disappear on switching
+        https://bugs.webkit.org/show_bug.cgi?id=101136
+
+        Reviewed by Sam Weinig.
+
+        Remove the GraphicsLayerClient methods showDebugBorders() and
+        showRepaintCounter().
+
+        * Api/WebOverlay_p.h:
+        (WebOverlayPrivateWebKitThread):
+        * Api/WebPage.cpp:
+        (BlackBerry::WebKit::WebPagePrivate::notifyFlushRequired):
+        * Api/WebPage_p.h:
+        * WebKitSupport/DefaultTapHighlight.cpp:
+        * WebKitSupport/DefaultTapHighlight.h:
+        (DefaultTapHighlight):
+        * WebKitSupport/InspectorOverlayBlackBerry.cpp:
+        * WebKitSupport/InspectorOverlayBlackBerry.h:
+        (InspectorOverlay):
+        * WebKitSupport/SelectionOverlay.cpp:
+        * WebKitSupport/SelectionOverlay.h:
+        (SelectionOverlay):
+
 2012-11-05  Rob Buis  <rbuis@rim.com>
 
         [BlackBerry] Input date should not popup dialog when readonly is set
index 45472aa..77b2c75 100644 (file)
@@ -148,16 +148,6 @@ void DefaultTapHighlight::paintContents(const GraphicsLayer*, GraphicsContext& c
     c.restore();
 }
 
-bool DefaultTapHighlight::showDebugBorders(const GraphicsLayer* layer) const
-{
-    return m_page->showDebugBorders(layer);
-}
-
-bool DefaultTapHighlight::showRepaintCounter(const GraphicsLayer* layer) const
-{
-    return m_page->showRepaintCounter(layer);
-}
-
 bool DefaultTapHighlight::contentsVisible(const GraphicsLayer*, const IntRect& contentRect) const
 {
     // This layer is typically small enough that we can afford to cache all tiles and never
index 06c5590..90af94c 100644 (file)
@@ -57,8 +57,6 @@ public:
     virtual void notifyAnimationStarted(const WebCore::GraphicsLayer*, double time) { }
     virtual void notifyFlushRequired(const WebCore::GraphicsLayer*);
     virtual void paintContents(const WebCore::GraphicsLayer*, WebCore::GraphicsContext&, WebCore::GraphicsLayerPaintingPhase, const WebCore::IntRect& inClip);
-    virtual bool showDebugBorders(const WebCore::GraphicsLayer*) const;
-    virtual bool showRepaintCounter(const WebCore::GraphicsLayer*) const;
     virtual bool contentsVisible(const WebCore::GraphicsLayer*, const WebCore::IntRect& contentRect) const;
 
 private:
index 0815dd9..52c9c4d 100644 (file)
@@ -56,15 +56,6 @@ void InspectorOverlay::paintContents(const WebCore::GraphicsLayer*, WebCore::Gra
     context.restore();
 }
 
-bool InspectorOverlay::showDebugBorders(const WebCore::GraphicsLayer* layer) const
-{
-    return m_webPage->showDebugBorders(layer);
-}
-
-bool InspectorOverlay::showRepaintCounter(const WebCore::GraphicsLayer* layer) const
-{
-    return m_webPage->showRepaintCounter(layer);
-}
 #endif
 
 InspectorOverlay::~InspectorOverlay() { }
index 91197cc..6df4ba6 100644 (file)
@@ -54,8 +54,6 @@ public:
     virtual void notifyAnimationStarted(const WebCore::GraphicsLayer*, double time) { }
     virtual void notifyFlushRequired(const WebCore::GraphicsLayer*);
     virtual void paintContents(const WebCore::GraphicsLayer*, WebCore::GraphicsContext&, WebCore::GraphicsLayerPaintingPhase, const WebCore::IntRect& inClip);
-    virtual bool showDebugBorders(const WebCore::GraphicsLayer*) const;
-    virtual bool showRepaintCounter(const WebCore::GraphicsLayer*) const;
 #endif
 
 private:
index e06f7df..d352b17 100644 (file)
@@ -117,16 +117,6 @@ void SelectionOverlay::paintContents(const GraphicsLayer*, GraphicsContext& c, G
     c.restore();
 }
 
-bool SelectionOverlay::showDebugBorders(const GraphicsLayer* layer) const
-{
-    return m_page->showDebugBorders(layer);
-}
-
-bool SelectionOverlay::showRepaintCounter(const GraphicsLayer* layer) const
-{
-    return m_page->showRepaintCounter(layer);
-}
-
 } // namespace WebKit
 } // namespace BlackBerry
 
index 5762b5a..d2704dc 100644 (file)
@@ -52,8 +52,6 @@ public:
     virtual void notifyAnimationStarted(const WebCore::GraphicsLayer*, double time) { }
     virtual void notifyFlushRequired(const WebCore::GraphicsLayer*);
     virtual void paintContents(const WebCore::GraphicsLayer*, WebCore::GraphicsContext&, WebCore::GraphicsLayerPaintingPhase, const WebCore::IntRect& inClip);
-    virtual bool showDebugBorders(const WebCore::GraphicsLayer*) const;
-    virtual bool showRepaintCounter(const WebCore::GraphicsLayer*) const;
 
 private:
     SelectionOverlay(WebPagePrivate*);
index 2a121c4..bf93cec 100644 (file)
@@ -1,3 +1,20 @@
+2012-11-05  Simon Fraser  <simon.fraser@apple.com>
+
+        Fix layer borders to cleaning appear and disappear on switching
+        https://bugs.webkit.org/show_bug.cgi?id=101136
+
+        Reviewed by Sam Weinig.
+
+        Remove the GraphicsLayerClient methods showDebugBorders() and
+        showRepaintCounter().
+
+        * src/NonCompositedContentHost.cpp:
+        * src/NonCompositedContentHost.h:
+        (NonCompositedContentHost):
+        * src/PageOverlay.cpp:
+        * tests/GraphicsLayerChromiumTest.cpp:
+        * tests/ImageLayerChromiumTest.cpp:
+
 2012-11-05  Bo Liu  <boliu@chromium.org>
 
         Expose hit test related methods in public chromium port
index 47578dd..05a4c15 100644 (file)
@@ -191,16 +191,6 @@ void NonCompositedContentHost::setShowDebugBorders(bool showDebugBorders)
     m_graphicsLayer->updateDebugIndicators();
 }
 
-bool NonCompositedContentHost::showDebugBorders(const WebCore::GraphicsLayer*) const
-{
-    return m_showDebugBorders;
-}
-
-bool NonCompositedContentHost::showRepaintCounter(const WebCore::GraphicsLayer*) const
-{
-    return false;
-}
-
 bool NonCompositedContentHost::isTrackingRepaints() const
 {
     return m_webView->isTrackingRepaints();
index c97aca6..609538a 100644 (file)
@@ -71,8 +71,6 @@ private:
     virtual void notifyAnimationStarted(const WebCore::GraphicsLayer*, double time);
     virtual void notifyFlushRequired(const WebCore::GraphicsLayer*);
     virtual void paintContents(const WebCore::GraphicsLayer*, WebCore::GraphicsContext&, WebCore::GraphicsLayerPaintingPhase, const WebCore::IntRect& clipRect);
-    virtual bool showDebugBorders(const WebCore::GraphicsLayer*) const;
-    virtual bool showRepaintCounter(const WebCore::GraphicsLayer*) const;
     virtual bool isTrackingRepaints() const;
 
     bool haveScrollLayer();
index a16a010..c95687a 100644 (file)
@@ -94,16 +94,6 @@ public:
         return m_webViewImpl->pageScaleFactor();
     }
 
-    virtual bool showDebugBorders(const GraphicsLayer*) const
-    {
-        return m_webViewImpl->page()->settings()->showDebugBorders();
-    }
-
-    virtual bool showRepaintCounter(const GraphicsLayer*) const
-    {
-        return m_webViewImpl->page()->settings()->showRepaintCounter();
-    }
-
 private:
     OverlayGraphicsLayerClientImpl(WebViewImpl* webViewImpl, WebPageOverlay* overlay)
         : m_overlay(overlay)
index 0ce8425..b04b3a9 100644 (file)
@@ -52,8 +52,6 @@ class MockGraphicsLayerClient : public GraphicsLayerClient {
     virtual void notifyAnimationStarted(const GraphicsLayer*, double time) OVERRIDE { }
     virtual void notifyFlushRequired(const GraphicsLayer*) OVERRIDE { }
     virtual void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsLayerPaintingPhase, const IntRect& inClip) OVERRIDE { }
-    virtual bool showDebugBorders(const GraphicsLayer*) const OVERRIDE { return false; }
-    virtual bool showRepaintCounter(const GraphicsLayer*) const OVERRIDE { return false; }
     virtual float deviceScaleFactor() const OVERRIDE { return 2; }
 };
 
index bfb03ed..74c2f16 100644 (file)
@@ -40,8 +40,6 @@ class MockGraphicsLayerClient : public GraphicsLayerClient {
     virtual void notifyAnimationStarted(const GraphicsLayer*, double time) { }
     virtual void notifyFlushRequired(const GraphicsLayer*) { }
     virtual void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsLayerPaintingPhase, const IntRect& inClip) { }
-    virtual bool showDebugBorders(const GraphicsLayer*) const { return false; }
-    virtual bool showRepaintCounter(const GraphicsLayer*) const { return false; }
 };
 
 class TestImage : public Image {
index 27711a9..ec1d0ef 100644 (file)
@@ -1,3 +1,19 @@
+2012-11-05  Simon Fraser  <simon.fraser@apple.com>
+
+        Fix layer borders to cleaning appear and disappear on switching
+        https://bugs.webkit.org/show_bug.cgi?id=101136
+
+        Reviewed by Sam Weinig.
+
+        Remove the GraphicsLayerClient methods showDebugBorders() and
+        showRepaintCounter().
+
+        * WebCoreSupport/AcceleratedCompositingContext.h:
+        (AcceleratedCompositingContext):
+        * WebCoreSupport/AcceleratedCompositingContextCairo.cpp:
+        * WebCoreSupport/AcceleratedCompositingContextClutter.cpp:
+        * WebCoreSupport/AcceleratedCompositingContextGL.cpp:
+
 2012-10-25  Martin Robinson  <mrobinson@igalia.com>
 
         [GTK] Move soup authentication from GtkAuthenticationDialog to WebCore
index 6572ea5..02597d1 100644 (file)
@@ -60,8 +60,6 @@ public:
     virtual void notifyAnimationStarted(const WebCore::GraphicsLayer*, double time);
     virtual void notifyFlushRequired(const WebCore::GraphicsLayer*);
     virtual void paintContents(const WebCore::GraphicsLayer*, WebCore::GraphicsContext&, WebCore::GraphicsLayerPaintingPhase, const WebCore::IntRect& rectToPaint);
-    virtual bool showDebugBorders(const WebCore::GraphicsLayer*) const;
-    virtual bool showRepaintCounter(const WebCore::GraphicsLayer*) const;
 
     void initialize();
 
index 3789034..cc6942e 100644 (file)
@@ -169,16 +169,6 @@ void AcceleratedCompositingContext::paintContents(const GraphicsLayer*, Graphics
     copyRectFromCairoSurfaceToContext(m_webView->priv->backingStore->cairoSurface(), cr, IntSize(), rectToPaint);
 }
 
-bool AcceleratedCompositingContext::showDebugBorders(const GraphicsLayer*) const
-{
-    return false;
-}
-
-bool AcceleratedCompositingContext::showRepaintCounter(const GraphicsLayer*) const
-{
-    return false;
-}
-
 } // namespace WebKit
 
 #endif // USE(ACCELERATED_COMPOSITING) && USE(TEXTURE_MAPPER_CAIRO)
index 87ceb6e..9fcae52 100644 (file)
@@ -165,18 +165,6 @@ void AcceleratedCompositingContext::paintContents(const WebCore::GraphicsLayer*,
     ASSERT_NOT_REACHED();
 }
 
-bool AcceleratedCompositingContext::showDebugBorders(const WebCore::GraphicsLayer*) const
-{
-    ASSERT_NOT_REACHED();
-    return false;
-}
-
-bool AcceleratedCompositingContext::showRepaintCounter(const WebCore::GraphicsLayer*) const
-{
-    ASSERT_NOT_REACHED();
-    return false;
-}
-
 } // namespace WebKit
 
 #endif // USE(ACCELERATED_COMPOSITING) && USE(CLUTTER)
index efc2061..d130a3f 100644 (file)
@@ -383,16 +383,6 @@ void AcceleratedCompositingContext::paintContents(const GraphicsLayer*, Graphics
     context.restore();
 }
 
-bool AcceleratedCompositingContext::showDebugBorders(const GraphicsLayer*) const
-{
-    return false;
-}
-
-bool AcceleratedCompositingContext::showRepaintCounter(const GraphicsLayer*) const
-{
-    return false;
-}
-
 } // namespace WebKit
 
 #endif // USE(ACCELERATED_COMPOSITING) && USE(TEXTURE_MAPPER_GL)
index 4fa6e93..2635174 100644 (file)
@@ -1,3 +1,16 @@
+2012-11-05  Simon Fraser  <simon.fraser@apple.com>
+
+        Fix layer borders to cleaning appear and disappear on switching
+        https://bugs.webkit.org/show_bug.cgi?id=101136
+
+        Reviewed by Sam Weinig.
+
+        Remove the GraphicsLayerClient methods showDebugBorders() and
+        showRepaintCounter().
+
+        * WebView.cpp:
+        * WebView.h:
+
 2012-10-29  Anders Carlsson  <andersca@apple.com>
 
         String::createCFString should return a RetainPtr
index 3a1b74e..dd7008e 100644 (file)
@@ -6645,16 +6645,6 @@ void WebView::paintContents(const GraphicsLayer*, GraphicsContext& context, Grap
     context.restore();
 }
 
-bool WebView::showDebugBorders(const GraphicsLayer*) const
-{
-    return m_page->settings()->showDebugBorders();
-}
-
-bool WebView::showRepaintCounter(const GraphicsLayer*) const
-{
-    return m_page->settings()->showRepaintCounter();
-}
-
 void WebView::flushPendingGraphicsLayerChanges()
 {
     Frame* coreFrame = core(m_mainFrame);
index 98fcbb3..c937346 100644 (file)
@@ -1020,8 +1020,6 @@ private:
     virtual void notifyAnimationStarted(const WebCore::GraphicsLayer*, double time);
     virtual void notifyFlushRequired(const WebCore::GraphicsLayer*);
     virtual void paintContents(const WebCore::GraphicsLayer*, WebCore::GraphicsContext&, WebCore::GraphicsLayerPaintingPhase, const WebCore::IntRect& inClip);
-    virtual bool showDebugBorders(const WebCore::GraphicsLayer*) const;
-    virtual bool showRepaintCounter(const WebCore::GraphicsLayer*) const;
 
     // CACFLayerTreeHostClient
     virtual void flushPendingGraphicsLayerChanges();
index d9cc54e..331a059 100644 (file)
@@ -1,3 +1,27 @@
+2012-11-05  Simon Fraser  <simon.fraser@apple.com>
+
+        Fix layer borders to cleaning appear and disappear on switching
+        https://bugs.webkit.org/show_bug.cgi?id=101136
+
+        Reviewed by Sam Weinig.
+        
+        Remove the GraphicsLayerClient methods showDebugBorders() and
+        showRepaintCounter().
+        
+        * UIProcess/CoordinatedGraphics/LayerTreeRenderer.h:
+        * WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp:
+        * WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.h:
+        (LayerTreeCoordinator):
+        * WebProcess/WebPage/ca/LayerTreeHostCA.cpp:
+        * WebProcess/WebPage/ca/LayerTreeHostCA.h:
+        (LayerTreeHostCA):
+        * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
+        * WebProcess/WebPage/gtk/LayerTreeHostGtk.h:
+        (LayerTreeHostGtk):
+        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
+        (TiledCoreAnimationDrawingArea):
+        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
+
 2012-11-05  Yael Aharon  <yael.aharon@intel.com>
 
         [EFL][WK2] Allow using ACCELERATED_COMPOSITING without COORDINATED_GRAPHICS
index ddea31d..8596022 100644 (file)
@@ -108,8 +108,6 @@ private:
     // Reimplementations from WebCore::GraphicsLayerClient.
     virtual void notifyAnimationStarted(const WebCore::GraphicsLayer*, double) { }
     virtual void notifyFlushRequired(const WebCore::GraphicsLayer*) { }
-    virtual bool showDebugBorders(const WebCore::GraphicsLayer*) const { return false; }
-    virtual bool showRepaintCounter(const WebCore::GraphicsLayer*) const { return false; }
     void paintContents(const WebCore::GraphicsLayer*, WebCore::GraphicsContext&, WebCore::GraphicsLayerPaintingPhase, const WebCore::IntRect&) { }
     void updateViewport();
     void dispatchOnMainThread(const Function<void()>&);
index 9eb378e..0ddfced 100644 (file)
@@ -578,16 +578,6 @@ void LayerTreeCoordinator::paintContents(const WebCore::GraphicsLayer* graphicsL
     }
 }
 
-bool LayerTreeCoordinator::showDebugBorders(const WebCore::GraphicsLayer*) const
-{
-    return m_webPage->corePage()->settings()->showDebugBorders();
-}
-
-bool LayerTreeCoordinator::showRepaintCounter(const WebCore::GraphicsLayer*) const
-{
-    return m_webPage->corePage()->settings()->showRepaintCounter();
-}
-
 PassOwnPtr<GraphicsLayer> LayerTreeCoordinator::createGraphicsLayer(GraphicsLayerClient* client)
 {
     return adoptPtr(new CoordinatedGraphicsLayer(client));
index d725af6..cacb68e 100644 (file)
@@ -112,8 +112,6 @@ private:
     virtual void notifyAnimationStarted(const WebCore::GraphicsLayer*, double time);
     virtual void notifyFlushRequired(const WebCore::GraphicsLayer*);
     virtual void paintContents(const WebCore::GraphicsLayer*, WebCore::GraphicsContext&, WebCore::GraphicsLayerPaintingPhase, const WebCore::IntRect& clipRect);
-    virtual bool showDebugBorders(const WebCore::GraphicsLayer*) const;
-    virtual bool showRepaintCounter(const WebCore::GraphicsLayer*) const;
 
     // GraphicsLayerFactory
     virtual PassOwnPtr<WebCore::GraphicsLayer> createGraphicsLayer(WebCore::GraphicsLayerClient*) OVERRIDE;
index 0872f43..dba55c2 100644 (file)
@@ -203,16 +203,6 @@ void LayerTreeHostCA::paintContents(const GraphicsLayer* graphicsLayer, Graphics
     }
 }
 
-bool LayerTreeHostCA::showDebugBorders(const GraphicsLayer*) const
-{
-    return m_webPage->corePage()->settings()->showDebugBorders();
-}
-
-bool LayerTreeHostCA::showRepaintCounter(const GraphicsLayer*) const
-{
-    return m_webPage->corePage()->settings()->showRepaintCounter();
-}
-
 float LayerTreeHostCA::deviceScaleFactor() const
 {
     return m_webPage->corePage()->deviceScaleFactor();
index 9cb8ca6..21b13da 100644 (file)
@@ -76,8 +76,6 @@ private:
     virtual void notifyAnimationStarted(const WebCore::GraphicsLayer*, double time);
     virtual void notifyFlushRequired(const WebCore::GraphicsLayer*);
     virtual void paintContents(const WebCore::GraphicsLayer*, WebCore::GraphicsContext&, WebCore::GraphicsLayerPaintingPhase, const WebCore::IntRect& clipRect);
-    virtual bool showDebugBorders(const WebCore::GraphicsLayer*) const;
-    virtual bool showRepaintCounter(const WebCore::GraphicsLayer*) const;
     virtual float deviceScaleFactor() const;
     virtual void didCommitChangesForLayer(const WebCore::GraphicsLayer*) const { }
 
index af2ae89..07fe128 100644 (file)
@@ -258,16 +258,6 @@ void LayerTreeHostGtk::paintContents(const GraphicsLayer* graphicsLayer, Graphic
     }
 }
 
-bool LayerTreeHostGtk::showDebugBorders(const GraphicsLayer*) const
-{
-    return m_webPage->corePage()->settings()->showDebugBorders();
-}
-
-bool LayerTreeHostGtk::showRepaintCounter(const GraphicsLayer*) const
-{
-    return m_webPage->corePage()->settings()->showRepaintCounter();
-}
-
 gboolean LayerTreeHostGtk::layerFlushTimerFiredCallback(LayerTreeHostGtk* layerTreeHost)
 {
     layerTreeHost->layerFlushTimerFired();
index 61b9fa6..840ada8 100644 (file)
@@ -77,8 +77,6 @@ private:
     virtual void notifyAnimationStarted(const WebCore::GraphicsLayer*, double time);
     virtual void notifyFlushRequired(const WebCore::GraphicsLayer*);
     virtual void paintContents(const WebCore::GraphicsLayer*, WebCore::GraphicsContext&, WebCore::GraphicsLayerPaintingPhase, const WebCore::IntRect& clipRect);
-    virtual bool showDebugBorders(const WebCore::GraphicsLayer*) const;
-    virtual bool showRepaintCounter(const WebCore::GraphicsLayer*) const;
     virtual void didCommitChangesForLayer(const WebCore::GraphicsLayer*) const { }
 
     void createPageOverlayLayer();
index f5048a9..7d5b3be 100644 (file)
@@ -72,8 +72,6 @@ private:
     virtual void notifyAnimationStarted(const WebCore::GraphicsLayer*, double time) OVERRIDE;
     virtual void notifyFlushRequired(const WebCore::GraphicsLayer*) OVERRIDE;
     virtual void paintContents(const WebCore::GraphicsLayer*, WebCore::GraphicsContext&, WebCore::GraphicsLayerPaintingPhase, const WebCore::IntRect& clipRect) OVERRIDE;
-    virtual bool showDebugBorders(const WebCore::GraphicsLayer*) const OVERRIDE;
-    virtual bool showRepaintCounter(const WebCore::GraphicsLayer*) const OVERRIDE;
     virtual float deviceScaleFactor() const OVERRIDE;
 
     // WebCore::LayerFlushSchedulerClient
index fcd72ca..cf5d23e 100644 (file)
@@ -273,16 +273,6 @@ void TiledCoreAnimationDrawingArea::paintContents(const GraphicsLayer* graphicsL
     m_webPage->drawPageOverlay(graphicsContext, clipRect);
 }
 
-bool TiledCoreAnimationDrawingArea::showDebugBorders(const GraphicsLayer*) const
-{
-    return m_webPage->corePage()->settings()->showDebugBorders();
-}
-
-bool TiledCoreAnimationDrawingArea::showRepaintCounter(const GraphicsLayer*) const
-{
-    return m_webPage->corePage()->settings()->showRepaintCounter();
-}
-
 float TiledCoreAnimationDrawingArea::deviceScaleFactor() const
 {
     return m_webPage->corePage()->deviceScaleFactor();