Changeset 133517 in webkit


Ignore:
Timestamp:
Nov 5, 2012 1:07:33 PM (11 years ago)
Author:
Simon Fraser
Message:

Fix layer borders to cleaning appear and disappear on switching
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:
Location:
trunk/Source
Files:
46 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r133502 r133517  
     12012-11-05  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Fix layer borders to cleaning appear and disappear on switching
     4        https://bugs.webkit.org/show_bug.cgi?id=101136
     5
     6        Reviewed by Sam Weinig.
     7
     8        GraphicsLayers decided whether to show layer borders based
     9        on a callback through the GraphicsLayerClient. This made it
     10        hard to manage state, resulting in a failure to cleanly
     11        hide layers when toggled off via the preference.
     12       
     13        Changed the layer border and repaint counter visibility to be bits
     14        stored on GraphicsLayer just like other properties, with getters
     15        and setters. RenderLayerBacking now updates these debug
     16        indicators when we update other compositing layer properties.
     17       
     18        In GraphicsLayerCA, avoid calling updateDebugIndicators() explicitly
     19        in several places by setting the change flag DebugIndicatorsChanged
     20        for properties whose values affect the appearance of the debug border.
     21
     22        Removed the GraphicsLayerClient methods showDebugBorders() and
     23        showRepaintCounter() which are no longer required.
     24
     25        * platform/graphics/GraphicsLayer.cpp:
     26        (WebCore::GraphicsLayer::GraphicsLayer):
     27        (WebCore::GraphicsLayer::updateDebugIndicators):
     28        * platform/graphics/GraphicsLayer.h:
     29        (WebCore::GraphicsLayer::setShowDebugBorder):
     30        (WebCore::GraphicsLayer::isShowingDebugBorder):
     31        (WebCore::GraphicsLayer::setShowRepaintCounter):
     32        (WebCore::GraphicsLayer::isShowingRepaintCounter):
     33        (WebCore::GraphicsLayer::repaintCount):
     34        (WebCore::GraphicsLayer::incrementRepaintCount):
     35        * platform/graphics/GraphicsLayerClient.h:
     36        * platform/graphics/ca/GraphicsLayerCA.cpp:
     37        (WebCore::GraphicsLayerCA::GraphicsLayerCA):
     38        (WebCore::GraphicsLayerCA::setMasksToBounds):
     39        (WebCore::GraphicsLayerCA::setDrawsContent):
     40        (WebCore::GraphicsLayerCA::platformCALayerShowRepaintCounter):
     41        (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
     42        (WebCore::GraphicsLayerCA::updateMasksToBounds):
     43        (WebCore::GraphicsLayerCA::updateLayerDrawsContent):
     44        (WebCore::GraphicsLayerCA::updateDebugBorder):
     45        (WebCore::GraphicsLayerCA::setShowDebugBorder):
     46        (WebCore::GraphicsLayerCA::setShowRepaintCounter):
     47        (WebCore::GraphicsLayerCA::swapFromOrToTiledLayer):
     48        (WebCore::GraphicsLayerCA::setupContentsLayer):
     49        (WebCore::GraphicsLayerCA::cloneLayer):
     50        * platform/graphics/ca/GraphicsLayerCA.h:
     51        (GraphicsLayerCA):
     52        (WebCore::GraphicsLayerCA::platformCALayerShowDebugBorders):
     53        * rendering/RenderLayerBacking.cpp:
     54        (WebCore::RenderLayerBacking::updateDebugIndicators):
     55        * rendering/RenderLayerBacking.h:
     56        (RenderLayerBacking):
     57        * rendering/RenderLayerCompositor.cpp:
     58        (WebCore::RenderLayerCompositor::updateBacking):
     59        * rendering/RenderLayerCompositor.h:
     60        (RenderLayerCompositor):
     61
    1622012-11-05  Genevieve Mak  <gmak@rim.com>
    263
  • trunk/Source/WebCore/platform/graphics/GraphicsLayer.cpp

    r133332 r133517  
    9090    , m_maintainsPixelAlignment(false)
    9191    , m_appliesPageScale(false)
     92    , m_showDebugBorder(false)
     93    , m_showRepaintCounter(false)
    9294    , m_paintingPhase(GraphicsLayerPaintAllWithOverflowClip)
    9395    , m_contentsOrientation(CompositingCoordinatesTopDown)
     
    375377void GraphicsLayer::updateDebugIndicators()
    376378{
    377     if (!GraphicsLayer::showDebugBorders())
     379    if (!isShowingDebugBorder())
    378380        return;
    379381
  • trunk/Source/WebCore/platform/graphics/GraphicsLayer.h

    r133332 r133517  
    353353    virtual PlatformLayer* platformLayer() const { return 0; }
    354354   
    355     void dumpLayer(TextStream&, int indent = 0, LayerTreeAsTextBehavior = LayerTreeAsTextBehaviorNormal) const;
    356 
    357     int repaintCount() const { return m_repaintCount; }
    358     int incrementRepaintCount() { return ++m_repaintCount; }
    359 
    360355    enum CompositingCoordinatesOrientation { CompositingCoordinatesTopDown, CompositingCoordinatesBottomUp };
    361356
     
    364359    CompositingCoordinatesOrientation contentsOrientation() const { return m_contentsOrientation; }
    365360
    366     bool showDebugBorders() const { return m_client ? m_client->showDebugBorders(this) : false; }
    367     bool showRepaintCounter() const { return m_client ? m_client->showRepaintCounter(this) : false; }
    368    
    369     void updateDebugIndicators();
    370    
     361    void dumpLayer(TextStream&, int indent = 0, LayerTreeAsTextBehavior = LayerTreeAsTextBehaviorNormal) const;
     362
     363    virtual void setShowDebugBorder(bool show) { m_showDebugBorder = show; }
     364    bool isShowingDebugBorder() const { return m_showDebugBorder; }
     365
     366    virtual void setShowRepaintCounter(bool show) { m_showRepaintCounter = show; }
     367    bool isShowingRepaintCounter() const { return m_showRepaintCounter; }
     368
     369    int repaintCount() const { return m_repaintCount; }
     370    int incrementRepaintCount() { return ++m_repaintCount; }
     371
    371372    virtual void setDebugBackgroundColor(const Color&) { }
    372373    virtual void setDebugBorder(const Color&, float /*borderWidth*/) { }
     374
    373375    // z-position is the z-equivalent of position(). It's only used for debugging purposes.
    374376    virtual float zPosition() const { return m_zPosition; }
     
    416418    static void setGraphicsLayerFactory(GraphicsLayerFactoryCallback);
    417419#endif
     420
     421    void updateDebugIndicators();
    418422
    419423protected:
     
    487491    bool m_maintainsPixelAlignment : 1;
    488492    bool m_appliesPageScale : 1; // Set for the layer which has the page scale applied to it.
    489 
     493    bool m_showDebugBorder : 1;
     494    bool m_showRepaintCounter : 1;
     495   
    490496    GraphicsLayerPaintingPhase m_paintingPhase;
    491497    CompositingCoordinatesOrientation m_contentsOrientation; // affects orientation of layer contents
  • trunk/Source/WebCore/platform/graphics/GraphicsLayerClient.h

    r133332 r133517  
    8383    virtual float pageScaleFactor() const { return 1; }
    8484
    85     virtual bool showDebugBorders(const GraphicsLayer*) const = 0;
    86     virtual bool showRepaintCounter(const GraphicsLayer*) const = 0;
    87 
    8885    virtual bool isTrackingRepaints() const { return false; }
    8986
  • trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp

    r133332 r133517  
    287287
    288288    m_layer = PlatformCALayer::create(layerType, this);
    289 
    290     updateDebugIndicators();
    291289    noteLayerPropertyChanged(ContentsScaleChanged);
    292290}
     
    521519
    522520    GraphicsLayer::setMasksToBounds(masksToBounds);
    523     noteLayerPropertyChanged(MasksToBoundsChanged);
     521    noteLayerPropertyChanged(MasksToBoundsChanged | DebugIndicatorsChanged);
    524522}
    525523
     
    530528
    531529    GraphicsLayer::setDrawsContent(drawsContent);
    532     noteLayerPropertyChanged(DrawsContentChanged);
     530    noteLayerPropertyChanged(DrawsContentChanged | DebugIndicatorsChanged);
    533531}
    534532
     
    10451043        return false;
    10461044   
    1047     return showRepaintCounter();
     1045    return isShowingRepaintCounter();
    10481046}
    10491047
     
    11511149    if (m_uncommittedChanges & AcceleratesDrawingChanged)
    11521150        updateAcceleratesDrawing();
     1151
     1152    if (m_uncommittedChanges & DebugIndicatorsChanged)
     1153        updateDebugBorder();
    11531154
    11541155    if (m_uncommittedChanges & ChildrenChanged) {
     
    13441345            it->value->setMasksToBounds(m_masksToBounds);
    13451346    }
    1346 
    1347     updateDebugIndicators();
    13481347}
    13491348
     
    15291528        }
    15301529    }
    1531     updateDebugIndicators();
    15321530}
    15331531
     
    15351533{
    15361534    m_layer->setAcceleratesDrawing(m_acceleratesDrawing);
     1535}
     1536
     1537void GraphicsLayerCA::updateDebugBorder()
     1538{
     1539    if (isShowingDebugBorder())
     1540        updateDebugIndicators();
     1541    else
     1542        m_layer->setBorderWidth(0);
    15371543}
    15381544
     
    24992505}
    25002506
     2507void GraphicsLayerCA::setShowDebugBorder(bool showBorder)
     2508{
     2509    if (showBorder == m_showDebugBorder)
     2510        return;
     2511
     2512    GraphicsLayer::setShowDebugBorder(showBorder);
     2513    noteLayerPropertyChanged(DebugIndicatorsChanged);
     2514}
     2515
     2516void GraphicsLayerCA::setShowRepaintCounter(bool showCounter)
     2517{
     2518    if (showCounter == m_showRepaintCounter)
     2519        return;
     2520
     2521    GraphicsLayer::setShowRepaintCounter(showCounter);
     2522    noteLayerPropertyChanged(DebugIndicatorsChanged);
     2523}
     2524
    25012525void GraphicsLayerCA::setDebugBackgroundColor(const Color& color)
    25022526{   
     
    26122636        | ContentsScaleChanged
    26132637        | AcceleratesDrawingChanged
    2614 #if ENABLE(CSS_FILTERS)
    26152638        | FiltersChanged
    2616 #endif
    2617         | OpacityChanged;
     2639        | OpacityChanged
     2640        | DebugIndicatorsChanged;
    26182641   
    26192642#ifndef NDEBUG
     
    26272650    // need to tell new layer to draw itself
    26282651    setNeedsDisplay();
    2629    
    2630     updateDebugIndicators();
    26312652}
    26322653
     
    26522673        contentsLayer->setAnchorPoint(FloatPoint3D());
    26532674
    2654     if (showDebugBorders()) {
     2675    if (isShowingDebugBorder()) {
    26552676        contentsLayer->setBorderColor(Color(0, 0, 128, 180));
    26562677        contentsLayer->setBorderWidth(1.0f);
     
    28472868    }
    28482869   
    2849     if (showDebugBorders()) {
     2870    if (isShowingDebugBorder()) {
    28502871        newLayer->setBorderColor(Color(255, 122, 251));
    28512872        newLayer->setBorderWidth(2);
  • trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h

    r132301 r133517  
    122122    virtual bool hasContentsLayer() const { return m_contentsLayer; }
    123123   
     124    virtual void setShowDebugBorder(bool) OVERRIDE;
     125    virtual void setShowRepaintCounter(bool) OVERRIDE;
     126
    124127    virtual void setDebugBackgroundColor(const Color&);
    125128    virtual void setDebugBorder(const Color&, float borderWidth);
     
    153156    virtual CompositingCoordinatesOrientation platformCALayerContentsOrientation() const { return contentsOrientation(); }
    154157    virtual void platformCALayerPaintContents(GraphicsContext&, const IntRect& clip);
    155     virtual bool platformCALayerShowDebugBorders() const { return showDebugBorders(); }
     158    virtual bool platformCALayerShowDebugBorders() const { return isShowingDebugBorder(); }
    156159    virtual bool platformCALayerShowRepaintCounter(PlatformCALayer*) const;
    157160    virtual int platformCALayerIncrementRepaintCount() { return incrementRepaintCount(); }
     
    327330    void updateContentsNeedsDisplay();
    328331    void updateAcceleratesDrawing();
     332    void updateDebugBorder();
    329333    void updateVisibleRect(const FloatRect& oldVisibleRect);
    330334    void updateContentsScale(float pixelAlignmentScale, const FloatPoint& positionRelativeToBase);
     
    378382        ContentsVisibilityChanged = 1 << 24,
    379383        VisibleRectChanged = 1 << 25,
    380 #if ENABLE(CSS_FILTERS)
    381384        FiltersChanged = 1 << 26,
    382 #endif
     385        DebugIndicatorsChanged = 1 << 27
    383386    };
    384387    typedef unsigned LayerChangeFlags;
  • trunk/Source/WebCore/platform/graphics/chromium/GraphicsLayerChromium.cpp

    r133499 r133517  
    849849        m_layer->layer()->insertChild(m_contentsLayer, 0);
    850850
    851         if (showDebugBorders()) {
     851        if (isShowingDebugBorder()) {
    852852            m_contentsLayer->setDebugBorderColor(Color(0, 0, 128, 180).rgb());
    853853            m_contentsLayer->setDebugBorderWidth(1);
  • trunk/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp

    r133047 r133517  
    130130    layer->paintGraphicsLayerContents(*context, dirtyRect);
    131131
    132     if (layer->showRepaintCounter()) {
     132    if (layer->isShowingRepaintCounter()) {
    133133        layer->incrementRepaintCount();
    134134        drawRepaintCounter(context, layer);
     
    139139    backingStore->updateContents(textureMapper, image.get(), m_size, dirtyRect, BitmapTexture::UpdateCanModifyOriginalImageData);
    140140
    141     backingStore->setShowDebugBorders(layer->showDebugBorders());
     141    backingStore->setShowDebugBorders(layer->isShowingDebugBorder());
    142142    backingStore->setDebugBorder(m_debugBorderColor, m_debugBorderWidth);
    143143
     
    618618
    619619    static const int repaintCountBorderWidth = 10;
    620     setSourceRGBAFromColor(cr, layer->showDebugBorders() ? m_debugBorderColor : Color(0, 255, 0, 127));
     620    setSourceRGBAFromColor(cr, layer->isShowingDebugBorder() ? m_debugBorderColor : Color(0, 255, 0, 127));
    621621    cairo_rectangle(cr, 0, 0,
    622622                    repaintTextExtents.width + (repaintCountBorderWidth * 2),
  • trunk/Source/WebCore/rendering/RenderLayerBacking.cpp

    r133332 r133517  
    204204}
    205205
     206void RenderLayerBacking::updateDebugIndicators(bool showBorder, bool showRepaintCounter)
     207{
     208    m_graphicsLayer->setShowDebugBorder(showBorder);
     209    m_graphicsLayer->setShowRepaintCounter(showRepaintCounter);
     210   
     211    if (m_ancestorClippingLayer)
     212        m_ancestorClippingLayer->setShowDebugBorder(showBorder);
     213
     214    if (m_foregroundLayer) {
     215        m_foregroundLayer->setShowDebugBorder(showBorder);
     216        m_foregroundLayer->setShowRepaintCounter(showRepaintCounter);
     217    }
     218
     219    if (m_maskLayer) {
     220        m_maskLayer->setShowDebugBorder(showBorder);
     221        m_maskLayer->setShowRepaintCounter(showRepaintCounter);
     222    }
     223
     224    if (m_scrollingLayer)
     225        m_scrollingLayer->setShowDebugBorder(showBorder);
     226
     227    if (m_scrollingContentsLayer)
     228        m_scrollingContentsLayer->setShowDebugBorder(showBorder);
     229}
     230
    206231void RenderLayerBacking::createPrimaryGraphicsLayer()
    207232{
     
    15871612}
    15881613
    1589 bool RenderLayerBacking::showDebugBorders(const GraphicsLayer*) const
    1590 {
    1591     return compositor() ? compositor()->compositorShowDebugBorders() : false;
    1592 }
    1593 
    1594 bool RenderLayerBacking::showRepaintCounter(const GraphicsLayer*) const
    1595 {
    1596     return compositor() ? compositor()->compositorShowRepaintCounter() : false;
    1597 }
    1598 
    15991614bool RenderLayerBacking::isTrackingRepaints() const
    16001615{
  • trunk/Source/WebCore/rendering/RenderLayerBacking.h

    r133332 r133517  
    142142    void adjustTileCacheCoverage();
    143143   
     144    void updateDebugIndicators(bool showBorder, bool showRepaintCounter);
     145   
    144146    // GraphicsLayerClient interface
    145147    virtual bool shouldUseTileCache(const GraphicsLayer*) const OVERRIDE;
     
    154156    virtual void didCommitChangesForLayer(const GraphicsLayer*) const OVERRIDE;
    155157    virtual bool getCurrentTransform(const GraphicsLayer*, TransformationMatrix&) const OVERRIDE;
    156 
    157     virtual bool showDebugBorders(const GraphicsLayer*) const OVERRIDE;
    158     virtual bool showRepaintCounter(const GraphicsLayer*) const OVERRIDE;
    159158
    160159    virtual bool isTrackingRepaints() const OVERRIDE;
  • trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp

    r133332 r133517  
    584584            scrollingCoordinator->frameViewFixedObjectsDidChange(m_renderView->frameView());
    585585    }
     586   
     587    if (layer->backing())
     588        layer->backing()->updateDebugIndicators(m_showDebugBorders, m_showRepaintCounter);
     589
    586590    return layerChanged;
    587591}
     
    20452049}
    20462050
    2047 bool RenderLayerCompositor::showDebugBorders(const GraphicsLayer* layer) const
    2048 {
    2049     if (layer == m_layerForHorizontalScrollbar || layer == m_layerForVerticalScrollbar || layer == m_layerForScrollCorner)
    2050         return m_showDebugBorders;
    2051 
    2052     return false;
    2053 }
    2054 
    2055 bool RenderLayerCompositor::showRepaintCounter(const GraphicsLayer* layer) const
    2056 {
    2057     if (layer == m_layerForHorizontalScrollbar || layer == m_layerForVerticalScrollbar || layer == m_layerForScrollCorner)
    2058         return m_showDebugBorders;
    2059 
    2060     return false;
    2061 }
    2062 
    20632051bool RenderLayerCompositor::isTrackingRepaints() const
    20642052{
  • trunk/Source/WebCore/rendering/RenderLayerCompositor.h

    r133332 r133517  
    203203    String layerTreeAsText(LayerTreeFlags);
    204204
    205     // These are named to avoid conflicts with the functions in GraphicsLayerClient
    206     // These return the actual internal variables.
    207     bool compositorShowDebugBorders() const { return m_showDebugBorders; }
    208     bool compositorShowRepaintCounter() const { return m_showRepaintCounter; }
    209 
    210205    virtual float deviceScaleFactor() const OVERRIDE;
    211206    virtual float pageScaleFactor() const OVERRIDE;
     
    239234    virtual void notifyFlushRequired(const GraphicsLayer*) OVERRIDE { scheduleLayerFlush(); }
    240235    virtual void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsLayerPaintingPhase, const IntRect&) OVERRIDE;
    241 
    242     virtual bool showDebugBorders(const GraphicsLayer*) const OVERRIDE;
    243     virtual bool showRepaintCounter(const GraphicsLayer*) const OVERRIDE;
    244236
    245237    virtual bool isTrackingRepaints() const OVERRIDE;
  • trunk/Source/WebKit/blackberry/Api/WebOverlay_p.h

    r130439 r133517  
    168168    virtual void notifyFlushRequired(const WebCore::GraphicsLayer*);
    169169    virtual void paintContents(const WebCore::GraphicsLayer*, WebCore::GraphicsContext&, WebCore::GraphicsLayerPaintingPhase, const WebCore::IntRect& inClip);
    170     virtual bool showDebugBorders(const WebCore::GraphicsLayer*) const { return false; }
    171     virtual bool showRepaintCounter(const WebCore::GraphicsLayer*) const { return false; }
    172170    virtual bool contentsVisible(const WebCore::GraphicsLayer*, const WebCore::IntRect& contentRect) const { return true; }
    173171
  • trunk/Source/WebKit/blackberry/Api/WebPage.cpp

    r133502 r133517  
    57345734    scheduleRootLayerCommit();
    57355735}
    5736 
    5737 bool WebPagePrivate::showDebugBorders(const GraphicsLayer*) const
    5738 {
    5739     return m_page->settings()->showDebugBorders();
    5740 }
    5741 
    5742 bool WebPagePrivate::showRepaintCounter(const GraphicsLayer*) const
    5743 {
    5744     return m_page->settings()->showRepaintCounter();
    5745 }
    57465736#endif // USE(ACCELERATED_COMPOSITING)
    57475737
  • trunk/Source/WebKit/blackberry/Api/WebPage_p.h

    r133477 r133517  
    402402    virtual void notifyFlushRequired(const WebCore::GraphicsLayer*);
    403403    virtual void paintContents(const WebCore::GraphicsLayer*, WebCore::GraphicsContext&, WebCore::GraphicsLayerPaintingPhase, const WebCore::IntRect& inClip) { }
    404     virtual bool showDebugBorders(const WebCore::GraphicsLayer*) const;
    405     virtual bool showRepaintCounter(const WebCore::GraphicsLayer*) const;
    406404
    407405    // WebKit thread, plumbed through from ChromeClientBlackBerry.
  • trunk/Source/WebKit/blackberry/ChangeLog

    r133515 r133517  
     12012-11-05  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Fix layer borders to cleaning appear and disappear on switching
     4        https://bugs.webkit.org/show_bug.cgi?id=101136
     5
     6        Reviewed by Sam Weinig.
     7
     8        Remove the GraphicsLayerClient methods showDebugBorders() and
     9        showRepaintCounter().
     10
     11        * Api/WebOverlay_p.h:
     12        (WebOverlayPrivateWebKitThread):
     13        * Api/WebPage.cpp:
     14        (BlackBerry::WebKit::WebPagePrivate::notifyFlushRequired):
     15        * Api/WebPage_p.h:
     16        * WebKitSupport/DefaultTapHighlight.cpp:
     17        * WebKitSupport/DefaultTapHighlight.h:
     18        (DefaultTapHighlight):
     19        * WebKitSupport/InspectorOverlayBlackBerry.cpp:
     20        * WebKitSupport/InspectorOverlayBlackBerry.h:
     21        (InspectorOverlay):
     22        * WebKitSupport/SelectionOverlay.cpp:
     23        * WebKitSupport/SelectionOverlay.h:
     24        (SelectionOverlay):
     25
    1262012-11-05  Rob Buis  <rbuis@rim.com>
    227
  • trunk/Source/WebKit/blackberry/WebKitSupport/DefaultTapHighlight.cpp

    r130439 r133517  
    149149}
    150150
    151 bool DefaultTapHighlight::showDebugBorders(const GraphicsLayer* layer) const
    152 {
    153     return m_page->showDebugBorders(layer);
    154 }
    155 
    156 bool DefaultTapHighlight::showRepaintCounter(const GraphicsLayer* layer) const
    157 {
    158     return m_page->showRepaintCounter(layer);
    159 }
    160 
    161151bool DefaultTapHighlight::contentsVisible(const GraphicsLayer*, const IntRect& contentRect) const
    162152{
  • trunk/Source/WebKit/blackberry/WebKitSupport/DefaultTapHighlight.h

    r130439 r133517  
    5858    virtual void notifyFlushRequired(const WebCore::GraphicsLayer*);
    5959    virtual void paintContents(const WebCore::GraphicsLayer*, WebCore::GraphicsContext&, WebCore::GraphicsLayerPaintingPhase, const WebCore::IntRect& inClip);
    60     virtual bool showDebugBorders(const WebCore::GraphicsLayer*) const;
    61     virtual bool showRepaintCounter(const WebCore::GraphicsLayer*) const;
    6260    virtual bool contentsVisible(const WebCore::GraphicsLayer*, const WebCore::IntRect& contentRect) const;
    6361
  • trunk/Source/WebKit/blackberry/WebKitSupport/InspectorOverlayBlackBerry.cpp

    r130439 r133517  
    5757}
    5858
    59 bool InspectorOverlay::showDebugBorders(const WebCore::GraphicsLayer* layer) const
    60 {
    61     return m_webPage->showDebugBorders(layer);
    62 }
    63 
    64 bool InspectorOverlay::showRepaintCounter(const WebCore::GraphicsLayer* layer) const
    65 {
    66     return m_webPage->showRepaintCounter(layer);
    67 }
    6859#endif
    6960
  • trunk/Source/WebKit/blackberry/WebKitSupport/InspectorOverlayBlackBerry.h

    r130439 r133517  
    5555    virtual void notifyFlushRequired(const WebCore::GraphicsLayer*);
    5656    virtual void paintContents(const WebCore::GraphicsLayer*, WebCore::GraphicsContext&, WebCore::GraphicsLayerPaintingPhase, const WebCore::IntRect& inClip);
    57     virtual bool showDebugBorders(const WebCore::GraphicsLayer*) const;
    58     virtual bool showRepaintCounter(const WebCore::GraphicsLayer*) const;
    5957#endif
    6058
  • trunk/Source/WebKit/blackberry/WebKitSupport/SelectionOverlay.cpp

    r132224 r133517  
    118118}
    119119
    120 bool SelectionOverlay::showDebugBorders(const GraphicsLayer* layer) const
    121 {
    122     return m_page->showDebugBorders(layer);
    123 }
    124 
    125 bool SelectionOverlay::showRepaintCounter(const GraphicsLayer* layer) const
    126 {
    127     return m_page->showRepaintCounter(layer);
    128 }
    129 
    130120} // namespace WebKit
    131121} // namespace BlackBerry
  • trunk/Source/WebKit/blackberry/WebKitSupport/SelectionOverlay.h

    r132224 r133517  
    5353    virtual void notifyFlushRequired(const WebCore::GraphicsLayer*);
    5454    virtual void paintContents(const WebCore::GraphicsLayer*, WebCore::GraphicsContext&, WebCore::GraphicsLayerPaintingPhase, const WebCore::IntRect& inClip);
    55     virtual bool showDebugBorders(const WebCore::GraphicsLayer*) const;
    56     virtual bool showRepaintCounter(const WebCore::GraphicsLayer*) const;
    5755
    5856private:
  • trunk/Source/WebKit/chromium/ChangeLog

    r133503 r133517  
     12012-11-05  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Fix layer borders to cleaning appear and disappear on switching
     4        https://bugs.webkit.org/show_bug.cgi?id=101136
     5
     6        Reviewed by Sam Weinig.
     7
     8        Remove the GraphicsLayerClient methods showDebugBorders() and
     9        showRepaintCounter().
     10
     11        * src/NonCompositedContentHost.cpp:
     12        * src/NonCompositedContentHost.h:
     13        (NonCompositedContentHost):
     14        * src/PageOverlay.cpp:
     15        * tests/GraphicsLayerChromiumTest.cpp:
     16        * tests/ImageLayerChromiumTest.cpp:
     17
    1182012-11-05  Bo Liu  <boliu@chromium.org>
    219
  • trunk/Source/WebKit/chromium/src/NonCompositedContentHost.cpp

    r133499 r133517  
    192192}
    193193
    194 bool NonCompositedContentHost::showDebugBorders(const WebCore::GraphicsLayer*) const
    195 {
    196     return m_showDebugBorders;
    197 }
    198 
    199 bool NonCompositedContentHost::showRepaintCounter(const WebCore::GraphicsLayer*) const
    200 {
    201     return false;
    202 }
    203 
    204194bool NonCompositedContentHost::isTrackingRepaints() const
    205195{
  • trunk/Source/WebKit/chromium/src/NonCompositedContentHost.h

    r133499 r133517  
    7272    virtual void notifyFlushRequired(const WebCore::GraphicsLayer*);
    7373    virtual void paintContents(const WebCore::GraphicsLayer*, WebCore::GraphicsContext&, WebCore::GraphicsLayerPaintingPhase, const WebCore::IntRect& clipRect);
    74     virtual bool showDebugBorders(const WebCore::GraphicsLayer*) const;
    75     virtual bool showRepaintCounter(const WebCore::GraphicsLayer*) const;
    7674    virtual bool isTrackingRepaints() const;
    7775
  • trunk/Source/WebKit/chromium/src/PageOverlay.cpp

    r130439 r133517  
    9595    }
    9696
    97     virtual bool showDebugBorders(const GraphicsLayer*) const
    98     {
    99         return m_webViewImpl->page()->settings()->showDebugBorders();
    100     }
    101 
    102     virtual bool showRepaintCounter(const GraphicsLayer*) const
    103     {
    104         return m_webViewImpl->page()->settings()->showRepaintCounter();
    105     }
    106 
    10797private:
    10898    OverlayGraphicsLayerClientImpl(WebViewImpl* webViewImpl, WebPageOverlay* overlay)
  • trunk/Source/WebKit/chromium/tests/GraphicsLayerChromiumTest.cpp

    r131962 r133517  
    5353    virtual void notifyFlushRequired(const GraphicsLayer*) OVERRIDE { }
    5454    virtual void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsLayerPaintingPhase, const IntRect& inClip) OVERRIDE { }
    55     virtual bool showDebugBorders(const GraphicsLayer*) const OVERRIDE { return false; }
    56     virtual bool showRepaintCounter(const GraphicsLayer*) const OVERRIDE { return false; }
    5755    virtual float deviceScaleFactor() const OVERRIDE { return 2; }
    5856};
  • trunk/Source/WebKit/chromium/tests/ImageLayerChromiumTest.cpp

    r130439 r133517  
    4141    virtual void notifyFlushRequired(const GraphicsLayer*) { }
    4242    virtual void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsLayerPaintingPhase, const IntRect& inClip) { }
    43     virtual bool showDebugBorders(const GraphicsLayer*) const { return false; }
    44     virtual bool showRepaintCounter(const GraphicsLayer*) const { return false; }
    4543};
    4644
  • trunk/Source/WebKit/gtk/ChangeLog

    r133389 r133517  
     12012-11-05  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Fix layer borders to cleaning appear and disappear on switching
     4        https://bugs.webkit.org/show_bug.cgi?id=101136
     5
     6        Reviewed by Sam Weinig.
     7
     8        Remove the GraphicsLayerClient methods showDebugBorders() and
     9        showRepaintCounter().
     10
     11        * WebCoreSupport/AcceleratedCompositingContext.h:
     12        (AcceleratedCompositingContext):
     13        * WebCoreSupport/AcceleratedCompositingContextCairo.cpp:
     14        * WebCoreSupport/AcceleratedCompositingContextClutter.cpp:
     15        * WebCoreSupport/AcceleratedCompositingContextGL.cpp:
     16
    1172012-10-25  Martin Robinson  <mrobinson@igalia.com>
    218
  • trunk/Source/WebKit/gtk/WebCoreSupport/AcceleratedCompositingContext.h

    r130439 r133517  
    6161    virtual void notifyFlushRequired(const WebCore::GraphicsLayer*);
    6262    virtual void paintContents(const WebCore::GraphicsLayer*, WebCore::GraphicsContext&, WebCore::GraphicsLayerPaintingPhase, const WebCore::IntRect& rectToPaint);
    63     virtual bool showDebugBorders(const WebCore::GraphicsLayer*) const;
    64     virtual bool showRepaintCounter(const WebCore::GraphicsLayer*) const;
    6563
    6664    void initialize();
  • trunk/Source/WebKit/gtk/WebCoreSupport/AcceleratedCompositingContextCairo.cpp

    r130439 r133517  
    170170}
    171171
    172 bool AcceleratedCompositingContext::showDebugBorders(const GraphicsLayer*) const
    173 {
    174     return false;
    175 }
    176 
    177 bool AcceleratedCompositingContext::showRepaintCounter(const GraphicsLayer*) const
    178 {
    179     return false;
    180 }
    181 
    182172} // namespace WebKit
    183173
  • trunk/Source/WebKit/gtk/WebCoreSupport/AcceleratedCompositingContextClutter.cpp

    r130439 r133517  
    166166}
    167167
    168 bool AcceleratedCompositingContext::showDebugBorders(const WebCore::GraphicsLayer*) const
    169 {
    170     ASSERT_NOT_REACHED();
    171     return false;
    172 }
    173 
    174 bool AcceleratedCompositingContext::showRepaintCounter(const WebCore::GraphicsLayer*) const
    175 {
    176     ASSERT_NOT_REACHED();
    177     return false;
    178 }
    179 
    180168} // namespace WebKit
    181169
  • trunk/Source/WebKit/gtk/WebCoreSupport/AcceleratedCompositingContextGL.cpp

    r130439 r133517  
    384384}
    385385
    386 bool AcceleratedCompositingContext::showDebugBorders(const GraphicsLayer*) const
    387 {
    388     return false;
    389 }
    390 
    391 bool AcceleratedCompositingContext::showRepaintCounter(const GraphicsLayer*) const
    392 {
    393     return false;
    394 }
    395 
    396386} // namespace WebKit
    397387
  • trunk/Source/WebKit/win/ChangeLog

    r132916 r133517  
     12012-11-05  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Fix layer borders to cleaning appear and disappear on switching
     4        https://bugs.webkit.org/show_bug.cgi?id=101136
     5
     6        Reviewed by Sam Weinig.
     7
     8        Remove the GraphicsLayerClient methods showDebugBorders() and
     9        showRepaintCounter().
     10
     11        * WebView.cpp:
     12        * WebView.h:
     13
    1142012-10-29  Anders Carlsson  <andersca@apple.com>
    215
  • trunk/Source/WebKit/win/WebView.cpp

    r132916 r133517  
    66466646}
    66476647
    6648 bool WebView::showDebugBorders(const GraphicsLayer*) const
    6649 {
    6650     return m_page->settings()->showDebugBorders();
    6651 }
    6652 
    6653 bool WebView::showRepaintCounter(const GraphicsLayer*) const
    6654 {
    6655     return m_page->settings()->showRepaintCounter();
    6656 }
    6657 
    66586648void WebView::flushPendingGraphicsLayerChanges()
    66596649{
  • trunk/Source/WebKit/win/WebView.h

    r130439 r133517  
    10211021    virtual void notifyFlushRequired(const WebCore::GraphicsLayer*);
    10221022    virtual void paintContents(const WebCore::GraphicsLayer*, WebCore::GraphicsContext&, WebCore::GraphicsLayerPaintingPhase, const WebCore::IntRect& inClip);
    1023     virtual bool showDebugBorders(const WebCore::GraphicsLayer*) const;
    1024     virtual bool showRepaintCounter(const WebCore::GraphicsLayer*) const;
    10251023
    10261024    // CACFLayerTreeHostClient
  • trunk/Source/WebKit2/ChangeLog

    r133464 r133517  
     12012-11-05  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Fix layer borders to cleaning appear and disappear on switching
     4        https://bugs.webkit.org/show_bug.cgi?id=101136
     5
     6        Reviewed by Sam Weinig.
     7       
     8        Remove the GraphicsLayerClient methods showDebugBorders() and
     9        showRepaintCounter().
     10       
     11        * UIProcess/CoordinatedGraphics/LayerTreeRenderer.h:
     12        * WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp:
     13        * WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.h:
     14        (LayerTreeCoordinator):
     15        * WebProcess/WebPage/ca/LayerTreeHostCA.cpp:
     16        * WebProcess/WebPage/ca/LayerTreeHostCA.h:
     17        (LayerTreeHostCA):
     18        * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
     19        * WebProcess/WebPage/gtk/LayerTreeHostGtk.h:
     20        (LayerTreeHostGtk):
     21        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
     22        (TiledCoreAnimationDrawingArea):
     23        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
     24
    1252012-11-05  Yael Aharon  <yael.aharon@intel.com>
    226
  • trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/LayerTreeRenderer.h

    r133182 r133517  
    109109    virtual void notifyAnimationStarted(const WebCore::GraphicsLayer*, double) { }
    110110    virtual void notifyFlushRequired(const WebCore::GraphicsLayer*) { }
    111     virtual bool showDebugBorders(const WebCore::GraphicsLayer*) const { return false; }
    112     virtual bool showRepaintCounter(const WebCore::GraphicsLayer*) const { return false; }
    113111    void paintContents(const WebCore::GraphicsLayer*, WebCore::GraphicsContext&, WebCore::GraphicsLayerPaintingPhase, const WebCore::IntRect&) { }
    114112    void updateViewport();
  • trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp

    r133270 r133517  
    579579}
    580580
    581 bool LayerTreeCoordinator::showDebugBorders(const WebCore::GraphicsLayer*) const
    582 {
    583     return m_webPage->corePage()->settings()->showDebugBorders();
    584 }
    585 
    586 bool LayerTreeCoordinator::showRepaintCounter(const WebCore::GraphicsLayer*) const
    587 {
    588     return m_webPage->corePage()->settings()->showRepaintCounter();
    589 }
    590 
    591581PassOwnPtr<GraphicsLayer> LayerTreeCoordinator::createGraphicsLayer(GraphicsLayerClient* client)
    592582{
  • trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.h

    r133270 r133517  
    113113    virtual void notifyFlushRequired(const WebCore::GraphicsLayer*);
    114114    virtual void paintContents(const WebCore::GraphicsLayer*, WebCore::GraphicsContext&, WebCore::GraphicsLayerPaintingPhase, const WebCore::IntRect& clipRect);
    115     virtual bool showDebugBorders(const WebCore::GraphicsLayer*) const;
    116     virtual bool showRepaintCounter(const WebCore::GraphicsLayer*) const;
    117115
    118116    // GraphicsLayerFactory
  • trunk/Source/WebKit2/WebProcess/WebPage/ca/LayerTreeHostCA.cpp

    r130439 r133517  
    204204}
    205205
    206 bool LayerTreeHostCA::showDebugBorders(const GraphicsLayer*) const
    207 {
    208     return m_webPage->corePage()->settings()->showDebugBorders();
    209 }
    210 
    211 bool LayerTreeHostCA::showRepaintCounter(const GraphicsLayer*) const
    212 {
    213     return m_webPage->corePage()->settings()->showRepaintCounter();
    214 }
    215 
    216206float LayerTreeHostCA::deviceScaleFactor() const
    217207{
  • trunk/Source/WebKit2/WebProcess/WebPage/ca/LayerTreeHostCA.h

    r130439 r133517  
    7777    virtual void notifyFlushRequired(const WebCore::GraphicsLayer*);
    7878    virtual void paintContents(const WebCore::GraphicsLayer*, WebCore::GraphicsContext&, WebCore::GraphicsLayerPaintingPhase, const WebCore::IntRect& clipRect);
    79     virtual bool showDebugBorders(const WebCore::GraphicsLayer*) const;
    80     virtual bool showRepaintCounter(const WebCore::GraphicsLayer*) const;
    8179    virtual float deviceScaleFactor() const;
    8280    virtual void didCommitChangesForLayer(const WebCore::GraphicsLayer*) const { }
  • trunk/Source/WebKit2/WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp

    r130525 r133517  
    259259}
    260260
    261 bool LayerTreeHostGtk::showDebugBorders(const GraphicsLayer*) const
    262 {
    263     return m_webPage->corePage()->settings()->showDebugBorders();
    264 }
    265 
    266 bool LayerTreeHostGtk::showRepaintCounter(const GraphicsLayer*) const
    267 {
    268     return m_webPage->corePage()->settings()->showRepaintCounter();
    269 }
    270 
    271261gboolean LayerTreeHostGtk::layerFlushTimerFiredCallback(LayerTreeHostGtk* layerTreeHost)
    272262{
  • trunk/Source/WebKit2/WebProcess/WebPage/gtk/LayerTreeHostGtk.h

    r130439 r133517  
    7878    virtual void notifyFlushRequired(const WebCore::GraphicsLayer*);
    7979    virtual void paintContents(const WebCore::GraphicsLayer*, WebCore::GraphicsContext&, WebCore::GraphicsLayerPaintingPhase, const WebCore::IntRect& clipRect);
    80     virtual bool showDebugBorders(const WebCore::GraphicsLayer*) const;
    81     virtual bool showRepaintCounter(const WebCore::GraphicsLayer*) const;
    8280    virtual void didCommitChangesForLayer(const WebCore::GraphicsLayer*) const { }
    8381
  • trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h

    r130439 r133517  
    7373    virtual void notifyFlushRequired(const WebCore::GraphicsLayer*) OVERRIDE;
    7474    virtual void paintContents(const WebCore::GraphicsLayer*, WebCore::GraphicsContext&, WebCore::GraphicsLayerPaintingPhase, const WebCore::IntRect& clipRect) OVERRIDE;
    75     virtual bool showDebugBorders(const WebCore::GraphicsLayer*) const OVERRIDE;
    76     virtual bool showRepaintCounter(const WebCore::GraphicsLayer*) const OVERRIDE;
    7775    virtual float deviceScaleFactor() const OVERRIDE;
    7876
  • trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm

    r130441 r133517  
    274274}
    275275
    276 bool TiledCoreAnimationDrawingArea::showDebugBorders(const GraphicsLayer*) const
    277 {
    278     return m_webPage->corePage()->settings()->showDebugBorders();
    279 }
    280 
    281 bool TiledCoreAnimationDrawingArea::showRepaintCounter(const GraphicsLayer*) const
    282 {
    283     return m_webPage->corePage()->settings()->showRepaintCounter();
    284 }
    285 
    286276float TiledCoreAnimationDrawingArea::deviceScaleFactor() const
    287277{
Note: See TracChangeset for help on using the changeset viewer.