libqdutils::Replace USE_MDP3 with getMDPVersion() method

Change-Id: Id602c8ab8d8ba140a379ba0e475c73806d17b527
This commit is contained in:
Ramakant Singh 2012-08-13 13:21:02 +05:30 committed by Andrew Sutherland
parent cc18cfed4c
commit 06d4f5be44
2 changed files with 8 additions and 7 deletions

View File

@ -33,7 +33,7 @@ include $(CLEAR_VARS)
LOCAL_MODULE := libmemalloc
LOCAL_MODULE_TAGS := optional
LOCAL_C_INCLUDES := $(common_includes)
LOCAL_SHARED_LIBRARIES := $(common_libs) libgenlock
LOCAL_SHARED_LIBRARIES := $(common_libs) libgenlock libqdutils
LOCAL_CFLAGS := $(common_flags) -DLOG_TAG=\"memalloc\"
LOCAL_SRC_FILES := alloc_controller.cpp
ifeq ($(TARGET_USES_ION),true)

View File

@ -33,7 +33,7 @@
#include <stdint.h>
#include <utils/Singleton.h>
#include <cutils/properties.h>
#include <mdp_version.h>
using namespace android;
namespace qdutils {
// Enum containing the supported composition types
@ -74,11 +74,12 @@ inline QCCompositionType::QCCompositionType()
} 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;
#else
mCompositionType = COMPOSITION_TYPE_DYN | COMPOSITION_TYPE_C2D;
#endif
if (qdutils::MDPVersion::getInstance().getMDPVersion() < 400)
mCompositionType =
COMPOSITION_TYPE_DYN |COMPOSITION_TYPE_MDP;
else
mCompositionType =
COMPOSITION_TYPE_DYN|COMPOSITION_TYPE_C2D;
} else {
mCompositionType = COMPOSITION_TYPE_GPU;
}