summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Hall <jessehall@google.com>2012-08-30 13:42:23 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-08-31 13:52:25 -0700
commit9ca48916bc9408d0f3f8ac95469ced0a6a342aca (patch)
treed71c1791e862afb5c65d9c045f02ba6d1213163c
parentf90883d6a50688081642855bba43bef0693d5020 (diff)
downloadframeworks_native-9ca48916bc9408d0f3f8ac95469ced0a6a342aca.zip
frameworks_native-9ca48916bc9408d0f3f8ac95469ced0a6a342aca.tar.gz
frameworks_native-9ca48916bc9408d0f3f8ac95469ced0a6a342aca.tar.bz2
If there is no hwc, call eglSwapBuffers for the main display
Bug: 7068568 Change-Id: I6a0309613fe3619d065b9047af6c3fb32b510d97
-rw-r--r--services/surfaceflinger/SurfaceFlinger.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp
index cd1b336..7124b0c 100644
--- a/services/surfaceflinger/SurfaceFlinger.cpp
+++ b/services/surfaceflinger/SurfaceFlinger.cpp
@@ -1255,8 +1255,9 @@ void SurfaceFlinger::doDisplayComposition(const sp<const DisplayDevice>& hw,
// FIXME: we need to call eglSwapBuffers() on displays that have
// GL composition and only on those.
// however, currently hwc.commit() already does that for the main
- // display and never for the other ones
- if (hw->getDisplayType() >= DisplayDevice::DISPLAY_VIRTUAL) {
+ // display (if there is a hwc) and never for the other ones
+ if (hw->getDisplayType() >= DisplayDevice::DISPLAY_VIRTUAL ||
+ getHwComposer().initCheck() != NO_ERROR) {
// FIXME: EGL spec says:
// "surface must be bound to the calling thread's current context,
// for the current rendering API."