diff options
-rw-r--r-- | include/gui/SurfaceComposerClient.h | 6 | ||||
-rw-r--r-- | libs/gui/SurfaceComposerClient.cpp | 20 | ||||
-rw-r--r-- | services/surfaceflinger/DisplayHardware/HWComposer.cpp | 6 | ||||
-rw-r--r-- | services/surfaceflinger/SurfaceFlinger.cpp | 3 |
4 files changed, 35 insertions, 0 deletions
diff --git a/include/gui/SurfaceComposerClient.h b/include/gui/SurfaceComposerClient.h index 1bbad60..7eb6b64 100644 --- a/include/gui/SurfaceComposerClient.h +++ b/include/gui/SurfaceComposerClient.h @@ -77,6 +77,12 @@ public: // this legacy function (when they shouldn't). static status_t getDisplayInfo(int32_t displayId, DisplayInfo* info); +#if defined(ICS_CAMERA_BLOB) || defined(MR0_CAMERA_BLOB) + static ssize_t getDisplayWidth(int32_t displayId); + static ssize_t getDisplayHeight(int32_t displayId); + static ssize_t getDisplayOrientation(int32_t displayId); +#endif + // ------------------------------------------------------------------------ // surface creation / destruction diff --git a/libs/gui/SurfaceComposerClient.cpp b/libs/gui/SurfaceComposerClient.cpp index 0301f72..e6b4b21 100644 --- a/libs/gui/SurfaceComposerClient.cpp +++ b/libs/gui/SurfaceComposerClient.cpp @@ -630,6 +630,26 @@ status_t SurfaceComposerClient::getDisplayInfo( return getDisplayInfo(getBuiltInDisplay(displayId), info); } +#if defined(ICS_CAMERA_BLOB) || defined(MR0_CAMERA_BLOB) +ssize_t SurfaceComposerClient::getDisplayWidth(int32_t displayId) { + DisplayInfo info; + getDisplayInfo(getBuiltInDisplay(displayId), &info); + return info.w; +} + +ssize_t SurfaceComposerClient::getDisplayHeight(int32_t displayId) { + DisplayInfo info; + getDisplayInfo(getBuiltInDisplay(displayId), &info); + return info.h; +} + +ssize_t SurfaceComposerClient::getDisplayOrientation(int32_t displayId) { + DisplayInfo info; + getDisplayInfo(getBuiltInDisplay(displayId), &info); + return info.orientation; +} +#endif + // ---------------------------------------------------------------------------- ScreenshotClient::ScreenshotClient() 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. |