From 2b64f698e72e838b5a14d0c826a866aafd5db179 Mon Sep 17 00:00:00 2001 From: Mathias Agopian Date: Mon, 21 Nov 2011 15:00:18 -0800 Subject: don't return an error when SF turns the screen off Change-Id: I3f0d2883d00afeb35563f07c6b34803078989d96 --- libhwcomposer/SecHWC.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'libhwcomposer') diff --git a/libhwcomposer/SecHWC.cpp b/libhwcomposer/SecHWC.cpp index c9970a1..31c0b2c 100644 --- a/libhwcomposer/SecHWC.cpp +++ b/libhwcomposer/SecHWC.cpp @@ -293,6 +293,13 @@ static int hwc_set(hwc_composer_device_t *dev, struct sec_rect dst_rect; + if (dpy == NULL && sur == NULL && list == NULL) { + // release our resources, the screen is turning off + // in our case, there is nothing to do. + ctx->num_of_fb_layer_prev = 0; + return 0; + } + bool need_swap_buffers = ctx->num_of_fb_layer > 0; /* -- cgit v1.1