Commit 728883c0 authored by bfulgham@apple.com's avatar bfulgham@apple.com

[Windows] Windows is incorrectly using a LayerTypeTiledBackingLayer

https://bugs.webkit.org/show_bug.cgi?id=119772

Reviewed by Simon Fraser.

* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::swapFromOrToTiledLayer): Ensure that we use
the correct (supported) tiled layer type for Windows.
* platform/graphics/ca/win/PlatformCALayerWin.cpp:
(PlatformCALayer::PlatformCALayer): Add an assertion to notify us if
we introduce this mistake again in the future.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154030 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent ba861f8b
2013-08-13 Brent Fulgham <bfulgham@apple.com>
[Windows] Windows is incorrectly using a LayerTypeTiledBackingLayer
https://bugs.webkit.org/show_bug.cgi?id=119772
Reviewed by Simon Fraser.
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::swapFromOrToTiledLayer): Ensure that we use
the correct (supported) tiled layer type for Windows.
* platform/graphics/ca/win/PlatformCALayerWin.cpp:
(PlatformCALayer::PlatformCALayer): Add an assertion to notify us if
we introduce this mistake again in the future.
2013-08-13 Anders Carlsson <andersca@apple.com>
<https://webkit.org/b/119771> Use NeverDestroyed for smart pointer slot static locals
......@@ -2682,8 +2682,15 @@ void GraphicsLayerCA::swapFromOrToTiledLayer(bool useTiledLayer)
ASSERT(m_layer->layerType() != PlatformCALayer::LayerTypePageTiledBackingLayer);
ASSERT(useTiledLayer != m_usingTiledBacking);
RefPtr<PlatformCALayer> oldLayer = m_layer;
m_layer = PlatformCALayer::create(useTiledLayer ? PlatformCALayer::LayerTypeTiledBackingLayer : PlatformCALayer::LayerTypeWebLayer, this);
#if PLATFORM(WIN)
PlatformCALayer::LayerType layerType = useTiledLayer ? PlatformCALayer::LayerTypeWebTiledLayer : PlatformCALayer::LayerTypeWebLayer;
#else
PlatformCALayer::LayerType layerType = useTiledLayer ? PlatformCALayer::LayerTypeTiledBackingLayer : PlatformCALayer::LayerTypeWebLayer;
#endif
m_layer = PlatformCALayer::create(layerType, this);
m_usingTiledBacking = useTiledLayer;
m_layer->adoptSublayers(oldLayer.get());
......
......@@ -116,6 +116,7 @@ PlatformCALayer::PlatformCALayer(LayerType layerType, PlatformLayer* layer, Plat
m_layer = layer;
} else {
m_layerType = layerType;
ASSERT((layerType != LayerTypeTiledBackingLayer) && (layerType != LayerTypePageTiledBackingLayer));
m_layer = adoptCF(CACFLayerCreate(toCACFLayerType(layerType)));
// Create the PlatformCALayerWinInternal object and point to it in the userdata.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment