| 30 | class TestResource : public Resource { |
| 31 | public: |
| 32 | static std::shared_ptr<const TestResource> Make(Context* context, uint32_t id) { |
| 33 | static const uint32_t TestResourceType = UniqueID::Next(); |
| 34 | BytesKey bytesKey = {}; |
| 35 | bytesKey.write(TestResourceType); |
| 36 | bytesKey.write(id); |
| 37 | return Resource::AddToCache(context, new TestResource(), bytesKey); |
| 38 | } |
| 39 | |
| 40 | size_t memoryUsage() const override { |
| 41 | return 1; |