class SkBlender; class SkData; class SkImage; class SkM44; class SkMaskFilter; class SkMatrix; class SkPath; class SkRRect; class SkRegion; class SkString; class SkTypeface; struct SkPoint3;
/** This may be called at most once; most clients of SkReadBuffer should not mess with it. */ void setVersion(int version) {
SkASSERT(0 == fVersion || version == fVersion);
fVersion = version;
}
// Reads SkAlign4(bytes), but will only copy bytes into the buffer. bool readPad32(void* buffer, size_t bytes);
// binary data and arrays bool readByteArray(void* value, size_t size); bool readColorArray(SkSpan<SkColor>); bool readColor4fArray(SkSpan<SkColor4f>); bool readIntArray(SkSpan<int32_t>); bool readPointArray(SkSpan<SkPoint>); bool readScalarArray(SkSpan<SkScalar>);
constvoid* skipByteArray(size_t* size);
sk_sp<SkData> readByteArrayAsData();
// helpers to get info about arrays and binary data
uint32_t getArrayCount();
// If there is a real error (e.g. data is corrupted) this returns null. If the image cannot // be created (e.g. it was not originally encoded) then this returns an image that doesn't // draw.
sk_sp<SkImage> readImage();
sk_sp<SkTypeface> readTypeface();
// Utilities that mark the buffer invalid if the requested value is out-of-range
// If the read value is outside of the range, validate(false) is called, and min // is returned, else the value is returned.
int32_t checkInt(int min, int max);
template <typename T> T checkRange(T min, T max) { return static_cast<T>(this->checkInt(static_cast<int32_t>(min),
static_cast<int32_t>(max)));
}
// These are always 4-byte aligned constchar* fCurr = nullptr; // current position within buffer constchar* fStop = nullptr; // end of buffer constchar* fBase = nullptr; // beginning of buffer
// Only used if we do not have an fFactoryArray.
skia_private::THashMap<uint32_t, SkFlattenable::Factory> fFlattenableDict;
int fVersion = 0;
sk_sp<SkTypeface>* fTFArray = nullptr; int fTFCount = 0;
SkFlattenable::Factory* fFactoryArray = nullptr; int fFactoryCount = 0;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.