Deprecate a bunch of old stuff in GlCalculatorHelper
PiperOrigin-RevId: 488813296
This commit is contained in:
parent
1979801a92
commit
63e2089639
|
@ -784,6 +784,7 @@ cc_library(
|
|||
":shader_util",
|
||||
"//mediapipe/framework:calculator_framework",
|
||||
"//mediapipe/framework:calculator_cc_proto",
|
||||
"@com_google_absl//absl/base:core_headers",
|
||||
"//mediapipe/framework:calculator_context",
|
||||
"//mediapipe/framework:calculator_node",
|
||||
"//mediapipe/framework:calculator_contract",
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
|
||||
#include <memory>
|
||||
|
||||
#include "absl/base/attributes.h"
|
||||
#include "absl/memory/memory.h"
|
||||
#include "mediapipe/framework/calculator_context.h"
|
||||
#include "mediapipe/framework/calculator_contract.h"
|
||||
|
@ -61,6 +62,7 @@ class GlCalculatorHelper {
|
|||
// Can be used to initialize the helper outside of a calculator. Useful for
|
||||
// testing.
|
||||
void InitializeForTest(GpuResources* gpu_resources);
|
||||
ABSL_DEPRECATED("Use InitializeForTest(GpuResources)")
|
||||
void InitializeForTest(GpuSharedData* gpu_shared);
|
||||
|
||||
// This method can be called from GetContract to set up the needed GPU
|
||||
|
@ -69,6 +71,7 @@ class GlCalculatorHelper {
|
|||
|
||||
// This method can be called from FillExpectations to set the correct types
|
||||
// for the shared GL input side packet(s).
|
||||
ABSL_DEPRECATED("Use UpdateContract")
|
||||
static absl::Status SetupInputSidePackets(PacketTypeSet* input_side_packets);
|
||||
|
||||
// Execute the provided function within the helper's GL context. On some
|
||||
|
@ -235,12 +238,14 @@ class GlTexture {
|
|||
// it is better to keep const-safety and accept having two versions of the
|
||||
// same thing.
|
||||
template <typename T>
|
||||
ABSL_DEPRECATED("Only for legacy calculators")
|
||||
auto TagOrIndex(const T& collection, const std::string& tag, int index)
|
||||
-> decltype(collection.Tag(tag)) {
|
||||
return collection.UsesTags() ? collection.Tag(tag) : collection.Index(index);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
ABSL_DEPRECATED("Only for legacy calculators")
|
||||
auto TagOrIndex(T* collection, const std::string& tag, int index)
|
||||
-> decltype(collection->Tag(tag)) {
|
||||
return collection->UsesTags() ? collection->Tag(tag)
|
||||
|
@ -248,12 +253,14 @@ auto TagOrIndex(T* collection, const std::string& tag, int index)
|
|||
}
|
||||
|
||||
template <typename T>
|
||||
ABSL_DEPRECATED("Only for legacy calculators")
|
||||
bool HasTagOrIndex(const T& collection, const std::string& tag, int index) {
|
||||
return collection.UsesTags() ? collection.HasTag(tag)
|
||||
: index < collection.NumEntries();
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
ABSL_DEPRECATED("Only for legacy calculators")
|
||||
bool HasTagOrIndex(T* collection, const std::string& tag, int index) {
|
||||
return collection->UsesTags() ? collection->HasTag(tag)
|
||||
: index < collection->NumEntries();
|
||||
|
|
Loading…
Reference in New Issue
Block a user