internal fix

PiperOrigin-RevId: 564404269
This commit is contained in:
Chris McClanahan 2023-09-11 09:09:07 -07:00 committed by Copybara-Service
parent 7f245bc84b
commit e51b923bda
2 changed files with 5 additions and 2 deletions

View File

@ -269,6 +269,7 @@ cc_library(
"//mediapipe/gpu:gl_calculator_helper", "//mediapipe/gpu:gl_calculator_helper",
"//mediapipe/gpu:gl_simple_shaders", "//mediapipe/gpu:gl_simple_shaders",
"//mediapipe/gpu:gpu_buffer", "//mediapipe/gpu:gpu_buffer",
"//mediapipe/gpu:gpu_buffer_format",
"//mediapipe/gpu:shader_util", "//mediapipe/gpu:shader_util",
], ],
}), }),

View File

@ -37,6 +37,7 @@
#include "mediapipe/gpu/gl_calculator_helper.h" #include "mediapipe/gpu/gl_calculator_helper.h"
#include "mediapipe/gpu/gl_simple_shaders.h" #include "mediapipe/gpu/gl_simple_shaders.h"
#include "mediapipe/gpu/gpu_buffer.h" #include "mediapipe/gpu/gpu_buffer.h"
#include "mediapipe/gpu/gpu_buffer_format.h"
#include "mediapipe/gpu/shader_util.h" #include "mediapipe/gpu/shader_util.h"
#endif // !MEDIAPIPE_DISABLE_GPU #endif // !MEDIAPIPE_DISABLE_GPU
@ -449,7 +450,8 @@ absl::Status AnnotationOverlayCalculator::RenderToGpu(CalculatorContext* cc,
auto input_texture = gpu_helper_.CreateSourceTexture(input_frame); auto input_texture = gpu_helper_.CreateSourceTexture(input_frame);
auto output_texture = gpu_helper_.CreateDestinationTexture( auto output_texture = gpu_helper_.CreateDestinationTexture(
width_, height_, mediapipe::GpuBufferFormat::kBGRA32); input_texture.width(), input_texture.height(),
mediapipe::GpuBufferFormat::kBGRA32);
// Upload render target to GPU. // Upload render target to GPU.
{ {
@ -478,7 +480,7 @@ absl::Status AnnotationOverlayCalculator::RenderToGpu(CalculatorContext* cc,
} }
// Send out blended image as GPU packet. // Send out blended image as GPU packet.
auto output_frame = output_texture.GetFrame<Type>(); auto output_frame = output_texture.template GetFrame<Type>();
cc->Outputs().Tag(Tag).Add(output_frame.release(), cc->InputTimestamp()); cc->Outputs().Tag(Tag).Add(output_frame.release(), cc->InputTimestamp());
// Cleanup // Cleanup