Changeset 120847 in webkit
- Timestamp:
- Jun 20, 2012 12:17:43 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 6 added
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r120845 r120847 1 2012-06-20 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 Adrienne Walker. 13 14 * compositing/backface-visibility/backface-visibility-image-expected.png: Added. 15 * compositing/backface-visibility/backface-visibility-image-expected.txt: Added. 16 * compositing/backface-visibility/backface-visibility-image.html: Added. 17 * compositing/backface-visibility/backface-visibility-webgl-expected.png: Added. 18 * compositing/backface-visibility/backface-visibility-webgl-expected.txt: Added. 19 * compositing/backface-visibility/backface-visibility-webgl.html: Added. 20 1 21 2012-06-20 Nate Chapin <japhet@chromium.org> 2 22 -
trunk/Source/Platform/ChangeLog
r120789 r120847 1 2012-06-20 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 Adrienne Walker. 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 1 19 2012-06-19 Tony Payne <tpayne@chromium.org> 2 20 -
trunk/Source/Platform/chromium/public/WebLayer.h
r119887 r120847 109 109 110 110 WEBKIT_EXPORT void setPreserves3D(bool); 111 112 // Mark that this layer should use its parent's transform and double-sided 113 // properties in determining this layer's backface visibility instead of 114 // using its own properties. If this property is set, this layer must 115 // have a parent, and the parent may not have this property set. 116 // Note: This API is to work around issues with visibility the handling of 117 // WebKit layers that have a contents layer (canvas, plugin, WebGL, video, 118 // etc). 119 WEBKIT_EXPORT void setUseParentBackfaceVisibility(bool); 120 111 121 WEBKIT_EXPORT void setBackgroundColor(WebColor); 112 122 -
trunk/Source/WebCore/ChangeLog
r120845 r120847 1 2012-06-20 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 Adrienne Walker. 13 14 Tests: compositing/backface-visibility/backface-visibility-image.html 15 compositing/backface-visibility/backface-visibility-webgl.html 16 17 * platform/graphics/chromium/GraphicsLayerChromium.cpp: 18 (WebCore::GraphicsLayerChromium::setupContentsLayer): 19 When a contents layer is added, tag it as inheriting its backface 20 culling from its parent. 21 * platform/graphics/chromium/LayerChromium.cpp: 22 (WebCore::LayerChromium::LayerChromium): 23 Initialize new m_useParentBackfaceVisibility member variable. 24 (WebCore::LayerChromium::pushPropertiesTo): 25 Propagate m_useParentBackfaceVisibility to CCLayerImpl. 26 * platform/graphics/chromium/LayerChromium.h: 27 (WebCore::LayerChromium::setUseParentBackfaceVisibility): 28 (WebCore::LayerChromium::useParentBackfaceVisibility): 29 (LayerChromium): 30 Add m_useParentBackfaceVisibility member variable and modify 31 and query accessors. 32 * platform/graphics/chromium/cc/CCLayerImpl.cpp: 33 (WebCore::CCLayerImpl::CCLayerImpl): 34 Initialize new m_useParentBackfaceVisibility member variable. 35 * platform/graphics/chromium/cc/CCLayerImpl.h: 36 (WebCore::CCLayerImpl::setUseParentBackfaceVisibility): 37 (WebCore::CCLayerImpl::useParentBackfaceVisibility): 38 (CCLayerImpl): 39 Add m_useParentBackfaceVisibility member variable and modify 40 and query accessors. 41 * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp: 42 (WebCore::layerShouldBeSkipped): 43 When examining a layer, if the layer has 44 useParentBackfaceVisibility set then use the layer's parent 45 layer to determine backface culling. 46 1 47 2012-06-20 Nate Chapin <japhet@chromium.org> 2 48 -
trunk/Source/WebCore/platform/graphics/chromium/GraphicsLayerChromium.cpp
r120644 r120847 839 839 840 840 if (!m_contentsLayer.isNull()) { 841 m_contentsLayer.setUseParentBackfaceVisibility(false); 841 842 m_contentsLayer.removeFromParent(); 842 843 m_contentsLayer.reset(); … … 847 848 848 849 m_contentsLayer.setAnchorPoint(FloatPoint(0, 0)); 850 m_contentsLayer.setUseParentBackfaceVisibility(true); 849 851 850 852 // It is necessary to call setDrawsContent as soon as we receive the new contentsLayer, for -
trunk/Source/WebCore/platform/graphics/chromium/LayerChromium.cpp
r120837 r120847 84 84 , m_isNonCompositedContent(false) 85 85 , m_preserves3D(false) 86 , m_useParentBackfaceVisibility(false) 86 87 , m_alwaysReserveTextures(false) 87 88 , m_drawCheckerboardForMissingTiles(false) … … 562 563 layer->setFixedToContainerLayer(m_fixedToContainerLayer); 563 564 layer->setPreserves3D(preserves3D()); 565 layer->setUseParentBackfaceVisibility(m_useParentBackfaceVisibility); 564 566 layer->setScrollPosition(m_scrollPosition); 565 567 layer->setMaxScrollPosition(m_maxScrollPosition); -
trunk/Source/WebCore/platform/graphics/chromium/LayerChromium.h
r120837 r120847 192 192 void setPreserves3D(bool preserve3D) { m_preserves3D = preserve3D; } 193 193 bool preserves3D() const { return m_preserves3D; } 194 195 void setUseParentBackfaceVisibility(bool useParentBackfaceVisibility) { m_useParentBackfaceVisibility = useParentBackfaceVisibility; } 196 bool useParentBackfaceVisibility() const { return m_useParentBackfaceVisibility; } 194 197 195 198 void setUsesLayerClipping(bool usesLayerClipping) { m_usesLayerClipping = usesLayerClipping; } … … 375 378 bool m_isNonCompositedContent; 376 379 bool m_preserves3D; 380 bool m_useParentBackfaceVisibility; 377 381 bool m_alwaysReserveTextures; 378 382 bool m_drawCheckerboardForMissingTiles; -
trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerImpl.cpp
r120837 r120847 62 62 , m_opacity(1.0) 63 63 , m_preserves3D(false) 64 , m_useParentBackfaceVisibility(false) 64 65 , m_drawCheckerboardForMissingTiles(false) 65 66 , m_usesLayerClipping(false) -
trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerImpl.h
r120837 r120847 142 142 bool preserves3D() const { return m_preserves3D; } 143 143 144 void setUseParentBackfaceVisibility(bool useParentBackfaceVisibility) { m_useParentBackfaceVisibility = useParentBackfaceVisibility; } 145 bool useParentBackfaceVisibility() const { return m_useParentBackfaceVisibility; } 146 144 147 void setUsesLayerClipping(bool usesLayerClipping) { m_usesLayerClipping = usesLayerClipping; } 145 148 bool usesLayerClipping() const { return m_usesLayerClipping; } … … 336 339 FloatPoint m_position; 337 340 bool m_preserves3D; 341 bool m_useParentBackfaceVisibility; 338 342 bool m_drawCheckerboardForMissingTiles; 339 343 WebKit::WebTransformationMatrix m_sublayerTransform; -
trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp
r120837 r120847 242 242 return true; 243 243 244 LayerType* backfaceTestLayer = layer; 245 if (layer->useParentBackfaceVisibility()) { 246 ASSERT(layer->parent()); 247 ASSERT(!layer->parent()->useParentBackfaceVisibility()); 248 backfaceTestLayer = layer->parent(); 249 } 250 244 251 // 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. 245 if (! layer->doubleSided() && transformToScreenIsKnown(layer) && isLayerBackFaceVisible(layer))252 if (!backfaceTestLayer->doubleSided() && transformToScreenIsKnown(backfaceTestLayer) && isLayerBackFaceVisible(backfaceTestLayer)) 246 253 return true; 247 254 -
trunk/Source/WebKit/chromium/ChangeLog
r120837 r120847 1 2012-06-20 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 Adrienne Walker. 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 1 19 2012-06-20 Ian Vollick <vollick@chromium.org> 2 20 -
trunk/Source/WebKit/chromium/src/WebLayer.cpp
r119178 r120847 271 271 } 272 272 273 void WebLayer::setUseParentBackfaceVisibility(bool useParentBackfaceVisibility) 274 { 275 m_private->setUseParentBackfaceVisibility(useParentBackfaceVisibility); 276 } 277 273 278 void WebLayer::setBackgroundColor(WebColor color) 274 279 {
Note: See TracChangeset
for help on using the changeset viewer.