Skip to content

Commit e23f11c

Browse files
nairvis-beepAndroid (Google) Code Review
authored andcommitted
Merge "Remove dead code from LayerFE" into main
2 parents 28c8e15 + 3305712 commit e23f11c

4 files changed

Lines changed: 0 additions & 15 deletions

File tree

services/surfaceflinger/CompositionEngine/include/compositionengine/LayerFE.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,9 +148,6 @@ class LayerFE : public virtual RefBase {
148148
virtual std::optional<LayerSettings> prepareClientComposition(
149149
ClientCompositionTargetSettings&) const = 0;
150150

151-
// Called after the layer is displayed to update the presentation fence
152-
virtual void onLayerDisplayed(ftl::SharedFuture<FenceResult>, ui::LayerStack layerStack) = 0;
153-
154151
// Initializes a promise for a buffer release fence and provides the future for that
155152
// fence. This should only be called when a promise has not yet been created, or
156153
// after the previous promise has already been fulfilled. Attempting to call this

services/surfaceflinger/CompositionEngine/include/compositionengine/mock/LayerFE.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,6 @@ class LayerFE : public compositionengine::LayerFE {
5050
std::optional<compositionengine::LayerFE::LayerSettings>(
5151
compositionengine::LayerFE::ClientCompositionTargetSettings&));
5252

53-
MOCK_METHOD(void, onLayerDisplayed, (ftl::SharedFuture<FenceResult>, ui::LayerStack),
54-
(override));
55-
5653
MOCK_METHOD0(createReleaseFenceFuture, ftl::Future<FenceResult>());
5754
MOCK_METHOD1(setReleaseFence, void(const FenceResult&));
5855
MOCK_METHOD0(getReleaseFencePromiseStatus, LayerFE::ReleaseFencePromiseStatus());

services/surfaceflinger/LayerFE.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
#include "LayerFE.h"
2828
#include "SurfaceFlinger.h"
2929
#include "ui/FenceResult.h"
30-
#include "ui/LayerStack.h"
3130

3231
namespace android {
3332

@@ -343,11 +342,6 @@ void LayerFE::prepareShadowClientComposition(LayerFE::LayerSettings& caster,
343342
caster.shadow = state;
344343
}
345344

346-
void LayerFE::onLayerDisplayed(ftl::SharedFuture<FenceResult> futureFenceResult,
347-
ui::LayerStack layerStack) {
348-
mCompositionResult.releaseFences.emplace_back(std::move(futureFenceResult), layerStack);
349-
}
350-
351345
CompositionResult&& LayerFE::stealCompositionResult() {
352346
return std::move(mCompositionResult);
353347
}

services/surfaceflinger/LayerFE.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,12 @@
2222
#include "compositionengine/LayerFE.h"
2323
#include "compositionengine/LayerFECompositionState.h"
2424
#include "renderengine/LayerSettings.h"
25-
#include "ui/LayerStack.h"
2625

2726
#include <ftl/future.h>
2827

2928
namespace android {
3029

3130
struct CompositionResult {
32-
std::vector<std::pair<ftl::SharedFuture<FenceResult>, ui::LayerStack>> releaseFences;
3331
sp<Fence> lastClientCompositionFence = nullptr;
3432
};
3533

@@ -41,7 +39,6 @@ class LayerFE : public virtual RefBase, public virtual compositionengine::LayerF
4139
// compositionengine::LayerFE overrides
4240
const compositionengine::LayerFECompositionState* getCompositionState() const override;
4341
bool onPreComposition(bool updatingOutputGeometryThisFrame) override;
44-
void onLayerDisplayed(ftl::SharedFuture<FenceResult>, ui::LayerStack) override;
4542
const char* getDebugName() const override;
4643
int32_t getSequence() const override;
4744
bool hasRoundedCorners() const override;

0 commit comments

Comments
 (0)