MCPcopy Create free account
hub / github.com/Tencent/tgfx / Make

Method Make

test/src/ResourceCacheTest.cpp:32–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30class 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;

Callers

nothing calls this directly

Calls 1

writeMethod · 0.45

Tested by

no test coverage detected