IntRect CoordinatedGraphicsLayer::tiledBackingStoreVisibleRect() { // Non-invertible layers are not visible. if (!m_layerTransform.combined().isInvertible()) return IntRect(); // 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). ASSERT(m_cachedInverseTransform == m_layerTransform.combined().inverse()); FloatRect rect = m_cachedInverseTransform.clampedBoundsOfProjectedQuad(FloatQuad(m_coordinator->visibleContentsRect())); clampToContentsRectIfRectIsInfinite(rect, tiledBackingStoreContentsRect()); return enclosingIntRect(rect); }
IntRect WebGraphicsLayer::tiledBackingStoreVisibleRect() { if (!shouldUseTiledBackingStore()) return tiledBackingStoreContentsRect(); // Non-invertible layers are not visible. if (!m_layerTransform.combined().isInvertible()) return IntRect(); // 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 m_layerTransform.combined().inverse().clampedBoundsOfProjectedQuad(FloatQuad(FloatRect(m_webGraphicsLayerClient->visibleContentsRect()))); }
bool CoordinatedGraphicsLayer::hasPendingVisibleChanges() { if (opacity() < 0.01 && !m_animations.hasActiveAnimationsOfType(AnimatedPropertyOpacity)) return false; for (size_t i = 0; i < children().size(); ++i) { if (toCoordinatedGraphicsLayer(children()[i])->hasPendingVisibleChanges()) return true; } bool shouldSyncCanvas = false; #if USE(GRAPHICS_SURFACE) shouldSyncCanvas = m_pendingCanvasOperation & SyncCanvas; #endif if (!m_shouldSyncLayerState && !m_shouldSyncChildren && !m_shouldSyncFilters && !m_shouldSyncImageBacking && !m_shouldSyncAnimations && !shouldSyncCanvas) return false; return tiledBackingStoreVisibleRect().intersects(tiledBackingStoreContentsRect()); }