Changeset 168219 in webkit


Ignore:
Timestamp:
May 2, 2014 6:16:00 PM (10 years ago)
Author:
Alan Bujtas
Message:

CodeCleanup: Remove *MaintainsPixelAlignment from GraphicsLayer*.
https://bugs.webkit.org/show_bug.cgi?id=132501

Reviewed by Simon Fraser.

  • WebCore.exp.in:
  • platform/graphics/GraphicsLayer.cpp:

(WebCore::GraphicsLayer::GraphicsLayer):

  • platform/graphics/GraphicsLayer.h:

(WebCore::GraphicsLayer::setMaintainsPixelAlignment): Deleted.
(WebCore::GraphicsLayer::maintainsPixelAlignment): Deleted.
(WebCore::GraphicsLayer::pixelAlignmentOffset): Deleted.

  • platform/graphics/ca/GraphicsLayerCA.cpp:

(WebCore::GraphicsLayerCA::updateGeometry):
(WebCore::GraphicsLayerCA::computePixelAlignment):
(WebCore::GraphicsLayerCA::setMaintainsPixelAlignment): Deleted.

  • platform/graphics/ca/GraphicsLayerCA.h:
  • rendering/RenderLayerBacking.cpp:

(WebCore::RenderLayerBacking::createGraphicsLayer):

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::keepLayersPixelAligned): Deleted.

  • rendering/RenderLayerCompositor.h:
Location:
trunk/Source/WebCore
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r168217 r168219  
     12014-05-02  Zalan Bujtas  <zalan@apple.com>
     2
     3        CodeCleanup: Remove *MaintainsPixelAlignment from GraphicsLayer*.
     4        https://bugs.webkit.org/show_bug.cgi?id=132501
     5
     6        Reviewed by Simon Fraser.
     7
     8        * WebCore.exp.in:
     9        * platform/graphics/GraphicsLayer.cpp:
     10        (WebCore::GraphicsLayer::GraphicsLayer):
     11        * platform/graphics/GraphicsLayer.h:
     12        (WebCore::GraphicsLayer::setMaintainsPixelAlignment): Deleted.
     13        (WebCore::GraphicsLayer::maintainsPixelAlignment): Deleted.
     14        (WebCore::GraphicsLayer::pixelAlignmentOffset): Deleted.
     15        * platform/graphics/ca/GraphicsLayerCA.cpp:
     16        (WebCore::GraphicsLayerCA::updateGeometry):
     17        (WebCore::GraphicsLayerCA::computePixelAlignment):
     18        (WebCore::GraphicsLayerCA::setMaintainsPixelAlignment): Deleted.
     19        * platform/graphics/ca/GraphicsLayerCA.h:
     20        * rendering/RenderLayerBacking.cpp:
     21        (WebCore::RenderLayerBacking::createGraphicsLayer):
     22        * rendering/RenderLayerCompositor.cpp:
     23        (WebCore::RenderLayerCompositor::keepLayersPixelAligned): Deleted.
     24        * rendering/RenderLayerCompositor.h:
     25
    1262014-05-02  Simon Fraser  <simon.fraser@apple.com>
    227
  • trunk/Source/WebCore/WebCore.exp.in

    r168205 r168219  
    578578__ZN7WebCore15GraphicsLayerCA23setContentsToSolidColorERKNS_5ColorE
    579579__ZN7WebCore15GraphicsLayerCA23setDebugBackgroundColorERKNS_5ColorE
    580 __ZN7WebCore15GraphicsLayerCA26setMaintainsPixelAlignmentEb
    581580__ZN7WebCore15GraphicsLayerCA28platformCALayerPaintContentsEPNS_15PlatformCALayerERNS_15GraphicsContextERKNS_9FloatRectE
    582581__ZN7WebCore15GraphicsLayerCA30deviceOrPageScaleFactorChangedEv
  • trunk/Source/WebCore/platform/graphics/GraphicsLayer.cpp

    r167529 r168219  
    8888    , m_contentsVisible(true)
    8989    , m_acceleratesDrawing(false)
    90     , m_maintainsPixelAlignment(false)
    9190    , m_appliesPageScale(false)
    9291    , m_showDebugBorder(false)
  • trunk/Source/WebCore/platform/graphics/GraphicsLayer.h

    r167529 r168219  
    455455    virtual float accumulatedOpacity() const;
    456456
    457     virtual void setMaintainsPixelAlignment(bool maintainsAlignment) { m_maintainsPixelAlignment = maintainsAlignment; }
    458     virtual bool maintainsPixelAlignment() const { return m_maintainsPixelAlignment; }
    459457#if PLATFORM(IOS)
    460     virtual FloatSize pixelAlignmentOffset() const { return FloatSize(); }
    461458    bool hasFlattenedPerspectiveTransform() const { return !preserves3D() && m_childrenTransform.hasPerspective(); }
    462459#endif
     
    591588    bool m_contentsVisible : 1;
    592589    bool m_acceleratesDrawing : 1;
    593     bool m_maintainsPixelAlignment : 1;
    594590    bool m_appliesPageScale : 1; // Set for the layer which has the page scale applied to it.
    595591    bool m_showDebugBorder : 1;
  • trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp

    r168079 r168219  
    15401540    computePixelAlignment(pageScaleFactor, positionRelativeToBase, scaledPosition, scaledSize, scaledAnchorPoint, pixelAlignmentOffset);
    15411541
    1542 #if PLATFORM(IOS)
    1543     m_pixelAlignmentOffset = pixelAlignmentOffset;
    1544 #endif
    1545 
    15461542    FloatRect adjustedBounds(m_boundsOrigin - pixelAlignmentOffset, scaledSize);
    15471543
     
    34293425}
    34303426
    3431 void GraphicsLayerCA::setMaintainsPixelAlignment(bool maintainsAlignment)
    3432 {
    3433     if (maintainsAlignment == m_maintainsPixelAlignment)
    3434         return;
    3435 
    3436     GraphicsLayer::setMaintainsPixelAlignment(maintainsAlignment);
    3437     noteChangesForScaleSensitiveProperties();
    3438 }
    3439 
    34403427void GraphicsLayerCA::deviceOrPageScaleFactorChanged()
    34413428{
     
    34513438    FloatPoint& position, FloatSize& size, FloatPoint3D& anchorPoint, FloatSize& alignmentOffset) const
    34523439{
    3453     if (!m_maintainsPixelAlignment || isIntegral(pageScaleFactor) || !m_drawsContent || m_masksToBounds) {
     3440    if (isIntegral(pageScaleFactor) || !m_drawsContent || m_masksToBounds) {
    34543441        position = m_position;
    34553442        size = m_size;
  • trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h

    r168079 r168219  
    147147    virtual void layerDidDisplay(PlatformLayer*) override;
    148148
    149     virtual void setMaintainsPixelAlignment(bool) override;
    150 #if PLATFORM(IOS)
    151     virtual FloatSize pixelAlignmentOffset() const override { return m_pixelAlignmentOffset; }
    152 #endif
    153149    virtual void deviceOrPageScaleFactorChanged() override;
    154150
     
    544540
    545541    Vector<FloatRect> m_dirtyRects;
    546     FloatSize m_pixelAlignmentOffset;
    547    
     542
    548543    LayerChangeFlags m_uncommittedChanges;
    549544    bool m_isCommittingChanges;
  • trunk/Source/WebCore/rendering/RenderLayerBacking.cpp

    r168190 r168219  
    177177    UNUSED_PARAM(name);
    178178#endif
    179     graphicsLayer->setMaintainsPixelAlignment(compositor().keepLayersPixelAligned());
    180 
    181179#if PLATFORM(COCOA) && USE(CA)
    182180    graphicsLayer->setAcceleratesDrawing(compositor().acceleratedDrawingEnabled());
  • trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp

    r168217 r168219  
    27822782}
    27832783
    2784 bool RenderLayerCompositor::keepLayersPixelAligned() const
    2785 {
    2786     // When scaling, attempt to align compositing layers to pixel boundaries.
    2787     return true;
    2788 }
    2789 
    27902784bool RenderLayerCompositor::mainFrameBackingIsTiled() const
    27912785{
  • trunk/Source/WebCore/rendering/RenderLayerCompositor.h

    r168217 r168219  
    250250    void layerTiledBackingUsageChanged(const GraphicsLayer*, bool /*usingTiledBacking*/);
    251251   
    252     bool keepLayersPixelAligned() const;
    253252    bool acceleratedDrawingEnabled() const { return m_acceleratedDrawingEnabled; }
    254253
Note: See TracChangeset for help on using the changeset viewer.