summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp')
-rw-r--r--Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp b/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp
index 427c7bf..8fb4c9f 100644
--- a/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp
+++ b/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp
@@ -255,6 +255,7 @@ GraphicsLayerCA::GraphicsLayerCA(GraphicsLayerClient* client)
, m_contentsLayerHasBackgroundColor(false)
, m_uncommittedChanges(NoChange)
, m_contentsScale(1)
+ , m_allowTiledLayer(true)
{
m_layer = PlatformCALayer::create(PlatformCALayer::LayerTypeWebLayer, this);
@@ -492,6 +493,17 @@ void GraphicsLayerCA::setAcceleratesDrawing(bool acceleratesDrawing)
noteLayerPropertyChanged(AcceleratesDrawingChanged);
}
+void GraphicsLayerCA::setAllowTiledLayer(bool allowTiledLayer)
+{
+ if (allowTiledLayer == m_allowTiledLayer)
+ return;
+
+ m_allowTiledLayer = allowTiledLayer;
+
+ // Handling this as a SizeChanged will cause use to switch in or out of tiled layer as needed
+ noteLayerPropertyChanged(SizeChanged);
+}
+
void GraphicsLayerCA::setBackgroundColor(const Color& color)
{
if (m_backgroundColorSet && m_backgroundColor == color)
@@ -2005,7 +2017,7 @@ FloatSize GraphicsLayerCA::constrainedSize() const
bool GraphicsLayerCA::requiresTiledLayer(const FloatSize& size) const
{
- if (!m_drawsContent)
+ if (!m_drawsContent || !m_allowTiledLayer)
return false;
// FIXME: catch zero-size height or width here (or earlier)?