Factor out ReusablePool

PiperOrigin-RevId: 488783477
This commit is contained in:
Camillo Lugaresi
2022-11-15 16:18:20 -08:00
committed by Copybara-Service
parent ab074a579a
commit 583d27636b
5 changed files with 178 additions and 112 deletions
+5
View File
@@ -71,6 +71,11 @@ class GlTextureBuffer
// Create a texture with a copy of the data in image_frame.
static std::unique_ptr<GlTextureBuffer> Create(const ImageFrame& image_frame);
static std::unique_ptr<GlTextureBuffer> Create(
const internal::GpuBufferSpec& spec) {
return Create(spec.width, spec.height, spec.format);
}
// Wraps an existing texture, but does not take ownership of it.
// deletion_callback is invoked when the GlTextureBuffer is released, so
// the caller knows that the texture is no longer in use.