summaryrefslogtreecommitdiffstats
path: root/libhwcomposer
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2011-11-21 15:00:18 -0800
committerMathias Agopian <mathias@google.com>2011-11-21 15:04:00 -0800
commit2b64f698e72e838b5a14d0c826a866aafd5db179 (patch)
tree36bf000cc5135e81e0a230d15c79397ab048f416 /libhwcomposer
parent7c4b5c2d1820cdf3b753af4057b9f8b56d6a408d (diff)
downloaddevice_samsung_crespo-2b64f698e72e838b5a14d0c826a866aafd5db179.zip
device_samsung_crespo-2b64f698e72e838b5a14d0c826a866aafd5db179.tar.gz
device_samsung_crespo-2b64f698e72e838b5a14d0c826a866aafd5db179.tar.bz2
don't return an error when SF turns the screen off
Change-Id: I3f0d2883d00afeb35563f07c6b34803078989d96
Diffstat (limited to 'libhwcomposer')
-rw-r--r--libhwcomposer/SecHWC.cpp7
1 files changed, 7 insertions, 0 deletions
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;
/*