Changeset 172738 in webkit


Ignore:
Timestamp:
Aug 18, 2014 6:04:37 PM (10 years ago)
Author:
Simon Fraser
Message:

Provide default implementations of all GraphicsLayerClient methods
https://bugs.webkit.org/show_bug.cgi?id=136054

Reviewed by Tim Horton.
Source/WebCore:

Make none of the functions in GraphicsLayerClient pure virtual, since in many cases
subclasses don't need to provide their own implementations.

  • platform/graphics/GraphicsLayerClient.h:

(WebCore::GraphicsLayerClient::notifyAnimationStarted):
(WebCore::GraphicsLayerClient::notifyFlushRequired):
(WebCore::GraphicsLayerClient::paintContents):

  • rendering/RenderLayerCompositor.h:

Source/WebKit2:

Remove overrides which are no longer required.

  • WebProcess/WebPage/PageOverlayController.h:
  • WebProcess/WebPage/ServicesOverlayController.h:
  • WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
Location:
trunk/Source
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r172736 r172738  
     12014-08-18  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Provide default implementations of all GraphicsLayerClient methods
     4        https://bugs.webkit.org/show_bug.cgi?id=136054
     5
     6        Reviewed by Tim Horton.
     7
     8        Make none of the functions in GraphicsLayerClient pure virtual, since in many cases
     9        subclasses don't need to provide their own implementations.
     10
     11        * platform/graphics/GraphicsLayerClient.h:
     12        (WebCore::GraphicsLayerClient::notifyAnimationStarted):
     13        (WebCore::GraphicsLayerClient::notifyFlushRequired):
     14        (WebCore::GraphicsLayerClient::paintContents):
     15        * rendering/RenderLayerCompositor.h:
     16
    1172014-08-18  Pratik Solanki  <psolanki@apple.com>
    218
  • trunk/Source/WebCore/platform/graphics/GraphicsLayerClient.h

    r169161 r172738  
    6363   
    6464    // Callback for when hardware-accelerated animation started.
    65     virtual void notifyAnimationStarted(const GraphicsLayer*, double time) = 0;
     65    virtual void notifyAnimationStarted(const GraphicsLayer*, double /*time*/) { }
    6666
    6767    // Notification that a layer property changed that requires a subsequent call to flushCompositingState()
    6868    // to appear on the screen.
    69     virtual void notifyFlushRequired(const GraphicsLayer*) = 0;
     69    virtual void notifyFlushRequired(const GraphicsLayer*) { }
    7070   
    7171    // Notification that this layer requires a flush before the next display refresh.
    7272    virtual void notifyFlushBeforeDisplayRefresh(const GraphicsLayer*) { }
    7373
    74     virtual void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsLayerPaintingPhase, const FloatRect& inClip) = 0;
     74    virtual void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsLayerPaintingPhase, const FloatRect& /* inClip */) { }
    7575    virtual void didCommitChangesForLayer(const GraphicsLayer*) const { }
    7676
  • trunk/Source/WebCore/rendering/RenderLayerCompositor.h

    r171306 r172738  
    306306
    307307    // GraphicsLayerClient implementation
    308     virtual void notifyAnimationStarted(const GraphicsLayer*, double) override { }
    309308    virtual void notifyFlushRequired(const GraphicsLayer*) override;
    310309    virtual void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsLayerPaintingPhase, const FloatRect&) override;
  • trunk/Source/WebKit2/ChangeLog

    r172736 r172738  
     12014-08-18  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Provide default implementations of all GraphicsLayerClient methods
     4        https://bugs.webkit.org/show_bug.cgi?id=136054
     5
     6        Reviewed by Tim Horton.
     7       
     8        Remove overrides which are no longer required.
     9
     10        * WebProcess/WebPage/PageOverlayController.h:
     11        * WebProcess/WebPage/ServicesOverlayController.h:
     12        * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
     13
    1142014-08-18  Pratik Solanki  <psolanki@apple.com>
    215
  • trunk/Source/WebKit2/WebProcess/WebPage/PageOverlayController.h

    r172483 r172738  
    8383
    8484    // WebCore::GraphicsLayerClient
    85     virtual void notifyAnimationStarted(const WebCore::GraphicsLayer*, double) override { }
    8685    virtual void notifyFlushRequired(const WebCore::GraphicsLayer*) override;
    8786    virtual void paintContents(const WebCore::GraphicsLayer*, WebCore::GraphicsContext&, WebCore::GraphicsLayerPaintingPhase, const WebCore::FloatRect& clipRect) override;
    8887    virtual float deviceScaleFactor() const override;
    89     virtual void didCommitChangesForLayer(const WebCore::GraphicsLayer*) const override { }
    9088    virtual bool shouldSkipLayerInDump(const WebCore::GraphicsLayer*) const override { return true; }
    9189
  • trunk/Source/WebKit2/WebProcess/WebPage/ServicesOverlayController.h

    r172636 r172738  
    8585
    8686        // GraphicsLayerClient
    87         virtual void notifyAnimationStarted(const WebCore::GraphicsLayer*, double time) override { }
    8887        virtual void notifyFlushRequired(const WebCore::GraphicsLayer*) override;
    8988        virtual void paintContents(const WebCore::GraphicsLayer*, WebCore::GraphicsContext&, WebCore::GraphicsLayerPaintingPhase, const WebCore::FloatRect& inClip) override;
  • trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h

    r171154 r172738  
    106106    virtual bool adjustLayerFlushThrottling(WebCore::LayerFlushThrottleState::Flags) override;
    107107
    108     // GraphicsLayerClient
    109     virtual void notifyAnimationStarted(const WebCore::GraphicsLayer*, double time) override { }
    110     virtual void notifyFlushRequired(const WebCore::GraphicsLayer*) override { }
    111     virtual void paintContents(const WebCore::GraphicsLayer*, WebCore::GraphicsContext&, WebCore::GraphicsLayerPaintingPhase, const WebCore::FloatRect& inClip) override { }
    112 
    113108    void updateScrolledExposedRect();
    114109
Note: See TracChangeset for help on using the changeset viewer.