Changeset 152227 in webkit


Ignore:
Timestamp:
Jul 1, 2013 9:32:07 AM (11 years ago)
Author:
commit-queue@webkit.org
Message:

Avoid calling RenderLayerBacking::resetContentsRect() if possible
https://bugs.webkit.org/show_bug.cgi?id=118217

Patch by Noam Rosenthal <Noam Rosenthal> on 2013-07-01
Reviewed by Simon Fraser.

Call resetContentsRect() only if the layer has a contentsLayer.
Otherwise the contentsRect is redundant for the GraphicsLayer.

No new tests - optimization only. This is covered by plenty of existing
tests in webgl/ and compositing/.

  • platform/graphics/texmap/GraphicsLayerTextureMapper.h:

(WebCore::GraphicsLayerTextureMapper::hasContentsLayer):

  • platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:

Added hasContentsLayer calls for TextureMapper/CoordinatedGraphics

  • rendering/RenderLayerBacking.cpp:

(WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):

Location:
trunk/Source/WebCore
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r152223 r152227  
     12013-07-01  Noam Rosenthal  <noam@webkit.org>
     2
     3        Avoid calling RenderLayerBacking::resetContentsRect() if possible
     4        https://bugs.webkit.org/show_bug.cgi?id=118217
     5
     6        Reviewed by Simon Fraser.
     7
     8        Call resetContentsRect() only if the layer has a contentsLayer.
     9        Otherwise the contentsRect is redundant for the GraphicsLayer.
     10
     11        No new tests - optimization only. This is covered by plenty of existing
     12        tests in webgl/ and compositing/.
     13
     14        * platform/graphics/texmap/GraphicsLayerTextureMapper.h:
     15        (WebCore::GraphicsLayerTextureMapper::hasContentsLayer):
     16        * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
     17            Added hasContentsLayer calls for TextureMapper/CoordinatedGraphics
     18
     19        * rendering/RenderLayerBacking.cpp:
     20        (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
     21
    1222013-07-01  Allan Sandfeld Jensen  <allan.jensen@digia.com>
    223
  • trunk/Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.h

    r149813 r152227  
    7777    virtual void flushCompositingStateForThisLayerOnly();
    7878    virtual void setName(const String& name);
     79    virtual bool hasContentsLayer() const { return m_contentsLayer; }
    7980    virtual PlatformLayer* platformLayer() const { return m_contentsLayer; }
    8081
  • trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h

    r151262 r152227  
    111111    virtual void suspendAnimations(double time) OVERRIDE;
    112112    virtual void resumeAnimations() OVERRIDE;
     113    virtual bool hasContentsLayer() const OVERRIDE { return m_canvasPlatformLayer || m_compositedImage; }
    113114
    114115    void syncPendingStateChangesIncludingSubLayers();
  • trunk/Source/WebCore/rendering/RenderLayerBacking.cpp

    r152213 r152227  
    862862    bool didUpdateContentsRect = false;
    863863    updateDirectlyCompositedContents(isSimpleContainer, didUpdateContentsRect);
    864     if (!didUpdateContentsRect)
     864    if (!didUpdateContentsRect && m_graphicsLayer->hasContentsLayer())
    865865        resetContentsRect();
    866866
Note: See TracChangeset for help on using the changeset viewer.