Changeset 186154 in webkit
- Timestamp:
- Jun 30, 2015, 6:01:13 PM (10 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r186139 r186154 1 2015-06-30 Simon Fraser <simon.fraser@apple.com> 2 3 Rename GraphicsLayer's allowsBackingStoreDetachment to isViewportConstrained 4 https://bugs.webkit.org/show_bug.cgi?id=146483 5 6 Reviewed by Tim Horton. 7 8 What GraphicsLayer really needs to know is whether some other thread/process 9 is moving its platform layers around behind its back, and this is is better 10 expressed as "isViewportConstrained" rather than "allowsBackingStoreDetachment". 11 12 The sense of the flag is flipped, and boolean logic adjusted accordingly. 13 14 * platform/graphics/GraphicsLayer.h: 15 (WebCore::GraphicsLayer::setIsViewportConstrained): 16 (WebCore::GraphicsLayer::isViewportConstrained): 17 (WebCore::GraphicsLayer::setAllowsBackingStoreDetachment): Deleted. 18 (WebCore::GraphicsLayer::allowsBackingStoreDetachment): Deleted. 19 * platform/graphics/ca/GraphicsLayerCA.cpp: 20 (WebCore::GraphicsLayerCA::GraphicsLayerCA): 21 (WebCore::GraphicsLayerCA::setVisibleAndCoverageRects): 22 (WebCore::GraphicsLayerCA::recursiveCommitChanges): 23 * platform/graphics/ca/GraphicsLayerCA.h: 24 * rendering/RenderLayerBacking.cpp: 25 (WebCore::RenderLayerBacking::setIsScrollCoordinatedWithViewportConstrainedRole): 26 1 27 2015-06-30 Dean Jackson <dino@apple.com> 2 28 -
trunk/Source/WebCore/platform/graphics/GraphicsLayer.h
r185124 r186154 495 495 float deviceScaleFactor() const { return m_client.deviceScaleFactor(); } 496 496 497 // Whether this layer (and descendants) can detach backing store when outside the coverage area.498 virtual void set AllowsBackingStoreDetachment(bool) { }499 virtual bool allowsBackingStoreDetachment() const { return true; }497 // Whether this layer is viewport constrained, implying that it's moved around externally from GraphicsLayer (e.g. by the scrolling tree). 498 virtual void setIsViewportConstrained(bool) { } 499 virtual bool isViewportConstrained() const { return false; } 500 500 501 501 virtual void deviceOrPageScaleFactorChanged() { } -
trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp
r186003 r186154 358 358 , m_needsFullRepaint(false) 359 359 , m_usingBackdropLayerType(false) 360 , m_ allowsBackingStoreDetachment(true)360 , m_isViewportConstrained(false) 361 361 , m_intersectsCoverageRect(false) 362 362 { … … 1273 1273 } 1274 1274 1275 void GraphicsLayerCA::setVisibleAndCoverageRects(const VisibleAndCoverageRects& rects, bool allowBackingStoreDetachment)1275 void GraphicsLayerCA::setVisibleAndCoverageRects(const VisibleAndCoverageRects& rects, bool isViewportConstrained) 1276 1276 { 1277 1277 bool visibleRectChanged = rects.visibleRect != m_visibleRect; … … 1281 1281 1282 1282 // FIXME: we need to take reflections into account when determining whether this layer intersects the coverage rect. 1283 bool intersectsCoverageRect = !allowBackingStoreDetachment|| rects.coverageRect.intersects(FloatRect(m_boundsOrigin, size()));1283 bool intersectsCoverageRect = isViewportConstrained || rects.coverageRect.intersects(FloatRect(m_boundsOrigin, size())); 1284 1284 if (intersectsCoverageRect != m_intersectsCoverageRect) { 1285 1285 m_uncommittedChanges |= CoverageRectChanged; … … 1330 1330 } 1331 1331 } 1332 setVisibleAndCoverageRects(rects, m_ allowsBackingStoreDetachment && commitState.ancestorsAllowBackingStoreDetachment);1332 setVisibleAndCoverageRects(rects, m_isViewportConstrained || commitState.ancestorIsViewportConstrained); 1333 1333 1334 1334 #ifdef VISIBLE_TILE_WASH … … 1374 1374 } 1375 1375 1376 childCommitState.ancestor sAllowBackingStoreDetachment &= m_allowsBackingStoreDetachment;1376 childCommitState.ancestorIsViewportConstrained |= m_isViewportConstrained; 1377 1377 1378 1378 if (GraphicsLayerCA* maskLayer = downcast<GraphicsLayerCA>(m_maskLayer)) … … 3674 3674 } 3675 3675 3676 void GraphicsLayerCA::set AllowsBackingStoreDetachment(bool allowDetachment)3677 { 3678 if ( allowDetachment == m_allowsBackingStoreDetachment)3679 return; 3680 3681 m_ allowsBackingStoreDetachment = allowDetachment;3676 void GraphicsLayerCA::setIsViewportConstrained(bool isViewportConstrained) 3677 { 3678 if (isViewportConstrained == m_isViewportConstrained) 3679 return; 3680 3681 m_isViewportConstrained = isViewportConstrained; 3682 3682 noteLayerPropertyChanged(CoverageRectChanged); 3683 3683 } -
trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h
r185124 r186154 152 152 int treeDepth { 0 }; 153 153 bool ancestorHasTransformAnimation { false }; 154 bool ancestor sAllowBackingStoreDetachment { true };154 bool ancestorIsViewportConstrained { false }; 155 155 }; 156 156 void recursiveCommitChanges(const CommitState&, const TransformState&, float pageScaleFactor = 1, const FloatPoint& positionRelativeToBase = FloatPoint(), bool affectedByPageScale = false); … … 196 196 virtual bool isCommittingChanges() const override { return m_isCommittingChanges; } 197 197 198 WEBCORE_EXPORT virtual void set AllowsBackingStoreDetachment(bool) override;199 virtual bool allowsBackingStoreDetachment() const override { return m_allowsBackingStoreDetachment; }198 WEBCORE_EXPORT virtual void setIsViewportConstrained(bool) override; 199 virtual bool isViewportConstrained() const override { return m_isViewportConstrained; } 200 200 201 201 WEBCORE_EXPORT virtual double backingStoreMemoryEstimate() const override; … … 295 295 const FloatRect& coverageRect() const { return m_coverageRect; } 296 296 297 void setVisibleAndCoverageRects(const VisibleAndCoverageRects&, bool allowBackingStoreDetachment);297 void setVisibleAndCoverageRects(const VisibleAndCoverageRects&, bool isViewportConstrained); 298 298 299 299 static FloatRect adjustTiledLayerVisibleRect(TiledBacking*, const FloatRect& oldVisibleRect, const FloatRect& newVisibleRect, const FloatSize& oldSize, const FloatSize& newSize); … … 514 514 bool m_needsFullRepaint : 1; 515 515 bool m_usingBackdropLayerType : 1; 516 bool m_ allowsBackingStoreDetachment: 1;516 bool m_isViewportConstrained : 1; 517 517 bool m_intersectsCoverageRect : 1; 518 518 -
trunk/Source/WebCore/rendering/RenderLayerBacking.cpp
r185851 r186154 1609 1609 void RenderLayerBacking::setIsScrollCoordinatedWithViewportConstrainedRole(bool viewportCoordinated) 1610 1610 { 1611 m_graphicsLayer->set AllowsBackingStoreDetachment(!viewportCoordinated);1611 m_graphicsLayer->setIsViewportConstrained(viewportCoordinated); 1612 1612 } 1613 1613
Note:
See TracChangeset
for help on using the changeset viewer.