311 {
313 VALIDATION_LOG <<
"Only textures with pixel format RGBA are supported yet.";
314 return false;
315 }
316
317 const auto&
gl = reactor.GetProcTable();
318
319 GLuint read_fbo = GL_NONE;
321 [&
gl, &read_fbo]() {
DeleteFBO(
gl, read_fbo, GL_READ_FRAMEBUFFER); });
322
323 {
325 if (!
read.has_value()) {
326 return false;
327 }
328 read_fbo =
read.value();
329 }
330
336 });
337
338 return true;
339};
static bool read(SkStream *stream, void *buffer, size_t amount)
Wraps a closure that is invoked in the destructor unless released by the caller.
static DeviceBufferGLES & Cast(DeviceBuffer &base)
void UpdateBufferData(const std::function< void(uint8_t *, size_t length)> &update_buffer_data)
static std::optional< GLuint > ConfigureFBO(const ProcTableGLES &gl, const std::shared_ptr< Texture > &texture, GLenum fbo_type)
static void DeleteFBO(const ProcTableGLES &gl, GLuint fbo, GLenum type)
std::shared_ptr< DeviceBuffer > destination
std::shared_ptr< Texture > source
size_t destination_offset
constexpr Type GetY() const
Returns the Y coordinate of the upper left corner, equivalent to |GetOrigin().y|.
constexpr Type GetHeight() const
Returns the height of the rectangle, equivalent to |GetSize().height|.
constexpr Type GetX() const
Returns the X coordinate of the upper left corner, equivalent to |GetOrigin().x|.
constexpr Type GetWidth() const
Returns the width of the rectangle, equivalent to |GetSize().width|.
std::shared_ptr< const fml::Mapping > data