Diff
Modified: trunk/Source/WebCore/ChangeLog (234138 => 234139)
--- trunk/Source/WebCore/ChangeLog 2018-07-24 08:24:35 UTC (rev 234138)
+++ trunk/Source/WebCore/ChangeLog 2018-07-24 08:54:00 UTC (rev 234139)
@@ -1,3 +1,45 @@
+2018-07-24 Zan Dobersek <[email protected]>
+
+ [TextureMapper] Separate repaint counter state from debug visuals
+ https://bugs.webkit.org/show_bug.cgi?id=187946
+
+ Reviewed by Carlos Garcia Campos.
+
+ Instead of managing the repaint counter visibility along with the
+ debug border visuals, do that together with the repaint count value.
+
+ TextureMapperLayer::setRepaintCount() is renamed to setRepaintCounter()
+ and now also sets the repaint counter visibility state instead of the
+ setDebugVisuals() method.
+
+ GraphicsLayerTextureMapper implementation is adjusted appropriately.
+ The unused setRepaintCount() method is also removed.
+
+ CoordinatedGraphicsLayerState now holds repaint counter state (both
+ visibility and count value) in a struct that's separate from debug
+ border state. CoordinatedGraphicsLayer implementation now updates
+ that state accordingly.
+
+ No new tests -- no change in behavior.
+
+ * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
+ (WebCore::GraphicsLayerTextureMapper::setShowRepaintCounter):
+ (WebCore::GraphicsLayerTextureMapper::commitLayerChanges):
+ (WebCore::GraphicsLayerTextureMapper::setRepaintCount): Deleted.
+ * platform/graphics/texmap/GraphicsLayerTextureMapper.h:
+ * platform/graphics/texmap/TextureMapperLayer.cpp:
+ (WebCore::TextureMapperLayer::setDebugVisuals):
+ (WebCore::TextureMapperLayer::setRepaintCounter):
+ (WebCore::TextureMapperLayer::setRepaintCount): Deleted.
+ * platform/graphics/texmap/TextureMapperLayer.h:
+ * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
+ (WebCore::CoordinatedGraphicsLayer::didUpdateTileBuffers):
+ (WebCore::CoordinatedGraphicsLayer::setShowRepaintCounter):
+ (WebCore::CoordinatedGraphicsLayer::syncLayerState):
+ * platform/graphics/texmap/coordinated/CoordinatedGraphicsState.h:
+ (WebCore::CoordinatedGraphicsLayerState::CoordinatedGraphicsLayerState):
+ (WebCore::DebugVisuals::DebugVisuals): Deleted.
+
2018-07-24 Thibault Saunier <[email protected]>
[WPE][GTK] Implement PeerConnection API on top of libwebrtc
Modified: trunk/Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.cpp (234138 => 234139)
--- trunk/Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.cpp 2018-07-24 08:24:35 UTC (rev 234138)
+++ trunk/Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.cpp 2018-07-24 08:54:00 UTC (rev 234139)
@@ -339,7 +339,7 @@
return;
GraphicsLayer::setShowRepaintCounter(show);
- notifyChange(DebugVisualsChange);
+ notifyChange(RepaintCountChange);
}
void GraphicsLayerTextureMapper::flushCompositingStateForThisLayerOnly()
@@ -449,10 +449,10 @@
m_layer.setBackingStore(m_backingStore.get());
if (m_changeMask & DebugVisualsChange)
- m_layer.setDebugVisuals(isShowingDebugBorder(), debugBorderColor(), debugBorderWidth(), isShowingRepaintCounter());
+ m_layer.setDebugVisuals(isShowingDebugBorder(), debugBorderColor(), debugBorderWidth());
if (m_changeMask & RepaintCountChange)
- m_layer.setRepaintCount(repaintCount());
+ m_layer.setRepaintCounter(isShowingRepaintCounter(), repaintCount());
if (m_changeMask & ContentChange)
m_layer.setContentsLayer(platformLayer());
@@ -607,11 +607,5 @@
return canCompositeFilters;
}
-void GraphicsLayerTextureMapper::setRepaintCount(int repaintCount)
-{
- m_repaintCount = repaintCount;
- notifyChange(RepaintCountChange);
}
-
-}
#endif
Modified: trunk/Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.h (234138 => 234139)
--- trunk/Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.h 2018-07-24 08:24:35 UTC (rev 234138)
+++ trunk/Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.h 2018-07-24 08:54:00 UTC (rev 234139)
@@ -90,7 +90,6 @@
Color debugBorderColor() const { return m_debugBorderColor; }
float debugBorderWidth() const { return m_debugBorderWidth; }
- void setRepaintCount(int);
private:
// GraphicsLayer
Modified: trunk/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp (234138 => 234139)
--- trunk/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp 2018-07-24 08:24:35 UTC (rev 234138)
+++ trunk/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp 2018-07-24 08:54:00 UTC (rev 234139)
@@ -595,16 +595,16 @@
m_state.filters = filters;
}
-void TextureMapperLayer::setDebugVisuals(bool showDebugBorders, const Color& debugBorderColor, float debugBorderWidth, bool showRepaintCounter)
+void TextureMapperLayer::setDebugVisuals(bool showDebugBorders, const Color& debugBorderColor, float debugBorderWidth)
{
m_state.showDebugBorders = showDebugBorders;
m_state.debugBorderColor = debugBorderColor;
m_state.debugBorderWidth = debugBorderWidth;
- m_state.showRepaintCounter = showRepaintCounter;
}
-void TextureMapperLayer::setRepaintCount(int repaintCount)
+void TextureMapperLayer::setRepaintCounter(bool showRepaintCounter, int repaintCount)
{
+ m_state.showRepaintCounter = showRepaintCounter;
m_state.repaintCount = repaintCount;
}
Modified: trunk/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.h (234138 => 234139)
--- trunk/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.h 2018-07-24 08:24:35 UTC (rev 234138)
+++ trunk/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.h 2018-07-24 08:54:00 UTC (rev 234139)
@@ -83,9 +83,8 @@
return !m_currentFilters.isEmpty();
}
- void setDebugVisuals(bool showDebugBorders, const Color& debugBorderColor, float debugBorderWidth, bool showRepaintCounter);
- bool isShowingRepaintCounter() const { return m_state.showRepaintCounter; }
- void setRepaintCount(int);
+ void setDebugVisuals(bool showDebugBorders, const Color& debugBorderColor, float debugBorderWidth);
+ void setRepaintCounter(bool showRepaintCounter, int repaintCount);
void setContentsLayer(TextureMapperPlatformLayer*);
void setAnimations(const TextureMapperAnimations&);
void setBackingStore(TextureMapperBackingStore*);
Modified: trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp (234138 => 234139)
--- trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp 2018-07-24 08:24:35 UTC (rev 234138)
+++ trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp 2018-07-24 08:54:00 UTC (rev 234139)
@@ -100,7 +100,7 @@
return;
auto repaintCount = incrementRepaintCount();
- m_layerState.repaintCount = repaintCount;
+ m_layerState.repaintCount.count = repaintCount;
m_layerState.repaintCountChanged = true;
m_nicosia.repaintCounter.count = repaintCount;
m_nicosia.delta.repaintCounterChanged = true;
@@ -504,8 +504,8 @@
return;
GraphicsLayer::setShowRepaintCounter(show);
- m_layerState.debugVisuals.showRepaintCounter = show;
- m_layerState.debugVisualsChanged = true;
+ m_layerState.repaintCount.showRepaintCounter = show;
+ m_layerState.repaintCountChanged = true;
m_nicosia.repaintCounter.visible = show;
m_nicosia.delta.repaintCounterChanged = true;
@@ -702,11 +702,11 @@
if (m_layerState.debugVisualsChanged) {
m_layerState.debugVisuals.showDebugBorders = isShowingDebugBorder();
- m_layerState.debugVisuals.showRepaintCounter = isShowingRepaintCounter();
+ if (m_layerState.debugVisuals.showDebugBorders)
+ updateDebugIndicators();
}
-
- if (m_layerState.debugVisuals.showDebugBorders)
- updateDebugIndicators();
+ if (m_layerState.repaintCountChanged)
+ m_layerState.repaintCount.showRepaintCounter = isShowingRepaintCounter();
}
void CoordinatedGraphicsLayer::setDebugBorder(const Color& color, float width)
Modified: trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsState.h (234138 => 234139)
--- trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsState.h 2018-07-24 08:24:35 UTC (rev 234138)
+++ trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsState.h 2018-07-24 08:54:00 UTC (rev 234139)
@@ -66,20 +66,16 @@
};
struct DebugVisuals {
- DebugVisuals()
- : showDebugBorders(false)
- , showRepaintCounter(false) { }
Color debugBorderColor;
float debugBorderWidth { 0 };
- union {
- struct {
- bool showDebugBorders : 1;
- bool showRepaintCounter : 1;
- };
- unsigned flags;
- };
+ bool showDebugBorders { false };
};
+struct RepaintCount {
+ unsigned count { 0 };
+ bool showRepaintCounter { false };
+};
+
struct CoordinatedGraphicsLayerState {
union {
struct {
@@ -134,7 +130,6 @@
, replica(InvalidCoordinatedLayerID)
, mask(InvalidCoordinatedLayerID)
, imageID(InvalidCoordinatedImageBackingID)
- , repaintCount(0)
#if USE(COORDINATED_GRAPHICS_THREADED)
, platformLayerProxy(0)
#endif
@@ -160,8 +155,8 @@
CoordinatedLayerID mask;
CoordinatedImageBackingID imageID;
DebugVisuals debugVisuals;
+ RepaintCount repaintCount;
- unsigned repaintCount;
Vector<TileUpdateInfo> tilesToUpdate;
#if USE(COORDINATED_GRAPHICS_THREADED)
Modified: trunk/Source/WebKit/ChangeLog (234138 => 234139)
--- trunk/Source/WebKit/ChangeLog 2018-07-24 08:24:35 UTC (rev 234138)
+++ trunk/Source/WebKit/ChangeLog 2018-07-24 08:54:00 UTC (rev 234139)
@@ -1,3 +1,25 @@
+2018-07-24 Zan Dobersek <[email protected]>
+
+ [TextureMapper] Separate repaint counter state from debug visuals
+ https://bugs.webkit.org/show_bug.cgi?id=187946
+
+ Reviewed by Carlos Garcia Campos.
+
+ Instead of managing the repaint counter visibility along with the
+ debug border visuals, do that together with the repaint count value.
+
+ In the CoordinatedGraphicsScene class, remove the helper
+ setLayerRepaintCountIfNeeded() method that's only been called in one
+ place, and instead set the repaint count information on the
+ TextureMapperLayer object directly from setLayerState(). The repaint
+ counter visiblity and count value are gathered from the new struct
+ that's kept on the CoordinatedGraphicsLayerState object.
+
+ * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
+ (WebKit::CoordinatedGraphicsScene::setLayerState):
+ (WebKit::CoordinatedGraphicsScene::setLayerRepaintCountIfNeeded): Deleted.
+ * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.h:
+
2018-07-24 Thibault Saunier <[email protected]>
[WPE][GTK] Implement WebRTC based on libwebrtc
Modified: trunk/Source/WebKit/Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp (234138 => 234139)
--- trunk/Source/WebKit/Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp 2018-07-24 08:24:35 UTC (rev 234138)
+++ trunk/Source/WebKit/Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp 2018-07-24 08:54:00 UTC (rev 234139)
@@ -128,14 +128,6 @@
}
#endif
-void CoordinatedGraphicsScene::setLayerRepaintCountIfNeeded(TextureMapperLayer* layer, const CoordinatedGraphicsLayerState& state)
-{
- if (!layer->isShowingRepaintCounter() || !state.repaintCountChanged)
- return;
-
- layer->setRepaintCount(state.repaintCount);
-}
-
void CoordinatedGraphicsScene::setLayerChildrenIfNeeded(TextureMapperLayer* layer, const CoordinatedGraphicsLayerState& state)
{
if (!state.childrenChanged)
@@ -192,7 +184,9 @@
layer->setSolidColor(layerState.solidColor);
if (layerState.debugVisualsChanged)
- layer->setDebugVisuals(layerState.debugVisuals.showDebugBorders, layerState.debugVisuals.debugBorderColor, layerState.debugVisuals.debugBorderWidth, layerState.debugVisuals.showRepaintCounter);
+ layer->setDebugVisuals(layerState.debugVisuals.showDebugBorders, layerState.debugVisuals.debugBorderColor, layerState.debugVisuals.debugBorderWidth);
+ if (layerState.repaintCountChanged)
+ layer->setRepaintCounter(layerState.repaintCount.showRepaintCounter, layerState.repaintCount.count);
if (layerState.replicaChanged)
layer->setReplicaLayer(getLayerByIDIfExists(layerState.replica));
@@ -223,7 +217,6 @@
removeTilesIfNeeded(layer, layerState, commitScope);
updateTilesIfNeeded(layer, layerState, commitScope);
syncPlatformLayerIfNeeded(layer, layerState);
- setLayerRepaintCountIfNeeded(layer, layerState);
}
TextureMapperLayer* CoordinatedGraphicsScene::getLayerByIDIfExists(CoordinatedLayerID id)
Modified: trunk/Source/WebKit/Shared/CoordinatedGraphics/CoordinatedGraphicsScene.h (234138 => 234139)
--- trunk/Source/WebKit/Shared/CoordinatedGraphics/CoordinatedGraphicsScene.h 2018-07-24 08:24:35 UTC (rev 234138)
+++ trunk/Source/WebKit/Shared/CoordinatedGraphics/CoordinatedGraphicsScene.h 2018-07-24 08:54:00 UTC (rev 234139)
@@ -108,7 +108,6 @@
void setLayerFiltersIfNeeded(WebCore::TextureMapperLayer*, const WebCore::CoordinatedGraphicsLayerState&);
void setLayerAnimationsIfNeeded(WebCore::TextureMapperLayer*, const WebCore::CoordinatedGraphicsLayerState&);
void syncPlatformLayerIfNeeded(WebCore::TextureMapperLayer*, const WebCore::CoordinatedGraphicsLayerState&);
- void setLayerRepaintCountIfNeeded(WebCore::TextureMapperLayer*, const WebCore::CoordinatedGraphicsLayerState&);
void syncImageBackings(const WebCore::CoordinatedGraphicsState&, CommitScope&);
void createImageBacking(WebCore::CoordinatedImageBackingID);