summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlbert Astals Cid <aacid@kde.org>2020-02-17 01:08:30 +0100
committerAlbert Astals Cid <aacid@kde.org>2020-02-17 01:08:30 +0100
commitdcce8cc11dd29180bcadbd182d3a8e6900bc08f8 (patch)
treed63a3e26078c3f294a80dae4df85665a6b530d60
parent16e1d0509be90a121b48e749cb330fe738f735eb (diff)
Remove dead code from GfxGouraudTriangleShading::getTriangle
If we're asserting for !isParameterized, that means nFuncs == 0
-rw-r--r--poppler/GfxState.cc40
1 files changed, 4 insertions, 36 deletions
diff --git a/poppler/GfxState.cc b/poppler/GfxState.cc
index f52603be..47ae1e5c 100644
--- a/poppler/GfxState.cc
+++ b/poppler/GfxState.cc
@@ -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 {