diff options
author | Diogo Ferreira <defer@cyngn.com> | 2015-02-27 21:51:24 +0000 |
---|---|---|
committer | Steve Kondik <steve@cyngn.com> | 2015-03-04 06:14:44 +0100 |
commit | 9d6655f9ff4fb88a1768a0e9748f1319b24430fd (patch) | |
tree | 9df1e4e8a003b62c02f19a0564c07067e32d6651 | |
parent | 6a330b96daf5c96c8cfedffd84d094134b976dd8 (diff) | |
download | android_hardware_qcom_display-stable/cm-12.0-caf-8974-YNG1TA.tar.gz android_hardware_qcom_display-stable/cm-12.0-caf-8974-YNG1TA.tar.bz2 android_hardware_qcom_display-stable/cm-12.0-caf-8974-YNG1TA.zip |
ovelray: Tolerate the absense of an RGB pipestable/cm-12.0-caf-8974-YNG4Nstable/cm-12.0-caf-8974-YNG3Cstable/cm-12.0-caf-8974-YNG1TAstable/cm-12.0-caf-8974-YNG1Tcm-12.0-caf-8974
Layers that use internal formats (such as nv12-venus) may not provide
RGB pipes. This would crash surfaceflinger and since nv12-venus is
a supported preview format for some cameras, let's tolerate that crash.
Change-Id: I8b4e564b2a0018f3926fb6ef71dc5b8dd454fc09
-rw-r--r-- | liboverlay/overlay.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/liboverlay/overlay.cpp b/liboverlay/overlay.cpp index 13d299586..26ae9f551 100644 --- a/liboverlay/overlay.cpp +++ b/liboverlay/overlay.cpp @@ -194,10 +194,13 @@ bool Overlay::commit(utils::eDest dest) { bool Overlay::queueBuffer(int fd, uint32_t offset, utils::eDest dest) { bool ret = false; - validate((int)dest); - //Queue only if commit() has succeeded (and the bit set) - if(PipeBook::isUsed((int)dest)) { - ret = mPipeBook[dest].mPipe->queueBuffer(fd, offset); + + if (mPipeBook[dest].valid()) { + validate((int)dest); + //Queue only if commit() has succeeded (and the bit set) + if(PipeBook::isUsed((int)dest)) { + ret = mPipeBook[dest].mPipe->queueBuffer(fd, offset); + } } return ret; } |