[Webkit-unassigned] [Bug 97859] [CSS Shaders] Implement all composite operators except destination and lighter.
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Sun Oct 14 15:35:48 PDT 2012
https://bugs.webkit.org/show_bug.cgi?id=97859
--- Comment #37 from Huang Dongsung <luxtella at company100.net> 2012-10-14 15:36:34 PST ---
(In reply to comment #36)
> Created an attachment (id=168535)
--> (https://bugs.webkit.org/attachment.cgi?id=168535&action=review) [details]
> Patch
I just removed ASSERTIONs in CustomFilterCompiledProgram::initializeParameterLocations().
It is ok because FECustomFilter checks if uniform and attribute are -1 before binding them.
1. For ASSERT(m_samplerLocation != -1), FECustomFilter binds m_samplerLocation uniform if m_samplerLocation is not -1.
void FECustomFilter::bindProgramAndBuffers(Platform3DObject inputTexture)
{
....
if (programNeedsInputTexture()) {
....
m_context->activeTexture(GraphicsContext3D::TEXTURE0);
m_context->uniform1i(m_compiledProgram->samplerLocation(), 0);
m_context->bindTexture(GraphicsContext3D::TEXTURE_2D, inputTexture);
....
}
....
}
bool FECustomFilter::programNeedsInputTexture() const
{
ASSERT(m_compiledProgram.get());
return m_compiledProgram->samplerLocation() != -1;
}
2. For ASSERT(m_internalTexCoordAttribLocation != -1), FECustomFilter binds m_internalTexCoordAttribLocation attribute if m_internalTexCoordAttribLocation is not -1.
void FECustomFilter::bindProgramAndBuffers(Platform3DObject inputTexture)
{
....
bindVertexAttribute(m_compiledProgram->internalTexCoordAttribLocation(), TexAttribSize, TexAttribOffset);
....
}
void FECustomFilter::bindVertexAttribute(int attributeLocation, unsigned size, unsigned offset)
{
if (attributeLocation != -1) {
m_context->vertexAttribPointer(attributeLocation, size, GraphicsContext3D::FLOAT, false, m_mesh->bytesPerVertex(), offset);
m_context->enableVertexAttribArray(attributeLocation);
}
}
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list