summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Chang <cweichun@google.com>2023-10-24 13:06:17 +0000
committerJohn Chang <cweichun@google.com>2023-10-24 19:48:39 +0000
commit6f7c830755a1c053677e725adaed7476833656ca (patch)
tree6c9e5d7c733231ed0133d5a41ac955f4b76d19eb
parentf2fccc37f9327fc9c044d75551964c7ff71f38ef (diff)
downloadgs101-6f7c830755a1c053677e725adaed7476833656ca.tar.gz
libhwc2.1: skipping unnecessary steps
Retrieve display interface only when required to optimize operations. BUG: 301286479 Test: Successfully build and check system works fine. Change-Id: Ie6e9e0a69b2fa956f829fcd282ac8efd7845b2f5
-rw-r--r--libhwc2.1/libdevice/ExynosDeviceModule.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/libhwc2.1/libdevice/ExynosDeviceModule.cpp b/libhwc2.1/libdevice/ExynosDeviceModule.cpp
index be259aa..2af614b 100644
--- a/libhwc2.1/libdevice/ExynosDeviceModule.cpp
+++ b/libhwc2.1/libdevice/ExynosDeviceModule.cpp
@@ -29,10 +29,9 @@ ExynosDeviceModule::ExynosDeviceModule() : ExynosDevice(), mDisplayColorLoader(D
std::vector<displaycolor::DisplayInfo> display_info;
for (uint32_t i = 0; i < mDisplays.size(); i++) {
ExynosDisplay* display = mDisplays[i];
- ExynosDisplayDrmInterfaceModule* moduleDisplayInterface =
- (ExynosDisplayDrmInterfaceModule*)(display->mDisplayInterface.get());
-
if (display->mType == HWC_DISPLAY_PRIMARY) {
+ ExynosDisplayDrmInterfaceModule* moduleDisplayInterface =
+ (ExynosDisplayDrmInterfaceModule*)(display->mDisplayInterface.get());
moduleDisplayInterface->getDisplayInfo(display_info);
}
}