#include "core/fxge/dib/cfx_dibbase.h"
#include <stddef.h>
#include <stdint.h>
#include <memory>
#include <type_traits>
#include <utility>
#include "core/fxcrt/check_op.h"
#include "core/fxcrt/compiler_specific.h"
#include "core/fxcrt/fx_2d_size.h"
#include "core/fxcrt/fx_memory.h"
#include "core/fxcrt/fx_memory_wrappers.h"
#include "core/fxcrt/fx_safe_types.h"
#include "core/fxcrt/notreached.h"
#include "core/fxcrt/retain_ptr.h"
#include "core/fxcrt/span.h"
#include "core/fxge/calculate_pitch.h"
#include "core/fxge/dib/cfx_dibitmap.h"
#include "core/fxge/dib/fx_dib.h"
#include "third_party/skia/include/core/SkAlphaType.h"
#include "third_party/skia/include/core/SkColor.h"
#include "third_party/skia/include/core/SkColorPriv.h"
#include "third_party/skia/include/core/SkColorType.h"
#include "third_party/skia/include/core/SkImage.h"
#include "third_party/skia/include/core/SkImageInfo.h"
#include "third_party/skia/include/core/SkPixmap.h"
#include "third_party/skia/include/core/SkRefCnt.h"
namespace {
void ReleaseRetainedHeldBySkImage(const void* ,
SkImages::ReleaseContext context) { … }
sk_sp<SkImage> CreateSkiaImageFromDib(const CFX_DIBBase* source,
SkColorType color_type,
SkAlphaType alpha_type) { … }
void ReleaseAllocatedHeldBySkImage(const void* pixels,
SkImages::ReleaseContext ) { … }
template <size_t source_bits_per_pixel, typename PixelTransform>
class PixelTransformTraits;
PixelTransformTraits<1, PixelTransform>;
PixelTransformTraits<8, PixelTransform>;
PixelTransformTraits<24, PixelTransform>;
PixelTransformTraits<32, PixelTransform>;
void ValidateScanlineSize(pdfium::span<const uint8_t> scanline,
size_t min_row_bytes) { … }
template <size_t source_bits_per_pixel, typename PixelTransform>
sk_sp<SkImage> CreateSkiaImageFromTransformedDib(
const CFX_DIBBase& source,
SkColorType color_type,
SkAlphaType alpha_type,
PixelTransform&& pixel_transform) { … }
bool IsRGBColorGrayScale(uint32_t color) { … }
}
sk_sp<SkImage> CFX_DIBBase::RealizeSkImage() const { … }