diff options
author | Steve Kondik <steve@cyngn.com> | 2015-11-16 14:36:34 -0800 |
---|---|---|
committer | Steve Kondik <steve@cyngn.com> | 2015-11-16 14:36:34 -0800 |
commit | 05e03ad50871dd8d3283c733b7f38794b029aaab (patch) | |
tree | 840dfcb3908c1a37b672229d15639bb155b34332 /services/surfaceflinger/SurfaceFlinger.cpp | |
parent | 2bb57a8bc3711fe2a1fb742c4acace3899860e87 (diff) | |
parent | ea9f37a30c0c1aa6b20f5a9e65c8faf39ace67ed (diff) | |
download | frameworks_native-05e03ad50871dd8d3283c733b7f38794b029aaab.zip frameworks_native-05e03ad50871dd8d3283c733b7f38794b029aaab.tar.gz frameworks_native-05e03ad50871dd8d3283c733b7f38794b029aaab.tar.bz2 |
Merge branch 'LA.BF64.1.2.2_rb4.7' of git://codeaurora.org/platform/frameworks/native into cm-13.0
Change-Id: Ib29f744a0f7baac5d5ad8a7e9c5c14303b6aeec1
Diffstat (limited to 'services/surfaceflinger/SurfaceFlinger.cpp')
-rw-r--r-- | services/surfaceflinger/SurfaceFlinger.cpp | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp index 429231c..4051b38 100644 --- a/services/surfaceflinger/SurfaceFlinger.cpp +++ b/services/surfaceflinger/SurfaceFlinger.cpp @@ -1478,6 +1478,7 @@ void SurfaceFlinger::handleTransactionLocked(uint32_t transactionFlags) if (state.surface != NULL) { int width = 0; + DisplayUtils* displayUtils = DisplayUtils::getInstance(); int status = state.surface->query( NATIVE_WINDOW_WIDTH, &width); ALOGE_IF(status != NO_ERROR, @@ -1490,11 +1491,19 @@ void SurfaceFlinger::handleTransactionLocked(uint32_t transactionFlags) if (MAX_VIRTUAL_DISPLAY_DIMENSION == 0 || (width <= MAX_VIRTUAL_DISPLAY_DIMENSION && height <= MAX_VIRTUAL_DISPLAY_DIMENSION)) { - hwcDisplayId = allocateHwcDisplayId(state.type); + int usage = 0; + status = state.surface->query( + NATIVE_WINDOW_CONSUMER_USAGE_BITS, &usage); + ALOGW_IF(status != NO_ERROR, + "Unable to query usage (%d)", status); + if ( (status == NO_ERROR) && + displayUtils->canAllocateHwcDisplayIdForVDS(usage)) { + hwcDisplayId = allocateHwcDisplayId(state.type); + } } - DisplayUtils::getInstance()->initVDSInstance(mHwc, hwcDisplayId, - state.surface, dispSurface, producer, bqProducer, bqConsumer, + displayUtils->initVDSInstance(mHwc, hwcDisplayId, state.surface, + dispSurface, producer, bqProducer, bqConsumer, state.displayName, state.isSecure, state.type); } |