diff options
| author | 2016-05-24 16:55:43 +0000 | |
|---|---|---|
| committer | 2016-05-24 16:55:44 +0000 | |
| commit | 80bc52aefa56e590f05bc30ff0182d860f00b128 (patch) | |
| tree | 4ba851e085ea8fba54ee997f82e484ca11f24eea /services/surfaceflinger/SurfaceFlinger.cpp | |
| parent | 9e332babb92d329c3c9b2e58fef77252cc11e52b (diff) | |
| parent | 5cf424bc129f01ee12c7a4fbea1664276d29f970 (diff) | |
Merge "HWC2: Fix breakage from header change" into nyc-dev
Diffstat (limited to 'services/surfaceflinger/SurfaceFlinger.cpp')
| -rw-r--r-- | services/surfaceflinger/SurfaceFlinger.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp index 91815f314e..466da8cfba 100644 --- a/services/surfaceflinger/SurfaceFlinger.cpp +++ b/services/surfaceflinger/SurfaceFlinger.cpp @@ -1477,10 +1477,19 @@ void SurfaceFlinger::handleTransactionLocked(uint32_t transactionFlags) NATIVE_WINDOW_HEIGHT, &height); ALOGE_IF(status != NO_ERROR, "Unable to query height (%d)", status); + int intFormat = 0; + status = state.surface->query( + NATIVE_WINDOW_FORMAT, &intFormat); + ALOGE_IF(status != NO_ERROR, + "Unable to query format (%d)", status); + auto format = static_cast<android_pixel_format_t>( + intFormat); - mHwc->allocateVirtualDisplay(width, height, + mHwc->allocateVirtualDisplay(width, height, &format, &hwcId); + // TODO: Plumb requested format back up to consumer + sp<VirtualDisplaySurface> vds = new VirtualDisplaySurface(*mHwc, hwcId, state.surface, bqProducer, |