Merge "sf: Fix issue with dequeueBuffer when multiple display present"
This commit is contained in:
commit
fa5cda8260
2 changed files with 11 additions and 1 deletions
|
@ -470,7 +470,7 @@ Error Display::getName(std::string* outName) const
|
||||||
|
|
||||||
Error Display::getRequests(HWC2::DisplayRequest* outDisplayRequests,
|
Error Display::getRequests(HWC2::DisplayRequest* outDisplayRequests,
|
||||||
std::unordered_map<HWC2::Layer*, LayerRequest>* outLayerRequests) {
|
std::unordered_map<HWC2::Layer*, LayerRequest>* outLayerRequests) {
|
||||||
uint32_t intDisplayRequests;
|
uint32_t intDisplayRequests = 0;
|
||||||
std::vector<Hwc2::Layer> layerIds;
|
std::vector<Hwc2::Layer> layerIds;
|
||||||
std::vector<uint32_t> layerRequests;
|
std::vector<uint32_t> layerRequests;
|
||||||
auto intError = mComposer.getDisplayRequests(
|
auto intError = mComposer.getDisplayRequests(
|
||||||
|
|
|
@ -3415,6 +3415,7 @@ bool SurfaceFlinger::doComposeSurfaces(const sp<DisplayDevice>& displayDevice,
|
||||||
const Region bounds(displayState.bounds);
|
const Region bounds(displayState.bounds);
|
||||||
const DisplayRenderArea renderArea(displayDevice);
|
const DisplayRenderArea renderArea(displayDevice);
|
||||||
const bool hasClientComposition = getHwComposer().hasClientComposition(displayId);
|
const bool hasClientComposition = getHwComposer().hasClientComposition(displayId);
|
||||||
|
const bool hasFlipClientTargetRequest = getHwComposer().hasFlipClientTargetRequest(displayId);
|
||||||
ATRACE_INT("hasClientComposition", hasClientComposition);
|
ATRACE_INT("hasClientComposition", hasClientComposition);
|
||||||
|
|
||||||
bool applyColorMatrix = false;
|
bool applyColorMatrix = false;
|
||||||
|
@ -3480,6 +3481,15 @@ bool SurfaceFlinger::doComposeSurfaces(const sp<DisplayDevice>& displayDevice,
|
||||||
if (applyColorMatrix) {
|
if (applyColorMatrix) {
|
||||||
clientCompositionDisplay.colorTransform = displayState.colorTransformMat;
|
clientCompositionDisplay.colorTransform = displayState.colorTransformMat;
|
||||||
}
|
}
|
||||||
|
} else if (hasFlipClientTargetRequest) {
|
||||||
|
buf = display->getRenderSurface()->dequeueBuffer(&fd);
|
||||||
|
|
||||||
|
if (buf == nullptr) {
|
||||||
|
ALOGW("Dequeuing buffer for display [%s] failed, bailing out of "
|
||||||
|
"client composition for this frame",
|
||||||
|
displayDevice->getDisplayName().c_str());
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in a new issue