diff options
Diffstat (limited to 'libs/gui/Surface.cpp')
-rw-r--r-- | libs/gui/Surface.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libs/gui/Surface.cpp b/libs/gui/Surface.cpp index 88c45b2..8cb9189 100644 --- a/libs/gui/Surface.cpp +++ b/libs/gui/Surface.cpp @@ -91,6 +91,13 @@ void Surface::setSidebandStream(const sp<NativeHandle>& stream) { mGraphicBufferProducer->setSidebandStream(stream); } +void Surface::allocateBuffers() { + uint32_t reqWidth = mReqWidth ? mReqWidth : mUserWidth; + uint32_t reqHeight = mReqHeight ? mReqHeight : mUserHeight; + mGraphicBufferProducer->allocateBuffers(mSwapIntervalZero, mReqWidth, + mReqHeight, mReqFormat, mReqUsage); +} + int Surface::hook_setSwapInterval(ANativeWindow* window, int interval) { Surface* c = getSelf(window); return c->setSwapInterval(interval); |