diff options
author | 2022-08-01 16:18:03 -0700 | |
---|---|---|
committer | 2022-08-01 16:23:25 -0700 | |
commit | d11bade4e5d7b7818090d775f0bb4dea9d719206 (patch) | |
tree | fc49aea275d69b819644224dea38d39a1802d1a0 /services/surfaceflinger/RegionSamplingThread.cpp | |
parent | c525efb611803c572e2f1154655e1e8fcdfeef30 (diff) |
SF: build with ANDROID_UTILS_REF_BASE_DISABLE_IMPLICIT_CONSTRUCTION
Change-Id: I347b2cf57f1df426d11d07a84075419597d4a442
Test: presubmit
Diffstat (limited to 'services/surfaceflinger/RegionSamplingThread.cpp')
-rw-r--r-- | services/surfaceflinger/RegionSamplingThread.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/services/surfaceflinger/RegionSamplingThread.cpp b/services/surfaceflinger/RegionSamplingThread.cpp index 2487dbd793..570525598e 100644 --- a/services/surfaceflinger/RegionSamplingThread.cpp +++ b/services/surfaceflinger/RegionSamplingThread.cpp @@ -132,7 +132,7 @@ RegionSamplingThread::~RegionSamplingThread() { void RegionSamplingThread::addListener(const Rect& samplingArea, const wp<Layer>& stopLayer, const sp<IRegionSamplingListener>& listener) { sp<IBinder> asBinder = IInterface::asBinder(listener); - asBinder->linkToDeath(this); + asBinder->linkToDeath(sp<DeathRecipient>::fromExisting(this)); std::lock_guard lock(mSamplingMutex); mDescriptors.emplace(wp<IBinder>(asBinder), Descriptor{samplingArea, stopLayer, listener}); } @@ -344,8 +344,8 @@ void RegionSamplingThread::captureSample() { const uint32_t usage = GRALLOC_USAGE_SW_READ_OFTEN | GRALLOC_USAGE_HW_RENDER | GRALLOC_USAGE_HW_TEXTURE; sp<GraphicBuffer> graphicBuffer = - new GraphicBuffer(sampledBounds.getWidth(), sampledBounds.getHeight(), - PIXEL_FORMAT_RGBA_8888, 1, usage, "RegionSamplingThread"); + sp<GraphicBuffer>::make(sampledBounds.getWidth(), sampledBounds.getHeight(), + PIXEL_FORMAT_RGBA_8888, 1, usage, "RegionSamplingThread"); const status_t bufferStatus = graphicBuffer->initCheck(); LOG_ALWAYS_FATAL_IF(bufferStatus != OK, "captureSample: Buffer failed to allocate: %d", bufferStatus); |