summaryrefslogtreecommitdiff
path: root/src/lib/ecore_drm2/ecore_drm2_outputs.c
diff options
context:
space:
mode:
authorChristopher Michael <cp.michael@samsung.com>2019-04-01 10:28:40 -0400
committerChristopher Michael <cp.michael@samsung.com>2019-04-18 07:21:39 -0400
commit2aaca58de0889027239df45238c17f046685a9a3 (patch)
tree97f185924c2deff8a34479774487f466565f7658 /src/lib/ecore_drm2/ecore_drm2_outputs.c
parentedd78d18006e94d7fa9bd553bb49d2e4becddd6d (diff)
ecore-drm2: Add API function to set crtc background color
This patch adds a new API function we can be called in order to set the crtc background color of a given output. @feature
Diffstat (limited to 'src/lib/ecore_drm2/ecore_drm2_outputs.c')
-rw-r--r--src/lib/ecore_drm2/ecore_drm2_outputs.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/lib/ecore_drm2/ecore_drm2_outputs.c b/src/lib/ecore_drm2/ecore_drm2_outputs.c
index 7ad6ef8396..a433d54358 100644
--- a/src/lib/ecore_drm2/ecore_drm2_outputs.c
+++ b/src/lib/ecore_drm2/ecore_drm2_outputs.c
@@ -1746,3 +1746,21 @@ ecore_drm2_output_relative_to_get(Ecore_Drm2_Output *output)
1746 EINA_SAFETY_ON_NULL_RETURN_VAL(output, NULL); 1746 EINA_SAFETY_ON_NULL_RETURN_VAL(output, NULL);
1747 return output->relative.to; 1747 return output->relative.to;
1748} 1748}
1749
1750EAPI Eina_Bool
1751ecore_drm2_output_background_color_set(Ecore_Drm2_Output *output, int r, int g, int b, int a)
1752{
1753 Ecore_Drm2_Crtc_State *cstate;
1754
1755 EINA_SAFETY_ON_NULL_RETURN_VAL(output, EINA_FALSE);
1756 EINA_SAFETY_ON_NULL_RETURN_VAL(output->crtc_state, EINA_FALSE);
1757
1758 cstate = output->crtc_state;
1759 if (cstate->background.id)
1760 {
1761 cstate->background.value = (a << 48 | b << 32 | g << 16 | r);
1762 return _fb_atomic_flip_test(output);
1763 }
1764
1765 return EINA_FALSE;
1766}