void CoordinatedGraphicsLayer::setFixedToViewport(bool isFixed) { if (m_fixedToViewport == isFixed) return; m_fixedToViewport = isFixed; m_layerState.fixedToViewport = isFixed; m_layerState.flagsChanged = true; didChangeLayerState(); }
void CoordinatedGraphicsLayer::setShowDebugBorder(bool show) { if (isShowingDebugBorder() == show) return; GraphicsLayer::setShowDebugBorder(show); m_layerState.showDebugBorders = true; m_layerState.flagsChanged = true; didChangeLayerState(); }
void WebGraphicsLayer::setReplicatedByLayer(GraphicsLayer* layer) { if (layer == replicaLayer()) return; if (layer) toWebGraphicsLayer(layer)->setWebGraphicsLayerClient(m_webGraphicsLayerClient); GraphicsLayer::setReplicatedByLayer(layer); didChangeLayerState(); }
void CoordinatedGraphicsLayer::setScrollableArea(ScrollableArea* scrollableArea) { bool oldScrollable = isScrollable(); m_scrollableArea = scrollableArea; if (oldScrollable == isScrollable()) return; m_layerState.isScrollable = isScrollable(); m_layerState.flagsChanged = true; didChangeLayerState(); }
void CoordinatedGraphicsLayer::setShowRepaintCounter(bool show) { if (isShowingRepaintCounter() == show) return; GraphicsLayer::setShowRepaintCounter(show); m_layerState.showRepaintCounter = true; m_layerState.flagsChanged = true; didChangeLayerState(); }
void CoordinatedGraphicsLayer::setContentsRect(const FloatRect& r) { if (contentsRect() == r) return; GraphicsLayer::setContentsRect(r); m_layerState.contentsRect = r; m_layerState.contentsRectChanged = true; didChangeLayerState(); }
void CoordinatedGraphicsLayer::setOpacity(float opacity) { if (this->opacity() == opacity) return; GraphicsLayer::setOpacity(opacity); m_layerState.opacity = opacity; m_layerState.opacityChanged = true; didChangeLayerState(); }
void CoordinatedGraphicsLayer::setBackfaceVisibility(bool b) { if (backfaceVisibility() == b) return; GraphicsLayer::setBackfaceVisibility(b); m_layerState.backfaceVisible = b; m_layerState.flagsChanged = true; didChangeLayerState(); }
void CoordinatedGraphicsLayer::setContentsOpaque(bool b) { if (contentsOpaque() == b) return; if (m_mainBackingStore) m_mainBackingStore->setSupportsAlpha(!b); GraphicsLayer::setContentsOpaque(b); m_layerState.contentsOpaque = b; m_layerState.flagsChanged = true; didChangeLayerState(); }
void CoordinatedGraphicsLayer::purgeBackingStores() { #ifndef NDEBUG TemporaryChange<bool> updateModeProtector(m_isPurging, true); #endif m_mainBackingStore = nullptr; m_previousBackingStore = nullptr; releaseImageBackingIfNeeded(); didChangeLayerState(); }
void WebGraphicsLayer::setContentsToImage(Image* image) { if (image == m_image) return; int64_t newID = 0; if (m_webGraphicsLayerClient) { // We adopt first, in case this is the same frame - that way we avoid destroying and recreating the image. newID = m_webGraphicsLayerClient->adoptImageBackingStore(image); m_webGraphicsLayerClient->releaseImageBackingStore(m_layerInfo.imageBackingStoreID); didChangeLayerState(); if (m_layerInfo.imageBackingStoreID && newID == m_layerInfo.imageBackingStoreID) return; } else { // If m_webGraphicsLayerClient is not set yet there should be no backing store ID. ASSERT(!m_layerInfo.imageBackingStoreID); didChangeLayerState(); } m_layerInfo.imageBackingStoreID = newID; m_image = image; GraphicsLayer::setContentsToImage(image); }
void WebGraphicsLayer::purgeBackingStores() { m_mainBackingStore.clear(); m_previousBackingStore.clear(); if (m_layerInfo.imageBackingStoreID) { m_webGraphicsLayerClient->releaseImageBackingStore(m_layerInfo.imageBackingStoreID); m_layerInfo.imageBackingStoreID = 0; } didChangeLayerState(); didChangeChildren(); }
void CoordinatedGraphicsLayer::setContentsVisible(bool b) { if (contentsAreVisible() == b) return; GraphicsLayer::setContentsVisible(b); m_layerState.contentsVisible = b; m_layerState.flagsChanged = true; if (maskLayer()) maskLayer()->setContentsVisible(b); didChangeLayerState(); }
void WebGraphicsLayer::setMaskLayer(GraphicsLayer* layer) { if (layer == maskLayer()) return; GraphicsLayer::setMaskLayer(layer); if (!layer) return; layer->setSize(size()); WebGraphicsLayer* webGraphicsLayer = toWebGraphicsLayer(layer); webGraphicsLayer->setWebGraphicsLayerClient(m_webGraphicsLayerClient); webGraphicsLayer->setMaskTarget(this); webGraphicsLayer->didChangeLayerState(); didChangeLayerState(); }
void CoordinatedGraphicsLayer::setMaskLayer(GraphicsLayer* layer) { if (layer == maskLayer()) return; GraphicsLayer::setMaskLayer(layer); if (!layer) return; layer->setSize(size()); layer->setContentsVisible(contentsAreVisible()); CoordinatedGraphicsLayer* coordinatedLayer = toCoordinatedGraphicsLayer(layer); coordinatedLayer->didChangeLayerState(); m_layerState.mask = coordinatedLayer->id(); m_layerState.maskChanged = true; didChangeLayerState(); }
void WebGraphicsLayer::didChangeGeometry() { didChangeLayerState(); setShouldUpdateVisibleRect(); }
void WebGraphicsLayer::setRootLayer(bool isRoot) { m_layerInfo.isRootLayer = isRoot; didChangeLayerState(); }
void WebGraphicsLayer::setNeedsDisplayInRect(const FloatRect& rect) { if (m_mainBackingStore) m_mainBackingStore->invalidate(IntRect(rect)); didChangeLayerState(); }