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
+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
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();
updateChildList();
}
+ m_layer->setPreserves3D(m_preserves3D);
updateOpacityOnLayer();
updateNames();
}
return GraphicsLayer::drawsContent();
}
-bool GraphicsLayerChromium::preserves3D() const
-{
- return GraphicsLayer::preserves3D();
-}
-
void GraphicsLayerChromium::paintContents(GraphicsContext& context, const IntRect& clip)
{
paintGraphicsLayerContents(context, clip);
// 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();
, m_doubleSided(true)
, m_usesLayerScissor(false)
, m_isNonCompositedContent(false)
+ , m_preserves3D(false)
, m_replicaLayer(0)
, m_drawOpacity(0)
, m_targetRenderSurface(0)
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;
};
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; }
bool m_doubleSided;
bool m_usesLayerScissor;
bool m_isNonCompositedContent;
+ bool m_preserves3D;
TransformationMatrix m_transform;
TransformationMatrix m_sublayerTransform;