Remove preserves3D() from CCLayerDelegate, replacing it by setting the

value explicitly after creating a layer, or setting its delegate.
https://bugs.webkit.org/show_bug.cgi?id=68295

Patch by Antoine Labour <piman@chromium.org> on 2011-09-23
Reviewed by James Robinson.

Covered by compositing/ layeout tests.

* platform/graphics/chromium/GraphicsLayerChromium.cpp:
(WebCore::GraphicsLayerChromium::setContentsToCanvas):
(WebCore::GraphicsLayerChromium::setContentsToMedia):
(WebCore::GraphicsLayerChromium::updateLayerPreserves3D):
(WebCore::GraphicsLayerChromium::setupContentsLayer):
* platform/graphics/chromium/GraphicsLayerChromium.h:
* platform/graphics/chromium/LayerChromium.cpp:
(WebCore::LayerChromium::LayerChromium):
* platform/graphics/chromium/LayerChromium.h:
(WebCore::LayerChromium::setPreserves3D):
(WebCore::LayerChromium::preserves3D):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95886 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent e70ec422
2011-09-23 Antoine Labour <piman@chromium.org>
Remove preserves3D() from CCLayerDelegate, replacing it by setting the
value explicitly after creating a layer, or setting its delegate.
https://bugs.webkit.org/show_bug.cgi?id=68295
Reviewed by James Robinson.
Covered by compositing/ layeout tests.
* platform/graphics/chromium/GraphicsLayerChromium.cpp:
(WebCore::GraphicsLayerChromium::setContentsToCanvas):
(WebCore::GraphicsLayerChromium::setContentsToMedia):
(WebCore::GraphicsLayerChromium::updateLayerPreserves3D):
(WebCore::GraphicsLayerChromium::setupContentsLayer):
* platform/graphics/chromium/GraphicsLayerChromium.h:
* platform/graphics/chromium/LayerChromium.cpp:
(WebCore::LayerChromium::LayerChromium):
* platform/graphics/chromium/LayerChromium.h:
(WebCore::LayerChromium::setPreserves3D):
(WebCore::LayerChromium::preserves3D):
2011-09-23 Julien Chaffraix <jchaffraix@webkit.org>
Implicit conversion double to float in ShadowBlur::adjustBlurRadius
......@@ -551,6 +551,7 @@ void GraphicsLayerChromium::updateLayerPreserves3D()
if (m_preserves3D && !m_transformLayer) {
// Create the transform layer.
m_transformLayer = LayerChromium::create(this);
m_transformLayer->setPreserves3D(true);
// Copy the position from this layer.
updateLayerPosition();
......@@ -592,6 +593,7 @@ void GraphicsLayerChromium::updateLayerPreserves3D()
updateChildList();
}
m_layer->setPreserves3D(m_preserves3D);
updateOpacityOnLayer();
updateNames();
}
......@@ -671,11 +673,6 @@ bool GraphicsLayerChromium::drawsContent() const
return GraphicsLayer::drawsContent();
}
bool GraphicsLayerChromium::preserves3D() const
{
return GraphicsLayer::preserves3D();
}
void GraphicsLayerChromium::paintContents(GraphicsContext& context, const IntRect& clip)
{
paintGraphicsLayerContents(context, clip);
......
......@@ -97,7 +97,6 @@ public:
// The following functions implement the CCLayerDelegate interface.
virtual bool drawsContent() const;
virtual bool preserves3D() const;
virtual void paintContents(GraphicsContext&, const IntRect& clip);
virtual void notifySyncRequired();
......
......@@ -70,6 +70,7 @@ LayerChromium::LayerChromium(CCLayerDelegate* delegate)
, m_doubleSided(true)
, m_usesLayerScissor(false)
, m_isNonCompositedContent(false)
, m_preserves3D(false)
, m_replicaLayer(0)
, m_drawOpacity(0)
, m_targetRenderSurface(0)
......
......@@ -59,7 +59,6 @@ class CCLayerDelegate {
public:
virtual ~CCLayerDelegate() { }
virtual bool drawsContent() const = 0;
virtual bool preserves3D() const = 0;
virtual void paintContents(GraphicsContext&, const IntRect& clip) = 0;
virtual void notifySyncRequired() = 0;
};
......@@ -134,7 +133,8 @@ public:
bool doubleSided() const { return m_doubleSided; }
void setDoubleSided(bool doubleSided) { m_doubleSided = doubleSided; setNeedsCommit(); }
bool preserves3D() const { return m_delegate && m_delegate->preserves3D(); }
void setPreserves3D(bool preserve3D) { m_preserves3D = preserve3D; }
bool preserves3D() const { return m_preserves3D; }
void setUsesLayerScissor(bool usesLayerScissor) { m_usesLayerScissor = usesLayerScissor; }
bool usesLayerScissor() const { return m_usesLayerScissor; }
......@@ -249,6 +249,7 @@ private:
bool m_doubleSided;
bool m_usesLayerScissor;
bool m_isNonCompositedContent;
bool m_preserves3D;
TransformationMatrix m_transform;
TransformationMatrix m_sublayerTransform;
......
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