Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp
unsigned LayerRendererChromium::createLayerTexture()
{
    unsigned textureId = 0;
    GLC(m_context.get(), textureId = m_context->createTexture());
    GLC(m_context.get(), m_context->bindTexture(GraphicsContext3D::TEXTURE_2D, textureId));
    // Do basic linear filtering on resize.
    GLC(m_context.get(), m_context->texParameteri(GraphicsContext3D::TEXTURE_2D, GraphicsContext3D::TEXTURE_MIN_FILTER, GraphicsContext3D::LINEAR));
    GLC(m_context.get(), m_context->texParameteri(GraphicsContext3D::TEXTURE_2D, GraphicsContext3D::TEXTURE_MAG_FILTER, GraphicsContext3D::LINEAR));
    // NPOT textures in GL ES only work when the wrap mode is set to GraphicsContext3D::CLAMP_TO_EDGE.
    GLC(m_context.get(), m_context->texParameteri(GraphicsContext3D::TEXTURE_2D, GraphicsContext3D::TEXTURE_WRAP_S, GraphicsContext3D::CLAMP_TO_EDGE));
    GLC(m_context.get(), m_context->texParameteri(GraphicsContext3D::TEXTURE_2D, GraphicsContext3D::TEXTURE_WRAP_T, GraphicsContext3D::CLAMP_TO_EDGE));
    return textureId;
}
// FIXME: This method should eventually be replaced by a proper texture manager.
This method should eventually be replaced by a proper texture manager.
This method should eventually be replaced by a proper texture manager .
unsigned LayerRendererChromium::createLayerTexture()
{
    unsigned textureId = 0;
    GLC(m_context.get(), textureId = m_context->createTexture());
    GLC(m_context.get(), m_context->bindTexture(GraphicsContext3D::TEXTURE_2D, textureId));
    GLC(m_context.get(), m_context->texParameteri(GraphicsContext3D::TEXTURE_2D, GraphicsContext3D::TEXTURE_MIN_FILTER, GraphicsContext3D::LINEAR));
    GLC(m_context.get(), m_context->texParameteri(GraphicsContext3D::TEXTURE_2D, GraphicsContext3D::TEXTURE_MAG_FILTER, GraphicsContext3D::LINEAR));
    GLC(m_context.get(), m_context->texParameteri(GraphicsContext3D::TEXTURE_2D, GraphicsContext3D::TEXTURE_WRAP_S, GraphicsContext3D::CLAMP_TO_EDGE));
    GLC(m_context.get(), m_context->texParameteri(GraphicsContext3D::TEXTURE_2D, GraphicsContext3D::TEXTURE_WRAP_T, GraphicsContext3D::CLAMP_TO_EDGE));
    return textureId;
}
unsigned LayerRendererChromium :: createLayerTexture ( ) { unsigned textureId = 0 ; GLC ( m_context . get ( ) , textureId = m_context -> createTexture ( ) ) ; GLC ( m_context . get ( ) , m_context -> bindTexture ( GraphicsContext3D :: TEXTURE_2D , textureId ) ) ; GLC ( m_context . get ( ) , m_context -> texParameteri ( GraphicsContext3D :: TEXTURE_2D , GraphicsContext3D :: TEXTURE_MIN_FILTER , GraphicsContext3D :: LINEAR ) ) ; GLC ( m_context . get ( ) , m_context -> texParameteri ( GraphicsContext3D :: TEXTURE_2D , GraphicsContext3D :: TEXTURE_MAG_FILTER , GraphicsContext3D :: LINEAR ) ) ; GLC ( m_context . get ( ) , m_context -> texParameteri ( GraphicsContext3D :: TEXTURE_2D , GraphicsContext3D :: TEXTURE_WRAP_S , GraphicsContext3D :: CLAMP_TO_EDGE ) ) ; GLC ( m_context . get ( ) , m_context -> texParameteri ( GraphicsContext3D :: TEXTURE_2D , GraphicsContext3D :: TEXTURE_WRAP_T , GraphicsContext3D :: CLAMP_TO_EDGE ) ) ; return textureId ; }
FIXME: This method should eventually be replaced by a proper texture manager.
FIXME : This method should eventually be replaced by a proper texture manager .
// Do basic linear filtering on resize. // NPOT textures in GL ES only work when the wrap mode is set to GraphicsContext3D::CLAMP_TO_EDGE.