diff options
Diffstat (limited to 'WebCore/platform/graphics/chromium/GraphicsLayerChromium.cpp')
-rw-r--r-- | WebCore/platform/graphics/chromium/GraphicsLayerChromium.cpp | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/WebCore/platform/graphics/chromium/GraphicsLayerChromium.cpp b/WebCore/platform/graphics/chromium/GraphicsLayerChromium.cpp index a01a17f..1d67857 100644 --- a/WebCore/platform/graphics/chromium/GraphicsLayerChromium.cpp +++ b/WebCore/platform/graphics/chromium/GraphicsLayerChromium.cpp @@ -53,7 +53,7 @@ #include "PlatformString.h" #include "SystemTime.h" #include "TransformLayerChromium.h" -#include "WebGLLayerChromium.h" + #include <wtf/CurrentTime.h> #include <wtf/StringExtras.h> #include <wtf/text/CString.h> @@ -69,7 +69,7 @@ static void setLayerBorderColor(LayerChromium& layer, const Color& color) static void clearBorderColor(LayerChromium& layer) { - layer.setBorderColor(0); + layer.setBorderColor(static_cast<RGBA32>(0)); } static void setLayerBackgroundColor(LayerChromium& layer, const Color& color) @@ -79,7 +79,7 @@ static void setLayerBackgroundColor(LayerChromium& layer, const Color& color) static void clearLayerBackgroundColor(LayerChromium& layer) { - layer.setBackgroundColor(0); + layer.setBackgroundColor(static_cast<RGBA32>(0)); } GraphicsLayer::CompositingCoordinatesOrientation GraphicsLayer::compositingCoordinatesOrientation() @@ -285,6 +285,11 @@ void GraphicsLayerChromium::setOpacity(float opacity) primaryLayer()->setOpacity(opacity); } +void GraphicsLayerChromium::setContentsNeedsDisplay() +{ + if (m_contentsLayer) + m_contentsLayer->setNeedsDisplay(); +} void GraphicsLayerChromium::setNeedsDisplay() { if (drawsContent()) @@ -334,19 +339,17 @@ void GraphicsLayerChromium::setContentsToImage(Image* image) updateSublayerList(); } -#if ENABLE(3D_CANVAS) -void GraphicsLayerChromium::setContentsToWebGL(PlatformLayer* platformLayer) +void GraphicsLayerChromium::setContentsToCanvas(PlatformLayer* platformLayer) { bool childrenChanged = false; if (platformLayer) { - if (!m_contentsLayer.get() || m_contentsLayerPurpose != ContentsLayerForWebGL) { - WebGLLayerChromium* webGLLayer = static_cast<WebGLLayerChromium*>(platformLayer); - setupContentsLayer(webGLLayer); - m_contentsLayer = webGLLayer; - m_contentsLayerPurpose = ContentsLayerForWebGL; + platformLayer->setOwner(this); + if (!m_contentsLayer.get() || m_contentsLayerPurpose != ContentsLayerForCanvas) { + setupContentsLayer(platformLayer); + m_contentsLayer = platformLayer; + m_contentsLayerPurpose = ContentsLayerForCanvas; childrenChanged = true; } - platformLayer->setOwner(this); platformLayer->setNeedsDisplay(); updateContentsRect(); } else { @@ -361,7 +364,6 @@ void GraphicsLayerChromium::setContentsToWebGL(PlatformLayer* platformLayer) if (childrenChanged) updateSublayerList(); } -#endif void GraphicsLayerChromium::setContentsToMedia(PlatformLayer* layer) { |