summaryrefslogtreecommitdiff
Diffstat
-rw-r--r--hwc1.4/Android.mk60
-rw-r--r--hwc1.4/hwcomposer.cpp1202
-rw-r--r--hwc2/common/base/HwcLayer.cpp2
-rw-r--r--hwc2/common/base/HwcLayer.h6
-rw-r--r--hwc2/common/base/HwcModule.cpp9
-rw-r--r--hwc2/common/base/Hwcomposer.cpp14
-rw-r--r--hwc2/common/composers/GE2DComposer.cpp3
-rw-r--r--hwc2/common/composers/GE2DComposer.h6
-rw-r--r--hwc2/common/composers/IComposeDevice.cpp (renamed from hwc2/common/composers/Composers.cpp)10
-rw-r--r--hwc2/common/composers/IComposeDevice.h (renamed from hwc2/common/composers/Composers.h)17
-rw-r--r--hwc2/common/devices/PhysicalDevice.cpp25
-rw-r--r--hwc2/common/devices/PrimaryDevice.cpp2
-rw-r--r--hwc2/common/hdmi/DisplayHdmi.h2
-rw-r--r--hwc2/common/utils/Utils.cpp2
-rw-r--r--hwc2/common/utils/Utils.h5
-rw-r--r--hwc2/include/Hwcomposer.h4
-rw-r--r--hwc2/include/IComposeDeviceFactory.h (renamed from hwc2/include/IComposerFactory.h)16
-rw-r--r--hwc2/include/IComposer.h47
-rw-r--r--hwc2/include/PhysicalDevice.h17
-rw-r--r--hwc2/include/PrimaryDevice.h4
-rw-r--r--hwc2/platforms/Android.mk6
-rw-r--r--hwc2/platforms/PlatFactory.cpp6
22 files changed, 45 insertions, 1420 deletions
diff --git a/hwc2/common/devices/PhysicalDevice.cpp b/hwc2/common/devices/PhysicalDevice.cpp
index 7976b8c..6a85574 100644
--- a/hwc2/common/devices/PhysicalDevice.cpp
+++ b/hwc2/common/devices/PhysicalDevice.cpp
@@ -27,13 +27,14 @@
#include <HwcFenceControl.h>
#include <cutils/properties.h>
#include <tvp/OmxUtil.h>
+#include <framebuffer.h>
#define FBIOPUT_OSD_CURSOR 0x451a
namespace android {
namespace amlogic {
-PhysicalDevice::PhysicalDevice(hwc2_display_t id, Hwcomposer& hwc, DeviceControlFactory* controlFactory)
+PhysicalDevice::PhysicalDevice(hwc2_display_t id, Hwcomposer& hwc, IComposeDeviceFactory* controlFactory)
: mId(id),
mHwc(hwc),
mControlFactory(controlFactory),
@@ -628,12 +629,7 @@ void PhysicalDevice::ge2dCompose(framebuffer_info_t * fbInfo, bool hasVideoOverl
int32_t PhysicalDevice::postFramebuffer(int32_t* outRetireFence, bool hasVideoOverlay) {
HwcLayer* layer = NULL;
void *cbuffer;
-
-#if PLATFORM_SDK_VERSION >= 26
bool bUseHwcPost = true;
-#else
- bool bUseHwcPost = mIsContinuousBuf;
-#endif
// deal physical display's client target layer
framebuffer_info_t fbInfo = *(mFramebufferContext->getInfo());
@@ -784,7 +780,6 @@ int32_t PhysicalDevice::presentDisplay(
if (mIsValidated) {
// TODO: need improve the way to set video axis.
-#if WITH_LIBPLAYER_MODULE
bool bPresent = true;
if (mHwcSecureLayers.indexOfKey(mVideoOverlayLayerId) >= 0) {
bPresent = false;
@@ -803,7 +798,6 @@ int32_t PhysicalDevice::presentDisplay(
} else {
mGE2DClearVideoRegionCount = 0;
}
-#endif
err = postFramebuffer(outRetireFence, hasVideoOverlay);
} else { // display not validate yet.
err = HWC2_ERROR_NOT_VALIDATED;
@@ -1362,25 +1356,10 @@ int32_t PhysicalDevice::initDisplay() {
fbInfo->info.yres);
int32_t usage = 0;
-#if PLATFORM_SDK_VERSION < 26
- private_module_t *grallocModule = Hwcomposer::getInstance().getGrallocModule();
- if (mId == HWC_DISPLAY_PRIMARY) {
- grallocModule->fb_primary.fb_info = *(fbInfo);
- } else if (mId == HWC_DISPLAY_EXTERNAL) {
- grallocModule->fb_external.fb_info = *(fbInfo);
- usage |= GRALLOC_USAGE_EXTERNAL_DISP;
- }
- fbInfo->grallocModule = grallocModule;
-#endif
-
- //Register the framebuffer to gralloc module
mFramebufferHnd = new private_handle_t(
private_handle_t::PRIV_FLAGS_FRAMEBUFFER,
usage, fbInfo->fbSize, 0,
0, fbInfo->fd, bufferSize, 0);
-#if PLATFORM_SDK_VERSION < 26
- grallocModule->base.registerBuffer(&(grallocModule->base), mFramebufferHnd);
-#endif
DTRACE("init_frame_buffer get frame size %d usage %d",
bufferSize, usage);