Title: [92884] trunk/Source/WebCore
- Revision
- 92884
- Author
- [email protected]
- Date
- 2011-08-11 15:29:02 -0700 (Thu, 11 Aug 2011)
Log Message
Avoid adding the visible wash layer twice
https://bugs.webkit.org/show_bug.cgi?id=66098
Reviewed by Chris Marrin.
Fix two issues; only create a m_visibleTileWashLayer if we don't have one
already, and avoid adding multiple m_visibleTileWashLayers to the sublayers
array when flipping between tiled and non-tiled.
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::swapFromOrToTiledLayer):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (92883 => 92884)
--- trunk/Source/WebCore/ChangeLog 2011-08-11 22:02:33 UTC (rev 92883)
+++ trunk/Source/WebCore/ChangeLog 2011-08-11 22:29:02 UTC (rev 92884)
@@ -1,3 +1,17 @@
+2011-08-11 Simon Fraser <[email protected]>
+
+ Avoid adding the visible wash layer twice
+ https://bugs.webkit.org/show_bug.cgi?id=66098
+
+ Reviewed by Chris Marrin.
+
+ Fix two issues; only create a m_visibleTileWashLayer if we don't have one
+ already, and avoid adding multiple m_visibleTileWashLayers to the sublayers
+ array when flipping between tiled and non-tiled.
+
+ * platform/graphics/ca/GraphicsLayerCA.cpp:
+ (WebCore::GraphicsLayerCA::swapFromOrToTiledLayer):
+
2011-08-11 Benjamin Poulain <[email protected]>
The PageSerializer should always use absolute URL
Modified: trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp (92883 => 92884)
--- trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp 2011-08-11 22:02:33 UTC (rev 92883)
+++ trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp 2011-08-11 22:29:02 UTC (rev 92884)
@@ -2118,17 +2118,23 @@
#ifdef VISIBLE_TILE_WASH
if (useTiledLayer) {
- static Color washFillColor(255, 0, 0, 50);
- static Color washBorderColor(255, 0, 0, 100);
-
- m_visibleTileWashLayer = PlatformCALayer::create(PlatformCALayer::LayerTypeLayer, this);
- m_visibleTileWashLayer->setName("Visible Tile Wash Layer");
- m_visibleTileWashLayer->setAnchorPoint(FloatPoint3D(0, 0, 0));
- m_visibleTileWashLayer->setBorderColor(washBorderColor);
- m_visibleTileWashLayer->setBorderWidth(8);
- m_visibleTileWashLayer->setBackgroundColor(washFillColor);
- } else
+ if (!m_visibleTileWashLayer) {
+ static Color washFillColor(255, 0, 0, 50);
+ static Color washBorderColor(255, 0, 0, 100);
+
+ m_visibleTileWashLayer = PlatformCALayer::create(PlatformCALayer::LayerTypeLayer, this);
+ String name = String::format("Visible Tile Wash Layer %p", m_visibleTileWashLayer->platformLayer());
+ m_visibleTileWashLayer->setName(name);
+ m_visibleTileWashLayer->setAnchorPoint(FloatPoint3D(0, 0, 0));
+ m_visibleTileWashLayer->setBorderColor(washBorderColor);
+ m_visibleTileWashLayer->setBorderWidth(8);
+ m_visibleTileWashLayer->setBackgroundColor(washFillColor);
+ }
+ } else {
+ if (m_visibleTileWashLayer)
+ m_visibleTileWashLayer->removeFromSuperlayer();
m_visibleTileWashLayer = 0;
+ }
#endif
if (useTiledLayer) {
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes