MCPcopy Create free account
hub / github.com/OpenKneeboard/OpenKneeboard / GetIPCClientTexture

Method GetIPCClientTexture

src/lib/SHM.cpp:854–870  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

852}
853
854std::shared_ptr<IPCClientTexture> CachedReader::GetIPCClientTexture(
855 const PixelSize& dimensions,
856 uint8_t swapchainIndex) noexcept {
857 OPENKNEEBOARD_TraceLoggingScope(
858 "CachedReader::GetIPCClientTexture",
859 TraceLoggingValue(swapchainIndex, "swapchainIndex"));
860 auto& ret = mClientTextures.at(swapchainIndex);
861 if (ret && ret->GetDimensions() != dimensions) {
862 ret = {};
863 }
864
865 if (!ret) {
866 OPENKNEEBOARD_TraceLoggingScope("CachedReader::CreateIPCClientTexture");
867 ret = this->CreateIPCClientTexture(dimensions, swapchainIndex);
868 }
869 return ret;
870}
871
872Snapshot CachedReader::MaybeGetMetadata() {
873 OPENKNEEBOARD_TraceLoggingScope("CachedReader::MaybeGetMetadata()");

Callers

nothing calls this directly

Calls 3

atMethod · 0.45
GetDimensionsMethod · 0.45

Tested by

no test coverage detected