surfaceflinger: fix missing pure virtual declarations.
android::frametimeline::FrameTimeline forgot to declare a pair of
methods as pure virtual, which results in the following link failure
when building at -O0 because the compiler expects to be able to only
emit the class's vtable in the translation unit that defines the first
non-pure method, which doesn't exist:
ld.lld: error: undefined symbol: vtable for android::frametimeline::FrameTimeline
>>> referenced by FrameTimeline.h:279 (frameworks/native/services/surfaceflinger/FrameTimeline/FrameTimeline.h:279)
>>> lto.tmp:(android::frametimeline::FrameTimeline::FrameTimeline())
>>> referenced by FrameTimeline.h:279 (frameworks/native/services/surfaceflinger/FrameTimeline/FrameTimeline.h:279)
>>> lto.tmp:(android::frametimeline::FrameTimeline::FrameTimeline())
Test: `mmma frameworks/native/surfaceflinger` after adding -O0 to surfaceflinger_defaults
Change-Id: I2c93986ac5add2c603f385154c07c6238d03c663
diff --git a/services/surfaceflinger/FrameTimeline/FrameTimeline.h b/services/surfaceflinger/FrameTimeline/FrameTimeline.h
index a2305af..3611dea 100644
--- a/services/surfaceflinger/FrameTimeline/FrameTimeline.h
+++ b/services/surfaceflinger/FrameTimeline/FrameTimeline.h
@@ -314,12 +314,12 @@
virtual void parseArgs(const Vector<String16>& args, std::string& result) = 0;
// Sets the max number of display frames that can be stored. Called by SF backdoor.
- virtual void setMaxDisplayFrames(uint32_t size);
+ virtual void setMaxDisplayFrames(uint32_t size) = 0;
// Computes the historical fps for the provided set of layer IDs
// The fps is compted from the linear timeline of present timestamps for DisplayFrames
// containing at least one layer ID.
- virtual float computeFps(const std::unordered_set<int32_t>& layerIds);
+ virtual float computeFps(const std::unordered_set<int32_t>& layerIds) = 0;
// Restores the max number of display frames to default. Called by SF backdoor.
virtual void reset() = 0;