Flutter Engine
The Flutter Engine
Public Types | Public Member Functions | Static Public Member Functions | Friends | List of all members
sktext::gpu::SubRunContainer Class Reference

#include <SubRunContainer.h>

Public Types

enum  SubRunCreationBehavior { kAddSubRuns , kStrikeCalculationsOnly }
 

Public Member Functions

 SubRunContainer (const SkMatrix &initialPositionMatrix)
 
 SubRunContainer ()=delete
 
 SubRunContainer (const SubRunContainer &)=delete
 
SubRunContaineroperator= (const SubRunContainer &)=delete
 
 SubRunContainer (SubRunContainer &&)=delete
 
SubRunContaineroperator= (SubRunContainer &&)=delete
 
void flattenAllocSizeHint (SkWriteBuffer &buffer) const
 
void flattenRuns (SkWriteBuffer &buffer) const
 
void draw (SkCanvas *, SkPoint drawOrigin, const SkPaint &, const SkRefCnt *subRunStorage, const AtlasDrawDelegate &) const
 
const SkMatrixinitialPosition () const
 
bool isEmpty () const
 
bool canReuse (const SkPaint &paint, const SkMatrix &positionMatrix) const
 

Static Public Member Functions

static int AllocSizeHintFromBuffer (SkReadBuffer &buffer)
 
static SubRunContainerOwner MakeFromBufferInAlloc (SkReadBuffer &buffer, const SkStrikeClient *client, SubRunAllocator *alloc)
 
static SubRunContainerOwner MakeInAlloc (const GlyphRunList &glyphRunList, const SkMatrix &positionMatrix, const SkPaint &runPaint, SkStrikeDeviceInfo strikeDeviceInfo, StrikeForGPUCacheInterface *strikeCache, sktext::gpu::SubRunAllocator *alloc, SubRunCreationBehavior creationBehavior, const char *tag)
 
static size_t EstimateAllocSize (const GlyphRunList &glyphRunList)
 

Friends

class TextBlobTools
 

Detailed Description

Definition at line 205 of file SubRunContainer.h.

Member Enumeration Documentation

◆ SubRunCreationBehavior

Enumerator
kAddSubRuns 
kStrikeCalculationsOnly 

Definition at line 224 of file SubRunContainer.h.

Constructor & Destructor Documentation

◆ SubRunContainer() [1/4]

sktext::gpu::SubRunContainer::SubRunContainer ( const SkMatrix initialPositionMatrix)
explicit

Definition at line 1364 of file SubRunContainer.cpp.

1365 : fInitialPositionMatrix{initialPositionMatrix} {}

◆ SubRunContainer() [2/4]

sktext::gpu::SubRunContainer::SubRunContainer ( )
delete

◆ SubRunContainer() [3/4]

sktext::gpu::SubRunContainer::SubRunContainer ( const SubRunContainer )
delete

◆ SubRunContainer() [4/4]

sktext::gpu::SubRunContainer::SubRunContainer ( SubRunContainer &&  )
delete

Member Function Documentation

◆ AllocSizeHintFromBuffer()

int sktext::gpu::SubRunContainer::AllocSizeHintFromBuffer ( SkReadBuffer buffer)
static

Definition at line 1375 of file SubRunContainer.cpp.

1375 {
1376 int subRunsSizeHint = buffer.readInt();
1377
1378 // Since the hint doesn't affect correctness, if it looks fishy just pick a reasonable
1379 // value.
1380 if (subRunsSizeHint < 0 || (1 << 16) < subRunsSizeHint) {
1381 subRunsSizeHint = 128;
1382 }
1383 return subRunsSizeHint;
1384}
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir Path to the cache directory This is different from the persistent_cache_path in embedder which is used for Skia shader cache icu native lib Path to the library file that exports the ICU data vm service The hostname IP address on which the Dart VM Service should be served If not defaults to or::depending on whether ipv6 is specified vm service A custom Dart VM Service port The default is to pick a randomly available open port disable vm Disable the Dart VM Service The Dart VM Service is never available in release mode disable vm service Disable mDNS Dart VM Service publication Bind to the IPv6 localhost address for the Dart VM Service Ignored if vm service host is set endless trace buffer
Definition: switches.h:126

◆ canReuse()

bool sktext::gpu::SubRunContainer::canReuse ( const SkPaint paint,
const SkMatrix positionMatrix 
) const

Definition at line 1986 of file SubRunContainer.cpp.

1986 {
1987 for (const SubRun& subRun : fSubRuns) {
1988 if (!subRun.canReuse(paint, positionMatrix)) {
1989 return false;
1990 }
1991 }
1992 return true;
1993}
const Paint & paint
Definition: color_source.cc:38

◆ draw()

void sktext::gpu::SubRunContainer::draw ( SkCanvas canvas,
SkPoint  drawOrigin,
const SkPaint paint,
const SkRefCnt subRunStorage,
const AtlasDrawDelegate atlasDelegate 
) const

Definition at line 1976 of file SubRunContainer.cpp.

1980 {
1981 for (auto& subRun : fSubRuns) {
1982 subRun.draw(canvas, drawOrigin, paint, sk_ref_sp(subRunStorage), atlasDelegate);
1983 }
1984}
sk_sp< T > sk_ref_sp(T *obj)
Definition: SkRefCnt.h:381

◆ EstimateAllocSize()

size_t sktext::gpu::SubRunContainer::EstimateAllocSize ( const GlyphRunList glyphRunList)
static

Definition at line 1419 of file SubRunContainer.cpp.

1419 {
1420 // The difference in alignment from the per-glyph data to the SubRun;
1421 constexpr size_t alignDiff = alignof(DirectMaskSubRun) - alignof(SkPoint);
1422 constexpr size_t vertexDataToSubRunPadding = alignDiff > 0 ? alignDiff : 0;
1423 size_t totalGlyphCount = glyphRunList.totalGlyphCount();
1424 // This is optimized for DirectMaskSubRun which is by far the most common case.
1425 return totalGlyphCount * sizeof(SkPoint)
1426 + GlyphVector::GlyphVectorSize(totalGlyphCount)
1427 + glyphRunList.runCount() * (sizeof(DirectMaskSubRun) + vertexDataToSubRunPadding)
1428 + sizeof(SubRunContainer);
1429}
size_t runCount() const
Definition: GlyphRun.h:89
size_t totalGlyphCount() const
Definition: GlyphRun.h:90
static size_t GlyphVectorSize(size_t count)
Definition: GlyphVector.h:72

◆ flattenAllocSizeHint()

void sktext::gpu::SubRunContainer::flattenAllocSizeHint ( SkWriteBuffer buffer) const

Definition at line 1367 of file SubRunContainer.cpp.

1367 {
1368 int unflattenSizeHint = 0;
1369 for (auto& subrun : fSubRuns) {
1370 unflattenSizeHint += subrun.unflattenSize();
1371 }
1372 buffer.writeInt(unflattenSizeHint);
1373}

◆ flattenRuns()

void sktext::gpu::SubRunContainer::flattenRuns ( SkWriteBuffer buffer) const

Definition at line 1386 of file SubRunContainer.cpp.

1386 {
1387 buffer.writeMatrix(fInitialPositionMatrix);
1388 int subRunCount = 0;
1389 for ([[maybe_unused]] auto& subRun : fSubRuns) {
1390 subRunCount += 1;
1391 }
1392 buffer.writeInt(subRunCount);
1393 for (auto& subRun : fSubRuns) {
1394 subRun.flatten(buffer);
1395 }
1396}

◆ initialPosition()

const SkMatrix & sktext::gpu::SubRunContainer::initialPosition ( ) const
inline

Definition at line 241 of file SubRunContainer.h.

241{ return fInitialPositionMatrix; }

◆ isEmpty()

bool sktext::gpu::SubRunContainer::isEmpty ( ) const
inline

Definition at line 242 of file SubRunContainer.h.

242{ return fSubRuns.isEmpty(); }

◆ MakeFromBufferInAlloc()

SubRunContainerOwner sktext::gpu::SubRunContainer::MakeFromBufferInAlloc ( SkReadBuffer buffer,
const SkStrikeClient client,
SubRunAllocator alloc 
)
static

Definition at line 1398 of file SubRunContainer.cpp.

1400 {
1401 SkMatrix positionMatrix;
1402 buffer.readMatrix(&positionMatrix);
1403 if (!buffer.isValid()) { return nullptr; }
1404 SubRunContainerOwner container = alloc->makeUnique<SubRunContainer>(positionMatrix);
1405
1406 int subRunCount = buffer.readInt();
1407 SkASSERT(subRunCount > 0);
1408 if (!buffer.validate(subRunCount > 0)) { return nullptr; }
1409 for (int i = 0; i < subRunCount; ++i) {
1410 auto subRunOwner = SubRun::MakeFromBuffer(buffer, alloc, client);
1411 if (!buffer.validate(subRunOwner != nullptr)) { return nullptr; }
1412 if (subRunOwner != nullptr) {
1413 container->fSubRuns.append(std::move(subRunOwner));
1414 }
1415 }
1416 return container;
1417}
#define SkASSERT(cond)
Definition: SkAssert.h:116
std::unique_ptr< T, Destroyer > makeUnique(Args &&... args)
static SubRunOwner MakeFromBuffer(SkReadBuffer &buffer, sktext::gpu::SubRunAllocator *alloc, const SkStrikeClient *client)
std::unique_ptr< SubRunContainer, SubRunAllocator::Destroyer > SubRunContainerOwner

◆ MakeInAlloc()

SubRunContainerOwner sktext::gpu::SubRunContainer::MakeInAlloc ( const GlyphRunList glyphRunList,
const SkMatrix positionMatrix,
const SkPaint runPaint,
SkStrikeDeviceInfo  strikeDeviceInfo,
StrikeForGPUCacheInterface strikeCache,
sktext::gpu::SubRunAllocator alloc,
SubRunCreationBehavior  creationBehavior,
const char *  tag 
)
static

Definition at line 1681 of file SubRunContainer.cpp.

1689 {
1690 SkASSERT(alloc != nullptr);
1691 SkASSERT(strikeDeviceInfo.fSDFTControl != nullptr);
1692
1693 SubRunContainerOwner container = alloc->makeUnique<SubRunContainer>(positionMatrix);
1694 // If there is no SDFT description ignore all SubRuns.
1695 if (strikeDeviceInfo.fSDFTControl == nullptr) {
1696 return container;
1697 }
1698
1699 const SkSurfaceProps deviceProps = strikeDeviceInfo.fSurfaceProps;
1700 const SkScalerContextFlags scalerContextFlags = strikeDeviceInfo.fScalerContextFlags;
1701#if !defined(SK_DISABLE_SDF_TEXT)
1702 const SDFTControl SDFTControl = *strikeDeviceInfo.fSDFTControl;
1703 const SkScalar maxMaskSize = SDFTControl.maxSize();
1704#else
1705 const SkScalar maxMaskSize = 256;
1706#endif
1707
1708 // TODO: hoist the buffer structure to the GlyphRunBuilder. The buffer structure here is
1709 // still begin tuned, and this is expected to be slower until tuned.
1710 const int maxGlyphRunSize = glyphRunList.maxGlyphRunSize();
1711
1712 // Accepted buffers.
1713 STArray<64, SkPackedGlyphID> acceptedPackedGlyphIDs;
1714 STArray<64, SkGlyphID> acceptedGlyphIDs;
1715 STArray<64, SkPoint> acceptedPositions;
1716 STArray<64, SkMask::Format> acceptedFormats;
1717 acceptedPackedGlyphIDs.resize(maxGlyphRunSize);
1718 acceptedGlyphIDs.resize(maxGlyphRunSize);
1719 acceptedPositions.resize(maxGlyphRunSize);
1720 acceptedFormats.resize(maxGlyphRunSize);
1721
1722 // Rejected buffers.
1723 STArray<64, SkGlyphID> rejectedGlyphIDs;
1724 STArray<64, SkPoint> rejectedPositions;
1725 rejectedGlyphIDs.resize(maxGlyphRunSize);
1726 rejectedPositions.resize(maxGlyphRunSize);
1727 const auto rejectedBuffer = SkMakeZip(rejectedGlyphIDs, rejectedPositions);
1728
1729 const SkPoint glyphRunListLocation = glyphRunList.sourceBounds().center();
1730
1731 // Handle all the runs in the glyphRunList
1732 for (auto& glyphRun : glyphRunList) {
1734 const SkFont& runFont = glyphRun.font();
1735
1736 const SkScalar approximateDeviceTextSize =
1737 // Since the positionMatrix has the origin prepended, use the plain
1738 // sourceBounds from above.
1739 SkFontPriv::ApproximateTransformedTextSize(runFont, positionMatrix,
1740 glyphRunListLocation);
1741
1742 // Atlas mask cases - SDFT and direct mask
1743 // Only consider using direct or SDFT drawing if not drawing hairlines and not too big.
1744 if ((runPaint.getStyle() != SkPaint::kStroke_Style || runPaint.getStrokeWidth() != 0) &&
1745 approximateDeviceTextSize < maxMaskSize) {
1746
1747#if !defined(SK_DISABLE_SDF_TEXT)
1748 // SDFT case
1749 if (SDFTControl.isSDFT(approximateDeviceTextSize, runPaint, positionMatrix)) {
1750 // Process SDFT - This should be the .009% case.
1751 const auto& [strikeSpec, strikeToSourceScale, matrixRange] =
1753 runFont, runPaint, deviceProps, positionMatrix,
1754 glyphRunListLocation, SDFTControl);
1755
1756 if (!SkScalarNearlyZero(strikeToSourceScale)) {
1757 sk_sp<StrikeForGPU> strike = strikeSpec.findOrCreateScopedStrike(strikeCache);
1758
1759 // The creationMatrix needs to scale the strike data when inverted and
1760 // multiplied by the positionMatrix. The final CTM should be:
1761 // [positionMatrix][scale by strikeToSourceScale],
1762 // which should equal the following because of the transform during the vertex
1763 // calculation,
1764 // [positionMatrix][creationMatrix]^-1.
1765 // So, the creation matrix needs to be
1766 // [scale by 1/strikeToSourceScale].
1767 SkMatrix creationMatrix =
1768 SkMatrix::Scale(1.f/strikeToSourceScale, 1.f/strikeToSourceScale);
1769
1770 auto acceptedBuffer = SkMakeZip(acceptedPackedGlyphIDs, acceptedPositions);
1771 auto [accepted, rejected, creationBounds] = prepare_for_SDFT_drawing(
1772 strike.get(), creationMatrix, source, acceptedBuffer, rejectedBuffer);
1773 source = rejected;
1774
1775 if (creationBehavior == kAddSubRuns && !accepted.empty()) {
1776 container->fSubRuns.append(SDFTSubRun::Make(
1777 accepted,
1778 runFont,
1779 strike->strikePromise(),
1780 creationMatrix,
1781 creationBounds,
1782 matrixRange,
1783 alloc));
1784 }
1785 }
1786 }
1787#endif // !defined(SK_DISABLE_SDF_TEXT)
1788
1789 // Direct Mask case
1790 // Handle all the directly mapped mask subruns.
1791 if (!source.empty() && !positionMatrix.hasPerspective()) {
1792 // Process masks including ARGB - this should be the 99.99% case.
1793 // This will handle medium size emoji that are sharing the run with SDFT drawn text.
1794 // If things are too big they will be passed along to the drawing of last resort
1795 // below.
1797 runFont, runPaint, deviceProps, scalerContextFlags, positionMatrix);
1798
1799 sk_sp<StrikeForGPU> strike = strikeSpec.findOrCreateScopedStrike(strikeCache);
1800
1801 auto acceptedBuffer = SkMakeZip(acceptedPackedGlyphIDs,
1802 acceptedPositions,
1803 acceptedFormats);
1804 auto [accepted, rejected, creationBounds] = prepare_for_direct_mask_drawing(
1805 strike.get(), positionMatrix, source, acceptedBuffer, rejectedBuffer);
1806 source = rejected;
1807
1808 if (creationBehavior == kAddSubRuns && !accepted.empty()) {
1809 auto addGlyphsWithSameFormat =
1810 [&, bounds = creationBounds](
1813 container->fSubRuns.append(
1815 subrun,
1816 container->initialPosition(),
1817 strike->strikePromise(),
1818 format,
1819 alloc));
1820 };
1821 add_multi_mask_format(addGlyphsWithSameFormat, accepted);
1822 }
1823 }
1824 }
1825
1826 // Drawable case
1827 // Handle all the drawable glyphs - usually large or perspective color glyphs.
1828 if (!source.empty()) {
1829 auto [strikeSpec, strikeToSourceScale] =
1830 SkStrikeSpec::MakePath(runFont, runPaint, deviceProps, scalerContextFlags);
1831
1832 if (!SkScalarNearlyZero(strikeToSourceScale)) {
1833 sk_sp<StrikeForGPU> strike = strikeSpec.findOrCreateScopedStrike(strikeCache);
1834
1835 auto acceptedBuffer = SkMakeZip(acceptedGlyphIDs, acceptedPositions);
1836 auto [accepted, rejected] =
1837 prepare_for_drawable_drawing(strike.get(), source, acceptedBuffer, rejectedBuffer);
1838 source = rejected;
1839
1840 if (creationBehavior == kAddSubRuns && !accepted.empty()) {
1841 container->fSubRuns.append(
1843 accepted,
1844 strikeToSourceScale,
1845 strike->strikePromise(),
1846 alloc));
1847 }
1848 }
1849 }
1850
1851 // Path case
1852 // Handle path subruns. Mainly, large or large perspective glyphs with no color.
1853 if (!source.empty()) {
1854 auto [strikeSpec, strikeToSourceScale] =
1855 SkStrikeSpec::MakePath(runFont, runPaint, deviceProps, scalerContextFlags);
1856
1857 if (!SkScalarNearlyZero(strikeToSourceScale)) {
1858 sk_sp<StrikeForGPU> strike = strikeSpec.findOrCreateScopedStrike(strikeCache);
1859
1860 auto acceptedBuffer = SkMakeZip(acceptedGlyphIDs, acceptedPositions);
1861 auto [accepted, rejected] =
1862 prepare_for_path_drawing(strike.get(), source, acceptedBuffer, rejectedBuffer);
1863 source = rejected;
1864
1865 if (creationBehavior == kAddSubRuns && !accepted.empty()) {
1866 container->fSubRuns.append(
1867 PathSubRun::Make(accepted,
1868 has_some_antialiasing(runFont),
1869 strikeToSourceScale,
1870 strike->strikePromise(),
1871 alloc));
1872 }
1873 }
1874 }
1875
1876 // Drawing of last resort case
1877 // Draw all the rest of the rejected glyphs from above. This scales out of the atlas to
1878 // the screen, so quality will suffer. This mainly handles large color or perspective
1879 // color not handled by Drawables.
1880 if (!source.empty() && !SkScalarNearlyZero(approximateDeviceTextSize)) {
1881 // Creation matrix will be changed below to meet the following criteria:
1882 // * No perspective - the font scaler and the strikes can't handle perspective masks.
1883 // * Fits atlas - creationMatrix will be conditioned so that the maximum glyph
1884 // dimension for this run will be < kMaxBilerpAtlasDimension.
1885 SkMatrix creationMatrix = positionMatrix;
1886
1887 // Condition creationMatrix for perspective.
1888 if (creationMatrix.hasPerspective()) {
1889 // Find a scale factor that reduces pixelation caused by keystoning.
1890 SkPoint center = glyphRunList.sourceBounds().center();
1891 SkScalar maxAreaScale = SkMatrixPriv::DifferentialAreaScale(creationMatrix, center);
1892 SkScalar perspectiveFactor = 1;
1893 if (SkIsFinite(maxAreaScale) && !SkScalarNearlyZero(maxAreaScale)) {
1894 perspectiveFactor = SkScalarSqrt(maxAreaScale);
1895 }
1896
1897 // Masks can not be created in perspective. Create a non-perspective font with a
1898 // scale that will support the perspective keystoning.
1899 creationMatrix = SkMatrix::Scale(perspectiveFactor, perspectiveFactor);
1900 }
1901
1902 // Reduce to make a one pixel border for the bilerp padding.
1903 static const constexpr SkScalar kMaxBilerpAtlasDimension =
1905
1906 // Get the raw glyph IDs to simulate device drawing to figure the maximum device
1907 // dimension.
1908 const SkSpan<const SkGlyphID> glyphs = get_glyphIDs(source);
1909
1910 // maxGlyphDimension always returns an integer even though the return type is SkScalar.
1911 auto maxGlyphDimension = [&](const SkMatrix& m) {
1913 runFont, runPaint, deviceProps, scalerContextFlags, m);
1914 const sk_sp<StrikeForGPU> gaugingStrike =
1915 strikeSpec.findOrCreateScopedStrike(strikeCache);
1916 const SkScalar maxDimension =
1917 find_maximum_glyph_dimension(gaugingStrike.get(), glyphs);
1918 // TODO: There is a problem where a small character (say .) and a large
1919 // character (say M) are in the same run. If the run is scaled to be very
1920 // large, then the M may return 0 because its dimensions are > 65535, but
1921 // the small character produces regular result because its largest dimension
1922 // is < 65535. This will create an improper scale factor causing the M to be
1923 // too large to fit in the atlas. Tracked by skia:13714.
1924 return maxDimension;
1925 };
1926
1927 // Condition the creationMatrix so that glyphs fit in the atlas.
1928 for (SkScalar maxDimension = maxGlyphDimension(creationMatrix);
1929 kMaxBilerpAtlasDimension < maxDimension;
1930 maxDimension = maxGlyphDimension(creationMatrix))
1931 {
1932 // The SkScalerContext has a limit of 65536 maximum dimension.
1933 // reductionFactor will always be < 1 because
1934 // maxDimension > kMaxBilerpAtlasDimension, and because maxDimension will always
1935 // be an integer the reduction factor will always be at most 254 / 255.
1936 SkScalar reductionFactor = kMaxBilerpAtlasDimension / maxDimension;
1937 creationMatrix.postScale(reductionFactor, reductionFactor);
1938 }
1939
1940 // Draw using the creationMatrix.
1942 runFont, runPaint, deviceProps, scalerContextFlags, creationMatrix);
1943
1944 sk_sp<StrikeForGPU> strike = strikeSpec.findOrCreateScopedStrike(strikeCache);
1945
1946 auto acceptedBuffer =
1947 SkMakeZip(acceptedPackedGlyphIDs, acceptedPositions, acceptedFormats);
1948 auto [accepted, rejected, creationBounds] =
1950 strike.get(), creationMatrix, source, acceptedBuffer, rejectedBuffer);
1951 source = rejected;
1952
1953 if (creationBehavior == kAddSubRuns && !accepted.empty()) {
1954
1955 auto addGlyphsWithSameFormat =
1956 [&, bounds = creationBounds](
1959 container->fSubRuns.append(
1961 container->initialPosition(),
1962 strike->strikePromise(),
1963 creationMatrix,
1964 bounds,
1965 format,
1966 alloc));
1967 };
1968 add_multi_mask_format(addGlyphsWithSameFormat, accepted);
1969 }
1970 }
1971 }
1972
1973 return container;
1974}
uint16_t glyphs[5]
Definition: FontMgrTest.cpp:46
static bool SkIsFinite(T x, Pack... values)
static bool SkScalarNearlyZero(SkScalar x, SkScalar tolerance=SK_ScalarNearlyZero)
Definition: SkScalar.h:101
#define SkScalarSqrt(x)
Definition: SkScalar.h:42
SkScalerContextFlags
constexpr auto SkMakeZip(Ts &&... ts)
Definition: SkZip.h:212
bool empty() const
Definition: SkBitmap.h:210
static SkScalar ApproximateTransformedTextSize(const SkFont &font, const SkMatrix &matrix, const SkPoint &textLocation)
Definition: SkFont.cpp:366
Definition: SkFont.h:35
static constexpr uint16_t kSkSideTooBigForAtlas
Definition: SkGlyph.h:333
static SkScalar DifferentialAreaScale(const SkMatrix &m, const SkPoint &p)
Definition: SkMatrix.cpp:1786
static SkMatrix Scale(SkScalar sx, SkScalar sy)
Definition: SkMatrix.h:75
SkMatrix & postScale(SkScalar sx, SkScalar sy, SkScalar px, SkScalar py)
Definition: SkMatrix.cpp:360
bool hasPerspective() const
Definition: SkMatrix.h:312
Style getStyle() const
Definition: SkPaint.h:204
@ kStroke_Style
set to stroke geometry
Definition: SkPaint.h:194
SkScalar getStrokeWidth() const
Definition: SkPaint.h:300
sk_sp< sktext::StrikeForGPU > findOrCreateScopedStrike(sktext::StrikeForGPUCacheInterface *cache) const
static SkStrikeSpec MakeTransformMask(const SkFont &font, const SkPaint &paint, const SkSurfaceProps &surfaceProps, SkScalerContextFlags scalerContextFlags, const SkMatrix &deviceMatrix)
static SkStrikeSpec MakeMask(const SkFont &font, const SkPaint &paint, const SkSurfaceProps &surfaceProps, SkScalerContextFlags scalerContextFlags, const SkMatrix &deviceMatrix)
static std::tuple< SkStrikeSpec, SkScalar > MakePath(const SkFont &font, const SkPaint &paint, const SkSurfaceProps &surfaceProps, SkScalerContextFlags scalerContextFlags)
Definition: SkZip.h:25
T * get() const
Definition: SkRefCnt.h:303
void resize(size_t count)
Definition: SkTArray.h:423
SkRect sourceBounds() const
Definition: GlyphRun.h:115
size_t maxGlyphRunSize() const
Definition: GlyphRun.h:97
bool isSDFT(SkScalar approximateDeviceTextSize, const SkPaint &paint, const SkMatrix &matrix) const
Definition: SDFTControl.cpp:69
SkScalar maxSize() const
Definition: SDFTControl.h:54
SkBitmap source
Definition: examples.cpp:28
float SkScalar
Definition: extension.cpp:12
uint32_t uint32_t * format
SK_API sk_sp< SkDocument > Make(SkWStream *dst, const SkSerialProcs *=nullptr, std::function< void(const SkPicture *)> onEndPage=nullptr)
Optional< SkRect > bounds
Definition: SkRecords.h:189
MaskFormat
Definition: AtlasTypes.h:98
std::tuple< SkZip< const SkPackedGlyphID, const SkPoint >, SkZip< SkGlyphID, SkPoint >, SkRect > prepare_for_SDFT_drawing(StrikeForGPU *strike, const SkMatrix &creationMatrix, SkZip< const SkGlyphID, const SkPoint > source, SkZip< SkPackedGlyphID, SkPoint > acceptedBuffer, SkZip< SkGlyphID, SkPoint > rejectedBuffer)
std::tuple< SkZip< const SkGlyphID, const SkPoint >, SkZip< SkGlyphID, SkPoint > > prepare_for_drawable_drawing(StrikeForGPU *strike, SkZip< const SkGlyphID, const SkPoint > source, SkZip< SkGlyphID, SkPoint > acceptedBuffer, SkZip< SkGlyphID, SkPoint > rejectedBuffer)
SkScalar find_maximum_glyph_dimension(StrikeForGPU *strike, SkSpan< const SkGlyphID > glyphs)
std::tuple< SkZip< const SkGlyphID, const SkPoint >, SkZip< SkGlyphID, SkPoint > > prepare_for_path_drawing(StrikeForGPU *strike, SkZip< const SkGlyphID, const SkPoint > source, SkZip< SkGlyphID, SkPoint > acceptedBuffer, SkZip< SkGlyphID, SkPoint > rejectedBuffer)
std::tuple< SkZip< const SkPackedGlyphID, const SkPoint, const SkMask::Format >, SkZip< SkGlyphID, SkPoint >, SkRect > prepare_for_direct_mask_drawing(StrikeForGPU *strike, const SkMatrix &positionMatrix, SkZip< const SkGlyphID, const SkPoint > source, SkZip< SkPackedGlyphID, SkPoint, SkMask::Format > acceptedBuffer, SkZip< SkGlyphID, SkPoint > rejectedBuffer)
std::tuple< SkZip< const SkPackedGlyphID, const SkPoint, const SkMask::Format >, SkZip< SkGlyphID, SkPoint >, SkRect > prepare_for_mask_drawing(StrikeForGPU *strike, const SkMatrix &creationMatrix, SkZip< const SkGlyphID, const SkPoint > source, SkZip< SkPackedGlyphID, SkPoint, SkMask::Format > acceptedBuffer, SkZip< SkGlyphID, SkPoint > rejectedBuffer)
static std::tuple< SkStrikeSpec, SkScalar, sktext::gpu::SDFTMatrixRange > make_sdft_strike_spec(const SkFont &font, const SkPaint &paint, const SkSurfaceProps &surfaceProps, const SkMatrix &deviceMatrix, const SkPoint &textLocation, const sktext::gpu::SDFTControl &control)
constexpr SkPoint center() const
Definition: SkRect.h:792
const SkSurfaceProps fSurfaceProps
Definition: SkDevice.h:80
const SkScalerContextFlags fScalerContextFlags
Definition: SkDevice.h:81
const sktext::gpu::SDFTControl *const fSDFTControl
Definition: SkDevice.h:83

◆ operator=() [1/2]

SubRunContainer & sktext::gpu::SubRunContainer::operator= ( const SubRunContainer )
delete

◆ operator=() [2/2]

SubRunContainer & sktext::gpu::SubRunContainer::operator= ( SubRunContainer &&  )
delete

Friends And Related Function Documentation

◆ TextBlobTools

friend class TextBlobTools
friend

Definition at line 246 of file SubRunContainer.h.


The documentation for this class was generated from the following files: