aboutsummaryrefslogtreecommitdiffstats
path: root/exynos
diff options
context:
space:
mode:
authorTobias Jakobi2015-09-08 10:22:30 -0500
committerEmil Velikov2015-09-21 11:43:14 -0500
commit76d1c6b15725f1e7de3c60b0398639e06bf295be (patch)
tree38ad33307fe4ac18462ddfdec9899f6ec2acdc51 /exynos
parente3c97d1a2473cd06a964599d10465f1e6a4d9015 (diff)
downloadexternal-libgbm-76d1c6b15725f1e7de3c60b0398639e06bf295be.tar.gz
external-libgbm-76d1c6b15725f1e7de3c60b0398639e06bf295be.tar.xz
external-libgbm-76d1c6b15725f1e7de3c60b0398639e06bf295be.zip
exynos/fimg2d: remove default case from g2d_get_blend_op()
We now validate the blending mode via g2d_validate_mode() prior to feeding it to g2d_get_blend_op(). Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Diffstat (limited to 'exynos')
-rw-r--r--exynos/exynos_fimg2d.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/exynos/exynos_fimg2d.c b/exynos/exynos_fimg2d.c
index 9d9359ae..d7cbb243 100644
--- a/exynos/exynos_fimg2d.c
+++ b/exynos/exynos_fimg2d.c
@@ -64,6 +64,11 @@ static unsigned int g2d_get_blend_op(enum e_g2d_op op)
64 64
65 val.val = 0; 65 val.val = 0;
66 66
67 /*
68 * The switch statement is missing the default branch since
69 * we assume that the caller checks the blending operation
70 * via g2d_validate_blending_op() first.
71 */
67 switch (op) { 72 switch (op) {
68 case G2D_OP_CLEAR: 73 case G2D_OP_CLEAR:
69 case G2D_OP_DISJOINT_CLEAR: 74 case G2D_OP_DISJOINT_CLEAR:
@@ -91,11 +96,6 @@ static unsigned int g2d_get_blend_op(enum e_g2d_op op)
91 SET_BF(val, G2D_COEFF_MODE_SRC_ALPHA, 0, 0, 0, 96 SET_BF(val, G2D_COEFF_MODE_SRC_ALPHA, 0, 0, 0,
92 G2D_COEFF_MODE_SRC_ALPHA, 1, 0, 0); 97 G2D_COEFF_MODE_SRC_ALPHA, 1, 0, 0);
93 break; 98 break;
94 default:
95 fprintf(stderr, "Not support operation(%d).\n", op);
96 SET_BF(val, G2D_COEFF_MODE_ONE, 0, 0, 0, G2D_COEFF_MODE_ZERO,
97 0, 0, 0);
98 break;
99 } 99 }
100 100
101 return val.val; 101 return val.val;