Revert "graphite: Do not call virtual setBackendLabel in Resource constructor"

This reverts commit fad584324d85c795e89635e277ccb88b1a55b572.

Reason for revert: Seems to have a caused a SEGFAULT in dm on Test-Mac13-Clang-MacMini9.1-GPU-AppleM1-arm64-Debug-All-Graphite_Dawn_Metal_FakeWGPU (

Original change's description:
> graphite: Do not call virtual setBackendLabel in Resource constructor
> Calling setLabel in Resource constructor calls virtual setBackendLabel
> which is a no-op in the base class. So the backend label never gets set
> until the next call to setLabel which usually happens only on resource
> reuse. Fix this by removing the call to setLabel in Resource constructor
> and instead exposing an updateBackendLabel method that subclasses are
> expected to call if they care about backend labels.
> Small change in behavior: we now set a default backend label based on
> resource type if the caller provided label is empty. Also, the resource
> types for GraphicsPipeline and ComputePipeline don't have an extra space
> to match other resource types.
> Bug: b/308986480
> Change-Id: I122b855d23b81383c4c8424b8e7792cc25d6682e
> Reviewed-on:
> Reviewed-by: Greg Daniel <>
> Commit-Queue: Greg Daniel <>
> Auto-Submit: Sunny Sachanandani <>

Bug: b/308986480
Change-Id: I20a02f26189dfe4ce8c3119dbb8f900a0c89ff82
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Commit-Queue: Rubber Stamper <>
Auto-Submit: Arman Uguray <>
Bot-Commit: Rubber Stamper <>
37 files changed