diff options
author | Arun Kumar K.R <akumarkr@codeaurora.org> | 2012-12-19 18:10:46 -0800 |
---|---|---|
committer | Steve Kondik <shade@chemlab.org> | 2013-01-23 10:16:30 -0800 |
commit | f442ef1dfc17ca56b88c68c318599942f94e1d68 (patch) | |
tree | 022da8ab9f95ce3c73b92ac4eeef7c40e6938750 | |
parent | 5d0e1286329f39347d8a3de0610522444c9cf93c (diff) | |
download | frameworks_native-f442ef1dfc17ca56b88c68c318599942f94e1d68.zip frameworks_native-f442ef1dfc17ca56b88c68c318599942f94e1d68.tar.gz frameworks_native-f442ef1dfc17ca56b88c68c318599942f94e1d68.tar.bz2 |
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
-rw-r--r-- | services/surfaceflinger/DisplayHardware/HWComposer.cpp | 6 | ||||
-rw-r--r-- | services/surfaceflinger/SurfaceFlinger.cpp | 3 |
2 files changed, 9 insertions, 0 deletions
diff --git a/services/surfaceflinger/DisplayHardware/HWComposer.cpp b/services/surfaceflinger/DisplayHardware/HWComposer.cpp index 690ec8d..379fb16 100644 --- a/services/surfaceflinger/DisplayHardware/HWComposer.cpp +++ b/services/surfaceflinger/DisplayHardware/HWComposer.cpp @@ -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; diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp index 6d8f558..67b1316 100644 --- a/services/surfaceflinger/SurfaceFlinger.cpp +++ b/services/surfaceflinger/SurfaceFlinger.cpp @@ -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. |