Title: [233910] trunk/Source/WebCore
- Revision
- 233910
- Author
- [email protected]
- Date
- 2018-07-18 03:22:15 -0700 (Wed, 18 Jul 2018)
Log Message
[Nicosia] Add debug border, repaint counter state tracking to Nicosia::CompositionLayer
https://bugs.webkit.org/show_bug.cgi?id=187749
Reviewed by Carlos Garcia Campos.
Add the RepaintCounter and DebugBorder structs to
Nicosia::CompositionLayer::LayerState, tracking visibility as well as
repaint count or debug color and width.
Instances of RepaintCounter and DebugBorder types are kept in each
CoordinatedGraphicsLayer object, updating the relevant data as it is
changed (since the GraphicsLayer object isn't tracking these values on
its own). During layer flush these values (if changed) are then copied
over into the CompositionLayer state.
* platform/graphics/nicosia/NicosiaPlatformLayer.cpp:
Also fix the year in the license header.
* platform/graphics/nicosia/NicosiaPlatformLayer.h:
Also fix the year in the license header.
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
(WebCore::CoordinatedGraphicsLayer::didUpdateTileBuffers):
(WebCore::CoordinatedGraphicsLayer::setShowDebugBorder):
(WebCore::CoordinatedGraphicsLayer::setShowRepaintCounter):
(WebCore::CoordinatedGraphicsLayer::setDebugBorder):
(WebCore::CoordinatedGraphicsLayer::flushCompositingStateForThisLayerOnly):
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (233909 => 233910)
--- trunk/Source/WebCore/ChangeLog 2018-07-18 10:20:21 UTC (rev 233909)
+++ trunk/Source/WebCore/ChangeLog 2018-07-18 10:22:15 UTC (rev 233910)
@@ -1,5 +1,34 @@
2018-07-18 Zan Dobersek <[email protected]>
+ [Nicosia] Add debug border, repaint counter state tracking to Nicosia::CompositionLayer
+ https://bugs.webkit.org/show_bug.cgi?id=187749
+
+ Reviewed by Carlos Garcia Campos.
+
+ Add the RepaintCounter and DebugBorder structs to
+ Nicosia::CompositionLayer::LayerState, tracking visibility as well as
+ repaint count or debug color and width.
+
+ Instances of RepaintCounter and DebugBorder types are kept in each
+ CoordinatedGraphicsLayer object, updating the relevant data as it is
+ changed (since the GraphicsLayer object isn't tracking these values on
+ its own). During layer flush these values (if changed) are then copied
+ over into the CompositionLayer state.
+
+ * platform/graphics/nicosia/NicosiaPlatformLayer.cpp:
+ Also fix the year in the license header.
+ * platform/graphics/nicosia/NicosiaPlatformLayer.h:
+ Also fix the year in the license header.
+ * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
+ (WebCore::CoordinatedGraphicsLayer::didUpdateTileBuffers):
+ (WebCore::CoordinatedGraphicsLayer::setShowDebugBorder):
+ (WebCore::CoordinatedGraphicsLayer::setShowRepaintCounter):
+ (WebCore::CoordinatedGraphicsLayer::setDebugBorder):
+ (WebCore::CoordinatedGraphicsLayer::flushCompositingStateForThisLayerOnly):
+ * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
+
+2018-07-18 Zan Dobersek <[email protected]>
+
[CoordGraphics] Start tracking Nicosia layers in CoordinatedGraphicsState
https://bugs.webkit.org/show_bug.cgi?id=187751
Modified: trunk/Source/WebCore/platform/graphics/nicosia/NicosiaPlatformLayer.cpp (233909 => 233910)
--- trunk/Source/WebCore/platform/graphics/nicosia/NicosiaPlatformLayer.cpp 2018-07-18 10:20:21 UTC (rev 233909)
+++ trunk/Source/WebCore/platform/graphics/nicosia/NicosiaPlatformLayer.cpp 2018-07-18 10:22:15 UTC (rev 233910)
@@ -1,6 +1,6 @@
/*
- * Copyright (C) 2017 Metrological Group B.V.
- * Copyright (C) 2017 Igalia S.L.
+ * Copyright (C) 2018 Metrological Group B.V.
+ * Copyright (C) 2018 Igalia S.L.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
Modified: trunk/Source/WebCore/platform/graphics/nicosia/NicosiaPlatformLayer.h (233909 => 233910)
--- trunk/Source/WebCore/platform/graphics/nicosia/NicosiaPlatformLayer.h 2018-07-18 10:20:21 UTC (rev 233909)
+++ trunk/Source/WebCore/platform/graphics/nicosia/NicosiaPlatformLayer.h 2018-07-18 10:22:15 UTC (rev 233910)
@@ -1,6 +1,6 @@
/*
- * Copyright (C) 2017 Metrological Group B.V.
- * Copyright (C) 2017 Igalia S.L.
+ * Copyright (C) 2018 Metrological Group B.V.
+ * Copyright (C) 2018 Igalia S.L.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -87,6 +87,8 @@
bool maskChanged : 1;
bool replicaChanged : 1;
bool flagsChanged : 1;
+ bool repaintCounterChanged : 1;
+ bool debugBorderChanged : 1;
};
uint32_t value { 0 };
};
@@ -128,6 +130,16 @@
Vector<RefPtr<CompositionLayer>> children;
RefPtr<CompositionLayer> replica;
RefPtr<CompositionLayer> mask;
+
+ struct RepaintCounter {
+ unsigned count { 0 };
+ bool visible { false };
+ } repaintCounter;
+ struct DebugBorder {
+ WebCore::Color color;
+ float width { 0 };
+ bool visible { false };
+ } debugBorder;
};
template<typename T>
Modified: trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp (233909 => 233910)
--- trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp 2018-07-18 10:20:21 UTC (rev 233909)
+++ trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp 2018-07-18 10:22:15 UTC (rev 233910)
@@ -99,8 +99,11 @@
if (!isShowingRepaintCounter())
return;
- m_layerState.repaintCount = incrementRepaintCount();
+ auto repaintCount = incrementRepaintCount();
+ m_layerState.repaintCount = repaintCount;
m_layerState.repaintCountChanged = true;
+ m_nicosia.repaintCounter.count = repaintCount;
+ m_nicosia.delta.repaintCounterChanged = true;
}
void CoordinatedGraphicsLayer::setShouldUpdateVisibleRect()
@@ -489,6 +492,8 @@
GraphicsLayer::setShowDebugBorder(show);
m_layerState.debugVisuals.showDebugBorders = show;
m_layerState.debugVisualsChanged = true;
+ m_nicosia.debugBorder.visible = show;
+ m_nicosia.delta.debugBorderChanged = true;
didChangeLayerState();
}
@@ -501,6 +506,8 @@
GraphicsLayer::setShowRepaintCounter(show);
m_layerState.debugVisuals.showRepaintCounter = show;
m_layerState.debugVisualsChanged = true;
+ m_nicosia.repaintCounter.visible = show;
+ m_nicosia.delta.repaintCounterChanged = true;
didChangeLayerState();
}
@@ -707,11 +714,15 @@
if (m_layerState.debugVisuals.debugBorderColor != color) {
m_layerState.debugVisuals.debugBorderColor = color;
m_layerState.debugVisualsChanged = true;
+ m_nicosia.debugBorder.color = color;
+ m_nicosia.delta.debugBorderChanged = true;
}
if (m_layerState.debugVisuals.debugBorderWidth != width) {
m_layerState.debugVisuals.debugBorderWidth = width;
m_layerState.debugVisualsChanged = true;
+ m_nicosia.debugBorder.width = width;
+ m_nicosia.delta.debugBorderChanged = true;
}
}
@@ -833,6 +844,11 @@
state.flags.masksToBounds = masksToBounds();
state.flags.preserves3D = preserves3D();
}
+
+ if (localDelta.repaintCounterChanged)
+ state.repaintCounter = m_nicosia.repaintCounter;
+ if (localDelta.debugBorderChanged)
+ state.debugBorder = m_nicosia.debugBorder;
});
m_nicosia.delta = { };
}
Modified: trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h (233909 => 233910)
--- trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h 2018-07-18 10:20:21 UTC (rev 233909)
+++ trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h 2018-07-18 10:22:15 UTC (rev 233910)
@@ -229,6 +229,8 @@
struct {
RefPtr<Nicosia::CompositionLayer> layer;
Nicosia::CompositionLayer::LayerState::Delta delta;
+ Nicosia::CompositionLayer::LayerState::RepaintCounter repaintCounter;
+ Nicosia::CompositionLayer::LayerState::DebugBorder debugBorder;
} m_nicosia;
};
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes