diff options
author | Naseer Ahmed <naseer@codeaurora.org> | 2013-02-13 16:33:40 -0500 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2013-02-14 11:42:46 -0800 |
commit | 501cf7b6ad5d26f85785912d2e0f162cc6360758 (patch) | |
tree | e67ee385bb66d5d48cbcd52f5b6987866ef99485 /libqdutils | |
parent | ef3efafaed54ff5a52f661720524c4a9f06b774f (diff) | |
download | display-501cf7b6ad5d26f85785912d2e0f162cc6360758.tar.gz |
qdutils: Default to GPU composition
If composition type is not set, default to GPU composition.
This is because CPU composition is not supported from MR1 onwards
Change-Id: I951dcb5586a8dbcfbe73cd7292d0f1690d6528ba
Diffstat (limited to 'libqdutils')
-rw-r--r-- | libqdutils/comptype.h | 31 |
1 files changed, 10 insertions, 21 deletions
diff --git a/libqdutils/comptype.h b/libqdutils/comptype.h index 63c99d3b..71f48716 100644 --- a/libqdutils/comptype.h +++ b/libqdutils/comptype.h @@ -61,32 +61,21 @@ class QCCompositionType : public Singleton <QCCompositionType> inline QCCompositionType::QCCompositionType() { char property[PROPERTY_VALUE_MAX]; - mCompositionType = 0; - if (property_get("debug.sf.hw", property, NULL) > 0) { - if(atoi(property) == 0) { - mCompositionType = COMPOSITION_TYPE_CPU; - } else { //debug.sf.hw = 1 - property_get("debug.composition.type", property, NULL); - if (property == NULL) { - mCompositionType = COMPOSITION_TYPE_GPU; - } else if ((strncmp(property, "mdp", 3)) == 0) { - mCompositionType = COMPOSITION_TYPE_MDP; - } else if ((strncmp(property, "c2d", 3)) == 0) { - mCompositionType = COMPOSITION_TYPE_C2D; - } else if ((strncmp(property, "dyn", 3)) == 0) { + mCompositionType = COMPOSITION_TYPE_GPU; + if (property_get("debug.composition.type", property, "gpu") > 0) { + if ((strncmp(property, "mdp", 3)) == 0) { + mCompositionType = COMPOSITION_TYPE_MDP; + } else if ((strncmp(property, "c2d", 3)) == 0) { + mCompositionType = COMPOSITION_TYPE_C2D; + } else if ((strncmp(property, "dyn", 3)) == 0) { #ifdef USE_MDP3 - mCompositionType = COMPOSITION_TYPE_DYN | COMPOSITION_TYPE_MDP; + mCompositionType = COMPOSITION_TYPE_DYN | COMPOSITION_TYPE_MDP; #else - mCompositionType = COMPOSITION_TYPE_DYN | COMPOSITION_TYPE_C2D; + mCompositionType = COMPOSITION_TYPE_DYN | COMPOSITION_TYPE_C2D; #endif - } else { - mCompositionType = COMPOSITION_TYPE_GPU; - } } - } else { //debug.sf.hw is not set. Use cpu composition - mCompositionType = COMPOSITION_TYPE_CPU; } - } + }; //namespace qdutils #endif //INCLUDE_LIBQCOM_COMPTYPES |