return m_visibleRect;
#endif
+ FloatRect perspectiveRect = m_webGraphicsLayerClient->visibleContentsRect();
+
#if ENABLE(TIZEN_CSS_OVERFLOW_CLIPPING_BACKING_STORE)
if (GraphicsLayer::overflowClipping() && m_mainBackingStore) {
WebGraphicsLayer* parentLayer = toWebGraphicsLayer(parent());
if (parentLayer)
- return enclosingIntRect(m_layerTransform.combined().inverse().clampedBoundsOfProjectedQuad(FloatQuad(parentLayer->clippingBounds())));
+ perspectiveRect = parentLayer->clippingBounds();
}
#endif
+ if (m_movingVisibleRect) {
+ IntRect startAnimationRect = enclosingIntRect(m_layerTransform.combined().inverse().clampedBoundsOfProjectedQuad(FloatQuad(perspectiveRect)));
+ IntRect endAnimationRect = enclosingIntRect(m_layerSettledTransform.combined().inverse().clampedBoundsOfProjectedQuad(FloatQuad(perspectiveRect)));
+ endAnimationRect.unite(startAnimationRect);
+ return endAnimationRect;
+ }
+
// Return a projection of the visible rect (surface coordinates) onto the layer's plane (layer coordinates).
// The resulting quad might be squewed and the visible rect is the bounding box of this quad,
// so it might spread further than the real visible area (and then even more amplified by the cover rect multiplier).
- return enclosingIntRect(m_layerTransform.combined().inverse().clampedBoundsOfProjectedQuad(FloatQuad(FloatRect(m_webGraphicsLayerClient->visibleContentsRect()))));
+ return enclosingIntRect(m_layerTransform.combined().inverse().clampedBoundsOfProjectedQuad(FloatQuad(perspectiveRect)));
}
Color WebGraphicsLayer::tiledBackingStoreBackgroundColor() const
void WebGraphicsLayer::computeTransformedVisibleRect()
{
// When we have a transform animation, we need to update visible rect every frame to adjust the visible rect of a backing store.
- bool hasActiveTransformAnimation = selfOrAncestorHasActiveTransformAnimation();
if (!m_shouldUpdateVisibleRect && !m_movingVisibleRect)
return;
m_shouldUpdateVisibleRect = false;
TransformationMatrix currentTransform = transform();
- if (m_movingVisibleRect)
+ if (m_movingVisibleRect) {
+ m_layerSettledTransform.setLocalTransform(currentTransform);
+ m_layerSettledTransform.setPosition(position());
+ m_layerSettledTransform.setAnchorPoint(anchorPoint());
+ m_layerSettledTransform.setSize(size());
+ m_layerSettledTransform.setFlattening(!preserves3D());
+ m_layerSettledTransform.setChildrenTransform(childrenTransform());
+ m_layerSettledTransform.combineTransforms(parent() ? toWebGraphicsLayer(parent())->m_layerTransform.combinedForChildren() : TransformationMatrix());
+
client()->getCurrentTransform(this, currentTransform);
+ }
+
m_layerTransform.setLocalTransform(currentTransform);
m_layerTransform.setPosition(position());
m_layerTransform.setAnchorPoint(anchorPoint());