#include "core/fpdfapi/page/cpdf_meshstream.h"
#include <utility>
#include "core/fpdfapi/page/cpdf_colorspace.h"
#include "core/fpdfapi/page/cpdf_function.h"
#include "core/fpdfapi/parser/cpdf_array.h"
#include "core/fpdfapi/parser/cpdf_dictionary.h"
#include "core/fpdfapi/parser/cpdf_stream.h"
#include "core/fpdfapi/parser/cpdf_stream_acc.h"
#include "core/fxcrt/cfx_bitstream.h"
#include "core/fxcrt/check.h"
#include "core/fxcrt/compiler_specific.h"
#include "core/fxcrt/span.h"
namespace {
bool ShouldCheckBPC(ShadingType type) { … }
bool IsValidBitsPerComponent(uint32_t x) { … }
bool IsValidBitsPerCoordinate(uint32_t x) { … }
bool ShouldCheckBitsPerFlag(ShadingType type) { … }
bool IsValidBitsPerFlag(uint32_t x) { … }
}
CPDF_MeshVertex::CPDF_MeshVertex() = default;
CPDF_MeshVertex::CPDF_MeshVertex(const CPDF_MeshVertex&) = default;
CPDF_MeshVertex::~CPDF_MeshVertex() = default;
CPDF_MeshStream::CPDF_MeshStream(
ShadingType type,
const std::vector<std::unique_ptr<CPDF_Function>>& funcs,
RetainPtr<const CPDF_Stream> pShadingStream,
RetainPtr<CPDF_ColorSpace> pCS)
: … { … }
CPDF_MeshStream::~CPDF_MeshStream() = default;
bool CPDF_MeshStream::Load() { … }
void CPDF_MeshStream::SkipBits(uint32_t nbits) { … }
void CPDF_MeshStream::ByteAlign() { … }
bool CPDF_MeshStream::IsEOF() const { … }
bool CPDF_MeshStream::CanReadFlag() const { … }
bool CPDF_MeshStream::CanReadCoords() const { … }
bool CPDF_MeshStream::CanReadColor() const { … }
uint32_t CPDF_MeshStream::ReadFlag() const { … }
CFX_PointF CPDF_MeshStream::ReadCoords() const { … }
FX_RGB_STRUCT<float> CPDF_MeshStream::ReadColor() const { … }
bool CPDF_MeshStream::ReadVertex(const CFX_Matrix& pObject2Bitmap,
CPDF_MeshVertex* vertex,
uint32_t* flag) { … }
std::vector<CPDF_MeshVertex> CPDF_MeshStream::ReadVertexRow(
const CFX_Matrix& pObject2Bitmap,
int count) { … }