69 {
70 const auto&
gl = reactor.GetProcTable();
71
72
73
74 if (!
gl.BlitFramebuffer.IsAvailable()) {
75
76 FML_LOG(
ERROR) <<
"Texture blit fallback not implemented yet for GLES2.";
77 return false;
78 }
79
80 GLuint read_fbo = GL_NONE;
81 GLuint draw_fbo = GL_NONE;
85 });
86
87 {
89 if (!
read.has_value()) {
90 return false;
91 }
92 read_fbo =
read.value();
93 }
94
95 {
97 if (!
draw.has_value()) {
98 return false;
99 }
100 draw_fbo =
draw.value();
101 }
102
103 gl.Disable(GL_SCISSOR_TEST);
104 gl.Disable(GL_DEPTH_TEST);
105 gl.Disable(GL_STENCIL_TEST);
106
115 GL_COLOR_BUFFER_BIT,
116 GL_NEAREST
117 );
118
119 return true;
120};
static bool read(SkStream *stream, void *buffer, size_t amount)
static void draw(SkCanvas *canvas, SkRect &target, int x, int y)
Wraps a closure that is invoked in the destructor unless released by the caller.
#define FML_LOG(severity)
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)
IPoint destination_origin
std::shared_ptr< Texture > destination
std::shared_ptr< Texture > source
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|.