#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "third_party/blink/renderer/platform/image-decoders/bmp/bmp_image_decoder.h"
#include "third_party/blink/renderer/platform/image-decoders/bmp/bmp_image_reader.h"
#include "third_party/blink/renderer/platform/image-decoders/fast_shared_buffer_reader.h"
namespace blink {
static const wtf_size_t kSizeOfFileHeader = …;
BMPImageDecoder::BMPImageDecoder(AlphaOption alpha_option,
ColorBehavior color_behavior,
wtf_size_t max_decoded_bytes)
: … { … }
BMPImageDecoder::~BMPImageDecoder() = default;
String BMPImageDecoder::FilenameExtension() const { … }
const AtomicString& BMPImageDecoder::MimeType() const { … }
void BMPImageDecoder::OnSetData(scoped_refptr<SegmentReader> data) { … }
bool BMPImageDecoder::SetFailed() { … }
void BMPImageDecoder::DecodeSize() { … }
void BMPImageDecoder::Decode(wtf_size_t) { … }
void BMPImageDecoder::Decode(bool only_size) { … }
bool BMPImageDecoder::DecodeHelper(bool only_size) { … }
bool BMPImageDecoder::ProcessFileHeader(wtf_size_t& img_data_offset) { … }
bool BMPImageDecoder::GetFileType(const FastSharedBufferReader& fast_reader,
char* buffer,
const char*& file_header,
uint16_t& file_type) const { … }
}