void GrGpuGLShaders::flushEdgeAAData() { const int& uni = fProgramData->fUniLocations.fEdgesUni; if (GrGLProgram::kUnusedUniform != uni) { int count = this->getDrawState().getNumAAEdges(); GrDrawState::Edge edges[GrDrawState::kMaxEdges]; // Flip the edges in Y float height = static_cast<float>(this->getDrawState().getRenderTarget()->height()); for (int i = 0; i < count; ++i) { edges[i] = this->getDrawState().getAAEdges()[i]; float b = edges[i].fY; edges[i].fY = -b; edges[i].fZ += b * height; } GL_CALL(Uniform3fv(uni, count, &edges[0].fX)); } }
GL_APICALL void GL_APIENTRY glUniform3fv (GLint location, GLsizei count, const GLfloat* v) { CONTEXT_EXEC(Uniform3fv(location, count, v)); }