summaryrefslogtreecommitdiffstats
path: root/services/surfaceflinger/DisplayHardware/HWComposer.cpp
diff options
context:
space:
mode:
authorJesse Hall <jessehall@google.com>2013-12-23 21:02:15 -0800
committerJesse Hall <jessehall@google.com>2013-12-23 21:53:39 -0800
commit19e872912af66c53a4350afcc333bbafaf6a2294 (patch)
treeb4c66aba064869becf7d16d10e75aca4023d0470 /services/surfaceflinger/DisplayHardware/HWComposer.cpp
parent05f8c703d4a050669ff8f406be3a9dc2357935f7 (diff)
downloadframeworks_native-19e872912af66c53a4350afcc333bbafaf6a2294.zip
frameworks_native-19e872912af66c53a4350afcc333bbafaf6a2294.tar.gz
frameworks_native-19e872912af66c53a4350afcc333bbafaf6a2294.tar.bz2
Implement per-display EGLConfig and configless EGLContext
Bug: 12230666 Change-Id: Icca608b108cbdcab9cf01a9236d8cdbda000a836 Signed-off-by: Jesse Hall <jessehall@google.com>
Diffstat (limited to 'services/surfaceflinger/DisplayHardware/HWComposer.cpp')
-rw-r--r--services/surfaceflinger/DisplayHardware/HWComposer.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/services/surfaceflinger/DisplayHardware/HWComposer.cpp b/services/surfaceflinger/DisplayHardware/HWComposer.cpp
index c7d1a90..1b652c3 100644
--- a/services/surfaceflinger/DisplayHardware/HWComposer.cpp
+++ b/services/surfaceflinger/DisplayHardware/HWComposer.cpp
@@ -455,7 +455,11 @@ uint32_t HWComposer::getHeight(int disp) const {
}
uint32_t HWComposer::getFormat(int disp) const {
- return mDisplayData[disp].format;
+ if (uint32_t(disp)>31 || !mAllocatedDisplayIDs.hasBit(disp)) {
+ return HAL_PIXEL_FORMAT_RGBA_8888;
+ } else {
+ return mDisplayData[disp].format;
+ }
}
float HWComposer::getDpiX(int disp) const {
@@ -1147,7 +1151,7 @@ bool HWComposer::VSyncThread::threadLoop() {
}
HWComposer::DisplayData::DisplayData()
-: width(0), height(0), format(0),
+: width(0), height(0), format(HAL_PIXEL_FORMAT_RGBA_8888),
xdpi(0.0f), ydpi(0.0f),
refresh(0),
connected(false),