summaryrefslogtreecommitdiffstats
path: root/libs
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2012-06-07 13:17:52 -0700
committerColin Cross <ccross@android.com>2012-06-07 16:28:30 -0700
commit8e533069e5721e55cb9768e140e16546c3a4a8b6 (patch)
tree711922166d28d1eb8b4a38e1e0798b59f64ca405 /libs
parent1e339878c128ef47271278779c2685a8dfa49cd1 (diff)
downloadframeworks_native-8e533069e5721e55cb9768e140e16546c3a4a8b6.zip
frameworks_native-8e533069e5721e55cb9768e140e16546c3a4a8b6.tar.gz
frameworks_native-8e533069e5721e55cb9768e140e16546c3a4a8b6.tar.bz2
surfaceflinger: replace early suspend with binder call from PowerManager
SurfaceFlinger will no longer directly synchronize with early suspend. Instead, PowerManagerService will synchronize with SurfaceFlinger to ensure that a black frame has been drawn on the display, and then trigger all early suspend handlers. Change-Id: I07acdd628440d23fdb69db94319ec5d65d3f4919
Diffstat (limited to 'libs')
-rw-r--r--libs/gui/ISurfaceComposer.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/libs/gui/ISurfaceComposer.cpp b/libs/gui/ISurfaceComposer.cpp
index 1f1794c..8177e4d 100644
--- a/libs/gui/ISurfaceComposer.cpp
+++ b/libs/gui/ISurfaceComposer.cpp
@@ -193,6 +193,20 @@ public:
result = interface_cast<IDisplayEventConnection>(reply.readStrongBinder());
return result;
}
+
+ virtual void blank()
+ {
+ Parcel data, reply;
+ data.writeInterfaceToken(ISurfaceComposer::getInterfaceDescriptor());
+ remote()->transact(BnSurfaceComposer::BLANK, data, &reply);
+ }
+
+ virtual void unblank()
+ {
+ Parcel data, reply;
+ data.writeInterfaceToken(ISurfaceComposer::getInterfaceDescriptor());
+ remote()->transact(BnSurfaceComposer::UNBLANK, data, &reply);
+ }
};
IMPLEMENT_META_INTERFACE(SurfaceComposer, "android.ui.ISurfaceComposer");
@@ -279,6 +293,14 @@ status_t BnSurfaceComposer::onTransact(
reply->writeStrongBinder(connection->asBinder());
return NO_ERROR;
} break;
+ case BLANK: {
+ CHECK_INTERFACE(ISurfaceComposer, data, reply);
+ blank();
+ } break;
+ case UNBLANK: {
+ CHECK_INTERFACE(ISurfaceComposer, data, reply);
+ unblank();
+ } break;
default:
return BBinder::onTransact(code, data, reply, flags);
}