Merge "Allow VirtualDisplay's to use hardware composer when in VR mode even if physical composer does not support them."
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp
index f82b363..04358dc 100644
--- a/services/surfaceflinger/SurfaceFlinger.cpp
+++ b/services/surfaceflinger/SurfaceFlinger.cpp
@@ -1903,7 +1903,8 @@
// 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);