#include "include/core/SkTextBlob.h"
#include "include/core/SkData.h"
#include "include/core/SkMaskFilter.h"
#include "include/core/SkMatrix.h"
#include "include/core/SkPaint.h"
#include "include/core/SkPathEffect.h"
#include "include/core/SkPoint.h"
#include "include/core/SkRSXform.h"
#include "include/private/base/SkAlign.h"
#include "include/private/base/SkFloatingPoint.h"
#include "include/private/base/SkMalloc.h"
#include "include/private/base/SkSpan_impl.h"
#include "include/private/base/SkTo.h"
#include "src/base/SkSafeMath.h"
#include "src/base/SkTLazy.h"
#include "src/core/SkFontPriv.h"
#include "src/core/SkGlyph.h"
#include "src/core/SkReadBuffer.h"
#include "src/core/SkStrikeSpec.h"
#include "src/core/SkTextBlobPriv.h"
#include "src/core/SkWriteBuffer.h"
#include "src/text/GlyphRun.h"
#include <algorithm>
#include <atomic>
#include <limits>
#include <new>
#include <vector>
usingnamespaceskia_private;
namespace {
struct RunFontStorageEquivalent { … };
static_assert …;
}
size_t SkTextBlob::RunRecord::StorageSize(uint32_t glyphCount, uint32_t textSize,
SkTextBlob::GlyphPositioning positioning,
SkSafeMath* safe) { … }
const SkTextBlob::RunRecord* SkTextBlob::RunRecord::First(const SkTextBlob* blob) { … }
const SkTextBlob::RunRecord* SkTextBlob::RunRecord::Next(const RunRecord* run) { … }
namespace {
struct RunRecordStorageEquivalent { … };
}
void SkTextBlob::RunRecord::validate(const uint8_t* storageTop) const { … }
const SkTextBlob::RunRecord* SkTextBlob::RunRecord::NextUnchecked(const RunRecord* run) { … }
size_t SkTextBlob::RunRecord::PosCount(uint32_t glyphCount,
SkTextBlob::GlyphPositioning positioning,
SkSafeMath* safe) { … }
uint32_t* SkTextBlob::RunRecord::textSizePtr() const { … }
void SkTextBlob::RunRecord::grow(uint32_t count) { … }
static uint32_t next_id() { … }
SkTextBlob::SkTextBlob(const SkRect& bounds)
: … { … }
SkTextBlob::~SkTextBlob() { … }
namespace {
PositioningAndExtended;
static_assert …;
}
enum SkTextBlob::GlyphPositioning : uint8_t { … };
unsigned SkTextBlob::ScalarsPerGlyph(GlyphPositioning pos) { … }
void SkTextBlob::operator delete(void* p) { … }
void* SkTextBlob::operator new(size_t) { … }
void* SkTextBlob::operator new(size_t, void* p) { … }
SkTextBlobRunIterator::SkTextBlobRunIterator(const SkTextBlob* blob)
: … { … }
void SkTextBlobRunIterator::next() { … }
SkTextBlobRunIterator::GlyphPositioning SkTextBlobRunIterator::positioning() const { … }
unsigned SkTextBlobRunIterator::scalarsPerGlyph() const { … }
bool SkTextBlobRunIterator::isLCD() const { … }
SkTextBlobBuilder::SkTextBlobBuilder()
: … { … }
SkTextBlobBuilder::~SkTextBlobBuilder() { … }
static SkRect map_quad_to_rect(const SkRSXform& xform, const SkRect& rect) { … }
SkRect SkTextBlobBuilder::TightRunBounds(const SkTextBlob::RunRecord& run) { … }
SkRect SkTextBlobBuilder::ConservativeRunBounds(const SkTextBlob::RunRecord& run) { … }
void SkTextBlobBuilder::updateDeferredBounds() { … }
void SkTextBlobBuilder::reserve(size_t size) { … }
bool SkTextBlobBuilder::mergeRun(const SkFont& font, SkTextBlob::GlyphPositioning positioning,
uint32_t count, SkPoint offset) { … }
void SkTextBlobBuilder::allocInternal(const SkFont& font,
SkTextBlob::GlyphPositioning positioning,
int count, int textSize, SkPoint offset,
const SkRect* bounds) { … }
const SkTextBlobBuilder::RunBuffer& SkTextBlobBuilder::allocRun(const SkFont& font, int count,
SkScalar x, SkScalar y,
const SkRect* bounds) { … }
const SkTextBlobBuilder::RunBuffer& SkTextBlobBuilder::allocRunPosH(const SkFont& font, int count,
SkScalar y,
const SkRect* bounds) { … }
const SkTextBlobBuilder::RunBuffer& SkTextBlobBuilder::allocRunPos(const SkFont& font, int count,
const SkRect* bounds) { … }
const SkTextBlobBuilder::RunBuffer&
SkTextBlobBuilder::allocRunRSXform(const SkFont& font, int count) { … }
const SkTextBlobBuilder::RunBuffer& SkTextBlobBuilder::allocRunText(const SkFont& font, int count,
SkScalar x, SkScalar y,
int textByteCount,
const SkRect* bounds) { … }
const SkTextBlobBuilder::RunBuffer& SkTextBlobBuilder::allocRunTextPosH(const SkFont& font,
int count,
SkScalar y,
int textByteCount,
const SkRect* bounds) { … }
const SkTextBlobBuilder::RunBuffer& SkTextBlobBuilder::allocRunTextPos(const SkFont& font,
int count,
int textByteCount,
const SkRect *bounds) { … }
const SkTextBlobBuilder::RunBuffer& SkTextBlobBuilder::allocRunTextRSXform(const SkFont& font,
int count,
int textByteCount,
const SkRect *bounds) { … }
sk_sp<SkTextBlob> SkTextBlobBuilder::make() { … }
void SkTextBlobPriv::Flatten(const SkTextBlob& blob, SkWriteBuffer& buffer) { … }
sk_sp<SkTextBlob> SkTextBlobPriv::MakeFromBuffer(SkReadBuffer& reader) { … }
sk_sp<SkTextBlob> SkTextBlob::MakeFromText(const void* text, size_t byteLength, const SkFont& font,
SkTextEncoding encoding) { … }
sk_sp<SkTextBlob> SkTextBlob::MakeFromPosText(const void* text, size_t byteLength,
const SkPoint pos[], const SkFont& font,
SkTextEncoding encoding) { … }
sk_sp<SkTextBlob> SkTextBlob::MakeFromPosTextH(const void* text, size_t byteLength,
const SkScalar xpos[], SkScalar constY,
const SkFont& font, SkTextEncoding encoding) { … }
sk_sp<SkTextBlob> SkTextBlob::MakeFromRSXform(const void* text, size_t byteLength,
const SkRSXform xform[], const SkFont& font,
SkTextEncoding encoding) { … }
sk_sp<SkData> SkTextBlob::serialize(const SkSerialProcs& procs) const { … }
sk_sp<SkTextBlob> SkTextBlob::Deserialize(const void* data, size_t length,
const SkDeserialProcs& procs) { … }
size_t SkTextBlob::serialize(const SkSerialProcs& procs, void* memory, size_t memory_size) const { … }
namespace {
int get_glyph_run_intercepts(const sktext::GlyphRun& glyphRun,
const SkPaint& paint,
const SkScalar bounds[2],
SkScalar intervals[],
int* intervalCount) { … }
}
int SkTextBlob::getIntercepts(const SkScalar bounds[2], SkScalar intervals[],
const SkPaint* paint) const { … }
std::vector<SkScalar> SkFont::getIntercepts(const SkGlyphID glyphs[], int count,
const SkPoint positions[],
SkScalar top, SkScalar bottom,
const SkPaint* paintPtr) const { … }
SkTextBlob::Iter::Iter(const SkTextBlob& blob) { … }
bool SkTextBlob::Iter::next(Run* rec) { … }
bool SkTextBlob::Iter::experimentalNext(ExperimentalRun* rec) { … }