当前位置: 首页>>代码示例>>C++>>正文


C++ setNeedsDisplay函数代码示例

本文整理汇总了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();
}
开发者ID:runt18,项目名称:webkit,代码行数:9,代码来源:ThreadedCompositor.cpp

示例2: setNeedsDisplay

void WebGraphicsLayer::setDrawsContent(bool b)
{
    if (drawsContent() == b)
        return;
    GraphicsLayer::setDrawsContent(b);

    if (b)
        setNeedsDisplay();
    notifyChange();
}
开发者ID:ruizhang331,项目名称:WebKit,代码行数:10,代码来源:WebGraphicsLayer.cpp

示例3: notifyChange

/* \reimp (GraphicsLayer.h)
*/
void GraphicsLayerTextureMapper::setDrawsContent(bool value)
{
    if (value == drawsContent())
        return;
    GraphicsLayer::setDrawsContent(value);
    notifyChange(DrawsContentChange);

    if (value)
        setNeedsDisplay();
}
开发者ID:3163504123,项目名称:phantomjs,代码行数:12,代码来源:GraphicsLayerTextureMapper.cpp

示例4: setNeedsDisplay

void GraphicsLayer::setSize(const FloatSize& size)
{
    if (size == m_size)
        return;
    
    m_size = size;

    if (shouldRepaintOnSizeChange())
        setNeedsDisplay();
}
开发者ID:houzhenggang,项目名称:webkit,代码行数:10,代码来源:GraphicsLayer.cpp

示例5: setNeedsDisplay

void
GraphicsLayerWKC::setDrawsContent(bool drawsContent)
{
    if (drawsContent == m_drawsContent)
        return;
    GraphicsLayer::setDrawsContent(drawsContent);
    if (m_drawsContent) {
        setNeedsDisplay();
    }
}
开发者ID:biddyweb,项目名称:switch-oss,代码行数:10,代码来源:GraphicsLayerWKC.cpp

示例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();
}
开发者ID:Moondee,项目名称:Artemis,代码行数:10,代码来源:GraphicsLayer.cpp

示例7: CACFLayerSetBounds

void WKCACFLayer::setBounds(const CGRect& rect)
{
    if (CGRectEqualToRect(rect, bounds()))
        return;

    CACFLayerSetBounds(layer(), rect);
    setNeedsCommit();

    if (m_needsDisplayOnBoundsChange)
        setNeedsDisplay();
}
开发者ID:325116067,项目名称:semc-qsd8x50,代码行数:11,代码来源:WKCACFLayer.cpp

示例8: frame

void WKCACFLayer::setFrame(const CGRect& rect)
{
    CGRect oldFrame = frame();
    if (CGRectEqualToRect(rect, oldFrame))
        return;

    CACFLayerSetFrame(layer(), rect);
    setNeedsCommit();

    if (m_needsDisplayOnBoundsChange)
        setNeedsDisplay();
}
开发者ID:325116067,项目名称:semc-qsd8x50,代码行数:12,代码来源:WKCACFLayer.cpp

示例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;
}
开发者ID:0omega,项目名称:platform_external_webkit,代码行数:15,代码来源:TextureMapperNode.cpp

示例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();
    }
}
开发者ID:SchleunigerAG,项目名称:WinEC7_Qt5.3.1_Fixes,代码行数:16,代码来源:PluginLayerWebKitThread.cpp

示例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();
}
开发者ID:abihf,项目名称:WebKitForWayland,代码行数:17,代码来源:ThreadedCompositor.cpp

示例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();
}
开发者ID:sysrqb,项目名称:chromium-src,代码行数:18,代码来源:DrawingAreaImpl.cpp

示例13: setLayerProgramShader

void CanvasLayerWebKitThread::setDevice(SkGpuDevice* device)
{
    m_device = device;
    setLayerProgramShader(LayerProgramShaderRGBA);
    setNeedsDisplay();
}
开发者ID:xiaolu31,项目名称:webkit-node,代码行数:6,代码来源:CanvasLayerWebKitThread.cpp

示例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;
//.........这里部分代码省略.........
开发者ID:0omega,项目名称:platform_external_webkit,代码行数:101,代码来源:TextureMapperNode.cpp

示例15: setNeedsDisplay

void TileController::forceRepaint()
{
    setNeedsDisplay();
}
开发者ID:emutavchi,项目名称:WebKitForWayland,代码行数:4,代码来源:TileController.cpp


注:本文中的setNeedsDisplay函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。