mediapipe/mediapipe/gpu/gl_texture_view.cc
Camillo Lugaresi 1c0a1d0aab Remove shared_ptr<GpuBuffer> member from GlTextureView
This only exists to support GlTexture's GetFrame API. It can be moved into GlTexture.

PiperOrigin-RevId: 488812896
2022-11-15 18:40:15 -08:00

24 lines
405 B
C++

#include "mediapipe/gpu/gl_texture_view.h"
namespace mediapipe {
void GlTextureView::Release() {
DoneWriting();
if (detach_) detach_(*this);
detach_ = nullptr;
gl_context_ = nullptr;
plane_ = 0;
name_ = 0;
width_ = 0;
height_ = 0;
}
void GlTextureView::DoneWriting() const {
if (done_writing_) {
done_writing_(*this);
done_writing_ = nullptr;
}
}
} // namespace mediapipe