Loading services/surfaceflinger/DisplayHardware/HWComposer.cpp +9 −3 Original line number Diff line number Diff line Loading @@ -444,10 +444,16 @@ status_t HWComposer::prepare(DisplayDevice& displayDevice) { HWC2::Error error = HWC2::Error::None; // First try to skip validate altogether if the HWC supports it. // First try to skip validate altogether when there is no client // composition. When there is client composition, since we haven't // rendered to the client target yet, we should not attempt to skip // validate. // // displayData.hasClientComposition hasn't been updated for this frame. // The check below is incorrect. We actually rely on HWC here to fall // back to validate when there is any client layer. displayData.validateWasSkipped = false; if (hasCapability(HWC2::Capability::SkipValidate) && !displayData.hasClientComposition) { if (!displayData.hasClientComposition) { sp<android::Fence> outPresentFence; uint32_t state = UINT32_MAX; error = hwcDisplay->presentOrValidate(&numTypes, &numRequests, &outPresentFence , &state); Loading services/surfaceflinger/tests/fakehwc/FakeComposerClient.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -156,6 +156,10 @@ FakeComposerClient::FakeComposerClient() FakeComposerClient::~FakeComposerClient() {} bool FakeComposerClient::hasCapability(hwc2_capability_t /*capability*/) { return false; } void FakeComposerClient::removeClient() { ALOGV("removeClient"); // TODO: Ahooga! Only thing current lifetime management choices in Loading services/surfaceflinger/tests/fakehwc/FakeComposerClient.h +2 −0 Original line number Diff line number Diff line Loading @@ -59,6 +59,8 @@ public: FakeComposerClient(); virtual ~FakeComposerClient(); bool hasCapability(hwc2_capability_t capability) override; void removeClient() override; void enableCallback(bool enable) override; uint32_t getMaxVirtualDisplayCount() override; Loading services/vr/hardware_composer/impl/vr_hwc.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -232,7 +232,7 @@ VrHwc::VrHwc() {} VrHwc::~VrHwc() {} bool VrHwc::hasCapability(Capability /* capability */) const { return false; } bool VrHwc::hasCapability(hwc2_capability_t /* capability */) { return false; } void VrHwc::removeClient() { std::lock_guard<std::mutex> guard(mutex_); Loading services/vr/hardware_composer/impl/vr_hwc.h +2 −2 Original line number Diff line number Diff line Loading @@ -196,8 +196,6 @@ class VrHwc : public IComposer, public ComposerBase, public ComposerView { VrHwc(); ~VrHwc() override; bool hasCapability(Capability capability) const; Error setLayerInfo(Display display, Layer layer, uint32_t type, uint32_t appId); Error setClientTargetMetadata( Loading @@ -207,6 +205,8 @@ class VrHwc : public IComposer, public ComposerBase, public ComposerView { const IVrComposerClient::BufferMetadata& metadata); // ComposerBase bool hasCapability(hwc2_capability_t capability) override; void removeClient() override; void enableCallback(bool enable) override; Loading Loading
services/surfaceflinger/DisplayHardware/HWComposer.cpp +9 −3 Original line number Diff line number Diff line Loading @@ -444,10 +444,16 @@ status_t HWComposer::prepare(DisplayDevice& displayDevice) { HWC2::Error error = HWC2::Error::None; // First try to skip validate altogether if the HWC supports it. // First try to skip validate altogether when there is no client // composition. When there is client composition, since we haven't // rendered to the client target yet, we should not attempt to skip // validate. // // displayData.hasClientComposition hasn't been updated for this frame. // The check below is incorrect. We actually rely on HWC here to fall // back to validate when there is any client layer. displayData.validateWasSkipped = false; if (hasCapability(HWC2::Capability::SkipValidate) && !displayData.hasClientComposition) { if (!displayData.hasClientComposition) { sp<android::Fence> outPresentFence; uint32_t state = UINT32_MAX; error = hwcDisplay->presentOrValidate(&numTypes, &numRequests, &outPresentFence , &state); Loading
services/surfaceflinger/tests/fakehwc/FakeComposerClient.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -156,6 +156,10 @@ FakeComposerClient::FakeComposerClient() FakeComposerClient::~FakeComposerClient() {} bool FakeComposerClient::hasCapability(hwc2_capability_t /*capability*/) { return false; } void FakeComposerClient::removeClient() { ALOGV("removeClient"); // TODO: Ahooga! Only thing current lifetime management choices in Loading
services/surfaceflinger/tests/fakehwc/FakeComposerClient.h +2 −0 Original line number Diff line number Diff line Loading @@ -59,6 +59,8 @@ public: FakeComposerClient(); virtual ~FakeComposerClient(); bool hasCapability(hwc2_capability_t capability) override; void removeClient() override; void enableCallback(bool enable) override; uint32_t getMaxVirtualDisplayCount() override; Loading
services/vr/hardware_composer/impl/vr_hwc.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -232,7 +232,7 @@ VrHwc::VrHwc() {} VrHwc::~VrHwc() {} bool VrHwc::hasCapability(Capability /* capability */) const { return false; } bool VrHwc::hasCapability(hwc2_capability_t /* capability */) { return false; } void VrHwc::removeClient() { std::lock_guard<std::mutex> guard(mutex_); Loading
services/vr/hardware_composer/impl/vr_hwc.h +2 −2 Original line number Diff line number Diff line Loading @@ -196,8 +196,6 @@ class VrHwc : public IComposer, public ComposerBase, public ComposerView { VrHwc(); ~VrHwc() override; bool hasCapability(Capability capability) const; Error setLayerInfo(Display display, Layer layer, uint32_t type, uint32_t appId); Error setClientTargetMetadata( Loading @@ -207,6 +205,8 @@ class VrHwc : public IComposer, public ComposerBase, public ComposerView { const IVrComposerClient::BufferMetadata& metadata); // ComposerBase bool hasCapability(hwc2_capability_t capability) override; void removeClient() override; void enableCallback(bool enable) override; Loading