summaryrefslogtreecommitdiff
path: root/services/surfaceflinger/Layer.cpp
diff options
context:
space:
mode:
author Alec Mouri <alecmouri@google.com> 2023-08-16 14:56:30 +0000
committer Alec Mouri <alecmouri@google.com> 2023-08-17 16:47:20 +0000
commitc3a17824aed485229dba17819e5ee4e4ecf4db1e (patch)
tree1dd2cccac1a7245fecffa15884dcc70c8c6de5dc /services/surfaceflinger/Layer.cpp
parente2b61c6265d4cda693daeb1313d0aaab48874452 (diff)
Delete genTextures and deleteTextures from RenderEngine
These methods are no-ops with skia and cause thread bounces in practice so just remove these. Bug: 270628071 Test: builds Change-Id: I0dc549eb7c9a0d94def5a8727322ed49b010ef1f
Diffstat (limited to 'services/surfaceflinger/Layer.cpp')
-rw-r--r--services/surfaceflinger/Layer.cpp10
1 files changed, 0 insertions, 10 deletions
diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp
index 59a8825de5..af4b65bcbc 100644
--- a/services/surfaceflinger/Layer.cpp
+++ b/services/surfaceflinger/Layer.cpp
@@ -149,7 +149,6 @@ Layer::Layer(const LayerCreationArgs& args)
args.metadata.getInt32(gui::METADATA_WINDOW_TYPE, 0))),
mLayerCreationFlags(args.flags),
mBorderEnabled(false),
- mTextureName(args.textureName),
mLegacyLayerFE(args.flinger->getFactory().createLayerFE(mName)) {
ALOGV("Creating Layer %s", getDebugName());
@@ -214,7 +213,6 @@ Layer::Layer(const LayerCreationArgs& args)
mSnapshot->sequence = sequence;
mSnapshot->name = getDebugName();
- mSnapshot->textureName = mTextureName;
mSnapshot->premultipliedAlpha = mPremultipliedAlpha;
mSnapshot->parentTransform = {};
}
@@ -236,13 +234,6 @@ Layer::~Layer() {
mBufferInfo.mBuffer->getBuffer(), mBufferInfo.mFrameNumber,
mBufferInfo.mFence);
}
- if (!isClone()) {
- // The original layer and the clone layer share the same texture. Therefore, only one of
- // the layers, in this case the original layer, needs to handle the deletion. The original
- // layer and the clone should be removed at the same time so there shouldn't be any issue
- // with the clone layer trying to use the deleted texture.
- mFlinger->deleteTextureAsync(mTextureName);
- }
const int32_t layerId = getSequence();
mFlinger->mTimeStats->onDestroy(layerId);
mFlinger->mFrameTracer->onDestroy(layerId);
@@ -3624,7 +3615,6 @@ Rect Layer::computeBufferCrop(const State& s) {
sp<Layer> Layer::createClone(uint32_t mirrorRootId) {
LayerCreationArgs args(mFlinger.get(), nullptr, mName + " (Mirror)", 0, LayerMetadata());
- args.textureName = mTextureName;
sp<Layer> layer = mFlinger->getFactory().createBufferStateLayer(args);
layer->setInitialValuesForClone(sp<Layer>::fromExisting(this), mirrorRootId);
return layer;