本文整理汇总了C++中setNeedsDisplay函数的典型用法代码示例。如果您正苦于以下问题:C++ setNeedsDisplay函数的具体用法?C++ setNeedsDisplay怎么用?C++ setNeedsDisplay使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了setNeedsDisplay函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: setNeedsDisplay
void ThreadedCompositor::updateSceneState(const CoordinatedGraphicsState& state)
{
RefPtr<CoordinatedGraphicsScene> scene = m_scene;
m_scene->appendUpdate([scene, state] {
scene->commitSceneState(state);
});
setNeedsDisplay();
}
示例2: setNeedsDisplay
void WebGraphicsLayer::setDrawsContent(bool b)
{
if (drawsContent() == b)
return;
GraphicsLayer::setDrawsContent(b);
if (b)
setNeedsDisplay();
notifyChange();
}
示例3: notifyChange
/* \reimp (GraphicsLayer.h)
*/
void GraphicsLayerTextureMapper::setDrawsContent(bool value)
{
if (value == drawsContent())
return;
GraphicsLayer::setDrawsContent(value);
notifyChange(DrawsContentChange);
if (value)
setNeedsDisplay();
}
示例4: setNeedsDisplay
void GraphicsLayer::setSize(const FloatSize& size)
{
if (size == m_size)
return;
m_size = size;
if (shouldRepaintOnSizeChange())
setNeedsDisplay();
}
示例5: setNeedsDisplay
void
GraphicsLayerWKC::setDrawsContent(bool drawsContent)
{
if (drawsContent == m_drawsContent)
return;
GraphicsLayer::setDrawsContent(drawsContent);
if (m_drawsContent) {
setNeedsDisplay();
}
}
示例6: setNeedsDisplay
void GraphicsLayer::setOffsetFromRenderer(const IntSize& offset)
{
if (offset == m_offsetFromRenderer)
return;
m_offsetFromRenderer = offset;
// If the compositing layer offset changes, we need to repaint.
setNeedsDisplay();
}
示例7: CACFLayerSetBounds
void WKCACFLayer::setBounds(const CGRect& rect)
{
if (CGRectEqualToRect(rect, bounds()))
return;
CACFLayerSetBounds(layer(), rect);
setNeedsCommit();
if (m_needsDisplayOnBoundsChange)
setNeedsDisplay();
}
示例8: frame
void WKCACFLayer::setFrame(const CGRect& rect)
{
CGRect oldFrame = frame();
if (CGRectEqualToRect(rect, oldFrame))
return;
CACFLayerSetFrame(layer(), rect);
setNeedsCommit();
if (m_needsDisplayOnBoundsChange)
setNeedsDisplay();
}
示例9: setNeedsDisplay
TextureMapperNode::~TextureMapperNode()
{
setNeedsDisplay();
{
const int childrenSize = m_children.size();
for (int i = childrenSize-1; i >= 0; --i) {
ASSERT(m_children[i]->m_parent == this);
m_children[i]->m_parent = 0;
}
}
if (m_parent)
m_parent->m_children.remove(m_parent->m_children.find(this));
if (m_cache)
delete m_cache;
}
示例10: setNeedsTexture
void PluginLayerWebKitThread::setPluginView(PluginView* pluginView)
{
m_pluginView = pluginView;
setNeedsTexture(isDrawable() && pluginView);
setLayerProgram(LayerProgramRGBA);
if (m_pluginView)
setNeedsDisplay();
else {
// We can't afford to wait until the next commit
// to set the m_pluginView to 0 in the impl, because it is
// about to be destroyed.
layerCompositingThread()->setPluginView(0);
setNeedsCommit();
}
}
示例11: protector
void ThreadedCompositor::updateSceneState(const CoordinatedGraphicsState& state)
{
RefPtr<ThreadedCompositor> protector(this);
RefPtr<CoordinatedGraphicsScene> scene = m_scene;
m_scene->appendUpdate([protector, scene, state] {
scene->commitSceneState(state);
protector->m_clientRendersNextFrame.store(true);
bool coordinateUpdate = std::any_of(state.layersToUpdate.begin(), state.layersToUpdate.end(),
[](const std::pair<CoordinatedLayerID, CoordinatedGraphicsLayerState>& it) {
return it.second.platformLayerChanged;
});
protector->m_coordinateUpdateCompletionWithClient.store(coordinateUpdate);
});
setNeedsDisplay();
}
示例12: setNeedsDisplay
void DrawingAreaImpl::resumePainting()
{
if (!m_isPaintingSuspended) {
// FIXME: We can get a call to resumePainting when painting is not suspended.
// This happens when sending a synchronous message to create a new page. See <rdar://problem/8976531>.
return;
}
if (m_layerTreeHost)
m_layerTreeHost->resumeRendering();
m_isPaintingSuspended = false;
// FIXME: We shouldn't always repaint everything here.
setNeedsDisplay(m_webPage->bounds());
m_webPage->corePage()->resumeScriptedAnimations();
}
示例13: setLayerProgramShader
void CanvasLayerWebKitThread::setDevice(SkGpuDevice* device)
{
m_device = device;
setLayerProgramShader(LayerProgramShaderRGBA);
setNeedsDisplay();
}
示例14: initializeTextureMapper
void TextureMapperNode::syncCompositingStateSelf(GraphicsLayerTextureMapper* graphicsLayer, TextureMapper* textureMapper)
{
const int changeMask = graphicsLayer->changeMask();
initializeTextureMapper(textureMapper);
const TextureMapperNode::ContentData& pendingContent = graphicsLayer->pendingContent();
if (changeMask == NoChanges && pendingContent.needsDisplayRect.isEmpty() && !pendingContent.needsDisplay)
return;
setNeedsDisplay();
if (m_parent)
m_parent->m_state.dirty = true;
if (m_currentContent.contentType == HTMLContentType && (changeMask & ParentChange)) {
// The WebCore compositor manages item ownership. We have to make sure graphicsview doesn't
// try to snatch that ownership.
if (!graphicsLayer->parent())
m_parent = 0;
else
m_parent = toTextureMapperNode(graphicsLayer->parent());
if (!graphicsLayer->parent() && m_parent) {
size_t index = m_parent->m_children.find(this);
m_parent->m_children.remove(index);
}
}
if (changeMask & ChildrenChange) {
m_children.clear();
for (size_t i = 0; i < graphicsLayer->children().size(); ++i) {
if (TextureMapperNode* child = toTextureMapperNode(graphicsLayer->children()[i])) {
if (!child)
continue;
m_children.append(child);
child->m_parent = this;
}
}
m_state.dirty = true;
}
if (changeMask & (SizeChange | ContentsRectChange)) {
IntSize wantedSize = IntSize(graphicsLayer->size().width(), graphicsLayer->size().height());
if (wantedSize.isEmpty() && pendingContent.contentType == HTMLContentType)
wantedSize = IntSize(graphicsLayer->contentsRect().width(), graphicsLayer->contentsRect().height());
if (wantedSize != m_size) {
m_size = IntSize(wantedSize.width(), wantedSize.height());
if (m_platformClient)
m_platformClient->setSizeChanged(m_size);
const bool needsTiling = m_size.width() > 2000 || m_size.height() > 2000;
if (m_state.tiled != needsTiling)
m_state.tiled = needsTiling;
m_state.dirty = true;
}
}
if (changeMask & MaskLayerChange) {
if (TextureMapperNode* layer = toTextureMapperNode(graphicsLayer->maskLayer()))
layer->m_effectTarget = this;
}
if (changeMask & ReplicaLayerChange) {
if (TextureMapperNode* layer = toTextureMapperNode(graphicsLayer->replicaLayer()))
layer->m_effectTarget = this;
}
if (changeMask & (TransformChange | SizeChange | AnchorPointChange | PositionChange))
m_transforms.localDirty = true;
if (changeMask & (ChildrenTransformChange | SizeChange))
m_transforms.perspectiveDirty = true;
if (changeMask & (ChildrenTransformChange | Preserves3DChange | TransformChange | AnchorPointChange | SizeChange | ContentsRectChange | BackfaceVisibilityChange | PositionChange | MaskLayerChange | DrawsContentChange | ContentChange | ReplicaLayerChange)) {
// Due to the differences between the way WebCore handles transforms and the way Qt handles transforms,
// all these elements affect the transforms of all the descendants.
invalidateTransform();
}
if (changeMask & DisplayChange)
m_state.dirty = true;
m_state.maskLayer = toTextureMapperNode(graphicsLayer->maskLayer());
m_state.replicaLayer = toTextureMapperNode(graphicsLayer->replicaLayer());
m_state.pos = graphicsLayer->position();
m_state.anchorPoint = graphicsLayer->anchorPoint();
m_state.size = graphicsLayer->size();
m_state.transform = graphicsLayer->transform();
m_state.contentsRect = graphicsLayer->contentsRect();
m_state.opacity = graphicsLayer->opacity();
m_state.contentsRect = graphicsLayer->contentsRect();
m_state.preserves3D = graphicsLayer->preserves3D();
m_state.masksToBounds = graphicsLayer->masksToBounds();
m_state.drawsContent = graphicsLayer->drawsContent();
m_state.contentsOpaque = graphicsLayer->contentsOpaque();
m_state.backfaceVisibility = graphicsLayer->backfaceVisibility();
m_state.childrenTransform = graphicsLayer->childrenTransform();
m_currentContent.contentType = pendingContent.contentType;
m_currentContent.image = pendingContent.image;
m_currentContent.media = pendingContent.media;
m_currentContent.backgroundColor = pendingContent.backgroundColor;
//.........这里部分代码省略.........
示例15: setNeedsDisplay
void TileController::forceRepaint()
{
setNeedsDisplay();
}