void GraphicsLayerBlackBerry::setupContentsLayer(LayerWebKitThread* contentsLayer) { if (contentsLayer == m_contentsLayer) return; if (m_contentsLayer) { m_contentsLayer->removeFromSuperlayer(); m_contentsLayer = 0; } if (contentsLayer) { m_contentsLayer = contentsLayer; m_contentsLayer->setAnchorPoint(FloatPoint::zero()); // It is necessary to update setDrawable as soon as we receive the new contentsLayer, for // the correctness of early exit conditions in setDrawsContent() and setContentsVisible(). m_contentsLayer->setDrawable(m_contentsVisible); // Insert the content layer first. Video elements require this, because they have // shadow content that must display in front of the video. m_layer->insertSublayer(m_contentsLayer.get(), 0); updateContentsRect(); if (showDebugBorders()) { setLayerBorderColor(*m_contentsLayer, Color(0, 0, 128, 180)); m_contentsLayer->setBorderWidth(1); } } updateDebugIndicators(); }
void GraphicsLayerChromium::updateLayerDrawsContent() { if (m_drawsContent) m_layer->setNeedsDisplay(); updateDebugIndicators(); }
void CoordinatedGraphicsLayer::syncLayerState() { if (!m_shouldSyncLayerState) return; m_shouldSyncLayerState = false; m_layerState.childrenTransform = childrenTransform(); m_layerState.contentsRect = contentsRect(); m_layerState.mask = toCoordinatedLayerID(maskLayer()); m_layerState.opacity = opacity(); m_layerState.replica = toCoordinatedLayerID(replicaLayer()); m_layerState.transform = transform(); m_layerState.anchorPoint = m_adjustedAnchorPoint; m_layerState.pos = m_adjustedPosition; m_layerState.size = m_adjustedSize; if (m_layerState.flagsChanged) { m_layerState.drawsContent = drawsContent(); m_layerState.contentsVisible = contentsAreVisible(); m_layerState.backfaceVisible = backfaceVisibility(); m_layerState.masksToBounds = masksToBounds(); m_layerState.preserves3D = preserves3D(); m_layerState.fixedToViewport = fixedToViewport(); m_layerState.showDebugBorders = isShowingDebugBorder(); m_layerState.showRepaintCounter = isShowingRepaintCounter(); m_layerState.isScrollable = isScrollable(); } if (m_layerState.showDebugBorders) updateDebugIndicators(); }
void GraphicsLayerChromium::setupContentsLayer(WebLayer* contentsLayer) { m_contentsLayer = contentsLayer; m_contentsLayerId = m_contentsLayer->id(); if (m_contentsLayer) { m_contentsLayer->setAnchorPoint(FloatPoint(0, 0)); m_contentsLayer->setUseParentBackfaceVisibility(true); // It is necessary to call setDrawsContent as soon as we receive the new contentsLayer, for // the correctness of early exit conditions in setDrawsContent() and setContentsVisible(). m_contentsLayer->setDrawsContent(m_contentsVisible); // Insert the content layer first. Video elements require this, because they have // shadow content that must display in front of the video. m_layer->layer()->insertChild(m_contentsLayer, 0); if (isShowingDebugBorder()) { m_contentsLayer->setDebugBorderColor(Color(0, 0, 128, 180).rgb()); m_contentsLayer->setDebugBorderWidth(1); } } updateDebugIndicators(); updateNames(); }
void GraphicsLayerChromium::setupContentsLayer(LayerChromium* contentsLayer) { if (contentsLayer == m_contentsLayer) return; if (m_contentsLayer) { m_contentsLayer->removeFromParent(); m_contentsLayer = 0; } if (contentsLayer) { m_contentsLayer = contentsLayer; m_contentsLayer->setAnchorPoint(FloatPoint(0, 0)); // It is necessary to update setIsDrawable as soon as we receive the new contentsLayer, for // the correctness of early exit conditions in setDrawsContent() and setContentsVisible(). m_contentsLayer->setIsDrawable(m_contentsVisible); // Insert the content layer first. Video elements require this, because they have // shadow content that must display in front of the video. m_layer->insertChild(m_contentsLayer.get(), 0); if (showDebugBorders()) { m_contentsLayer->setDebugBorderColor(Color(0, 0, 128, 180)); m_contentsLayer->setDebugBorderWidth(1); } } updateDebugIndicators(); updateNames(); }
void GraphicsLayerChromium::setupContentsLayer(LayerChromium* contentsLayer) { if (contentsLayer == m_contentsLayer) return; if (m_contentsLayer) { m_contentsLayer->removeFromSuperlayer(); m_contentsLayer = 0; } if (contentsLayer) { m_contentsLayer = contentsLayer; m_contentsLayer->setAnchorPoint(FloatPoint(0, 0)); // Insert the content layer first. Video elements require this, because they have // shadow content that must display in front of the video. m_layer->insertSublayer(m_contentsLayer.get(), 0); updateContentsRect(); if (showDebugBorders()) { setLayerBorderColor(*m_contentsLayer, Color(0, 0, 128, 180)); m_contentsLayer->setBorderWidth(1); } } updateDebugIndicators(); }
void GraphicsLayerCACF::updateLayerDrawsContent() { if (m_drawsContent) m_layer->setNeedsDisplay(); else m_layer->setContents(nil); updateDebugIndicators(); }
GraphicsLayerCACF::GraphicsLayerCACF(GraphicsLayerClient* client) : GraphicsLayer(client) , m_contentsLayerPurpose(NoContentsLayer) , m_contentsLayerHasBackgroundColor(false) { m_layer = WebLayer::create(WKCACFLayer::Layer, this); updateDebugIndicators(); }
GraphicsLayerChromium::GraphicsLayerChromium(GraphicsLayerClient* client) : GraphicsLayer(client) , m_contentsLayerPurpose(NoContentsLayer) , m_contentsLayerHasBackgroundColor(false) { m_layer = ContentLayerChromium::create(this); updateDebugIndicators(); }
GraphicsLayerBlackBerry::GraphicsLayerBlackBerry(GraphicsLayerClient* client) : GraphicsLayer(client) , m_suspendTime(0) , m_contentsLayerPurpose(NoContentsLayer) , m_contentsLayerHasBackgroundColor(false) { m_layer = LayerWebKitThread::create(LayerData::Layer, this); updateDebugIndicators(); }
void GraphicsLayerTextureMapper::updateDebugBorderAndRepaintCount() { if (isShowingDebugBorder()) updateDebugIndicators(); // When this has its own backing store (e.g. Qt WK1), update the repaint count before calling TextureMapperLayer::flushCompositingStateForThisLayerOnly(). bool needsToRepaint = shouldHaveBackingStore() && (m_needsDisplay || !m_needsDisplayRect.isEmpty()); if (isShowingRepaintCounter() && needsToRepaint) { incrementRepaintCount(); m_changeMask |= RepaintCountChange; } }
void GraphicsLayerClutter::updateLayerDrawsContent(float pageScaleFactor, const FloatPoint& positionRelativeToBase) { if (m_drawsContent) { graphicsLayerActorSetDrawsContent(m_layer.get(), TRUE); setNeedsDisplay(); } else { graphicsLayerActorSetDrawsContent(m_layer.get(), FALSE); graphicsLayerActorSetSurface(m_layer.get(), 0); } updateDebugIndicators(); }
GraphicsLayerChromium::GraphicsLayerChromium(GraphicsLayerClient* client) : GraphicsLayer(client) , m_contentsLayerPurpose(NoContentsLayer) , m_contentsLayerHasBackgroundColor(false) , m_inSetChildren(false) , m_pageScaleChanged(false) { m_opaqueRectTrackingContentLayerDelegate = adoptPtr(new OpaqueRectTrackingContentLayerDelegate(this)); m_layer = WebContentLayer::create(m_opaqueRectTrackingContentLayerDelegate.get()); m_layer.setDrawsContent(m_drawsContent && m_contentsVisible); if (client) deviceOrPageScaleFactorChanged(); updateDebugIndicators(); }
void GraphicsLayerBlackBerry::updateLayerIsDrawable() { // For the rest of the accelerated compositor code, there is no reason to make a // distinction between drawsContent and contentsVisible. So, for m_layer, these two // flags are combined here. m_contentsLayer shouldn't receive the drawsContent flag // so it is only given contentsVisible. m_layer->setDrawable(m_drawsContent && m_contentsVisible); if (m_contentsLayer) m_contentsLayer->setDrawable(m_contentsVisible); if (m_drawsContent) m_layer->setNeedsDisplay(); updateDebugIndicators(); }
GraphicsLayerChromium::GraphicsLayerChromium(GraphicsLayerClient* client) : GraphicsLayer(client) , m_contentsLayer(0) , m_contentsLayerId(0) , m_linkHighlight(0) , m_contentsLayerPurpose(NoContentsLayer) , m_contentsLayerHasBackgroundColor(false) , m_inSetChildren(false) , m_scrollableArea(0) { m_opaqueRectTrackingContentLayerDelegate = adoptPtr(new OpaqueRectTrackingContentLayerDelegate(this)); m_layer = adoptPtr(Platform::current()->compositorSupport()->createContentLayer(m_opaqueRectTrackingContentLayerDelegate.get())); m_layer->layer()->setDrawsContent(m_drawsContent && m_contentsVisible); m_layer->layer()->setScrollClient(this); updateDebugIndicators(); }
void GraphicsLayerChromium::updateLayerIsDrawable() { // For the rest of the accelerated compositor code, there is no reason to make a // distinction between drawsContent and contentsVisible. So, for m_layer, these two // flags are combined here. m_contentsLayer shouldn't receive the drawsContent flag // so it is only given contentsVisible. m_layer.setDrawsContent(m_drawsContent && m_contentsVisible); if (!m_contentsLayer.isNull()) m_contentsLayer.setDrawsContent(m_contentsVisible); if (m_drawsContent) m_layer.invalidate(); updateDebugIndicators(); }
void GraphicsLayerChromium::updateLayerIsDrawable() { // For the rest of the accelerated compositor code, there is no reason to make a // distinction between drawsContent and contentsVisible. So, for m_layer->layer(), these two // flags are combined here. m_contentsLayer shouldn't receive the drawsContent flag // so it is only given contentsVisible. m_layer->layer()->setDrawsContent(m_drawsContent && m_contentsVisible); if (WebLayer* contentsLayer = contentsLayerIfRegistered()) contentsLayer->setDrawsContent(m_contentsVisible); if (m_drawsContent) { m_layer->layer()->invalidate(); if (m_linkHighlight) m_linkHighlight->invalidate(); } updateDebugIndicators(); }
void GraphicsLayerCACF::setupContentsLayer(WKCACFLayer* contentsLayer) { if (contentsLayer == m_contentsLayer) return; if (m_contentsLayer) { m_contentsLayer->removeFromSuperlayer(); m_contentsLayer = 0; } if (contentsLayer) { m_contentsLayer = contentsLayer; if (defaultContentsOrientation() == CompositingCoordinatesBottomUp) { CATransform3D flipper = { 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, -1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f}; m_contentsLayer->setTransform(flipper); m_contentsLayer->setAnchorPoint(CGPointMake(0.0f, 1.0f)); } else m_contentsLayer->setAnchorPoint(CGPointMake(0.0f, 0.0f)); // Insert the content layer first. Video elements require this, because they have // shadow content that must display in front of the video. m_layer->insertSublayer(m_contentsLayer.get(), 0); updateContentsRect(); if (showDebugBorders()) { setLayerBorderColor(m_contentsLayer.get(), Color(0, 0, 128, 180)); m_contentsLayer->setBorderWidth(1.0f); } } updateDebugIndicators(); }
void GraphicsLayerBlackBerry::updateMasksToBounds() { m_layer->setMasksToBounds(m_masksToBounds); updateDebugIndicators(); }
void GraphicsLayerChromium::updateMasksToBounds() { m_layer->setMasksToBounds(m_masksToBounds); updateDebugIndicators(); }