SF: build with ANDROID_UTILS_REF_BASE_DISABLE_IMPLICIT_CONSTRUCTION
Change-Id: I347b2cf57f1df426d11d07a84075419597d4a442
Test: presubmit
diff --git a/services/surfaceflinger/BufferStateLayer.cpp b/services/surfaceflinger/BufferStateLayer.cpp
index 5656e05..51a5445 100644
--- a/services/surfaceflinger/BufferStateLayer.cpp
+++ b/services/surfaceflinger/BufferStateLayer.cpp
@@ -134,7 +134,7 @@
: Layer(args),
mTextureName(args.textureName),
mCompositionState{mFlinger->getCompositionEngine().createLayerFECompositionState()},
- mHwcSlotGenerator(new HwcSlotGenerator()) {
+ mHwcSlotGenerator(sp<HwcSlotGenerator>::make()) {
ALOGV("Creating Layer %s", getDebugName());
mPremultipliedAlpha = !(args.flags & ISurfaceComposerClient::eNonPremultiplied);
@@ -812,7 +812,7 @@
args.textureName = mTextureName;
sp<BufferStateLayer> layer = mFlinger->getFactory().createBufferStateLayer(args);
layer->mHwcSlotGenerator = mHwcSlotGenerator;
- layer->setInitialValuesForClone(this);
+ layer->setInitialValuesForClone(sp<Layer>::fromExisting(this));
return layer;
}
@@ -1573,7 +1573,8 @@
void BufferStateLayer::setInitialValuesForClone(const sp<Layer>& clonedFrom) {
Layer::setInitialValuesForClone(clonedFrom);
- sp<BufferStateLayer> bufferClonedFrom = static_cast<BufferStateLayer*>(clonedFrom.get());
+ sp<BufferStateLayer> bufferClonedFrom =
+ sp<BufferStateLayer>::fromExisting(static_cast<BufferStateLayer*>(clonedFrom.get()));
mPremultipliedAlpha = bufferClonedFrom->mPremultipliedAlpha;
mPotentialCursor = bufferClonedFrom->mPotentialCursor;
mProtectedByApp = bufferClonedFrom->mProtectedByApp;
@@ -1586,7 +1587,8 @@
return;
}
- sp<BufferStateLayer> clonedFrom = static_cast<BufferStateLayer*>(getClonedFrom().get());
+ sp<BufferStateLayer> clonedFrom = sp<BufferStateLayer>::fromExisting(
+ static_cast<BufferStateLayer*>(getClonedFrom().get()));
mBufferInfo = clonedFrom->mBufferInfo;
mSidebandStream = clonedFrom->mSidebandStream;
surfaceDamageRegion = clonedFrom->surfaceDamageRegion;