Internal change

PiperOrigin-RevId: 514421618
This commit is contained in:
MediaPipe Team
2023-03-06 08:42:19 -08:00
committed by Copybara-Service
parent 96b2958f18
commit 6c68d4c358
9 changed files with 29 additions and 35 deletions
+1 -1
View File
@@ -50,7 +50,6 @@ cc_library(
name = "graph_support",
hdrs = ["graph_support.h"],
visibility = ["//visibility:public"],
deps = ["//mediapipe/framework:graph_service"],
)
cc_library(
@@ -827,6 +826,7 @@ objc_library(
features = ["-layering_check"],
visibility = ["//visibility:public"],
deps = [
":gpu_service",
":gpu_shared_data_internal",
":graph_support",
"//mediapipe/objc:mediapipe_framework_ios",
+1
View File
@@ -16,6 +16,7 @@
#import "mediapipe/gpu/gpu_buffer.h"
#import "mediapipe/gpu/graph_support.h"
#import "mediapipe/gpu/gpu_service.h"
#import "mediapipe/gpu/metal_shared_resources.h"
#import "GTMDefines.h"
+1 -1
View File
@@ -27,7 +27,7 @@ namespace mediapipe {
class GpuResources {
GpuResources() = delete;
};
#endif // !MEDIAPIPE_DISABLE_GPU
#endif // MEDIAPIPE_DISABLE_GPU
extern const GraphService<GpuResources> kGpuService;
+2 -2
View File
@@ -116,6 +116,8 @@ GpuResources::~GpuResources() {
#endif // __APPLE__
}
extern const GraphService<GpuResources> kGpuService;
absl::Status GpuResources::PrepareGpuNode(CalculatorNode* node) {
CHECK(ContainsKey(node->Contract().ServiceRequests(), kGpuService.key));
std::string node_id = node->GetCalculatorState().NodeName();
@@ -195,8 +197,6 @@ GlContext::StatusOrGlContext GpuResources::GetOrCreateGlContext(
GpuSharedData::GpuSharedData() : GpuSharedData(kPlatformGlContextNone) {}
extern const GraphService<GpuResources> kGpuService;
#if !MEDIAPIPE_GPU_BUFFER_USE_CV_PIXEL_BUFFER
static std::shared_ptr<GlTextureBuffer> GetGlTextureBufferFromPool(
int width, int height, GpuBufferFormat format) {
-6
View File
@@ -16,14 +16,8 @@
#ifndef MEDIAPIPE_GPU_GRAPH_SUPPORT_H_
#define MEDIAPIPE_GPU_GRAPH_SUPPORT_H_
#include "mediapipe/framework/graph_service.h"
namespace mediapipe {
// Forward declaration to avoid depending on GpuResources here.
class GpuResources;
extern const GraphService<GpuResources> kGpuService;
static constexpr char kGpuSharedTagName[] = "GPU_SHARED";
static constexpr char kGpuSharedSidePacketName[] = "gpu_shared";
static constexpr char kGpuExecutorName[] = "__gpu";