OSDN Git Service

drm_hwcomposer: Always call PrepareFrame() for compositions
authorSean Paul <seanpaul@chromium.org>
Mon, 30 Nov 2015 19:35:45 +0000 (14:35 -0500)
committerSean Paul <seanpaul@chromium.org>
Mon, 30 Nov 2015 21:03:54 +0000 (16:03 -0500)
Previously this was not called for compositions which were known to
fail the atomic test. Unfortunately this left the composition in a
state which could not be processed by SquashFrame (only one layer and
source_layer was still set to kSourceSquash).

So call PrepareFrame() on every composition so SquashFrame stays happy.

Change-Id: I976e344ce4970370d9ca4307c2f2c45025199b64
Signed-off-by: Sean Paul <seanpaul@chromium.org>
drmdisplaycompositor.cpp

index 028a6a3..29ecc75 100644 (file)
@@ -922,12 +922,10 @@ int DrmDisplayCompositor::Composite() {
 
   switch (composition->type()) {
     case DRM_COMPOSITION_TYPE_FRAME:
-      if (use_hw_overlays_ || composition->geometry_changed()) {
-        ret = PrepareFrame(composition.get());
-        if (ret) {
-          ALOGE("Failed to prepare frame for display %d", display_);
-          return ret;
-        }
+      ret = PrepareFrame(composition.get());
+      if (ret) {
+        ALOGE("Failed to prepare frame for display %d", display_);
+        return ret;
       }
       if (composition->geometry_changed()) {
         // Send the composition to the kernel to ensure we can commit it. This