Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1482)

Unified Diff: Source/platform/graphics/filters/custom/CustomFilterRenderer.cpp

Issue 106503003: Changed GL enums from GraphicsContext3D to standard versions (Take 2) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/platform/graphics/filters/custom/CustomFilterRenderer.cpp
diff --git a/Source/platform/graphics/filters/custom/CustomFilterRenderer.cpp b/Source/platform/graphics/filters/custom/CustomFilterRenderer.cpp
index 70d4609b3b2064ddb2505c0a0afab325d4e4ce0a..c8480321696c000ba308d54d2be1089fb910936e 100644
--- a/Source/platform/graphics/filters/custom/CustomFilterRenderer.cpp
+++ b/Source/platform/graphics/filters/custom/CustomFilterRenderer.cpp
@@ -104,7 +104,7 @@ void CustomFilterRenderer::draw(Platform3DObject inputTexture, const IntSize& si
m_contextSize = size;
bindProgramAndBuffers(inputTexture);
- m_context->drawElements(GraphicsContext3D::TRIANGLES, m_mesh->indicesCount(), GraphicsContext3D::UNSIGNED_SHORT, 0);
+ m_context->drawElements(GL_TRIANGLES, m_mesh->indicesCount(), GL_UNSIGNED_SHORT, 0);
unbindVertexAttributes();
}
@@ -136,7 +136,7 @@ void CustomFilterRenderer::initializeMeshIfNeeded()
void CustomFilterRenderer::bindVertexAttribute(int attributeLocation, unsigned size, unsigned offset)
{
if (attributeLocation != -1) {
- m_context->vertexAttribPointer(attributeLocation, size, GraphicsContext3D::FLOAT, false, m_mesh->bytesPerVertex(), offset);
+ m_context->vertexAttribPointer(attributeLocation, size, GL_FLOAT, false, m_mesh->bytesPerVertex(), offset);
m_context->enableVertexAttribArray(attributeLocation);
}
}
@@ -233,13 +233,13 @@ void CustomFilterRenderer::bindProgramAndBuffers(Platform3DObject inputTexture)
ASSERT(m_programType == ProgramTypeBlendsElementTexture);
ASSERT(m_compiledProgram->samplerLocation() != -1);
- m_context->activeTexture(GraphicsContext3D::TEXTURE0);
+ m_context->activeTexture(GL_TEXTURE0);
m_context->uniform1i(m_compiledProgram->samplerLocation(), 0);
- m_context->bindTexture(GraphicsContext3D::TEXTURE_2D, inputTexture);
- m_context->texParameteri(GraphicsContext3D::TEXTURE_2D, GraphicsContext3D::TEXTURE_MIN_FILTER, GraphicsContext3D::LINEAR);
- m_context->texParameteri(GraphicsContext3D::TEXTURE_2D, GraphicsContext3D::TEXTURE_MAG_FILTER, GraphicsContext3D::LINEAR);
- m_context->texParameteri(GraphicsContext3D::TEXTURE_2D, GraphicsContext3D::TEXTURE_WRAP_S, GraphicsContext3D::CLAMP_TO_EDGE);
- m_context->texParameteri(GraphicsContext3D::TEXTURE_2D, GraphicsContext3D::TEXTURE_WRAP_T, GraphicsContext3D::CLAMP_TO_EDGE);
+ m_context->bindTexture(GL_TEXTURE_2D, inputTexture);
+ m_context->texParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
+ m_context->texParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
+ m_context->texParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
+ m_context->texParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
}
if (m_compiledProgram->projectionMatrixLocation() != -1) {
@@ -268,8 +268,8 @@ void CustomFilterRenderer::bindProgramAndBuffers(Platform3DObject inputTexture)
if (m_compiledProgram->samplerSizeLocation() != -1)
m_context->uniform2f(m_compiledProgram->samplerSizeLocation(), m_contextSize.width(), m_contextSize.height());
- m_context->bindBuffer(GraphicsContext3D::ARRAY_BUFFER, m_mesh->verticesBufferObject());
- m_context->bindBuffer(GraphicsContext3D::ELEMENT_ARRAY_BUFFER, m_mesh->elementsBufferObject());
+ m_context->bindBuffer(GL_ARRAY_BUFFER, m_mesh->verticesBufferObject());
+ m_context->bindBuffer(GL_ELEMENT_ARRAY_BUFFER, m_mesh->elementsBufferObject());
bindVertexAttribute(m_compiledProgram->positionAttribLocation(), PositionAttribSize, PositionAttribOffset);
bindVertexAttribute(m_compiledProgram->texAttribLocation(), TexAttribSize, TexAttribOffset);

Powered by Google App Engine
This is Rietveld 408576698