summaryrefslogtreecommitdiff
Diffstat
-rw-r--r--hwc2/common/base/HwcFenceControl.cpp22
-rw-r--r--hwc2/common/base/HwcLayer.cpp61
-rw-r--r--hwc2/common/base/HwcLayer.h7
-rw-r--r--hwc2/common/base/Hwcomposer.cpp3
-rw-r--r--hwc2/common/composers/Composers.cpp16
-rw-r--r--hwc2/common/composers/Composers.h15
-rw-r--r--hwc2/common/composers/GE2DComposer.cpp33
-rw-r--r--hwc2/common/composers/GE2DComposer.h22
-rw-r--r--hwc2/common/devices/PhysicalDevice.cpp598
-rw-r--r--hwc2/common/devices/PrimaryDevice.cpp13
-rw-r--r--hwc2/common/devices/VirtualDevice.cpp14
-rw-r--r--hwc2/common/hdmi/DisplayHdmi.cpp853
-rw-r--r--hwc2/common/hdmi/DisplayHdmi.h202
-rw-r--r--hwc2/common/observers/SoftVsyncObserver.cpp18
-rw-r--r--hwc2/common/observers/SoftVsyncObserver.h3
-rw-r--r--hwc2/common/observers/UeventObserver.cpp2
-rw-r--r--hwc2/common/utils/AmVideo.cpp109
-rw-r--r--hwc2/common/utils/AmVinfo.cpp928
-rw-r--r--hwc2/common/utils/Utils.cpp89
-rw-r--r--hwc2/common/utils/Utils.h30
-rw-r--r--hwc2/include/AmVideo.h45
-rw-r--r--hwc2/include/AmVinfo.h221
-rw-r--r--hwc2/include/HwcFenceControl.h15
-rw-r--r--hwc2/include/IComposer.h16
-rw-r--r--hwc2/include/IComposerFactory.h16
-rw-r--r--hwc2/include/IDisplayDevice.h16
-rw-r--r--hwc2/include/PhysicalDevice.h33
-rw-r--r--hwc2/include/VirtualDevice.h1
-rw-r--r--hwc2/platforms/Android.mk6
-rw-r--r--tvp/LICENSE23
-rw-r--r--tvp/OmxUtil.cpp48
-rw-r--r--tvp/OmxUtil.h13
32 files changed, 2617 insertions, 874 deletions
diff --git a/hwc2/common/utils/Utils.h b/hwc2/common/utils/Utils.h
index 53a55d0..4ae0302 100644
--- a/hwc2/common/utils/Utils.h
+++ b/hwc2/common/utils/Utils.h
@@ -1,5 +1,18 @@
/*
-// Copyright(c) 2016 Amlogic Corporation
+// Copyright (c) 2016 Amlogic
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
*/
#ifndef UTILS_H_
@@ -9,6 +22,7 @@
#if WITH_LIBPLAYER_MODULE
#include <Amavutils.h>
#endif
+#include <hardware/hwcomposer_defs.h>
#define DISPLAY_HPD_STATE "/sys/class/amhdmitx/amhdmitx0/hpd_state"
#define DISPLAY_HDMI_EDID "/sys/class/amhdmitx/amhdmitx0/disp_cap"
@@ -47,8 +61,6 @@ public:
#if WITH_LIBPLAYER_MODULE
static bool checkSysfsStatus(const char* sysfstr, char* lastr, int32_t size);
#endif
- static bool checkOutputMode(char* curmode, int32_t* rate);
- static bool checkVinfo(framebuffer_info_t *fbinfo);
static const char* getHotplugUeventEnvelope();
static const char* getHdcpUeventEnvelope();
@@ -92,6 +104,18 @@ public:
b = t;
}
+ /*
+ * hwc_rect_t operation
+ */
+ enum OVERLAP_TYPE{
+ OVERLAP_EMPTY = 0,
+ OVERLAP_PART,
+ OVERLAP_FULL
+ };
+
+ static bool rectEmpty(hwc_rect_t& rect);
+ static bool rectIntersect(hwc_rect_t& source, hwc_rect_t& dest, hwc_rect_t& result);
+ static OVERLAP_TYPE rectOverlap(hwc_rect_t& source, hwc_rect_t& dest);
};
} // namespace amlogic