WebKit Bugzilla
Attachment 372478 Details for
Bug 198998
: [CoordinatedGraphics] support bounds origin
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
WIP
bug-198998-20190619195010.patch (text/plain), 10.28 KB, created by
Zan Dobersek
on 2019-06-19 10:50:12 PDT
(
hide
)
Description:
WIP
Filename:
MIME Type:
Creator:
Zan Dobersek
Created:
2019-06-19 10:50:12 PDT
Size:
10.28 KB
patch
obsolete
>Subversion Revision: 246581 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index c571b58a80f3ebdd94d7bc2760647ccd15dac75f..a5c897b3d9e6494039068293d895b5cf8f23b09b 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,25 @@ >+2019-06-19 Zan Dobersek <zdobersek@igalia.com> >+ >+ REGRESSION(r246538): [GTK] Scroll is broken >+ https://bugs.webkit.org/show_bug.cgi?id=198998 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ No new tests (OOPS!). >+ >+ * platform/graphics/nicosia/NicosiaPlatformLayer.h: >+ (Nicosia::CompositionLayer::flushState): >+ * platform/graphics/texmap/TextureMapperLayer.cpp: >+ (WebCore::TextureMapperLayer::computeTransformsRecursive): >+ (WebCore::TextureMapperLayer::setBoundsOrigin): >+ * platform/graphics/texmap/TextureMapperLayer.h: >+ * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp: >+ (WebCore::CoordinatedGraphicsLayer::setBoundsOrigin): >+ (WebCore::CoordinatedGraphicsLayer::flushCompositingStateForThisLayerOnly): >+ (WebCore::CoordinatedGraphicsLayer::updateContentBuffers): >+ (WebCore::CoordinatedGraphicsLayer::computeTransformedVisibleRect): >+ * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h: >+ > 2019-06-18 Saam Barati <sbarati@apple.com> > > [WHLSL] Support matrices >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index 6d600149b7a7ca7c23a5b4baf244b3881a6c2bc6..7dc4e33472792f94b187135b63cf561eff97c671 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,13 @@ >+2019-06-19 Zan Dobersek <zdobersek@igalia.com> >+ >+ REGRESSION(r246538): [GTK] Scroll is broken >+ https://bugs.webkit.org/show_bug.cgi?id=198998 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp: >+ (WebKit::CoordinatedGraphicsScene::updateSceneState): >+ > 2019-06-18 Ryan Haddad <ryanhaddad@apple.com> > > Unreviewed, rolling out r246575. >diff --git a/Source/WebCore/platform/graphics/nicosia/NicosiaPlatformLayer.h b/Source/WebCore/platform/graphics/nicosia/NicosiaPlatformLayer.h >index a3bf287eb8d752c9cc7104f47e21e2c06ff35a17..89ce59474fe0fabfbfd3c6f7426d91442965b902 100644 >--- a/Source/WebCore/platform/graphics/nicosia/NicosiaPlatformLayer.h >+++ b/Source/WebCore/platform/graphics/nicosia/NicosiaPlatformLayer.h >@@ -110,6 +110,7 @@ public: > struct { > bool positionChanged : 1; > bool anchorPointChanged : 1; >+ bool boundsOriginChanged : 1; > bool sizeChanged : 1; > bool transformChanged : 1; > bool childrenTransformChanged : 1; >@@ -154,6 +155,7 @@ public: > > WebCore::FloatPoint position; > WebCore::FloatPoint3D anchorPoint; >+ WebCore::FloatPoint boundsOrigin; > WebCore::FloatSize size; > > WebCore::TransformationMatrix transform; >@@ -210,6 +212,8 @@ public: > staging.position = pending.position; > if (pending.delta.anchorPointChanged) > staging.anchorPoint = pending.anchorPoint; >+ if (pending.delta.boundsOriginChanged) >+ staging.boundsOrigin = pending.boundsOrigin; > if (pending.delta.sizeChanged) > staging.size = pending.size; > >diff --git a/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp b/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp >index 5e9c56b5f30f0228bb87058fbf30b209fc939bd1..fdecbdd41dc7049e699d8dd93fe31ea24bb922f0 100644 >--- a/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp >+++ b/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp >@@ -68,7 +68,7 @@ void TextureMapperLayer::computeTransformsRecursive() > > m_layerTransforms.combined = parentTransform; > m_layerTransforms.combined >- .translate3d(originX + m_state.pos.x(), originY + m_state.pos.y(), m_state.anchorPoint.z()) >+ .translate3d(originX + m_state.pos.x() - m_state.boundsOrigin.x(), originY + m_state.pos.y() - m_state.boundsOrigin.y(), m_state.anchorPoint.z()) > .multiply(m_layerTransforms.localTransform); > > m_layerTransforms.combinedForChildren = m_layerTransforms.combined; >@@ -515,6 +515,11 @@ void TextureMapperLayer::setPosition(const FloatPoint& position) > m_state.pos = position; > } > >+void TextureMapperLayer::setBoundsOrigin(const FloatPoint& boundsOrigin) >+{ >+ m_state.boundsOrigin = boundsOrigin; >+} >+ > void TextureMapperLayer::setSize(const FloatSize& size) > { > m_state.size = size; >diff --git a/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.h b/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.h >index ea259ba1006b256eb1af8f699aee9322b1cc5eb2..d39d6fca95692bdfaab0290536d1a10089862149 100644 >--- a/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.h >+++ b/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.h >@@ -56,6 +56,7 @@ public: > void setMaskLayer(TextureMapperLayer*); > void setReplicaLayer(TextureMapperLayer*); > void setPosition(const FloatPoint&); >+ void setBoundsOrigin(const FloatPoint&); > void setSize(const FloatSize&); > void setAnchorPoint(const FloatPoint3D&); > void setPreserves3D(bool); >@@ -135,7 +136,7 @@ private: > > inline FloatRect layerRect() const > { >- return FloatRect(FloatPoint::zero(), m_state.size); >+ return FloatRect(m_state.boundsOrigin, m_state.size); > } > > Vector<TextureMapperLayer*> m_children; >@@ -150,6 +151,7 @@ private: > struct State { > FloatPoint pos; > FloatPoint3D anchorPoint; >+ FloatPoint boundsOrigin; > FloatSize size; > TransformationMatrix transform; > TransformationMatrix childrenTransform; >diff --git a/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp b/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp >index a95382c9d747959cb0de24bbd9b261a1c1fc0e7d..de149a116407ff25ca3d6d1facb1ab38e2364190 100644 >--- a/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp >+++ b/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp >@@ -259,6 +259,16 @@ void CoordinatedGraphicsLayer::setSize(const FloatSize& size) > didChangeGeometry(); > } > >+void CoordinatedGraphicsLayer::setBoundsOrigin(const FloatPoint& boundsOrigin) >+{ >+ if (this->boundsOrigin() == boundsOrigin) >+ return; >+ >+ GraphicsLayer::setBoundsOrigin(boundsOrigin); >+ m_nicosia.delta.boundsOriginChanged = true; >+ didChangeGeometry(); >+} >+ > void CoordinatedGraphicsLayer::setTransform(const TransformationMatrix& t) > { > if (transform() == t) >@@ -724,6 +734,8 @@ void CoordinatedGraphicsLayer::flushCompositingStateForThisLayerOnly() > state.position = m_adjustedPosition; > if (localDelta.anchorPointChanged) > state.anchorPoint = m_adjustedAnchorPoint; >+ if (localDelta.boundsOriginChanged) >+ state.boundsOrigin = m_boundsOrigin; > if (localDelta.sizeChanged) > state.size = m_adjustedSize; > >@@ -904,14 +916,14 @@ void CoordinatedGraphicsLayer::updateContentBuffers() > for (auto& rect : m_needsDisplay.rects) > layerState.mainBackingStore->invalidate(enclosingIntRect(rect)); > } else >- layerState.mainBackingStore->invalidate({ { }, IntSize { m_size } }); >+ layerState.mainBackingStore->invalidate({ IntPoint { m_boundsOrigin }, IntSize { m_size } }); > > m_needsDisplay.completeLayer = false; > m_needsDisplay.rects.clear(); > > if (m_pendingVisibleRectAdjustment) { > m_pendingVisibleRectAdjustment = false; >- layerState.mainBackingStore->createTilesIfNeeded(transformedVisibleRect(), IntRect(0, 0, m_size.width(), m_size.height())); >+ layerState.mainBackingStore->createTilesIfNeeded(transformedVisibleRect(), IntRect(m_boundsOrigin.x(), m_boundsOrigin.y(), m_size.width(), m_size.height())); > } > > ASSERT(m_coordinator && m_coordinator->isFlushingLayerChanges()); >@@ -1097,7 +1109,7 @@ void CoordinatedGraphicsLayer::computeTransformedVisibleRect() > m_layerTransform.setLocalTransform(currentTransform); > > m_layerTransform.setAnchorPoint(m_adjustedAnchorPoint); >- m_layerTransform.setPosition(m_adjustedPosition); >+ m_layerTransform.setPosition({ m_adjustedPosition.x() - m_boundsOrigin.x(), m_adjustedPosition.y() - m_boundsOrigin.y() }); > m_layerTransform.setSize(m_adjustedSize); > > m_layerTransform.setFlattening(!preserves3D()); >diff --git a/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h b/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h >index b5177de8cec528866a1c80a8f69b5ca72dd2b2ec..23f94394643db78a878e457147620bb84ece9603 100644 >--- a/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h >+++ b/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h >@@ -74,6 +74,7 @@ public: > void setPosition(const FloatPoint&) override; > void setAnchorPoint(const FloatPoint3D&) override; > void setSize(const FloatSize&) override; >+ void setBoundsOrigin(const FloatPoint&) override; > void setTransform(const TransformationMatrix&) override; > void setChildrenTransform(const TransformationMatrix&) override; > void setPreserves3D(bool) override; >diff --git a/Source/WebKit/Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp b/Source/WebKit/Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp >index eb6af9806244899e86c7c5789987f4b2a59a1bc0..5616f55aa81850f686c919b7b3fae4c8b78171f6 100644 >--- a/Source/WebKit/Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp >+++ b/Source/WebKit/Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp >@@ -289,6 +289,8 @@ void CoordinatedGraphicsScene::updateSceneState() > layer.setPosition(layerState.position); > if (layerState.delta.anchorPointChanged) > layer.setAnchorPoint(layerState.anchorPoint); >+ if (layerState.delta.boundsOriginChanged) >+ layer.setBoundsOrigin(layerState.boundsOrigin); > if (layerState.delta.sizeChanged) > layer.setSize(layerState.size); >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 198998
:
372458
|
372478
|
372548
|
379633