diff options
author | 2017-03-26 12:28:34 -0400 | |
---|---|---|
committer | 2017-03-31 17:03:07 +0000 | |
commit | 5cee136dd4f9ee18ea600f0dc6e6f45f786cd097 (patch) | |
tree | c1ee6aa772cc5529e1919a72b0fe1af8c9c630af | |
parent | 34ca5f2ab8cc891957567915def5bc32a36e6d82 (diff) |
Allow VirtualDisplay's to use hardware composer when in VR mode even if
physical composer does not support them.
Bug: 36071574
Test: Applied remaining wip patches, launched 2D activity while in
persistent VR mode. Observed 2D activity rendered in VR in VirtualDisplay.
Further, instrumented SurfaceFlinger code to ensure DisplayDevice's are
created and destroyed with proper composers during VR mode transition.
Change-Id: I12b09f1209fcf33f97abfd77e14c6ce61f45a5e9
(cherry picked from commit d38ec4e294eadd4f655476fc90b675c78c1c8740)
-rw-r--r-- | services/surfaceflinger/SurfaceFlinger.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp index f82b363cb5..04358dc76b 100644 --- a/services/surfaceflinger/SurfaceFlinger.cpp +++ b/services/surfaceflinger/SurfaceFlinger.cpp @@ -1903,7 +1903,8 @@ void SurfaceFlinger::handleTransactionLocked(uint32_t transactionFlags) // etc.) but no internal state (i.e. a DisplayDevice). if (state.surface != NULL) { - if (mUseHwcVirtualDisplays) { + // Allow VR composer to use virtual displays. + if (mUseHwcVirtualDisplays || mHwc == mVrHwc) { int width = 0; int status = state.surface->query( NATIVE_WINDOW_WIDTH, &width); |