Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Friends | List of all members
SkScalerContext Class Referenceabstract

#include <SkScalerContext.h>

Inheritance diagram for SkScalerContext:
RandomScalerContext SkFontationsScalerContext SkScalerContextProxy SkScalerContext_DW SkScalerContext_FreeType SkTestScalerContext SkUserScalerContext

Classes

struct  GlyphMetrics
 

Public Types

enum  Flags {
  kFrameAndFill_Flag = 0x0001 , kUnused = 0x0002 , kEmbeddedBitmapText_Flag = 0x0004 , kEmbolden_Flag = 0x0008 ,
  kSubpixelPositioning_Flag = 0x0010 , kForceAutohinting_Flag = 0x0020 , kHinting_Shift = 7 , kHintingBit1_Flag = 0x0080 ,
  kHintingBit2_Flag = 0x0100 , kLCD_Vertical_Flag = 0x0200 , kLCD_BGROrder_Flag = 0x0400 , kGenA8FromLCD_Flag = 0x0800 ,
  kLinearMetrics_Flag = 0x1000 , kBaselineSnap_Flag = 0x2000 , kNeedsForegroundColor_Flag = 0x4000
}
 
enum  { kHinting_Mask = kHintingBit1_Flag | kHintingBit2_Flag }
 

Public Member Functions

 SkScalerContext (sk_sp< SkTypeface >, const SkScalerContextEffects &, const SkDescriptor *)
 
virtual ~SkScalerContext ()
 
SkTypefacegetTypeface () const
 
SkMask::Format getMaskFormat () const
 
bool isSubpixel () const
 
bool isLinearMetrics () const
 
bool isVertical () const
 
SkGlyph makeGlyph (SkPackedGlyphID, SkArenaAlloc *)
 
void getImage (const SkGlyph &)
 
void getPath (SkGlyph &, SkArenaAlloc *)
 
sk_sp< SkDrawablegetDrawable (SkGlyph &)
 
void getFontMetrics (SkFontMetrics *)
 
const SkScalerContextRecgetRec () const
 
SkScalerContextEffects getEffects () const
 
SkAxisAlignment computeAxisAlignmentForHText () const
 

Static Public Member Functions

static size_t GetGammaLUTSize (SkScalar contrast, SkScalar paintGamma, SkScalar deviceGamma, int *width, int *height)
 
static bool GetGammaLUTData (SkScalar contrast, SkScalar paintGamma, SkScalar deviceGamma, uint8_t *data)
 
static void MakeRecAndEffects (const SkFont &font, const SkPaint &paint, const SkSurfaceProps &surfaceProps, SkScalerContextFlags scalerContextFlags, const SkMatrix &deviceMatrix, SkScalerContextRec *rec, SkScalerContextEffects *effects)
 
static void MakeRecAndEffectsFromFont (const SkFont &font, SkScalerContextRec *rec, SkScalerContextEffects *effects)
 
static std::unique_ptr< SkScalerContextMakeEmpty (sk_sp< SkTypeface > typeface, const SkScalerContextEffects &effects, const SkDescriptor *desc)
 
static SkDescriptorAutoDescriptorGivenRecAndEffects (const SkScalerContextRec &rec, const SkScalerContextEffects &effects, SkAutoDescriptor *ad)
 
static std::unique_ptr< SkDescriptorDescriptorGivenRecAndEffects (const SkScalerContextRec &rec, const SkScalerContextEffects &effects)
 
static void DescriptorBufferGiveRec (const SkScalerContextRec &rec, void *buffer)
 
static bool CheckBufferSizeForRec (const SkScalerContextRec &rec, const SkScalerContextEffects &effects, size_t size)
 
static SkMaskGamma::PreBlend GetMaskPreBlend (const SkScalerContextRec &rec)
 
static SkDescriptorCreateDescriptorAndEffectsUsingPaint (const SkFont &, const SkPaint &, const SkSurfaceProps &, SkScalerContextFlags scalerContextFlags, const SkMatrix &deviceMatrix, SkAutoDescriptor *ad, SkScalerContextEffects *effects)
 

Protected Member Functions

virtual GlyphMetrics generateMetrics (const SkGlyph &, SkArenaAlloc *)=0
 
virtual void generateImage (const SkGlyph &glyph, void *imageBuffer)=0
 
virtual bool generatePath (const SkGlyph &, SkPath *)=0
 
virtual sk_sp< SkDrawablegenerateDrawable (const SkGlyph &)
 
virtual void generateFontMetrics (SkFontMetrics *)=0
 
void forceGenerateImageFromPath ()
 
void forceOffGenerateImageFromPath ()
 

Static Protected Member Functions

static void GenerateMetricsFromPath (SkGlyph *glyph, const SkPath &path, SkMask::Format format, bool verticalLCD, bool a8FromLCD, bool hairline)
 
static void SaturateGlyphBounds (SkGlyph *glyph, SkRect &&)
 
static void SaturateGlyphBounds (SkGlyph *glyph, SkIRect const &)
 
static void GenerateImageFromPath (SkMaskBuilder &dst, const SkPath &path, const SkMaskGamma::PreBlend &maskPreBlend, bool doBGR, bool verticalLCD, bool a8FromLCD, bool hairline)
 

Protected Attributes

SkScalerContextRec fRec
 
const SkMaskGamma::PreBlend fPreBlend
 

Friends

class PathText
 
class PathTextBench
 
class RandomScalerContext
 

Detailed Description

Definition at line 249 of file SkScalerContext.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
kHinting_Mask 

Definition at line 280 of file SkScalerContext.h.

◆ Flags

Enumerator
kFrameAndFill_Flag 
kUnused 
kEmbeddedBitmapText_Flag 
kEmbolden_Flag 
kSubpixelPositioning_Flag 
kForceAutohinting_Flag 
kHinting_Shift 
kHintingBit1_Flag 
kHintingBit2_Flag 
kLCD_Vertical_Flag 
kLCD_BGROrder_Flag 
kGenA8FromLCD_Flag 
kLinearMetrics_Flag 
kBaselineSnap_Flag 
kNeedsForegroundColor_Flag 

Definition at line 251 of file SkScalerContext.h.

251 {
252 kFrameAndFill_Flag = 0x0001,
253 kUnused = 0x0002,
255 kEmbolden_Flag = 0x0008,
257 kForceAutohinting_Flag = 0x0020, // Use auto instead of bytcode hinting if hinting.
258
259 // together, these two flags resulting in a two bit value which matches
260 // up with the SkPaint::Hinting enum.
261 kHinting_Shift = 7, // to shift into the other flags above
262 kHintingBit1_Flag = 0x0080,
263 kHintingBit2_Flag = 0x0100,
264
265 // Pixel geometry information.
266 // only meaningful if fMaskFormat is kLCD16
267 kLCD_Vertical_Flag = 0x0200, // else Horizontal
268 kLCD_BGROrder_Flag = 0x0400, // else RGB order
269
270 // Generate A8 from LCD source (for GDI and CoreGraphics).
271 // only meaningful if fMaskFormat is kA8
272 kGenA8FromLCD_Flag = 0x0800, // could be 0x200 (bit meaning dependent on fMaskFormat)
273 kLinearMetrics_Flag = 0x1000,
274 kBaselineSnap_Flag = 0x2000,
275
277 };

Constructor & Destructor Documentation

◆ SkScalerContext()

SkScalerContext::SkScalerContext ( sk_sp< SkTypeface typeface,
const SkScalerContextEffects effects,
const SkDescriptor desc 
)

Definition at line 88 of file SkScalerContext.cpp.

90 : fRec(PreprocessRec(*typeface, effects, *desc))
91 , fTypeface(std::move(typeface))
92 , fPathEffect(sk_ref_sp(effects.fPathEffect))
93 , fMaskFilter(sk_ref_sp(effects.fMaskFilter))
94 // Initialize based on our settings. Subclasses can also force this.
95 , fGenerateImageFromPath(fRec.fFrameWidth >= 0 || fPathEffect != nullptr)
96
98{
99 if constexpr (kSkScalerContextDumpRec) {
100 SkDebugf("SkScalerContext checksum %x count %u length %u\n",
101 desc->getChecksum(), desc->getCount(), desc->getLength());
102 SkDebugf("%s", fRec.dump().c_str());
103 SkDebugf(" effects %p\n", desc->findEntry(kEffects_SkDescriptorTag, nullptr));
104 }
105}
void SK_SPI SkDebugf(const char format[],...) SK_PRINTF_LIKE(1
sk_sp< T > sk_ref_sp(T *obj)
Definition SkRefCnt.h:381
#define kEffects_SkDescriptorTag
SkScalerContextRec fRec
const SkMaskGamma::PreBlend fPreBlend
static SkMaskGamma::PreBlend GetMaskPreBlend(const SkScalerContextRec &rec)
const char * c_str() const
Definition SkString.h:133
SkString dump() const

◆ ~SkScalerContext()

SkScalerContext::~SkScalerContext ( )
virtual

Definition at line 107 of file SkScalerContext.cpp.

107{}

Member Function Documentation

◆ AutoDescriptorGivenRecAndEffects()

SkDescriptor * SkScalerContext::AutoDescriptorGivenRecAndEffects ( const SkScalerContextRec rec,
const SkScalerContextEffects effects,
SkAutoDescriptor ad 
)
static

Definition at line 1236 of file SkScalerContext.cpp.

1240{
1241 SkBinaryWriteBuffer buf({});
1242
1243 ad->reset(calculate_size_and_flatten(rec, effects, &buf));
1244 generate_descriptor(rec, buf, ad->getDesc());
1245
1246 return ad->getDesc();
1247}
static void generate_descriptor(const SkScalerContextRec &rec, const SkBinaryWriteBuffer &effectBuffer, SkDescriptor *desc)
static size_t calculate_size_and_flatten(const SkScalerContextRec &rec, const SkScalerContextEffects &effects, SkBinaryWriteBuffer *effectBuffer)
SkDescriptor * getDesc() const
void reset(size_t size)

◆ CheckBufferSizeForRec()

bool SkScalerContext::CheckBufferSizeForRec ( const SkScalerContextRec rec,
const SkScalerContextEffects effects,
size_t  size 
)
static

Definition at line 1265 of file SkScalerContext.cpp.

1267 {
1268 SkBinaryWriteBuffer buf({});
1269 return size >= calculate_size_and_flatten(rec, effects, &buf);
1270}
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size
Definition switches.h:259

◆ computeAxisAlignmentForHText()

SkAxisAlignment SkScalerContext::computeAxisAlignmentForHText ( ) const

Return the axis (if any) that the baseline for horizontal text should land on. As an example, the identity matrix will return SkAxisAlignment::kX.

Definition at line 969 of file SkScalerContext.cpp.

969 {
971}
SkAxisAlignment computeAxisAlignmentForHText() const

◆ CreateDescriptorAndEffectsUsingPaint()

SkDescriptor * SkScalerContext::CreateDescriptorAndEffectsUsingPaint ( const SkFont font,
const SkPaint paint,
const SkSurfaceProps surfaceProps,
SkScalerContextFlags  scalerContextFlags,
const SkMatrix deviceMatrix,
SkAutoDescriptor ad,
SkScalerContextEffects effects 
)
static

Definition at line 1195 of file SkScalerContext.cpp.

1199{
1201 MakeRecAndEffects(font, paint, surfaceProps, scalerContextFlags, deviceMatrix, &rec, effects);
1202 return AutoDescriptorGivenRecAndEffects(rec, *effects, ad);
1203}
static void MakeRecAndEffects(const SkFont &font, const SkPaint &paint, const SkSurfaceProps &surfaceProps, SkScalerContextFlags scalerContextFlags, const SkMatrix &deviceMatrix, SkScalerContextRec *rec, SkScalerContextEffects *effects)
static SkDescriptor * AutoDescriptorGivenRecAndEffects(const SkScalerContextRec &rec, const SkScalerContextEffects &effects, SkAutoDescriptor *ad)
const Paint & paint

◆ DescriptorBufferGiveRec()

void SkScalerContext::DescriptorBufferGiveRec ( const SkScalerContextRec rec,
void *  buffer 
)
static

Definition at line 1261 of file SkScalerContext.cpp.

1261 {
1263}
static const uint8_t buffer[]

◆ DescriptorGivenRecAndEffects()

std::unique_ptr< SkDescriptor > SkScalerContext::DescriptorGivenRecAndEffects ( const SkScalerContextRec rec,
const SkScalerContextEffects effects 
)
static

Definition at line 1249 of file SkScalerContext.cpp.

1252{
1253 SkBinaryWriteBuffer buf({});
1254
1255 auto desc = SkDescriptor::Alloc(calculate_size_and_flatten(rec, effects, &buf));
1256 generate_descriptor(rec, buf, desc.get());
1257
1258 return desc;
1259}
static std::unique_ptr< SkDescriptor > Alloc(size_t length)

◆ forceGenerateImageFromPath()

void SkScalerContext::forceGenerateImageFromPath ( )
inlineprotected

Definition at line 441 of file SkScalerContext.h.

441{ fGenerateImageFromPath = true; }

◆ forceOffGenerateImageFromPath()

void SkScalerContext::forceOffGenerateImageFromPath ( )
inlineprotected

Definition at line 442 of file SkScalerContext.h.

442{ fGenerateImageFromPath = false; }

◆ generateDrawable()

sk_sp< SkDrawable > SkScalerContext::generateDrawable ( const SkGlyph )
protectedvirtual

Returns the drawable for the glyph (if any).

The generated drawable will be lifetime scoped to the lifetime of this scaler context. This means the drawable may refer to the scaler context and associated font data.

The drawable does not need to be flattenable (e.g. implement getFactory and getTypeName). Any necessary serialization will be done with makePictureSnapshot.

Reimplemented in SkScalerContextProxy, SkScalerContext_FreeType, SkScalerContext_DW, RandomScalerContext, SkFontationsScalerContext, and SkUserScalerContext.

Definition at line 744 of file SkScalerContext.cpp.

744 {
745 return nullptr;
746}

◆ generateFontMetrics()

virtual void SkScalerContext::generateFontMetrics ( SkFontMetrics )
protectedpure virtual

◆ generateImage()

virtual void SkScalerContext::generateImage ( const SkGlyph glyph,
void *  imageBuffer 
)
protectedpure virtual

Generates the contents of glyph.fImage. When called, glyph.fImage will be pointing to a pre-allocated, uninitialized region of memory of size glyph.imageSize(). This method may not change glyph.fMaskFormat.

Because glyph.imageSize() will determine the size of fImage, generateMetrics will be called before generateImage.

Implemented in SkScalerContextProxy, SkScalerContext_FreeType, RandomScalerContext, SkTestScalerContext, SkScalerContext_DW, SkFontationsScalerContext, and SkUserScalerContext.

◆ GenerateImageFromPath()

void SkScalerContext::GenerateImageFromPath ( SkMaskBuilder dst,
const SkPath path,
const SkMaskGamma::PreBlend maskPreBlend,
bool  doBGR,
bool  verticalLCD,
bool  a8FromLCD,
bool  hairline 
)
staticprotected

Definition at line 490 of file SkScalerContext.cpp.

493{
494 SkASSERT(dstMask.fFormat == SkMask::kBW_Format ||
495 dstMask.fFormat == SkMask::kA8_Format ||
496 dstMask.fFormat == SkMask::kLCD16_Format);
497
500 const SkPath* pathToUse = &path;
501
502 int srcW = dstMask.fBounds.width();
503 int srcH = dstMask.fBounds.height();
504 int dstW = srcW;
505 int dstH = srcH;
506
508 matrix.setTranslate(-SkIntToScalar(dstMask.fBounds.fLeft),
509 -SkIntToScalar(dstMask.fBounds.fTop));
510
511 paint.setStroke(hairline);
512 paint.setAntiAlias(SkMask::kBW_Format != dstMask.fFormat);
513
514 const bool fromLCD = (dstMask.fFormat == SkMask::kLCD16_Format) ||
515 (dstMask.fFormat == SkMask::kA8_Format && a8FromLCD);
516 const bool intermediateDst = fromLCD || dstMask.fFormat == SkMask::kBW_Format;
517 if (fromLCD) {
518 if (verticalLCD) {
519 dstW = 4*dstH - 8;
520 dstH = srcW;
521 matrix.setAll(0, 4, -SkIntToScalar(dstMask.fBounds.fTop + 1) * 4,
522 1, 0, -SkIntToScalar(dstMask.fBounds.fLeft),
523 0, 0, 1);
524 } else {
525 dstW = 4*dstW - 8;
526 matrix.setAll(4, 0, -SkIntToScalar(dstMask.fBounds.fLeft + 1) * 4,
527 0, 1, -SkIntToScalar(dstMask.fBounds.fTop),
528 0, 0, 1);
529 }
530
531 // LCD hairline doesn't line up with the pixels, so do it the expensive way.
533 if (hairline) {
534 rec.setStrokeStyle(1.0f, false);
535 rec.setStrokeParams(SkPaint::kButt_Cap, SkPaint::kRound_Join, 0.0f);
536 }
537 if (rec.needToApply() && rec.applyToPath(&strokePath, path)) {
538 pathToUse = &strokePath;
539 paint.setStyle(SkPaint::kFill_Style);
540 }
541 }
542
544 clip.setRect(SkIRect::MakeWH(dstW, dstH));
545
546 const SkImageInfo info = SkImageInfo::MakeA8(dstW, dstH);
548
549 if (intermediateDst) {
550 if (!dst.tryAlloc(info)) {
551 // can't allocate offscreen, so empty the mask and return
552 sk_bzero(dstMask.image(), dstMask.computeImageSize());
553 return;
554 }
555 } else {
556 dst.reset(info, dstMask.image(), dstMask.fRowBytes);
557 }
558 sk_bzero(dst.writable_addr(), dst.computeByteSize());
559
562 draw.fDst = dst;
563 draw.fRC = &clip;
564 draw.fCTM = &matrix;
565 draw.drawPath(*pathToUse, paint);
566
567 switch (dstMask.fFormat) {
569 packA8ToA1(dstMask, dst.addr8(0, 0), dst.rowBytes());
570 break;
572 if (fromLCD) {
573 pack4xHToMask(dst, dstMask, maskPreBlend, doBGR, verticalLCD);
574 } else if (maskPreBlend.isApplicable()) {
575 applyLUTToA8Mask(dstMask, maskPreBlend.fG);
576 }
577 break;
579 pack4xHToMask(dst, dstMask, maskPreBlend, doBGR, verticalLCD);
580 break;
581 default:
582 break;
583 }
584}
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
Definition DM.cpp:213
#define SkASSERT(cond)
Definition SkAssert.h:116
SkBlitter * SkA8Blitter_Choose(const SkPixmap &dst, const SkMatrix &ctm, const SkPaint &paint, SkArenaAlloc *alloc, bool drawCoverage, sk_sp< SkShader > clipShader, const SkSurfaceProps &)
static void sk_bzero(void *buffer, size_t size)
Definition SkMalloc.h:105
static SkPath clip(const SkPath &path, const SkHalfPlane &plane)
Definition SkPath.cpp:3824
#define SkIntToScalar(x)
Definition SkScalar.h:57
static void applyLUTToA8Mask(SkMaskBuilder &mask, const uint8_t *lut)
static void pack4xHToMask(const SkPixmap &src, SkMaskBuilder &dst, const SkMaskGamma::PreBlend &maskPreBlend, const bool doBGR, const bool doVert)
static void packA8ToA1(SkMaskBuilder &dstMask, const uint8_t *src, size_t srcRB)
static void draw(SkCanvas *canvas, SkRect &target, int x, int y)
Definition aaclip.cpp:27
BlitterChooser * fBlitterChooser
Definition SkDrawBase.h:152
@ kButt_Cap
no stroke extension
Definition SkPaint.h:334
@ kFill_Style
set to fill geometry
Definition SkPaint.h:193
@ kRound_Join
adds circle
Definition SkPaint.h:360
const uint8_t * fG
bool isApplicable() const
static void strokePath(SkCanvas *canvas, const SkPath &path)
unsigned useCenter Optional< SkMatrix > matrix
Definition SkRecords.h:258
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
Definition switches.h:57
dst
Definition cp.py:12
static constexpr SkIRect MakeWH(int32_t w, int32_t h)
Definition SkRect.h:56
static SkImageInfo MakeA8(int width, int height)
@ kA8_Format
8bits per pixel mask (e.g. antialiasing)
Definition SkMask.h:28
@ kLCD16_Format
565 alpha for r/g/b
Definition SkMask.h:31
@ kBW_Format
1bit per pixel mask (e.g. monochrome)
Definition SkMask.h:27

◆ generateMetrics()

virtual GlyphMetrics SkScalerContext::generateMetrics ( const SkGlyph ,
SkArenaAlloc  
)
protectedpure virtual

◆ GenerateMetricsFromPath()

void SkScalerContext::GenerateMetricsFromPath ( SkGlyph glyph,
const SkPath path,
SkMask::Format  format,
bool  verticalLCD,
bool  a8FromLCD,
bool  hairline 
)
staticprotected

Definition at line 218 of file SkScalerContext.cpp.

221{
222 // Only BW, A8, and LCD16 can be produced from paths.
223 if (glyph->fMaskFormat != SkMask::kBW_Format &&
224 glyph->fMaskFormat != SkMask::kA8_Format &&
225 glyph->fMaskFormat != SkMask::kLCD16_Format)
226 {
227 glyph->fMaskFormat = SkMask::kA8_Format;
228 }
229
230 SkRect bounds = devPath.getBounds();
231 if (!bounds.isEmpty()) {
232 const bool fromLCD = (glyph->fMaskFormat == SkMask::kLCD16_Format) ||
233 (glyph->fMaskFormat == SkMask::kA8_Format && a8FromLCD);
234
235 const bool needExtraWidth = (fromLCD && !verticalLCD) || hairline;
236 const bool needExtraHeight = (fromLCD && verticalLCD) || hairline;
237 if (needExtraWidth) {
238 bounds.roundOut(&bounds);
239 bounds.outset(1, 0);
240 }
241 if (needExtraHeight) {
242 bounds.roundOut(&bounds);
243 bounds.outset(0, 1);
244 }
245 }
246 SaturateGlyphBounds(glyph, std::move(bounds));
247}
static void SaturateGlyphBounds(SkGlyph *glyph, SkRect &&)
Optional< SkRect > bounds
Definition SkRecords.h:189

◆ generatePath()

virtual bool SkScalerContext::generatePath ( const SkGlyph ,
SkPath  
)
protectedpure virtual

Sets the passed path to the glyph outline. If this cannot be done the path is set to empty; Does not apply subpixel positioning to the path.

Returns
false if this glyph does not have any path.

Implemented in SkScalerContext_DW, RandomScalerContext, SkScalerContextProxy, SkScalerContext_FreeType, SkFontationsScalerContext, SkUserScalerContext, and SkTestScalerContext.

◆ getDrawable()

sk_sp< SkDrawable > SkScalerContext::getDrawable ( SkGlyph glyph)

Definition at line 740 of file SkScalerContext.cpp.

740 {
741 return this->generateDrawable(glyph);
742}
virtual sk_sp< SkDrawable > generateDrawable(const SkGlyph &)

◆ getEffects()

SkScalerContextEffects SkScalerContext::getEffects ( ) const
inline

Definition at line 362 of file SkScalerContext.h.

362 {
363 return { fPathEffect.get(), fMaskFilter.get() };
364 }
T * get() const
Definition SkRefCnt.h:303

◆ getFontMetrics()

void SkScalerContext::getFontMetrics ( SkFontMetrics fm)

Definition at line 748 of file SkScalerContext.cpp.

748 {
749 SkASSERT(fm);
750 this->generateFontMetrics(fm);
751}
virtual void generateFontMetrics(SkFontMetrics *)=0

◆ GetGammaLUTData()

bool SkScalerContext::GetGammaLUTData ( SkScalar  contrast,
SkScalar  paintGamma,
SkScalar  deviceGamma,
uint8_t *  data 
)
static

Get the associated gamma lookup table. The 'data' pointer must point to pre-allocated memory, with size in bytes greater than or equal to the return value of getGammaLUTSize().

If the lookup table hasn't been initialized (e.g., it's linear), this will return false.

Definition at line 175 of file SkScalerContext.cpp.

176 {
178 const SkMaskGamma& maskGamma = cached_mask_gamma(contrast,
179 paintGamma,
180 deviceGamma);
181 const uint8_t* gammaTables = maskGamma.getGammaTables();
182 if (!gammaTables) {
183 return false;
184 }
185
186 int width, height;
188 size_t size = width*height * sizeof(uint8_t);
189 memcpy(data, gammaTables, size);
190 return true;
191}
static const SkMaskGamma & cached_mask_gamma(SkScalar contrast, SkScalar paintGamma, SkScalar deviceGamma)
static SkMutex & mask_gamma_cache_mutex()
void getGammaTableDimensions(int *tableWidth, int *numTables) const
const uint8_t * getGammaTables() const
int32_t height
int32_t width

◆ GetGammaLUTSize()

size_t SkScalerContext::GetGammaLUTSize ( SkScalar  contrast,
SkScalar  paintGamma,
SkScalar  deviceGamma,
int width,
int height 
)
static

Return the size in bytes of the associated gamma lookup table

Definition at line 162 of file SkScalerContext.cpp.

163 {
165 const SkMaskGamma& maskGamma = cached_mask_gamma(contrast,
166 paintGamma,
167 deviceGamma);
168
170 size_t size = (*width)*(*height)*sizeof(uint8_t);
171
172 return size;
173}

◆ getImage()

void SkScalerContext::getImage ( const SkGlyph origGlyph)

Definition at line 586 of file SkScalerContext.cpp.

586 {
587 SkASSERT(origGlyph.fAdvancesBoundsFormatAndInitialPathDone);
588
589 const SkGlyph* unfilteredGlyph = &origGlyph;
590 // in case we need to call generateImage on a mask-format that is different
591 // (i.e. larger) than what our caller allocated by looking at origGlyph.
592 SkAutoMalloc tmpGlyphImageStorage;
593 SkGlyph tmpGlyph;
594 SkSTArenaAlloc<sizeof(SkGlyph::PathData)> tmpGlyphPathDataStorage;
595 if (fMaskFilter) {
596 // need the original bounds, sans our maskfilter
597 sk_sp<SkMaskFilter> mf = std::move(fMaskFilter);
598 tmpGlyph = this->makeGlyph(origGlyph.getPackedID(), &tmpGlyphPathDataStorage);
599 fMaskFilter = std::move(mf);
600
601 // Use the origGlyph storage for the temporary unfiltered mask if it will fit.
602 if (tmpGlyph.fMaskFormat == origGlyph.fMaskFormat &&
603 tmpGlyph.imageSize() <= origGlyph.imageSize())
604 {
605 tmpGlyph.fImage = origGlyph.fImage;
606 } else {
607 tmpGlyphImageStorage.reset(tmpGlyph.imageSize());
608 tmpGlyph.fImage = tmpGlyphImageStorage.get();
609 }
610 unfilteredGlyph = &tmpGlyph;
611 }
612
613 if (!fGenerateImageFromPath) {
614 generateImage(*unfilteredGlyph, unfilteredGlyph->fImage);
615 } else {
616 SkASSERT(origGlyph.setPathHasBeenCalled());
617 const SkPath* devPath = origGlyph.path();
618
619 if (!devPath) {
620 generateImage(*unfilteredGlyph, unfilteredGlyph->fImage);
621 } else {
622 SkMaskBuilder mask(static_cast<uint8_t*>(unfilteredGlyph->fImage),
623 unfilteredGlyph->iRect(), unfilteredGlyph->rowBytes(),
624 unfilteredGlyph->maskFormat());
625 SkASSERT(SkMask::kARGB32_Format != origGlyph.fMaskFormat);
626 SkASSERT(SkMask::kARGB32_Format != mask.fFormat);
630 const bool hairline = origGlyph.pathIsHairline();
631 GenerateImageFromPath(mask, *devPath, fPreBlend, doBGR, doVert, a8LCD, hairline);
632 }
633 }
634
635 if (fMaskFilter) {
636 // k3D_Format should not be mask filtered.
637 SkASSERT(SkMask::k3D_Format != unfilteredGlyph->fMaskFormat);
638
639 SkMaskBuilder srcMask;
640 SkAutoMaskFreeImage srcMaskOwnedImage(nullptr);
641 SkMatrix m;
643
644 if (as_MFB(fMaskFilter)->filterMask(&srcMask, unfilteredGlyph->mask(), m, nullptr)) {
645 // Filter succeeded; srcMask.fImage was allocated.
646 srcMaskOwnedImage.reset(srcMask.image());
647 } else if (unfilteredGlyph->fImage == tmpGlyphImageStorage.get()) {
648 // Filter did nothing; unfiltered mask is independent of origGlyph.fImage.
649 srcMask = SkMaskBuilder(static_cast<uint8_t*>(unfilteredGlyph->fImage),
650 unfilteredGlyph->iRect(), unfilteredGlyph->rowBytes(),
651 unfilteredGlyph->maskFormat());
652 } else if (origGlyph.iRect() == unfilteredGlyph->iRect()) {
653 // Filter did nothing; the unfiltered mask is in origGlyph.fImage and matches.
654 return;
655 } else {
656 // Filter did nothing; the unfiltered mask is in origGlyph.fImage and conflicts.
657 srcMask = SkMaskBuilder(static_cast<uint8_t*>(unfilteredGlyph->fImage),
658 unfilteredGlyph->iRect(), unfilteredGlyph->rowBytes(),
659 unfilteredGlyph->maskFormat());
660 size_t imageSize = unfilteredGlyph->imageSize();
661 tmpGlyphImageStorage.reset(imageSize);
662 srcMask.image() = static_cast<uint8_t*>(tmpGlyphImageStorage.get());
663 memcpy(srcMask.image(), unfilteredGlyph->fImage, imageSize);
664 }
665
666 SkASSERT_RELEASE(srcMask.fFormat == origGlyph.fMaskFormat);
667 SkMaskBuilder dstMask = SkMaskBuilder(static_cast<uint8_t*>(origGlyph.fImage),
668 origGlyph.iRect(), origGlyph.rowBytes(),
669 origGlyph.maskFormat());
670 SkIRect origBounds = dstMask.fBounds;
671
672 // Find the intersection of src and dst while updating the fImages.
673 if (srcMask.fBounds.fTop < dstMask.fBounds.fTop) {
674 int32_t topDiff = dstMask.fBounds.fTop - srcMask.fBounds.fTop;
675 srcMask.image() += srcMask.fRowBytes * topDiff;
676 srcMask.bounds().fTop = dstMask.fBounds.fTop;
677 }
678 if (dstMask.fBounds.fTop < srcMask.fBounds.fTop) {
679 int32_t topDiff = srcMask.fBounds.fTop - dstMask.fBounds.fTop;
680 dstMask.image() += dstMask.fRowBytes * topDiff;
681 dstMask.bounds().fTop = srcMask.fBounds.fTop;
682 }
683
684 if (srcMask.fBounds.fLeft < dstMask.fBounds.fLeft) {
685 int32_t leftDiff = dstMask.fBounds.fLeft - srcMask.fBounds.fLeft;
686 srcMask.image() += leftDiff;
687 srcMask.bounds().fLeft = dstMask.fBounds.fLeft;
688 }
689 if (dstMask.fBounds.fLeft < srcMask.fBounds.fLeft) {
690 int32_t leftDiff = srcMask.fBounds.fLeft - dstMask.fBounds.fLeft;
691 dstMask.image() += leftDiff;
692 dstMask.bounds().fLeft = srcMask.fBounds.fLeft;
693 }
694
695 if (srcMask.fBounds.fBottom < dstMask.fBounds.fBottom) {
696 dstMask.bounds().fBottom = srcMask.fBounds.fBottom;
697 }
698 if (dstMask.fBounds.fBottom < srcMask.fBounds.fBottom) {
699 srcMask.bounds().fBottom = dstMask.fBounds.fBottom;
700 }
701
702 if (srcMask.fBounds.fRight < dstMask.fBounds.fRight) {
703 dstMask.bounds().fRight = srcMask.fBounds.fRight;
704 }
705 if (dstMask.fBounds.fRight < srcMask.fBounds.fRight) {
706 srcMask.bounds().fRight = dstMask.fBounds.fRight;
707 }
708
709 SkASSERT(srcMask.fBounds == dstMask.fBounds);
710 int width = srcMask.fBounds.width();
711 int height = srcMask.fBounds.height();
712 int dstRB = dstMask.fRowBytes;
713 int srcRB = srcMask.fRowBytes;
714
715 const uint8_t* src = srcMask.fImage;
716 uint8_t* dst = dstMask.image();
717
718 if (SkMask::k3D_Format == srcMask.fFormat) {
719 // we have to copy 3 times as much
720 height *= 3;
721 }
722
723 // If not filling the full original glyph, clear it out first.
724 if (dstMask.fBounds != origBounds) {
725 sk_bzero(origGlyph.fImage, origGlyph.fHeight * origGlyph.rowBytes());
726 }
727
728 while (--height >= 0) {
729 memcpy(dst, src, width);
730 src += srcRB;
731 dst += dstRB;
732 }
733 }
734}
#define SkASSERT_RELEASE(cond)
Definition SkAssert.h:100
SkMaskFilterBase * as_MFB(SkMaskFilter *mf)
std::unique_ptr< uint8_t, SkFunctionObject< SkMaskBuilder::FreeImage > > SkAutoMaskFreeImage
Definition SkMask.h:316
static constexpr bool SkToBool(const T &x)
Definition SkTo.h:35
void * reset(size_t size=0, OnShrink shrink=kAlloc_OnShrink)
void * get()
bool setPathHasBeenCalled() const
Definition SkGlyph.h:486
size_t rowBytes() const
Definition SkGlyph.cpp:233
size_t imageSize() const
Definition SkGlyph.cpp:241
SkMask mask() const
Definition SkGlyph.cpp:125
const SkPath * path() const
Definition SkGlyph.cpp:284
SkMask::Format maskFormat() const
Definition SkGlyph.h:500
bool pathIsHairline() const
Definition SkGlyph.cpp:293
SkIRect iRect() const
Definition SkGlyph.h:505
SkPackedGlyphID getPackedID() const
Definition SkGlyph.h:430
virtual void generateImage(const SkGlyph &glyph, void *imageBuffer)=0
static void GenerateImageFromPath(SkMaskBuilder &dst, const SkPath &path, const SkMaskGamma::PreBlend &maskPreBlend, bool doBGR, bool verticalLCD, bool a8FromLCD, bool hairline)
SkGlyph makeGlyph(SkPackedGlyphID, SkArenaAlloc *)
int32_t fBottom
larger y-axis bounds
Definition SkRect.h:36
constexpr int32_t height() const
Definition SkRect.h:165
int32_t fTop
smaller y-axis bounds
Definition SkRect.h:34
constexpr int32_t width() const
Definition SkRect.h:158
int32_t fLeft
smaller x-axis bounds
Definition SkRect.h:33
int32_t fRight
larger x-axis bounds
Definition SkRect.h:35
SkIRect & bounds()
Definition SkMask.h:237
uint8_t *& image()
Definition SkMask.h:236
const uint32_t fRowBytes
Definition SkMask.h:43
@ k3D_Format
3 8bit per pixl planes: alpha, mul, add
Definition SkMask.h:29
@ kARGB32_Format
SkPMColor.
Definition SkMask.h:30
uint8_t const *const fImage
Definition SkMask.h:41
const SkIRect fBounds
Definition SkMask.h:42
const Format fFormat
Definition SkMask.h:44
void getMatrixFrom2x2(SkMatrix *) const

◆ getMaskFormat()

SkMask::Format SkScalerContext::getMaskFormat ( ) const
inline

Definition at line 289 of file SkScalerContext.h.

289 {
290 return fRec.fMaskFormat;
291 }
SkMask::Format fMaskFormat

◆ GetMaskPreBlend()

SkMaskGamma::PreBlend SkScalerContext::GetMaskPreBlend ( const SkScalerContextRec rec)
static

Expands fDeviceGamma, fPaintGamma, fContrast, and fLumBits into a mask pre-blend.

Definition at line 151 of file SkScalerContext.cpp.

151 {
153
154 const SkMaskGamma& maskGamma = cached_mask_gamma(rec.getContrast(),
155 rec.getPaintGamma(),
156 rec.getDeviceGamma());
157
158 // TODO: remove CanonicalColor when we to fix up Chrome layout tests.
159 return maskGamma.preBlend(rec.getLuminanceColor());
160}
PreBlend preBlend(SkColor color) const
SkScalar getPaintGamma() const
SkScalar getContrast() const
SkScalar getDeviceGamma() const
SkColor getLuminanceColor() const

◆ getPath()

void SkScalerContext::getPath ( SkGlyph glyph,
SkArenaAlloc alloc 
)

Definition at line 736 of file SkScalerContext.cpp.

736 {
737 this->internalGetPath(glyph, alloc);
738}

◆ getRec()

const SkScalerContextRec & SkScalerContext::getRec ( ) const
inline

Definition at line 360 of file SkScalerContext.h.

360{ return fRec; }

◆ getTypeface()

SkTypeface * SkScalerContext::getTypeface ( ) const
inline

Definition at line 287 of file SkScalerContext.h.

287{ return fTypeface.get(); }

◆ isLinearMetrics()

bool SkScalerContext::isLinearMetrics ( ) const
inline

Definition at line 297 of file SkScalerContext.h.

297 {
299 }

◆ isSubpixel()

bool SkScalerContext::isSubpixel ( ) const
inline

Definition at line 293 of file SkScalerContext.h.

293 {
295 }

◆ isVertical()

bool SkScalerContext::isVertical ( ) const
inline

Definition at line 302 of file SkScalerContext.h.

302{ return false; }

◆ MakeEmpty()

std::unique_ptr< SkScalerContext > SkScalerContext::MakeEmpty ( sk_sp< SkTypeface typeface,
const SkScalerContextEffects effects,
const SkDescriptor desc 
)
static

Definition at line 1272 of file SkScalerContext.cpp.

1274 {
1275 class SkScalerContext_Empty : public SkScalerContext {
1276 public:
1277 SkScalerContext_Empty(sk_sp<SkTypeface> typeface, const SkScalerContextEffects& effects,
1278 const SkDescriptor* desc)
1279 : SkScalerContext(std::move(typeface), effects, desc) {}
1280
1281 protected:
1282 GlyphMetrics generateMetrics(const SkGlyph& glyph, SkArenaAlloc*) override {
1283 return {glyph.maskFormat()};
1284 }
1285 void generateImage(const SkGlyph&, void*) override {}
1286 bool generatePath(const SkGlyph& glyph, SkPath* path) override {
1287 path->reset();
1288 return false;
1289 }
1290 void generateFontMetrics(SkFontMetrics* metrics) override {
1291 if (metrics) {
1292 sk_bzero(metrics, sizeof(*metrics));
1293 }
1294 }
1295 };
1296
1297 return std::make_unique<SkScalerContext_Empty>(std::move(typeface), effects, desc);
1298}
Definition ref_ptr.h:256

◆ makeGlyph()

SkGlyph SkScalerContext::makeGlyph ( SkPackedGlyphID  packedID,
SkArenaAlloc alloc 
)

Definition at line 193 of file SkScalerContext.cpp.

193 {
194 return internalMakeGlyph(packedID, fRec.fMaskFormat, alloc);
195}

◆ MakeRecAndEffects()

void SkScalerContext::MakeRecAndEffects ( const SkFont font,
const SkPaint paint,
const SkSurfaceProps surfaceProps,
SkScalerContextFlags  scalerContextFlags,
const SkMatrix deviceMatrix,
SkScalerContextRec rec,
SkScalerContextEffects effects 
)
static

Definition at line 1045 of file SkScalerContext.cpp.

1050 {
1051 SkASSERT(!deviceMatrix.hasPerspective());
1052
1053 sk_bzero(rec, sizeof(SkScalerContextRec));
1054
1055 SkTypeface* typeface = font.getTypeface();
1056
1057 rec->fTypefaceID = typeface->uniqueID();
1058 rec->fTextSize = font.getSize();
1059 rec->fPreScaleX = font.getScaleX();
1060 rec->fPreSkewX = font.getSkewX();
1061
1062 bool checkPost2x2 = false;
1063
1064 const SkMatrix::TypeMask mask = deviceMatrix.getType();
1065 if (mask & SkMatrix::kScale_Mask) {
1066 rec->fPost2x2[0][0] = sk_relax(deviceMatrix.getScaleX());
1067 rec->fPost2x2[1][1] = sk_relax(deviceMatrix.getScaleY());
1068 checkPost2x2 = true;
1069 } else {
1070 rec->fPost2x2[0][0] = rec->fPost2x2[1][1] = SK_Scalar1;
1071 }
1072 if (mask & SkMatrix::kAffine_Mask) {
1073 rec->fPost2x2[0][1] = sk_relax(deviceMatrix.getSkewX());
1074 rec->fPost2x2[1][0] = sk_relax(deviceMatrix.getSkewY());
1075 checkPost2x2 = true;
1076 } else {
1077 rec->fPost2x2[0][1] = rec->fPost2x2[1][0] = 0;
1078 }
1079
1080 SkPaint::Style style = paint.getStyle();
1081 SkScalar strokeWidth = paint.getStrokeWidth();
1082
1083 unsigned flags = 0;
1084
1085 if (font.isEmbolden()) {
1086#ifdef SK_USE_FREETYPE_EMBOLDEN
1088#else
1089 SkScalar fakeBoldScale = SkScalarInterpFunc(font.getSize(),
1093 SkScalar extra = font.getSize() * fakeBoldScale;
1094
1095 if (style == SkPaint::kFill_Style) {
1097 strokeWidth = extra; // ignore paint's strokeWidth if it was "fill"
1098 } else {
1099 strokeWidth += extra;
1100 }
1101#endif
1102 }
1103
1104 if (style != SkPaint::kFill_Style && strokeWidth >= 0) {
1105 rec->fFrameWidth = strokeWidth;
1106 rec->fMiterLimit = paint.getStrokeMiter();
1107 rec->fStrokeJoin = SkToU8(paint.getStrokeJoin());
1108 rec->fStrokeCap = SkToU8(paint.getStrokeCap());
1109
1110 if (style == SkPaint::kStrokeAndFill_Style) {
1112 }
1113 } else {
1114 rec->fFrameWidth = -1;
1115 rec->fMiterLimit = 0;
1116 rec->fStrokeJoin = 0;
1117 rec->fStrokeCap = 0;
1118 }
1119
1120 rec->fMaskFormat = compute_mask_format(font);
1121
1122 if (SkMask::kLCD16_Format == rec->fMaskFormat) {
1123 if (too_big_for_lcd(*rec, checkPost2x2)) {
1126 } else {
1127 SkPixelGeometry geometry = surfaceProps.pixelGeometry();
1128
1129 switch (geometry) {
1131 // eeek, can't support LCD
1134 break;
1136 // our default, do nothing.
1137 break;
1140 break;
1143 break;
1147 break;
1148 }
1149 }
1150 }
1151
1152 if (font.isEmbeddedBitmaps()) {
1154 }
1155 if (font.isSubpixel()) {
1157 }
1158 if (font.isForceAutoHinting()) {
1160 }
1161 if (font.isLinearMetrics()) {
1163 }
1164 if (font.isBaselineSnap()) {
1166 }
1167 if (typeface->glyphMaskNeedsCurrentColor()) {
1169 rec->fForegroundColor = paint.getColor();
1170 }
1171 rec->fFlags = SkToU16(flags);
1172
1173 // these modify fFlags, so do them after assigning fFlags
1174 rec->setHinting(font.getHinting());
1176
1177 // For now always set the paint gamma equal to the device gamma.
1178 // The math in SkMaskGamma can handle them being different,
1179 // but it requires superluminous masks when
1180 // Ex : deviceGamma(x) < paintGamma(x) and x is sufficiently large.
1181 rec->setDeviceGamma(surfaceProps.textGamma());
1182 rec->setPaintGamma(surfaceProps.textGamma());
1183 rec->setContrast(surfaceProps.textContrast());
1184
1185 if (!SkToBool(scalerContextFlags & SkScalerContextFlags::kFakeGamma)) {
1186 rec->ignoreGamma();
1187 }
1188 if (!SkToBool(scalerContextFlags & SkScalerContextFlags::kBoostContrast)) {
1189 rec->setContrast(0);
1190 }
1191
1192 new (effects) SkScalerContextEffects{paint};
1193}
static const int strokeWidth
Definition BlurTest.cpp:60
#define SK_Scalar1
Definition SkScalar.h:18
SkScalar SkScalarInterpFunc(SkScalar searchKey, const SkScalar keys[], const SkScalar values[], int length)
Definition SkScalar.cpp:10
static SkScalar sk_relax(SkScalar x)
static bool too_big_for_lcd(const SkScalerContextRec &rec, bool checkPost2x2)
static SkMask::Format compute_mask_format(const SkFont &font)
SkPixelGeometry
@ kUnknown_SkPixelGeometry
@ kRGB_V_SkPixelGeometry
@ kBGR_H_SkPixelGeometry
@ kRGB_H_SkPixelGeometry
@ kBGR_V_SkPixelGeometry
static const SkScalar kStdFakeBoldInterpValues[]
static const int kStdFakeBoldInterpLength
static const SkScalar kStdFakeBoldInterpKeys[]
constexpr uint16_t SkToU16(S x)
Definition SkTo.h:24
constexpr uint8_t SkToU8(S x)
Definition SkTo.h:22
SkScalar getSkewY() const
Definition SkMatrix.h:430
SkScalar getSkewX() const
Definition SkMatrix.h:438
SkScalar getScaleX() const
Definition SkMatrix.h:415
SkScalar getScaleY() const
Definition SkMatrix.h:422
bool hasPerspective() const
Definition SkMatrix.h:312
@ kScale_Mask
scale SkMatrix
Definition SkMatrix.h:194
@ kAffine_Mask
skew or rotate SkMatrix
Definition SkMatrix.h:195
TypeMask getType() const
Definition SkMatrix.h:207
static SkColor ComputeLuminanceColor(const SkPaint &)
@ kStrokeAndFill_Style
sets to stroke and fill geometry
Definition SkPaint.h:195
SkScalar textGamma() const
SkPixelGeometry pixelGeometry() const
SkScalar textContrast() const
SkTypefaceID uniqueID() const
Definition SkTypeface.h:101
float SkScalar
Definition extension.cpp:12
FlutterSemanticsFlag flags
font
Font Metadata and Metrics.
void setPaintGamma(SkScalar pg)
void setDeviceGamma(SkScalar dg)
void setContrast(SkScalar c)
SkTypefaceID fTypefaceID
SkScalar fPost2x2[2][2]
void setHinting(SkFontHinting)
void setLuminanceColor(SkColor c)

◆ MakeRecAndEffectsFromFont()

static void SkScalerContext::MakeRecAndEffectsFromFont ( const SkFont font,
SkScalerContextRec rec,
SkScalerContextEffects effects 
)
inlinestatic

Definition at line 331 of file SkScalerContext.h.

333 {
335 return MakeRecAndEffects(
336 font, paint, SkSurfaceProps(),
338 }
static const SkMatrix & I()

◆ SaturateGlyphBounds() [1/2]

void SkScalerContext::SaturateGlyphBounds ( SkGlyph glyph,
SkIRect const &  r 
)
staticprotected

Definition at line 211 of file SkScalerContext.cpp.

211 {
212 glyph->fLeft = sk_saturate_cast<int16_t>(r.fLeft);
213 glyph->fTop = sk_saturate_cast<int16_t>(r.fTop);
214 glyph->fWidth = sk_saturate_cast<uint16_t>(r.width64());
215 glyph->fHeight = sk_saturate_cast<uint16_t>(r.height64());
216}

◆ SaturateGlyphBounds() [2/2]

void SkScalerContext::SaturateGlyphBounds ( SkGlyph glyph,
SkRect &&  r 
)
staticprotected

Definition at line 204 of file SkScalerContext.cpp.

204 {
205 r.roundOut(&r);
206 glyph->fLeft = sk_saturate_cast<int16_t>(r.fLeft);
207 glyph->fTop = sk_saturate_cast<int16_t>(r.fTop);
208 glyph->fWidth = sk_saturate_cast<uint16_t>(r.width());
209 glyph->fHeight = sk_saturate_cast<uint16_t>(r.height());
210}
SkScalar fLeft
smaller x-axis bounds
Definition extension.cpp:14
void roundOut(SkIRect *dst) const
Definition SkRect.h:1241
constexpr float height() const
Definition SkRect.h:769
constexpr float width() const
Definition SkRect.h:762
SkScalar fTop
smaller y-axis bounds
Definition extension.cpp:15

Friends And Related Symbol Documentation

◆ PathText

friend class PathText
friend

Definition at line 445 of file SkScalerContext.h.

◆ PathTextBench

friend class PathTextBench
friend

Definition at line 446 of file SkScalerContext.h.

◆ RandomScalerContext

friend class RandomScalerContext
friend

Definition at line 447 of file SkScalerContext.h.

Member Data Documentation

◆ fPreBlend

const SkMaskGamma::PreBlend SkScalerContext::fPreBlend
protected

Definition at line 470 of file SkScalerContext.h.

◆ fRec

SkScalerContextRec SkScalerContext::fRec
protected

Definition at line 379 of file SkScalerContext.h.


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