From eef639ac65abd3fe09f836ec453d666a59f2ea17 Mon Sep 17 00:00:00 2001 From: Stark Li Date: Tue, 11 Apr 2017 06:34:15 +0000 Subject: PD#140059: fix ge2d process 2 different size layer performance problems. Change-Id: If679ce5f00f748bda1d0c45d275c07e819f48875 --- diff --git a/hwc2/common/devices/PhysicalDevice.cpp b/hwc2/common/devices/PhysicalDevice.cpp index 04bf089..2dab0d4 100644 --- a/hwc2/common/devices/PhysicalDevice.cpp +++ b/hwc2/common/devices/PhysicalDevice.cpp @@ -1013,6 +1013,12 @@ bool PhysicalDevice::layersStateCheck(int32_t renderMode, } } #endif + if (HWC2_TWO_LAYERS == layerNum + && (!Utils::compareSize(sourceCrop[0], sourceCrop[1]) + || !Utils::compareSize(displayFrame[0], displayFrame[1]))) { + DTRACE("when 2 layer's size is difference, ge2d compose can not process!"); + return false; + } } #endif -- cgit