diff options
| -rw-r--r-- | services/surfaceflinger/BufferLayer.h | 4 | ||||
| -rw-r--r-- | services/surfaceflinger/BufferQueueLayer.h | 2 | ||||
| -rw-r--r-- | services/surfaceflinger/BufferStateLayer.h | 2 | ||||
| -rw-r--r-- | services/surfaceflinger/ColorLayer.h | 2 | ||||
| -rw-r--r-- | services/surfaceflinger/ContainerLayer.h | 2 | ||||
| -rw-r--r-- | services/surfaceflinger/Layer.cpp | 6 | ||||
| -rw-r--r-- | services/surfaceflinger/Layer.h | 4 |
7 files changed, 12 insertions, 10 deletions
diff --git a/services/surfaceflinger/BufferLayer.h b/services/surfaceflinger/BufferLayer.h index fb8d7d027f..ee44cbe836 100644 --- a/services/surfaceflinger/BufferLayer.h +++ b/services/surfaceflinger/BufferLayer.h @@ -62,10 +62,6 @@ public: void useSurfaceDamage() override; void useEmptyDamage() override; - // getTypeId - Provide unique string for each class type in the Layer - // hierarchy - const char* getTypeId() const override { return "BufferLayer"; } - bool isOpaque(const Layer::State& s) const override; // isVisible - true if this layer is visible, false otherwise diff --git a/services/surfaceflinger/BufferQueueLayer.h b/services/surfaceflinger/BufferQueueLayer.h index 392b706416..3bc625e462 100644 --- a/services/surfaceflinger/BufferQueueLayer.h +++ b/services/surfaceflinger/BufferQueueLayer.h @@ -38,6 +38,8 @@ public: // Interface implementation for Layer // ----------------------------------------------------------------------- public: + const char* getType() const override { return "BufferQueueLayer"; } + void onLayerDisplayed(const sp<Fence>& releaseFence) override; void setTransformHint(uint32_t orientation) const override; diff --git a/services/surfaceflinger/BufferStateLayer.h b/services/surfaceflinger/BufferStateLayer.h index 0ee941e6d7..cc670087ac 100644 --- a/services/surfaceflinger/BufferStateLayer.h +++ b/services/surfaceflinger/BufferStateLayer.h @@ -40,6 +40,8 @@ public: // ----------------------------------------------------------------------- // Interface implementation for Layer // ----------------------------------------------------------------------- + const char* getType() const override { return "BufferStateLayer"; } + void onLayerDisplayed(const sp<Fence>& releaseFence) override; void setTransformHint(uint32_t orientation) const override; void releasePendingBuffer(nsecs_t dequeueReadyTime) override; diff --git a/services/surfaceflinger/ColorLayer.h b/services/surfaceflinger/ColorLayer.h index c793142957..57c54c7e2c 100644 --- a/services/surfaceflinger/ColorLayer.h +++ b/services/surfaceflinger/ColorLayer.h @@ -30,7 +30,7 @@ public: std::shared_ptr<compositionengine::Layer> getCompositionLayer() const override; - virtual const char* getTypeId() const { return "ColorLayer"; } + const char* getType() const override { return "ColorLayer"; } bool isVisible() const override; bool setColor(const half3& color) override; diff --git a/services/surfaceflinger/ContainerLayer.h b/services/surfaceflinger/ContainerLayer.h index a1607ffabb..f0fbb6104f 100644 --- a/services/surfaceflinger/ContainerLayer.h +++ b/services/surfaceflinger/ContainerLayer.h @@ -28,7 +28,7 @@ public: explicit ContainerLayer(const LayerCreationArgs&); ~ContainerLayer() override; - const char* getTypeId() const override { return "ContainerLayer"; } + const char* getType() const override { return "ContainerLayer"; } bool isVisible() const override; bool canReceiveInput() const override; diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp index db4ae41bc8..5121835cae 100644 --- a/services/surfaceflinger/Layer.cpp +++ b/services/surfaceflinger/Layer.cpp @@ -1217,7 +1217,7 @@ LayerDebugInfo Layer::getLayerDebugInfo() const { info.mName = getName(); sp<Layer> parent = getParent(); info.mParentName = (parent == nullptr ? std::string("none") : parent->getName().string()); - info.mType = std::string(getTypeId()); + info.mType = getType(); info.mTransparentRegion = ds.activeTransparentRegion_legacy; info.mVisibleRegion = visibleRegion; info.mSurfaceDamageRegion = surfaceDamageRegion; @@ -1334,7 +1334,7 @@ void Layer::getFrameStats(FrameStats* outStats) const { } void Layer::dumpFrameEvents(std::string& result) { - StringAppendF(&result, "- Layer %s (%s, %p)\n", getName().string(), getTypeId(), this); + StringAppendF(&result, "- Layer %s (%s, %p)\n", getName().string(), getType(), this); Mutex::Autolock lock(mFrameEventHistoryMutex); mFrameEventHistory.checkFencesForCompletion(); mFrameEventHistory.dump(result); @@ -1868,7 +1868,7 @@ void Layer::writeToProtoCommonState(LayerProto* layerInfo, LayerVector::StateSet if (traceFlags & SurfaceTracing::TRACE_CRITICAL) { layerInfo->set_id(sequence); layerInfo->set_name(getName().c_str()); - layerInfo->set_type(String8(getTypeId())); + layerInfo->set_type(getType()); for (const auto& child : children) { layerInfo->add_children(child->sequence); diff --git a/services/surfaceflinger/Layer.h b/services/surfaceflinger/Layer.h index 53091a0392..9107189d52 100644 --- a/services/surfaceflinger/Layer.h +++ b/services/surfaceflinger/Layer.h @@ -378,7 +378,9 @@ public: // ----------------------------------------------------------------------- // Virtuals - virtual const char* getTypeId() const = 0; + + // Provide unique string for each class type in the Layer hierarchy + virtual const char* getType() const = 0; /* * isOpaque - true if this surface is opaque |