#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "ui/ozone/common/gl_surface_egl_readback.h"
#include <utility>
#include "base/functional/bind.h"
#include "base/task/single_thread_task_runner.h"
#include "ui/gl/gl_bindings.h"
#include "ui/gl/gl_implementation.h"
#include "ui/ozone/common/egl_util.h"
namespace ui {
namespace {
constexpr size_t kBytesPerPixelBGRA = …;
}
GLSurfaceEglReadback::GLSurfaceEglReadback(gl::GLDisplayEGL* display)
: … { … }
bool GLSurfaceEglReadback::Resize(const gfx::Size& size,
float scale_factor,
const gfx::ColorSpace& color_space,
bool has_alpha) { … }
gfx::SwapResult GLSurfaceEglReadback::SwapBuffers(PresentationCallback callback,
gfx::FrameData data) { … }
gfx::SurfaceOrigin GLSurfaceEglReadback::GetOrigin() const { … }
GLSurfaceEglReadback::~GLSurfaceEglReadback() { … }
bool GLSurfaceEglReadback::HandlePixels(uint8_t* pixels) { … }
void GLSurfaceEglReadback::ReadPixels(base::span<uint8_t> buffer) { … }
}