2021-10-18 21:39:29 +02:00
|
|
|
#include "mediapipe/gpu/gl_texture_view.h"
|
|
|
|
|
|
|
|
namespace mediapipe {
|
|
|
|
|
|
|
|
void GlTextureView::Release() {
|
2022-03-21 20:07:37 +01:00
|
|
|
DoneWriting();
|
2021-10-18 21:39:29 +02:00
|
|
|
if (detach_) detach_(*this);
|
|
|
|
detach_ = nullptr;
|
|
|
|
gl_context_ = nullptr;
|
|
|
|
plane_ = 0;
|
|
|
|
name_ = 0;
|
|
|
|
width_ = 0;
|
|
|
|
height_ = 0;
|
|
|
|
}
|
|
|
|
|
2022-03-21 20:07:37 +01:00
|
|
|
void GlTextureView::DoneWriting() const {
|
|
|
|
if (done_writing_) {
|
|
|
|
done_writing_(*this);
|
|
|
|
done_writing_ = nullptr;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-10-18 21:39:29 +02:00
|
|
|
} // namespace mediapipe
|