OSDN Git Service

Disable skip Validate on client composition
authorFabien Sanglard <sanglardf@google.com>
Thu, 22 Jun 2017 18:35:16 +0000 (11:35 -0700)
committerFabien Sanglard <sanglardf@google.com>
Thu, 22 Jun 2017 19:30:31 +0000 (12:30 -0700)
SurfaceFlinger should not skip validate when GLComposition is
needed. This can happen when SF decides to force GLComposition
(like when a screen rotation occurs).

Bug: 62906801
Test: Manual
Change-Id: I248146eade395a124cb149773287abd88ae36511

services/surfaceflinger/DisplayHardware/HWComposer.cpp

index 913c43f..3f953ea 100644 (file)
@@ -460,7 +460,8 @@ status_t HWComposer::prepare(DisplayDevice& displayDevice) {
 
     // First try to skip validate altogether if the HWC supports it.
     displayData.validateWasSkipped = false;
-    if (hasCapability(HWC2::Capability::SkipValidate)) {
+    if (hasCapability(HWC2::Capability::SkipValidate) &&
+            !displayData.hasClientComposition) {
         sp<android::Fence> outPresentFence;
         uint32_t state = UINT32_MAX;
         error = hwcDisplay->presentOrValidate(&numTypes, &numRequests, &outPresentFence , &state);