diff options
author | 2011-06-28 19:09:31 -0700 | |
---|---|---|
committer | 2011-06-29 15:05:41 -0700 | |
commit | 439863f3b3e725b5de1cba4940a21900369961c0 (patch) | |
tree | 90ab56432c2436c3392b02ba08876c86796a36ef /libs/gui/LayerState.cpp | |
parent | f1bfa84ccf61cad2b6ea9f2e6a612a54a38b79bc (diff) |
SF transactions are now O(1) wrt IPC instead of O(N).
Change-Id: I57669852cbf6aabae244ea86940a08a5a27ffc43
Diffstat (limited to 'libs/gui/LayerState.cpp')
-rw-r--r-- | libs/gui/LayerState.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libs/gui/LayerState.cpp b/libs/gui/LayerState.cpp index 01c4c7ebfe84..87901e87f706 100644 --- a/libs/gui/LayerState.cpp +++ b/libs/gui/LayerState.cpp @@ -17,6 +17,7 @@ #include <utils/Errors.h> #include <binder/Parcel.h> #include <private/surfaceflinger/LayerState.h> +#include <surfaceflinger/ISurfaceComposerClient.h> namespace android { @@ -58,4 +59,14 @@ status_t layer_state_t::read(const Parcel& input) return NO_ERROR; } +status_t ComposerState::write(Parcel& output) const { + output.writeStrongBinder(client->asBinder()); + return state.write(output); +} + +status_t ComposerState::read(const Parcel& input) { + client = interface_cast<ISurfaceComposerClient>(input.readStrongBinder()); + return state.read(input); +} + }; // namespace android |