Source/Platform/ChangeLog

 12012-06-13 Christopher Cameron <ccameron@chromium.org>
 2
 3 [chromium] webkit-backface-visibility doesn't work with video
 4 https://bugs.webkit.org/show_bug.cgi?id=88908
 5
 6 When determining a contents layer's backface culling, use the parent
 7 layer's transform and backface-visibility properties. Track which
 8 layers need this special treatment with useParentBackfaceVisibility
 9 and setUseParentBackfaceVisibility functions in WebCore::LayerChromium,
 10 WebKit::WebLayer, and WebCore::CCLayerImpl.
 11
 12 Reviewed by NOBODY (OOPS!).
 13
 14 * chromium/public/WebLayer.h:
 15 (WebLayer):
 16 Add an accessor to specify that a layer should use its parent's
 17 backface culling behavior.
 18
1192012-06-11 James Robinson <jamesr@chromium.org>
220
321 [chromium] Port DrawingBufferChromium from TextureLayerChromium over to WebExternalTextureLayer

Source/WebCore/ChangeLog

 12012-06-13 Christopher Cameron <ccameron@chromium.org>
 2
 3 [chromium] webkit-backface-visibility doesn't work with video
 4 https://bugs.webkit.org/show_bug.cgi?id=88908
 5
 6 When determining a contents layer's backface culling, use the parent
 7 layer's transform and backface-visibility properties. Track which
 8 layers need this special treatment with useParentBackfaceVisibility
 9 and setUseParentBackfaceVisibility functions in WebCore::LayerChromium,
 10 WebKit::WebLayer, and WebCore::CCLayerImpl.
 11
 12 Reviewed by NOBODY (OOPS!).
 13
 14 * platform/graphics/chromium/GraphicsLayerChromium.cpp:
 15 (WebCore::GraphicsLayerChromium::setupContentsLayer):
 16 When a contents layer is added, tag it as inheriting its backface
 17 culling from its parent.
 18 * platform/graphics/chromium/LayerChromium.cpp:
 19 (WebCore::LayerChromium::LayerChromium):
 20 Initialize new m_useParentBackfaceVisibility member variable.
 21 (WebCore::LayerChromium::pushPropertiesTo):
 22 Propagate m_useParentBackfaceVisibility to CCLayerImpl.
 23 * platform/graphics/chromium/LayerChromium.h:
 24 (WebCore::LayerChromium::setUseParentBackfaceVisibility):
 25 (WebCore::LayerChromium::useParentBackfaceVisibility):
 26 (LayerChromium):
 27 Add m_useParentBackfaceVisibility member variable and modify
 28 and query accessors.
 29 * platform/graphics/chromium/cc/CCLayerImpl.cpp:
 30 (WebCore::CCLayerImpl::CCLayerImpl):
 31 Initialize new m_useParentBackfaceVisibility member variable.
 32 * platform/graphics/chromium/cc/CCLayerImpl.h:
 33 (WebCore::CCLayerImpl::setUseParentBackfaceVisibility):
 34 (WebCore::CCLayerImpl::useParentBackfaceVisibility):
 35 (CCLayerImpl):
 36 Add m_useParentBackfaceVisibility member variable and modify
 37 and query accessors.
 38 * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
 39 (WebCore::layerShouldBeSkipped):
 40 When examining a layer, if the layer has
 41 useParentBackfaceVisibility set then use the layer's parent
 42 layer to determine backface culling.
 43
1442012-06-12 Sami Kyostila <skyostil@chromium.org>
245
346 [chromium] Don't crash in CCLayerIterator if the root layer doesn't have a render surface

Source/WebKit/chromium/ChangeLog

 12012-06-13 Christopher Cameron <ccameron@chromium.org>
 2
 3 [chromium] webkit-backface-visibility doesn't work with video
 4 https://bugs.webkit.org/show_bug.cgi?id=88908
 5
 6 When determining a contents layer's backface culling, use the parent
 7 layer's transform and backface-visibility properties. Track which
 8 layers need this special treatment with useParentBackfaceVisibility
 9 and setUseParentBackfaceVisibility functions in WebCore::LayerChromium,
 10 WebKit::WebLayer, and WebCore::CCLayerImpl.
 11
 12 Reviewed by NOBODY (OOPS!).
 13
 14 * src/WebLayer.cpp:
 15 (WebKit::WebLayer::setUseParentBackfaceVisibility):
 16 Add an accessor to specify that a layer should use its parent's
 17 backface culling behavior.
 18
1192012-06-12 Adrienne Walker <enne@google.com>
220
321 [chromium] Fix incorrect LayerChromium scroll position for RTL overflow pages

Source/Platform/chromium/public/WebLayer.h

@@public:
108108 WEBKIT_EXPORT bool drawsContent() const;
109109
110110 WEBKIT_EXPORT void setPreserves3D(bool);
 111
 112 // Set whether this layer is a content layer (e.g, canvas, plugin, WebGL, or video)
 113 WEBKIT_EXPORT void setUseParentBackfaceVisibility(bool);
 114
111115 WEBKIT_EXPORT void setBackgroundColor(WebColor);
112116
113117 // Clear the filters in use by passing in a newly instantiated

Source/WebCore/platform/graphics/chromium/GraphicsLayerChromium.cpp

@@void GraphicsLayerChromium::setupContentsLayer(LayerChromium* contentsLayer)
832832 return;
833833
834834 if (!m_contentsLayer.isNull()) {
 835 m_contentsLayer.setUseParentBackfaceVisibility(false);
835836 m_contentsLayer.removeFromParent();
836837 m_contentsLayer.reset();
837838 }

@@void GraphicsLayerChromium::setupContentsLayer(LayerChromium* contentsLayer)
840841 m_contentsLayer = WebLayer(contentsLayer);
841842
842843 m_contentsLayer.setAnchorPoint(FloatPoint(0, 0));
 844 m_contentsLayer.setUseParentBackfaceVisibility(true);
843845
844846 // It is necessary to call setDrawsContent as soon as we receive the new contentsLayer, for
845847 // the correctness of early exit conditions in setDrawsContent() and setContentsVisible().

Source/WebCore/platform/graphics/chromium/LayerChromium.cpp

@@LayerChromium::LayerChromium()
8282 , m_usesLayerClipping(false)
8383 , m_isNonCompositedContent(false)
8484 , m_preserves3D(false)
 85 , m_useParentBackfaceVisibility(false)
8586 , m_alwaysReserveTextures(false)
8687 , m_drawCheckerboardForMissingTiles(false)
8788 , m_forceRenderSurface(false)

@@void LayerChromium::pushPropertiesTo(CCLayerImpl* layer)
512513 layer->setIsContainerForFixedPositionLayers(m_isContainerForFixedPositionLayers);
513514 layer->setFixedToContainerLayerVisibleRect(m_fixedToContainerLayerVisibleRect);
514515 layer->setPreserves3D(preserves3D());
 516 layer->setUseParentBackfaceVisibility(m_useParentBackfaceVisibility);
515517 layer->setScrollPosition(m_scrollPosition);
516518 layer->setSublayerTransform(m_sublayerTransform);
517519 if (!transformIsAnimating())

Source/WebCore/platform/graphics/chromium/LayerChromium.h

@@public:
174174 void setPreserves3D(bool preserve3D) { m_preserves3D = preserve3D; }
175175 bool preserves3D() const { return m_preserves3D; }
176176
 177 void setUseParentBackfaceVisibility(bool useParentBackfaceVisibility) { m_useParentBackfaceVisibility = useParentBackfaceVisibility; }
 178 bool useParentBackfaceVisibility() const { return m_useParentBackfaceVisibility; }
 179
177180 void setUsesLayerClipping(bool usesLayerClipping) { m_usesLayerClipping = usesLayerClipping; }
178181 bool usesLayerClipping() const { return m_usesLayerClipping; }
179182

@@private:
349352 bool m_usesLayerClipping;
350353 bool m_isNonCompositedContent;
351354 bool m_preserves3D;
 355 bool m_useParentBackfaceVisibility;
352356 bool m_alwaysReserveTextures;
353357 bool m_drawCheckerboardForMissingTiles;
354358 bool m_forceRenderSurface;

Source/WebCore/platform/graphics/chromium/cc/CCLayerImpl.cpp

@@CCLayerImpl::CCLayerImpl(int id)
5858 , m_opaque(false)
5959 , m_opacity(1.0)
6060 , m_preserves3D(false)
 61 , m_useParentBackfaceVisibility(false)
6162 , m_drawCheckerboardForMissingTiles(false)
6263 , m_usesLayerClipping(false)
6364 , m_isNonCompositedContent(false)

Source/WebCore/platform/graphics/chromium/cc/CCLayerImpl.h

@@public:
140140 void setPreserves3D(bool);
141141 bool preserves3D() const { return m_preserves3D; }
142142
 143 void setUseParentBackfaceVisibility(bool useParentBackfaceVisibility) { m_useParentBackfaceVisibility = useParentBackfaceVisibility; }
 144 bool useParentBackfaceVisibility() const { return m_useParentBackfaceVisibility; }
 145
143146 void setUsesLayerClipping(bool usesLayerClipping) { m_usesLayerClipping = usesLayerClipping; }
144147 bool usesLayerClipping() const { return m_usesLayerClipping; }
145148

@@private:
320323 float m_opacity;
321324 FloatPoint m_position;
322325 bool m_preserves3D;
 326 bool m_useParentBackfaceVisibility;
323327 bool m_drawCheckerboardForMissingTiles;
324328 WebKit::WebTransformationMatrix m_sublayerTransform;
325329 WebKit::WebTransformationMatrix m_transform;

Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp

@@static bool layerShouldBeSkipped(LayerType* layer)
243243 if (!layer->drawsContent() || layer->bounds().isEmpty())
244244 return true;
245245
 246 // If this is a contents layer, then we should evaluate double-sidedness based
 247 // on its parent's properties.
 248 if (layer->useParentBackfaceVisibility()) {
 249 ASSERT(layer->parent());
 250 layer = layer->parent();
 251 }
 252
246253 // The layer should not be drawn if (1) it is not double-sided and (2) the back of the layer is known to be facing the screen.
247254 if (!layer->doubleSided() && transformToScreenIsKnown(layer) && isLayerBackFaceVisible(layer))
248255 return true;

Source/WebKit/chromium/src/WebLayer.cpp

@@void WebLayer::setPreserves3D(bool preserve3D)
270270 m_private->setPreserves3D(preserve3D);
271271}
272272
 273void WebLayer::setUseParentBackfaceVisibility(bool useParentBackfaceVisibility)
 274{
 275 m_private->setUseParentBackfaceVisibility(useParentBackfaceVisibility);
 276}
 277
273278void WebLayer::setBackgroundColor(WebColor color)
274279{
275280 m_private->setBackgroundColor(color);