summaryrefslogtreecommitdiff
Diffstat
-rw-r--r--common/display/include/HwDisplayConnector.h8
-rw-r--r--common/hwc/ActiveModeMgr.cpp (renamed from hwc2/ActiveModeMgr.cpp)0
-rw-r--r--common/hwc/Android.mk5
-rw-r--r--common/hwc/FixedSizeModeMgr.cpp (renamed from hwc2/FixedSizeModeMgr.cpp)0
-rw-r--r--common/hwc/HwcModeMgr.cpp (renamed from hwc2/HwcModeMgr.cpp)0
-rw-r--r--common/hwc/RealModeMgr.cpp (renamed from hwc2/RealModeMgr.cpp)0
-rw-r--r--common/hwc/VariableModeMgr.cpp (renamed from hwc2/VariableModeMgr.cpp)0
-rw-r--r--common/hwc/include/ActiveModeMgr.h (renamed from hwc2/ActiveModeMgr.h)0
-rw-r--r--common/hwc/include/FixedSizeModeMgr.h (renamed from hwc2/FixedSizeModeMgr.h)0
-rw-r--r--common/hwc/include/RealModeMgr.h (renamed from hwc2/RealModeMgr.h)0
-rw-r--r--common/hwc/include/VariableModeMgr.h (renamed from hwc2/VariableModeMgr.h)0
-rw-r--r--hwc2/Android.mk62
-rwxr-xr-xhwc2/Hwc2Display.cpp18
-rw-r--r--hwc2/Hwc2Display.h4
-rw-r--r--hwc2/Hwc2Module.cpp9
-rw-r--r--hwc2/MesonHwc2.cpp8
-rw-r--r--hwc2/MesonHwc2.h9
-rw-r--r--postprocessor/Android.mk3
-rw-r--r--postprocessor/fbprocessor/CopyProcessor.cpp16
-rw-r--r--service/2.3/default/android.hardware.graphics.composer@2.3-service.droidlogic.xml9
-rw-r--r--service/2.4/default/android.hardware.graphics.composer@2.4-service.droidlogic.xml9
21 files changed, 138 insertions, 22 deletions
diff --git a/common/hwc/HwcModeMgr.cpp b/common/hwc/HwcModeMgr.cpp
new file mode 100644
index 0000000..c6d4c62
--- a/dev/null
+++ b/common/hwc/HwcModeMgr.cpp
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2017 Amlogic, Inc. All rights reserved.
+ *
+ * This source code is subject to the terms and conditions defined in the
+ * file 'LICENSE' which is part of this source code package.
+ *
+ * Description:
+ */
+
+#include "HwcModeMgr.h"
+#include "FixedSizeModeMgr.h"
+#include "VariableModeMgr.h"
+#include "ActiveModeMgr.h"
+#include "RealModeMgr.h"
+
+std::shared_ptr<HwcModeMgr> createModeMgr(
+ hwc_modes_policy_t policy) {
+ if (policy == FIXED_SIZE_POLICY) {
+ HwcModeMgr * modeMgr = (HwcModeMgr *) new FixedSizeModeMgr();
+ return std::shared_ptr<HwcModeMgr>(std::move(modeMgr));
+ } else if (policy == FULL_ACTIVE_POLICY) {
+ HwcModeMgr * modeMgr = (HwcModeMgr *) new VariableModeMgr();
+ return std::shared_ptr<HwcModeMgr>(std::move(modeMgr));
+ } else if (policy == ACTIVE_MODE_POLICY) {
+ HwcModeMgr * modeMgr = (HwcModeMgr *) new ActiveModeMgr();
+ return std::shared_ptr<HwcModeMgr>(std::move(modeMgr));
+ } else if (policy == REAL_MODE_POLICY){
+ HwcModeMgr * modeMgr = (HwcModeMgr *) new RealModeMgr();
+ return std::shared_ptr<HwcModeMgr>(std::move(modeMgr));
+ } else {
+ return NULL;
+ }
+}
+