Internal change
PiperOrigin-RevId: 514421618
This commit is contained in:
committed by
Copybara-Service
parent
96b2958f18
commit
6c68d4c358
+1
-1
@@ -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",
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace mediapipe {
|
||||
class GpuResources {
|
||||
GpuResources() = delete;
|
||||
};
|
||||
#endif // !MEDIAPIPE_DISABLE_GPU
|
||||
#endif // MEDIAPIPE_DISABLE_GPU
|
||||
|
||||
extern const GraphService<GpuResources> kGpuService;
|
||||
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user