#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "gpu/command_buffer/service/shared_image/gl_repack_utils.h"
#include <vector>
#include "base/bits.h"
#include "base/check_op.h"
#include "gpu/command_buffer/service/shared_image/copy_image_plane.h"
#include "third_party/skia/include/core/SkPixmap.h"
namespace gpu {
std::vector<uint8_t> RepackPixelDataAsRgb(const gfx::Size& size,
const SkPixmap& src_pixmap,
bool src_is_bgrx) { … }
std::vector<uint8_t> RepackPixelDataWithStride(const gfx::Size& size,
const SkPixmap& src_pixmap,
size_t dst_stride) { … }
void UnpackPixelDataWithStride(const gfx::Size& size,
const std::vector<uint8_t>& src_data,
size_t src_stride,
const SkPixmap& dst_pixmap) { … }
void SwizzleRedAndBlue(const SkPixmap& pixmap) { … }
}