diff options
author | Lajos Molnar <lajos@google.com> | 2014-09-19 06:23:46 -0700 |
---|---|---|
committer | Lajos Molnar <lajos@google.com> | 2014-09-19 06:23:46 -0700 |
commit | 147372fdf9fae688114121228247497d43514ab7 (patch) | |
tree | cadfa7bfc3f2600949f8dbeeca01221528b0f801 /libs | |
parent | 8990766e446384d739236f776ef6043f62c75785 (diff) | |
parent | 67d8bd66aaf04805cb8f2616ba964141b865e3b9 (diff) | |
download | frameworks_native-147372fdf9fae688114121228247497d43514ab7.zip frameworks_native-147372fdf9fae688114121228247497d43514ab7.tar.gz frameworks_native-147372fdf9fae688114121228247497d43514ab7.tar.bz2 |
resolved conflicts for merge of 67d8bd66 to lmp-mr1-dev-plus-aosp
Change-Id: I5e7e6fdf0d2afe6c3e4a0ed6ef96afb4713a72bc
Diffstat (limited to 'libs')
-rw-r--r-- | libs/gui/ISurfaceComposer.cpp | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/libs/gui/ISurfaceComposer.cpp b/libs/gui/ISurfaceComposer.cpp index 4d65c56..81e8336 100644 --- a/libs/gui/ISurfaceComposer.cpp +++ b/libs/gui/ISurfaceComposer.cpp @@ -33,6 +33,7 @@ #include <private/gui/LayerState.h> #include <ui/DisplayInfo.h> +#include <ui/DisplayStatInfo.h> #include <utils/Log.h> @@ -237,6 +238,22 @@ public: return result; } + virtual status_t getDisplayStats(const sp<IBinder>& display, + DisplayStatInfo* stats) + { + Parcel data, reply; + data.writeInterfaceToken(ISurfaceComposer::getInterfaceDescriptor()); + data.writeStrongBinder(display); + remote()->transact(BnSurfaceComposer::GET_DISPLAY_STATS, data, &reply); + status_t result = reply.readInt32(); + if (result == NO_ERROR) { + memcpy(stats, + reply.readInplace(sizeof(DisplayStatInfo)), + sizeof(DisplayStatInfo)); + } + return result; + } + virtual int getActiveConfig(const sp<IBinder>& display) { Parcel data, reply; @@ -390,6 +407,18 @@ status_t BnSurfaceComposer::onTransact( } return NO_ERROR; } + case GET_DISPLAY_STATS: { + CHECK_INTERFACE(ISurfaceComposer, data, reply); + DisplayStatInfo stats; + sp<IBinder> display = data.readStrongBinder(); + status_t result = getDisplayStats(display, &stats); + reply->writeInt32(result); + if (result == NO_ERROR) { + memcpy(reply->writeInplace(sizeof(DisplayStatInfo)), + &stats, sizeof(DisplayStatInfo)); + } + return NO_ERROR; + } case GET_ACTIVE_CONFIG: { CHECK_INTERFACE(ISurfaceComposer, data, reply); sp<IBinder> display = data.readStrongBinder(); |