- Revision
- 235219
- Author
- [email protected]
- Date
- 2018-08-22 23:30:07 -0700 (Wed, 22 Aug 2018)
Log Message
[CoordGraphics] Drop old-school PlatformLayer management in CoordinatedGraphicsLayer
https://bugs.webkit.org/show_bug.cgi?id=188850
Reviewed by Michael Catanzaro.
Remove the m_platformLayer member from the CoordinatedGraphicsLayer
class as it's been unused since the rework in r235165.
The CoordinatedGraphicsLayer::syncPlatformLayer() helper method and the
related member variable can both be removed as well. On the
CoordinatedGraphicsLayerState class, we can remove the obsolete
flags and the TextureMapperPlatformLayerProxy member variable that's
unused now that such objects are handled through the Nicosia impl class.
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
(WebCore::CoordinatedGraphicsLayer::CoordinatedGraphicsLayer):
(WebCore::CoordinatedGraphicsLayer::setContentsNeedsDisplay):
(WebCore::CoordinatedGraphicsLayer::setContentsToPlatformLayer):
(WebCore::CoordinatedGraphicsLayer::updatePlatformLayer):
(WebCore::CoordinatedGraphicsLayer::flushCompositingStateForThisLayerOnly):
(WebCore::CoordinatedGraphicsLayer::syncPlatformLayer): Deleted.
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
* platform/graphics/texmap/coordinated/CoordinatedGraphicsState.h:
(WebCore::CoordinatedGraphicsLayerState::CoordinatedGraphicsLayerState):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (235218 => 235219)
--- trunk/Source/WebCore/ChangeLog 2018-08-23 06:27:11 UTC (rev 235218)
+++ trunk/Source/WebCore/ChangeLog 2018-08-23 06:30:07 UTC (rev 235219)
@@ -1,5 +1,32 @@
2018-08-22 Zan Dobersek <[email protected]>
+ [CoordGraphics] Drop old-school PlatformLayer management in CoordinatedGraphicsLayer
+ https://bugs.webkit.org/show_bug.cgi?id=188850
+
+ Reviewed by Michael Catanzaro.
+
+ Remove the m_platformLayer member from the CoordinatedGraphicsLayer
+ class as it's been unused since the rework in r235165.
+
+ The CoordinatedGraphicsLayer::syncPlatformLayer() helper method and the
+ related member variable can both be removed as well. On the
+ CoordinatedGraphicsLayerState class, we can remove the obsolete
+ flags and the TextureMapperPlatformLayerProxy member variable that's
+ unused now that such objects are handled through the Nicosia impl class.
+
+ * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
+ (WebCore::CoordinatedGraphicsLayer::CoordinatedGraphicsLayer):
+ (WebCore::CoordinatedGraphicsLayer::setContentsNeedsDisplay):
+ (WebCore::CoordinatedGraphicsLayer::setContentsToPlatformLayer):
+ (WebCore::CoordinatedGraphicsLayer::updatePlatformLayer):
+ (WebCore::CoordinatedGraphicsLayer::flushCompositingStateForThisLayerOnly):
+ (WebCore::CoordinatedGraphicsLayer::syncPlatformLayer): Deleted.
+ * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
+ * platform/graphics/texmap/coordinated/CoordinatedGraphicsState.h:
+ (WebCore::CoordinatedGraphicsLayerState::CoordinatedGraphicsLayerState):
+
+2018-08-22 Zan Dobersek <[email protected]>
+
[CoordGraphics] Remove TiledBackingStoreClient inheritance from CoordinatedGraphicsLayer
https://bugs.webkit.org/show_bug.cgi?id=188849
Modified: trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp (235218 => 235219)
--- trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp 2018-08-23 06:27:11 UTC (rev 235218)
+++ trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp 2018-08-23 06:30:07 UTC (rev 235219)
@@ -135,12 +135,10 @@
, m_pendingContentsScaleAdjustment(false)
, m_pendingVisibleRectAdjustment(false)
#if USE(COORDINATED_GRAPHICS_THREADED)
- , m_shouldSyncPlatformLayer(false)
, m_shouldUpdatePlatformLayer(false)
#endif
, m_coordinator(0)
, m_compositedNativeImagePtr(0)
- , m_platformLayer(0)
, m_animationStartedTimer(*this, &CoordinatedGraphicsLayer::animationStartedTimerFired)
{
static CoordinatedLayerID nextLayerID = 1;
@@ -418,15 +416,10 @@
void CoordinatedGraphicsLayer::setContentsNeedsDisplay()
{
-#if USE(COORDINATED_GRAPHICS_THREADED)
-#if USE(NICOSIA)
+#if USE(COORDINATED_GRAPHICS_THREADED) && USE(NICOSIA)
if (m_nicosia.contentLayer)
m_shouldUpdatePlatformLayer = true;
-#else
- if (m_platformLayer)
- m_shouldUpdatePlatformLayer = true;
#endif
-#endif
notifyFlushRequired();
addRepaintRect(contentsRect());
@@ -434,20 +427,12 @@
void CoordinatedGraphicsLayer::setContentsToPlatformLayer(PlatformLayer* platformLayer, ContentsLayerPurpose)
{
-#if USE(COORDINATED_GRAPHICS_THREADED)
-#if USE(NICOSIA)
+#if USE(COORDINATED_GRAPHICS_THREADED) && USE(NICOSIA)
auto* contentLayer = downcast<Nicosia::ContentLayer>(platformLayer);
if (m_nicosia.contentLayer != contentLayer) {
- m_shouldSyncPlatformLayer = true;
m_nicosia.contentLayer = contentLayer;
m_nicosia.delta.contentLayerChanged = true;
}
-#else
- if (m_platformLayer != platformLayer)
- m_shouldSyncPlatformLayer = true;
-
- m_platformLayer = platformLayer;
-#endif
notifyFlushRequired();
#else
UNUSED_PARAM(platformLayer);
@@ -726,22 +711,6 @@
m_nicosia.delta.animationsChanged = true;
}
-void CoordinatedGraphicsLayer::syncPlatformLayer()
-{
- if (!m_shouldSyncPlatformLayer)
- return;
-
- m_shouldSyncPlatformLayer = false;
-#if USE(COORDINATED_GRAPHICS_THREADED)
-#if USE(NICOSIA)
-#else
- m_layerState.platformLayerChanged = true;
- if (m_platformLayer)
- m_layerState.platformLayerProxy = m_platformLayer->proxy();
-#endif
-#endif
-}
-
void CoordinatedGraphicsLayer::updatePlatformLayer()
{
if (!m_shouldUpdatePlatformLayer)
@@ -748,16 +717,10 @@
return;
m_shouldUpdatePlatformLayer = false;
-#if USE(COORDINATED_GRAPHICS_THREADED)
-#if USE(NICOSIA)
+#if USE(COORDINATED_GRAPHICS_THREADED) && USE(NICOSIA)
if (m_nicosia.contentLayer)
downcast<Nicosia::ContentLayerTextureMapperImpl>(m_nicosia.contentLayer->impl()).swapBuffersIfNeeded();
-#else
- m_layerState.platformLayerUpdated = true;
- if (m_platformLayer)
- m_platformLayer->swapBuffersIfNeeded();
#endif
-#endif
}
void CoordinatedGraphicsLayer::flushCompositingStateForThisLayerOnly()
@@ -779,7 +742,6 @@
computeTransformedVisibleRect();
syncChildren();
syncFilters();
- syncPlatformLayer();
updatePlatformLayer();
// Only unset m_movingVisibleRect after we have updated the visible rect after the animation stopped.
Modified: trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h (235218 => 235219)
--- trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h 2018-08-23 06:27:11 UTC (rev 235218)
+++ trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h 2018-08-23 06:30:07 UTC (rev 235219)
@@ -104,7 +104,7 @@
void removeAnimation(const String&) override;
void suspendAnimations(MonotonicTime) override;
void resumeAnimations() override;
- bool usesContentsLayer() const override { return m_platformLayer || m_nicosia.contentLayer || m_compositedImage; }
+ bool usesContentsLayer() const override { return m_nicosia.contentLayer || m_compositedImage; }
void syncPendingStateChangesIncludingSubLayers();
void updateContentBuffersIncludingSubLayers();
@@ -127,7 +127,6 @@
private:
bool isCoordinatedGraphicsLayer() const override { return true; }
- void syncPlatformLayer();
void updatePlatformLayer();
void setDebugBorder(const Color&, float width) override;
@@ -185,7 +184,6 @@
bool m_pendingContentsScaleAdjustment : 1;
bool m_pendingVisibleRectAdjustment : 1;
#if USE(COORDINATED_GRAPHICS_THREADED)
- bool m_shouldSyncPlatformLayer : 1;
bool m_shouldUpdatePlatformLayer : 1;
#endif
@@ -199,7 +197,6 @@
RefPtr<Image> m_compositedImage;
NativeImagePtr m_compositedNativeImagePtr;
- PlatformLayer* m_platformLayer;
Timer m_animationStartedTimer;
TextureMapperAnimations m_animations;
MonotonicTime m_lastAnimationStartTime;
Modified: trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsState.h (235218 => 235219)
--- trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsState.h 2018-08-23 06:27:11 UTC (rev 235218)
+++ trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsState.h 2018-08-23 06:30:07 UTC (rev 235219)
@@ -43,10 +43,6 @@
#include "TextureMapperAnimation.h"
#include "TransformationMatrix.h"
-#if USE(COORDINATED_GRAPHICS_THREADED)
-#include "TextureMapperPlatformLayerProxy.h"
-#endif
-
namespace WebCore {
typedef uint32_t CoordinatedLayerID;
@@ -82,9 +78,6 @@
bool filtersChanged: 1;
bool childrenChanged: 1;
bool repaintCountChanged : 1;
- bool platformLayerChanged: 1;
- bool platformLayerUpdated: 1;
- bool platformLayerShouldSwapBuffers: 1;
bool isScrollableChanged: 1;
bool contentsTilingChanged: 1;
};
@@ -115,9 +108,6 @@
, opacity(0)
, replica(InvalidCoordinatedLayerID)
, mask(InvalidCoordinatedLayerID)
-#if USE(COORDINATED_GRAPHICS_THREADED)
- , platformLayerProxy(0)
-#endif
{
}
@@ -139,10 +129,6 @@
DebugVisuals debugVisuals;
RepaintCount repaintCount;
-#if USE(COORDINATED_GRAPHICS_THREADED)
- RefPtr<TextureMapperPlatformLayerProxy> platformLayerProxy;
-#endif
-
bool hasPendingChanges() const
{
return changeMask;