Title: [133182] trunk/Source/WebKit2
Revision
133182
Author
commit-qu...@webkit.org
Date
2012-11-01 08:55:53 -0700 (Thu, 01 Nov 2012)

Log Message

Coordinated Graphics: Clean up headers of Coordinated Graphics.
https://bugs.webkit.org/show_bug.cgi?id=100907

Patch by Huang Dongsung <luxte...@company100.net> on 2012-11-01
Reviewed by Noam Rosenthal.

This patch performs:
1. Remove unused methods.
2. Change public methods to private if needed.
3. Put virtual, OVERRIDE and explicit keywords if needed.

* UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.h:
(LayerTreeCoordinatorProxy):
* UIProcess/CoordinatedGraphics/LayerTreeRenderer.h:
(LayerTreeRenderer):
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp:
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.h:
(CoordinatedGraphicsLayer):
(WebCore::CoordinatedGraphicsLayer::fixedToViewport):
(WebCore::CoordinatedGraphicsLayer::setMaskTarget):
* WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.h:
(LayerTreeCoordinator):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (133181 => 133182)


--- trunk/Source/WebKit2/ChangeLog	2012-11-01 15:51:20 UTC (rev 133181)
+++ trunk/Source/WebKit2/ChangeLog	2012-11-01 15:55:53 UTC (rev 133182)
@@ -1,3 +1,27 @@
+2012-11-01  Huang Dongsung  <luxte...@company100.net>
+
+        Coordinated Graphics: Clean up headers of Coordinated Graphics.
+        https://bugs.webkit.org/show_bug.cgi?id=100907
+
+        Reviewed by Noam Rosenthal.
+
+        This patch performs:
+        1. Remove unused methods.
+        2. Change public methods to private if needed.
+        3. Put virtual, OVERRIDE and explicit keywords if needed.
+
+        * UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.h:
+        (LayerTreeCoordinatorProxy):
+        * UIProcess/CoordinatedGraphics/LayerTreeRenderer.h:
+        (LayerTreeRenderer):
+        * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp:
+        * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.h:
+        (CoordinatedGraphicsLayer):
+        (WebCore::CoordinatedGraphicsLayer::fixedToViewport):
+        (WebCore::CoordinatedGraphicsLayer::setMaskTarget):
+        * WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.h:
+        (LayerTreeCoordinator):
+
 2012-11-01  Christophe Dumez  <christophe.du...@intel.com>
 
         [EFL][WK2] Add Ewk_Auth_Request API

Modified: trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.h (133181 => 133182)


--- trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.h	2012-11-01 15:51:20 UTC (rev 133181)
+++ trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.h	2012-11-01 15:55:53 UTC (rev 133182)
@@ -46,9 +46,11 @@
 class WebLayerUpdateInfo;
 
 class LayerTreeCoordinatorProxy {
+    WTF_MAKE_NONCOPYABLE(LayerTreeCoordinatorProxy);
+    WTF_MAKE_FAST_ALLOCATED;
 public:
-    LayerTreeCoordinatorProxy(DrawingAreaProxy*);
-    virtual ~LayerTreeCoordinatorProxy();
+    explicit LayerTreeCoordinatorProxy(DrawingAreaProxy*);
+    ~LayerTreeCoordinatorProxy();
     void setCompositingLayerState(WebLayerID, const WebLayerInfo&);
     void setCompositingLayerChildren(WebLayerID, const Vector<WebLayerID>&);
 #if ENABLE(CSS_FILTERS)

Modified: trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/LayerTreeRenderer.h (133181 => 133182)


--- trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/LayerTreeRenderer.h	2012-11-01 15:51:20 UTC (rev 133181)
+++ trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/LayerTreeRenderer.h	2012-11-01 15:55:53 UTC (rev 133182)
@@ -60,7 +60,7 @@
         {
         }
     };
-    LayerTreeRenderer(LayerTreeCoordinatorProxy*);
+    explicit LayerTreeRenderer(LayerTreeCoordinatorProxy*);
     virtual ~LayerTreeRenderer();
     void purgeGLResources();
     void paintToCurrentGLContext(const WebCore::TransformationMatrix&, float, const WebCore::FloatRect&, WebCore::TextureMapper::PaintFlags = 0);
@@ -75,7 +75,6 @@
 
     void detach();
     void appendUpdate(const Function<void()>&);
-    void updateViewport();
     void setActive(bool);
 
     void deleteLayer(WebLayerID);
@@ -95,7 +94,6 @@
     void setLayerAnimations(WebLayerID, const WebCore::GraphicsLayerAnimations&);
     void setAnimationsLocked(bool);
 
-
 #if ENABLE(REQUEST_ANIMATION_FRAME)
     void requestAnimationFrame();
     void animationFrameReady();
@@ -113,9 +111,17 @@
     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()>&);
     void adjustPositionForFixedLayers();
 
+    void assignImageToLayer(WebCore::GraphicsLayer*, int64_t imageID);
+    void ensureRootLayer();
+    void ensureLayer(WebLayerID);
+    void commitTileOperations();
+    void renderNextFrame();
+    void purgeBackingStores();
+
     typedef HashMap<WebLayerID, WebCore::GraphicsLayer*> LayerMap;
     WebCore::FloatSize m_contentsSize;
     WebCore::FloatRect m_visibleContentsRect;
@@ -134,16 +140,6 @@
     SurfaceBackingStoreMap m_surfaceBackingStores;
 #endif
 
-    void scheduleWebViewUpdate();
-    void synchronizeViewport();
-    void assignImageToLayer(WebCore::GraphicsLayer*, int64_t imageID);
-    void ensureRootLayer();
-    void ensureLayer(WebLayerID);
-    void commitTileOperations();
-    void syncAnimations();
-    void renderNextFrame();
-    void purgeBackingStores();
-
     LayerTreeCoordinatorProxy* m_layerTreeCoordinatorProxy;
     OwnPtr<WebCore::GraphicsLayer> m_rootLayer;
 

Modified: trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp (133181 => 133182)


--- trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp	2012-11-01 15:51:20 UTC (rev 133181)
+++ trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp	2012-11-01 15:55:53 UTC (rev 133182)
@@ -47,15 +47,6 @@
     return globalMap;
 }
 
-CoordinatedGraphicsLayer* CoordinatedGraphicsLayer::layerByID(WebKit::WebLayerID id)
-{
-    HashMap<WebLayerID, CoordinatedGraphicsLayer*>& table = layerByIDMap();
-    HashMap<WebLayerID, CoordinatedGraphicsLayer*>::iterator it = table.find(id);
-    if (it == table.end())
-        return 0;
-    return it->value;
-}
-
 static WebLayerID toWebLayerID(GraphicsLayer* layer)
 {
     return layer ? toCoordinatedGraphicsLayer(layer)->id() : 0;
@@ -138,11 +129,6 @@
     willBeDestroyed();
 }
 
-void CoordinatedGraphicsLayer::willBeDestroyed()
-{
-    GraphicsLayer::willBeDestroyed();
-}
-
 bool CoordinatedGraphicsLayer::setChildren(const Vector<GraphicsLayer*>& children)
 {
     bool ok = GraphicsLayer::setChildren(children);

Modified: trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.h (133181 => 133182)


--- trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.h	2012-11-01 15:51:20 UTC (rev 133181)
+++ trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.h	2012-11-01 15:55:53 UTC (rev 133182)
@@ -78,7 +78,7 @@
 
 namespace WebCore {
 
-class CoordinatedGraphicsLayer : public WebCore::GraphicsLayer
+class CoordinatedGraphicsLayer : public GraphicsLayer
     , public TiledBackingStoreClient
     , public WebKit::CoordinatedTileClient {
 public:
@@ -86,93 +86,110 @@
     virtual ~CoordinatedGraphicsLayer();
 
     // Reimplementations from GraphicsLayer.h.
-    bool setChildren(const Vector<GraphicsLayer*>&);
-    void addChild(GraphicsLayer*);
-    void addChildAtIndex(GraphicsLayer*, int);
-    void addChildAbove(GraphicsLayer*, GraphicsLayer*);
-    void addChildBelow(GraphicsLayer*, GraphicsLayer*);
-    bool replaceChild(GraphicsLayer*, GraphicsLayer*);
-    void removeFromParent();
-    void setPosition(const FloatPoint&);
-    void setAnchorPoint(const FloatPoint3D&);
-    void setSize(const FloatSize&);
-    void setTransform(const TransformationMatrix&);
-    void setChildrenTransform(const TransformationMatrix&);
-    void setPreserves3D(bool);
-    void setMasksToBounds(bool);
-    void setDrawsContent(bool);
-    void setContentsVisible(bool);
-    void setContentsOpaque(bool);
-    void setBackfaceVisibility(bool);
-    void setOpacity(float);
-    void setContentsRect(const IntRect&);
-    void setContentsToImage(Image*);
-    void setContentsToCanvas(PlatformLayer*);
-    void setMaskLayer(GraphicsLayer*);
-    void setReplicatedByLayer(GraphicsLayer*);
-    void setNeedsDisplay();
-    void setNeedsDisplayInRect(const FloatRect&);
-    void setContentsNeedsDisplay();
-    void setContentsScale(float);
-    void setVisibleContentRectTrajectoryVector(const FloatPoint&);
-    virtual void flushCompositingState(const FloatRect&);
-    virtual void flushCompositingStateForThisLayerOnly();
+    virtual bool setChildren(const Vector<GraphicsLayer*>&) OVERRIDE;
+    virtual void addChild(GraphicsLayer*) OVERRIDE;
+    virtual void addChildAtIndex(GraphicsLayer*, int) OVERRIDE;
+    virtual void addChildAbove(GraphicsLayer*, GraphicsLayer*) OVERRIDE;
+    virtual void addChildBelow(GraphicsLayer*, GraphicsLayer*) OVERRIDE;
+    virtual bool replaceChild(GraphicsLayer*, GraphicsLayer*) OVERRIDE;
+    virtual void removeFromParent() OVERRIDE;
+    virtual void setPosition(const FloatPoint&) OVERRIDE;
+    virtual void setAnchorPoint(const FloatPoint3D&) OVERRIDE;
+    virtual void setSize(const FloatSize&) OVERRIDE;
+    virtual void setTransform(const TransformationMatrix&) OVERRIDE;
+    virtual void setChildrenTransform(const TransformationMatrix&) OVERRIDE;
+    virtual void setPreserves3D(bool) OVERRIDE;
+    virtual void setMasksToBounds(bool) OVERRIDE;
+    virtual void setDrawsContent(bool) OVERRIDE;
+    virtual void setContentsVisible(bool) OVERRIDE;
+    virtual void setContentsOpaque(bool) OVERRIDE;
+    virtual void setBackfaceVisibility(bool) OVERRIDE;
+    virtual void setOpacity(float) OVERRIDE;
+    virtual void setContentsRect(const IntRect&) OVERRIDE;
+    virtual void setContentsToImage(Image*) OVERRIDE;
+    virtual void setContentsToCanvas(PlatformLayer*) OVERRIDE;
+    virtual void setMaskLayer(GraphicsLayer*) OVERRIDE;
+    virtual void setReplicatedByLayer(GraphicsLayer*) OVERRIDE;
+    virtual void setNeedsDisplay() OVERRIDE;
+    virtual void setNeedsDisplayInRect(const FloatRect&) OVERRIDE;
+    virtual void setContentsNeedsDisplay() OVERRIDE;
+    virtual void setContentsScale(float) OVERRIDE;
+    virtual void setVisibleContentRectTrajectoryVector(const FloatPoint&) OVERRIDE;
+    virtual void flushCompositingState(const FloatRect&) OVERRIDE;
+    virtual void flushCompositingStateForThisLayerOnly() OVERRIDE;
 #if ENABLE(CSS_FILTERS)
-    bool setFilters(const FilterOperations&);
+    virtual bool setFilters(const FilterOperations&) OVERRIDE;
 #endif
+    virtual bool addAnimation(const KeyframeValueList&, const IntSize&, const Animation*, const String&, double) OVERRIDE;
+    virtual void pauseAnimation(const String&, double) OVERRIDE;
+    virtual void removeAnimation(const String&) OVERRIDE;
 
     void setRootLayer(bool);
 
     WebKit::WebLayerID id() const;
-    static CoordinatedGraphicsLayer* layerByID(WebKit::WebLayerID);
-    void didSynchronize();
-    Image* image() { return m_image.get(); }
 
-    bool fixedToViewport() const { return m_fixedToViewport; }
     void setFixedToViewport(bool isFixed) { m_fixedToViewport = isFixed; }
 
-    GraphicsLayer* maskTarget() const { return m_maskTarget; }
-    void setMaskTarget(GraphicsLayer* layer) { m_maskTarget = layer; }
     IntRect coverRect() const { return m_mainBackingStore ? m_mainBackingStore->mapToContents(m_mainBackingStore->coverRect()) : IntRect(); }
 
     static void initFactory();
 
     // TiledBackingStoreClient
-    virtual void tiledBackingStorePaintBegin();
-    virtual void tiledBackingStorePaint(GraphicsContext*, const IntRect&);
-    virtual void tiledBackingStorePaintEnd(const Vector<IntRect>& paintedArea);
-    virtual bool tiledBackingStoreUpdatesAllowed() const;
-    virtual IntRect tiledBackingStoreContentsRect();
-    virtual IntRect tiledBackingStoreVisibleRect();
-    virtual Color tiledBackingStoreBackgroundColor() const;
+    virtual void tiledBackingStorePaintBegin() OVERRIDE;
+    virtual void tiledBackingStorePaint(GraphicsContext*, const IntRect&) OVERRIDE;
+    virtual void tiledBackingStorePaintEnd(const Vector<IntRect>& paintedArea) OVERRIDE;
+    virtual bool tiledBackingStoreUpdatesAllowed() const OVERRIDE;
+    virtual IntRect tiledBackingStoreContentsRect() OVERRIDE;
+    virtual IntRect tiledBackingStoreVisibleRect() OVERRIDE;
+    virtual Color tiledBackingStoreBackgroundColor() const OVERRIDE;
 
     // CoordinatedTileClient
-    virtual void createTile(int tileID, const WebKit::SurfaceUpdateInfo&, const WebCore::IntRect&);
-    virtual void updateTile(int tileID, const WebKit::SurfaceUpdateInfo&, const WebCore::IntRect&);
-    virtual void removeTile(int tileID);
-    virtual PassOwnPtr<WebCore::GraphicsContext> beginContentUpdate(const WebCore::IntSize&, WebKit::ShareableSurface::Handle&, WebCore::IntPoint&);
+    virtual void createTile(int tileID, const WebKit::SurfaceUpdateInfo&, const IntRect&) OVERRIDE;
+    virtual void updateTile(int tileID, const WebKit::SurfaceUpdateInfo&, const IntRect&) OVERRIDE;
+    virtual void removeTile(int tileID) OVERRIDE;
+    virtual PassOwnPtr<GraphicsContext> beginContentUpdate(const IntSize&, WebKit::ShareableSurface::Handle&, IntPoint&) OVERRIDE;
 
     void setCoordinatedGraphicsLayerClient(WebKit::CoordinatedGraphicsLayerClient*);
-    void syncChildren();
+
+    void adjustVisibleRect();
+    void purgeBackingStores();
+    bool hasPendingVisibleChanges();
+
+private:
+    bool fixedToViewport() const { return m_fixedToViewport; }
+    void setMaskTarget(GraphicsLayer* layer) { m_maskTarget = layer; }
+
+    void notifyChange();
+    void didChangeLayerState();
+    void didChangeAnimations();
+    void didChangeGeometry();
+    void didChangeChildren();
+#if ENABLE(CSS_FILTERS)
+    void didChangeFilters();
+#endif
+
     void syncLayerState();
+    void syncAnimations();
+    void syncChildren();
 #if ENABLE(CSS_FILTERS)
     void syncFilters();
 #endif
     void syncCanvas();
     void ensureImageBackingStore();
-
-    void adjustVisibleRect();
-    bool isReadyForTileBufferSwap() const;
+    void computeTransformedVisibleRect();
     void updateContentBuffers();
-    void purgeBackingStores();
-    bool hasPendingVisibleChanges();
 
-    virtual bool addAnimation(const KeyframeValueList&, const IntSize&, const Animation*, const String&, double);
-    virtual void pauseAnimation(const String&, double);
-    virtual void removeAnimation(const String&);
+    void createBackingStore();
 
-private:
-    virtual void willBeDestroyed();
+    bool selfOrAncestorHaveNonAffineTransforms();
+    bool shouldUseTiledBackingStore();
+    void adjustContentsScale();
+
+    void setShouldUpdateVisibleRect();
+    float effectiveContentsScale();
+
+    void animationStartedTimerFired(Timer<CoordinatedGraphicsLayer>*);
+
     WebKit::WebLayerID m_id;
     WebKit::WebLayerInfo m_layerInfo;
     RefPtr<Image> m_image;
@@ -188,34 +205,12 @@
     bool m_fixedToViewport : 1;
     bool m_canvasNeedsDisplay : 1;
 
-    void notifyChange();
-    void didChangeAnimations();
-    void didChangeGeometry();
-    void didChangeLayerState();
-    void didChangeChildren();
-#if ENABLE(CSS_FILTERS)
-    void didChangeFilters();
-#endif
-
     float m_effectiveOpacity;
     TransformationMatrix m_effectiveTransform;
 
-    void createBackingStore();
-
-    bool selfOrAncestorHaveNonAffineTransforms();
-    bool shouldUseTiledBackingStore();
-    void adjustContentsScale();
-    void computeTransformedVisibleRect();
-    void syncLayerParameters();
-    void syncAnimations();
-    void setShouldUpdateVisibleRect();
-    float effectiveContentsScale();
-
-    void animationStartedTimerFired(WebCore::Timer<CoordinatedGraphicsLayer>*);
-
     WebKit::CoordinatedGraphicsLayerClient* m_CoordinatedGraphicsLayerClient;
-    OwnPtr<WebCore::TiledBackingStore> m_mainBackingStore;
-    OwnPtr<WebCore::TiledBackingStore> m_previousBackingStore;
+    OwnPtr<TiledBackingStore> m_mainBackingStore;
+    OwnPtr<TiledBackingStore> m_previousBackingStore;
     float m_contentsScale;
     PlatformLayer* m_canvasPlatformLayer;
     Timer<CoordinatedGraphicsLayer> m_animationStartedTimer;

Modified: trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.h (133181 => 133182)


--- trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.h	2012-11-01 15:51:20 UTC (rev 133181)
+++ trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.h	2012-11-01 15:55:53 UTC (rev 133182)
@@ -44,8 +44,6 @@
     static PassRefPtr<LayerTreeCoordinator> create(WebPage*);
     virtual ~LayerTreeCoordinator();
 
-    static bool supportsAcceleratedCompositing();
-
     virtual const LayerTreeContext& layerTreeContext() { return m_layerTreeContext; }
     virtual void setLayerFlushSchedulingEnabled(bool);
     virtual void scheduleLayerFlush();
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to