Commit dcce8cc1 authored by Albert Astals Cid's avatar Albert Astals Cid

Remove dead code from GfxGouraudTriangleShading::getTriangle

If we're asserting for !isParameterized, that means nFuncs == 0
parent 16e1d050
......@@ -4877,54 +4877,22 @@ void GfxGouraudTriangleShading::getTriangle(
double *x0, double *y0, GfxColor *color0,
double *x1, double *y1, GfxColor *color1,
double *x2, double *y2, GfxColor *color2) {
double in;
double out[gfxColorMaxComps];
int v, j;
int v;
assert(!isParameterized());
v = triangles[i][0];
*x0 = vertices[v].x;
*y0 = vertices[v].y;
if (nFuncs > 0) {
in = colToDbl(vertices[v].color.c[0]);
for (j = 0; j < nFuncs; ++j) {
funcs[j]->transform(&in, &out[j]);
}
for (j = 0; j < gfxColorMaxComps; ++j) {
color0->c[j] = dblToCol(out[j]);
}
} else {
*color0 = vertices[v].color;
}
*color0 = vertices[v].color;
v = triangles[i][1];
*x1 = vertices[v].x;
*y1 = vertices[v].y;
if (nFuncs > 0) {
in = colToDbl(vertices[v].color.c[0]);
for (j = 0; j < nFuncs; ++j) {
funcs[j]->transform(&in, &out[j]);
}
for (j = 0; j < gfxColorMaxComps; ++j) {
color1->c[j] = dblToCol(out[j]);
}
} else {
*color1 = vertices[v].color;
}
*color1 = vertices[v].color;
v = triangles[i][2];
*x2 = vertices[v].x;
*y2 = vertices[v].y;
if (nFuncs > 0) {
in = colToDbl(vertices[v].color.c[0]);
for (j = 0; j < nFuncs; ++j) {
funcs[j]->transform(&in, &out[j]);
}
for (j = 0; j < gfxColorMaxComps; ++j) {
color2->c[j] = dblToCol(out[j]);
}
} else {
*color2 = vertices[v].color;
}
*color2 = vertices[v].color;
}
void GfxGouraudTriangleShading::getParameterizedColor(double t, GfxColor *color) const {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment