Exemple #1
0
void Canvas2DLayerChromium::pushPropertiesTo(CCLayerImpl* layer)
{
    CanvasLayerChromium::pushPropertiesTo(layer);

    CCTextureLayerImpl* textureLayer = static_cast<CCTextureLayerImpl*>(layer);
    if (m_useDoubleBuffering) {
        if (m_frontTexture && m_frontTexture->isValid(m_size, GraphicsContext3D::RGBA))
            textureLayer->setTextureId(m_frontTexture->textureId());
        else
            textureLayer->setTextureId(0);
    } else
        textureLayer->setTextureId(m_backTextureId);
}
void WebGLLayerChromium::pushPropertiesTo(CCLayerImpl* layer)
{
    CanvasLayerChromium::pushPropertiesTo(layer);

    CCTextureLayerImpl* textureLayer = static_cast<CCTextureLayerImpl*>(layer);
    textureLayer->setTextureId(m_textureId);
    textureLayer->setHasAlpha(m_hasAlpha);
    textureLayer->setPremultipliedAlpha(m_premultipliedAlpha);
}
void PluginLayerChromium::pushPropertiesTo(CCLayerImpl* layer)
{
    LayerChromium::pushPropertiesTo(layer);

    CCTextureLayerImpl* textureLayer = static_cast<CCTextureLayerImpl*>(layer);
    textureLayer->setTextureId(m_textureId);
    textureLayer->setFlipped(m_flipped);
    textureLayer->setUVRect(m_uvRect);
    textureLayer->setIOSurfaceProperties(m_ioSurfaceSize, m_ioSurfaceId);
}
Exemple #4
0
void TextureLayerChromium::pushPropertiesTo(CCLayerImpl* layer)
{
    LayerChromium::pushPropertiesTo(layer);

    CCTextureLayerImpl* textureLayer = static_cast<CCTextureLayerImpl*>(layer);
    textureLayer->setFlipped(m_flipped);
    textureLayer->setUVRect(m_uvRect);
    textureLayer->setPremultipliedAlpha(m_premultipliedAlpha);
    textureLayer->setTextureId(m_textureId);
}