Exemplo n.º 1
0
void ContentLayerChromium::createTilerIfNeeded()
{
    if (m_tiler)
        return;

    m_tiler = LayerTilerChromium::create(
        layerRenderer(),
        createTextureUpdater(),
        IntSize(defaultTileSize, defaultTileSize),
        LayerTilerChromium::HasBorderTexels);
}
Exemplo n.º 2
0
void TiledLayerChromium::setLayerTreeHost(CCLayerTreeHost* host)
{
    LayerChromium::setLayerTreeHost(host);

    if (m_tiler || !host)
        return;

    createTextureUpdater(host);

    m_textureFormat = host->layerRendererCapabilities().bestTextureFormat;
    m_textureOrientation = textureUpdater()->orientation();
    m_sampledTexelFormat = textureUpdater()->sampledTexelFormat(m_textureFormat);
    m_tiler = CCLayerTilingData::create(
        IntSize(defaultTileSize, defaultTileSize),
        isRootLayer() ? CCLayerTilingData::NoBorderTexels : CCLayerTilingData::HasBorderTexels);
}
Exemplo n.º 3
0
void TiledLayerChromium::setLayerTreeHost(CCLayerTreeHost* host)
{
    if (host == layerTreeHost())
        return;

    if (layerTreeHost())
        cleanupResources();

    LayerChromium::setLayerTreeHost(host);

    if (!host)
        return;

    createTextureUpdater(host);
    setTextureFormat(host->layerRendererCapabilities().bestTextureFormat);
    m_sampledTexelFormat = textureUpdater()->sampledTexelFormat(m_textureFormat);
}