Changeset 168219 in webkit
- Timestamp:
- May 2, 2014 6:16:00 PM (10 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r168217 r168219 1 2014-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 1 26 2014-05-02 Simon Fraser <simon.fraser@apple.com> 2 27 -
trunk/Source/WebCore/WebCore.exp.in
r168205 r168219 578 578 __ZN7WebCore15GraphicsLayerCA23setContentsToSolidColorERKNS_5ColorE 579 579 __ZN7WebCore15GraphicsLayerCA23setDebugBackgroundColorERKNS_5ColorE 580 __ZN7WebCore15GraphicsLayerCA26setMaintainsPixelAlignmentEb581 580 __ZN7WebCore15GraphicsLayerCA28platformCALayerPaintContentsEPNS_15PlatformCALayerERNS_15GraphicsContextERKNS_9FloatRectE 582 581 __ZN7WebCore15GraphicsLayerCA30deviceOrPageScaleFactorChangedEv -
trunk/Source/WebCore/platform/graphics/GraphicsLayer.cpp
r167529 r168219 88 88 , m_contentsVisible(true) 89 89 , m_acceleratesDrawing(false) 90 , m_maintainsPixelAlignment(false)91 90 , m_appliesPageScale(false) 92 91 , m_showDebugBorder(false) -
trunk/Source/WebCore/platform/graphics/GraphicsLayer.h
r167529 r168219 455 455 virtual float accumulatedOpacity() const; 456 456 457 virtual void setMaintainsPixelAlignment(bool maintainsAlignment) { m_maintainsPixelAlignment = maintainsAlignment; }458 virtual bool maintainsPixelAlignment() const { return m_maintainsPixelAlignment; }459 457 #if PLATFORM(IOS) 460 virtual FloatSize pixelAlignmentOffset() const { return FloatSize(); }461 458 bool hasFlattenedPerspectiveTransform() const { return !preserves3D() && m_childrenTransform.hasPerspective(); } 462 459 #endif … … 591 588 bool m_contentsVisible : 1; 592 589 bool m_acceleratesDrawing : 1; 593 bool m_maintainsPixelAlignment : 1;594 590 bool m_appliesPageScale : 1; // Set for the layer which has the page scale applied to it. 595 591 bool m_showDebugBorder : 1; -
trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp
r168079 r168219 1540 1540 computePixelAlignment(pageScaleFactor, positionRelativeToBase, scaledPosition, scaledSize, scaledAnchorPoint, pixelAlignmentOffset); 1541 1541 1542 #if PLATFORM(IOS)1543 m_pixelAlignmentOffset = pixelAlignmentOffset;1544 #endif1545 1546 1542 FloatRect adjustedBounds(m_boundsOrigin - pixelAlignmentOffset, scaledSize); 1547 1543 … … 3429 3425 } 3430 3426 3431 void GraphicsLayerCA::setMaintainsPixelAlignment(bool maintainsAlignment)3432 {3433 if (maintainsAlignment == m_maintainsPixelAlignment)3434 return;3435 3436 GraphicsLayer::setMaintainsPixelAlignment(maintainsAlignment);3437 noteChangesForScaleSensitiveProperties();3438 }3439 3440 3427 void GraphicsLayerCA::deviceOrPageScaleFactorChanged() 3441 3428 { … … 3451 3438 FloatPoint& position, FloatSize& size, FloatPoint3D& anchorPoint, FloatSize& alignmentOffset) const 3452 3439 { 3453 if ( !m_maintainsPixelAlignment ||isIntegral(pageScaleFactor) || !m_drawsContent || m_masksToBounds) {3440 if (isIntegral(pageScaleFactor) || !m_drawsContent || m_masksToBounds) { 3454 3441 position = m_position; 3455 3442 size = m_size; -
trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h
r168079 r168219 147 147 virtual void layerDidDisplay(PlatformLayer*) override; 148 148 149 virtual void setMaintainsPixelAlignment(bool) override;150 #if PLATFORM(IOS)151 virtual FloatSize pixelAlignmentOffset() const override { return m_pixelAlignmentOffset; }152 #endif153 149 virtual void deviceOrPageScaleFactorChanged() override; 154 150 … … 544 540 545 541 Vector<FloatRect> m_dirtyRects; 546 FloatSize m_pixelAlignmentOffset; 547 542 548 543 LayerChangeFlags m_uncommittedChanges; 549 544 bool m_isCommittingChanges; -
trunk/Source/WebCore/rendering/RenderLayerBacking.cpp
r168190 r168219 177 177 UNUSED_PARAM(name); 178 178 #endif 179 graphicsLayer->setMaintainsPixelAlignment(compositor().keepLayersPixelAligned());180 181 179 #if PLATFORM(COCOA) && USE(CA) 182 180 graphicsLayer->setAcceleratesDrawing(compositor().acceleratedDrawingEnabled()); -
trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp
r168217 r168219 2782 2782 } 2783 2783 2784 bool RenderLayerCompositor::keepLayersPixelAligned() const2785 {2786 // When scaling, attempt to align compositing layers to pixel boundaries.2787 return true;2788 }2789 2790 2784 bool RenderLayerCompositor::mainFrameBackingIsTiled() const 2791 2785 { -
trunk/Source/WebCore/rendering/RenderLayerCompositor.h
r168217 r168219 250 250 void layerTiledBackingUsageChanged(const GraphicsLayer*, bool /*usingTiledBacking*/); 251 251 252 bool keepLayersPixelAligned() const;253 252 bool acceleratedDrawingEnabled() const { return m_acceleratedDrawingEnabled; } 254 253
Note: See TracChangeset
for help on using the changeset viewer.