From: Harish Krupo Date: Tue, 11 Dec 2018 08:29:07 +0000 (+0530) Subject: desktop-shell: Set 1x1 buffers for solid-color backgrounds X-Git-Tag: upstream/9.0.0~235 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3623e46dc555ea9df34ff259530af64f0d9f0645;p=platform%2Fupstream%2Fweston.git desktop-shell: Set 1x1 buffers for solid-color backgrounds When we are going to set a solid color for the background, use a 1x1 buffer and set the viewport to the full size. This avoids un-necessary allocation of buffer memory. Signed-off-by: Harish Krupo --- diff --git a/clients/desktop-shell.c b/clients/desktop-shell.c index efadb49c..1d75ad1c 100644 --- a/clients/desktop-shell.c +++ b/clients/desktop-shell.c @@ -849,6 +849,12 @@ background_configure(void *data, return; } + if (!background->image) { + widget_set_viewport_destination(background->widget, width, height); + width = 1; + height = 1; + } + widget_schedule_resize(background->widget, width, height); }