diff options
author | Thomas Wendt <thoemy@gmx.net> | 2014-12-12 15:38:36 +0100 |
---|---|---|
committer | Ethan Chen <intervigil@gmail.com> | 2014-12-16 00:18:57 +0000 |
commit | f9890356928f6dbae9a4a88418c170cceaf9d351 (patch) | |
tree | 108173a7e890c8a909d9f4f450330311265d2d55 | |
parent | 7c38f6bf2fd19214146788f5b5b8cd587fa972fb (diff) | |
download | android_frameworks_native-f9890356928f6dbae9a4a88418c170cceaf9d351.tar.gz android_frameworks_native-f9890356928f6dbae9a4a88418c170cceaf9d351.tar.bz2 android_frameworks_native-f9890356928f6dbae9a4a88418c170cceaf9d351.zip |
surfaceflinger: Add more ifdefs for secure display query
Commit f04661 forgot ifdefs in HWComposer.h that break ABI. This
broke at least grouper and endeavoru surfaceflinger.
Change-Id: I9a1bd4e1fb9a2ad5ac0a39e86ef8131b52526e32
-rw-r--r-- | services/surfaceflinger/DisplayHardware/HWComposer.cpp | 14 | ||||
-rw-r--r-- | services/surfaceflinger/DisplayHardware/HWComposer.h | 4 |
2 files changed, 18 insertions, 0 deletions
diff --git a/services/surfaceflinger/DisplayHardware/HWComposer.cpp b/services/surfaceflinger/DisplayHardware/HWComposer.cpp index 5fac58df6..b2b07a185 100644 --- a/services/surfaceflinger/DisplayHardware/HWComposer.cpp +++ b/services/surfaceflinger/DisplayHardware/HWComposer.cpp @@ -179,7 +179,9 @@ HWComposer::HWComposer( config.height = mFbDev->height; config.xdpi = mFbDev->xdpi; config.ydpi = mFbDev->ydpi; +#ifdef QCOM_BSP config.secure = true; //XXX: Assuming primary is always true +#endif config.refresh = nsecs_t(1e9 / mFbDev->fps); disp.configs.push_back(config); disp.currentConfig = 0; @@ -351,10 +353,12 @@ static const uint32_t DISPLAY_ATTRIBUTES[] = { HWC_DISPLAY_HEIGHT, HWC_DISPLAY_DPI_X, HWC_DISPLAY_DPI_Y, +#ifdef QCOM_BSP //To specify if display is secure //Primary is considered as secure always //HDMI can be secure based on HDCP HWC_DISPLAY_SECURE, +#endif HWC_DISPLAY_NO_ATTRIBUTE, }; #define NUM_DISPLAY_ATTRIBUTES (sizeof(DISPLAY_ATTRIBUTES) / sizeof(DISPLAY_ATTRIBUTES)[0]) @@ -410,9 +414,11 @@ status_t HWComposer::queryDisplayProperties(int disp) { case HWC_DISPLAY_DPI_Y: config.ydpi = values[i] / 1000.0f; break; +#ifdef QCOM_BSP case HWC_DISPLAY_SECURE: config.secure = values[i]; break; +#endif default: ALOG_ASSERT(false, "unknown display attribute[%zu] %#x", i, DISPLAY_ATTRIBUTES[i]); @@ -524,10 +530,12 @@ float HWComposer::getDpiY(int disp) const { return mDisplayData[disp].configs[currentConfig].ydpi; } +#ifdef QCOM_BSP bool HWComposer::isSecure(int disp) const { size_t currentConfig = mDisplayData[disp].currentConfig; return mDisplayData[disp].configs[currentConfig].secure; } +#endif nsecs_t HWComposer::getRefreshPeriod(int disp) const { @@ -1258,9 +1266,15 @@ void HWComposer::dump(String8& result) const { result.appendFormat(" Display[%zd] configurations (* current):\n", i); for (size_t c = 0; c < disp.configs.size(); ++c) { const DisplayConfig& config(disp.configs[c]); +#ifdef QCOM_BSP result.appendFormat(" %s%zd: %ux%u, xdpi=%f, ydpi=%f, secure=%d refresh=%" PRId64 "\n", c == disp.currentConfig ? "* " : "", c, config.width, config.height, config.xdpi, config.ydpi, config.secure, config.refresh); +#else + result.appendFormat(" %s%zd: %ux%u, xdpi=%f, ydpi=%f, refresh=%" PRId64 "\n", + c == disp.currentConfig ? "* " : "", c, config.width, config.height, + config.xdpi, config.ydpi, config.refresh); +#endif } if (disp.list) { diff --git a/services/surfaceflinger/DisplayHardware/HWComposer.h b/services/surfaceflinger/DisplayHardware/HWComposer.h index 3fb1234d6..4e3d1d114 100644 --- a/services/surfaceflinger/DisplayHardware/HWComposer.h +++ b/services/surfaceflinger/DisplayHardware/HWComposer.h @@ -276,7 +276,9 @@ public: uint32_t height; float xdpi; float ydpi; +#ifdef QCOM_BSP bool secure; +#endif nsecs_t refresh; }; @@ -286,7 +288,9 @@ public: sp<Fence> getDisplayFence(int disp) const; uint32_t getFormat(int disp) const; bool isConnected(int disp) const; +#ifdef QCOM_BSP bool isSecure(int disp) const; +#endif // These return the values for the current config of a given display index. // To get the values for all configs, use getConfigs below. |