Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f442ef1d authored by Arun Kumar K.R's avatar Arun Kumar K.R Committed by Steve Kondik
Browse files

SurfaceFlinger: Change to support framebuffer flip for 2D blitters

- Surfaceflinger does not flip framebuffers when there are
  no layers marked for HWC_FRAMEBUFFER
- This change checks for the HWC_BLIT flag and will request a flip
  to a new FB_TARGET buffer even if there are no FRAMEBUFFER layers

Change-Id: I1cb44389a05c9ec049d7f0d39c288feccb11a91c
parent 5d0e1286
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -776,6 +776,11 @@ status_t HWComposer::prepare() {
                    if (l.compositionType == HWC_FRAMEBUFFER) {
                        disp.hasFbComp = true;
                    }
                    // If the composition type is BLIT, we set this to
                    // trigger a FLIP
                    if(l.compositionType == HWC_BLIT) {
                        disp.hasFbComp = true;
                    }
                    if (l.compositionType == HWC_OVERLAY) {
                        disp.hasOvComp = true;
                    }
@@ -1232,6 +1237,7 @@ void HWComposer::dump(String8& result, char* buffer, size_t SIZE) const {
                            "HWC",
                            "BACKGROUND",
                            "FB TARGET",
                            "FB_BLIT",
                            "UNKNOWN"};
                    if (type >= NELEM(compositionTypeName))
                        type = NELEM(compositionTypeName) - 1;
+3 −0
Original line number Diff line number Diff line
@@ -1576,6 +1576,9 @@ void SurfaceFlinger::doComposeSurfaces(const sp<const DisplayDevice>& hw, const
                        layer->draw(hw, clip);
                        break;
                    }
                    case HWC_BLIT:
                        //Do nothing
                        break;
                    case HWC_FRAMEBUFFER_TARGET: {
                        // this should not happen as the iterator shouldn't
                        // let us get there.