diff options
-rw-r--r-- | libs/gui/SurfaceComposerClient.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/libs/gui/SurfaceComposerClient.cpp b/libs/gui/SurfaceComposerClient.cpp index 267359a..6ba933b 100644 --- a/libs/gui/SurfaceComposerClient.cpp +++ b/libs/gui/SurfaceComposerClient.cpp @@ -441,6 +441,30 @@ void SurfaceComposerClient::dispose() { mStatus = NO_INIT; } +/* Create ICS/MR0-compatible constructors */ +extern "C" sp<SurfaceControl> _ZN7android21SurfaceComposerClient13createSurfaceERKNS_7String8Ejjij( + const String8& name, + uint32_t w, + uint32_t h, + PixelFormat format, + uint32_t flags); +extern "C" sp<SurfaceControl> _ZN7android21SurfaceComposerClient13createSurfaceEijjij( + uint32_t display, + uint32_t w, + uint32_t h, + PixelFormat format, + uint32_t flags) +{ + String8 name; + const size_t SIZE = 128; + char buffer[SIZE]; + snprintf(buffer, SIZE, "<pid_%d>", getpid()); + name.append(buffer); + + return _ZN7android21SurfaceComposerClient13createSurfaceERKNS_7String8Ejjij(name, + w, h, format, flags); +} + sp<SurfaceControl> SurfaceComposerClient::createSurface( const String8& name, uint32_t w, |