diff options
author | Vamsidhar reddy Gaddam <gvamsi@google.com> | 2022-12-07 15:53:40 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2022-12-07 15:53:40 +0000 |
commit | 3ba6311c04042bd61dcec1ee40f697db84071516 (patch) | |
tree | 8af7b9896437a72bcb85318be9a351c567cb2e0b | |
parent | 34ef6dfdcca7c1ba7626bee1c9a83d8d12bcb475 (diff) | |
download | gamesdk-3ba6311c04042bd61dcec1ee40f697db84071516.tar.gz |
Revert "Revert "Add missing SwappyVk_uninjectTracer function""
This reverts commit 34ef6dfdcca7c1ba7626bee1c9a83d8d12bcb475.
Reason for revert: Re-add the API that was held back from the release.
Change-Id: I47c638176cb2c8257d816cd6c05f2b2f558c0c2e
-rw-r--r-- | include/swappy/swappyVk.h | 8 | ||||
-rw-r--r-- | third_party/cube/app/src/main/cpp/cube.c | 3 |
2 files changed, 11 insertions, 0 deletions
diff --git a/include/swappy/swappyVk.h b/include/swappy/swappyVk.h index 1ec50c80..291f2abf 100644 --- a/include/swappy/swappyVk.h +++ b/include/swappy/swappyVk.h @@ -261,6 +261,14 @@ uint64_t SwappyVk_getFenceTimeoutNS(); void SwappyVk_injectTracer(const SwappyTracer* tracer); /** + * @brief Remove callbacks that were previously added using + * SwappyVk_injectTracer. + * + * @param[in] tracer - Collection of callback functions + */ +void SwappyVk_uninjectTracer(const SwappyTracer* tracer); + +/** * @brief A structure enabling you to provide your own Vulkan function wrappers * by calling ::SwappyVk_setFunctionProvider. * diff --git a/third_party/cube/app/src/main/cpp/cube.c b/third_party/cube/app/src/main/cpp/cube.c index 1bc62855..2fa41691 100644 --- a/third_party/cube/app/src/main/cpp/cube.c +++ b/third_party/cube/app/src/main/cpp/cube.c @@ -1567,6 +1567,9 @@ static void demo_prepare_buffers(struct demo *demo) { tracer.startFrame = swappy_trace_test_startFrame; tracer.swapIntervalChanged = swappy_trace_test_swapIntervalChanged; SwappyVk_injectTracer(&tracer); + // Test uninject tracer function. + SwappyVk_uninjectTracer(&tracer); + SwappyVk_injectTracer(&tracer); demo->tracer_injected = true; } |