summaryrefslogtreecommitdiff
path: root/libs/gui/SurfaceControl.cpp
diff options
context:
space:
mode:
author Huihong Luo <huisinro@google.com> 2022-03-08 14:48:46 -0800
committer Huihong Luo <huisinro@google.com> 2022-04-12 10:31:23 -0700
commitd3d8f8e3501a07d55090c287ac45943d687b7006 (patch)
treea013da5f7f66e25d219250c36302ac22f006769d /libs/gui/SurfaceControl.cpp
parentbd173bbcfac4a55016e136d8227c0b683cb47013 (diff)
Migrate ISurfaceComposerClient to AIDL
Migrate and clean up ISurfaceComposerClient to aidl, removed the deprecated createWithParent method, removed non used parameters. Bug: 172002646 Test: atest libgui_test Change-Id: I8ceb7cd90104f2ad9ca72c8025f6298de1fb1ba0
Diffstat (limited to 'libs/gui/SurfaceControl.cpp')
-rw-r--r--libs/gui/SurfaceControl.cpp15
1 files changed, 5 insertions, 10 deletions
diff --git a/libs/gui/SurfaceControl.cpp b/libs/gui/SurfaceControl.cpp
index 654fb336fe..84257dee9b 100644
--- a/libs/gui/SurfaceControl.cpp
+++ b/libs/gui/SurfaceControl.cpp
@@ -49,12 +49,10 @@ namespace android {
// ============================================================================
SurfaceControl::SurfaceControl(const sp<SurfaceComposerClient>& client, const sp<IBinder>& handle,
- const sp<IGraphicBufferProducer>& gbp, int32_t layerId,
- uint32_t w, uint32_t h, PixelFormat format, uint32_t transform,
- uint32_t flags)
+ int32_t layerId, uint32_t w, uint32_t h, PixelFormat format,
+ uint32_t transform, uint32_t flags)
: mClient(client),
mHandle(handle),
- mGraphicBufferProducer(gbp),
mLayerId(layerId),
mTransformHint(transform),
mWidth(w),
@@ -65,7 +63,6 @@ SurfaceControl::SurfaceControl(const sp<SurfaceComposerClient>& client, const sp
SurfaceControl::SurfaceControl(const sp<SurfaceControl>& other) {
mClient = other->mClient;
mHandle = other->mHandle;
- mGraphicBufferProducer = other->mGraphicBufferProducer;
mTransformHint = other->mTransformHint;
mLayerId = other->mLayerId;
mWidth = other->mWidth;
@@ -165,11 +162,11 @@ sp<Surface> SurfaceControl::createSurface()
void SurfaceControl::updateDefaultBufferSize(uint32_t width, uint32_t height) {
Mutex::Autolock _l(mLock);
- mWidth = width; mHeight = height;
+ mWidth = width;
+ mHeight = height;
if (mBbq) {
mBbq->update(mBbqChild, width, height, mFormat);
}
-
}
sp<IBinder> SurfaceControl::getLayerStateHandle() const
@@ -245,9 +242,7 @@ status_t SurfaceControl::readFromParcel(const Parcel& parcel,
*outSurfaceControl =
new SurfaceControl(new SurfaceComposerClient(
interface_cast<ISurfaceComposerClient>(client)),
- handle.get(), nullptr, layerId,
- width, height, format,
- transformHint);
+ handle.get(), layerId, width, height, format, transformHint);
return NO_ERROR;
}