31#include <initializer_list>
50 for (
int i = 0;
i < 3; ++
i) {
56 font.setSubpixel(
true);
82 for (
auto twm : {TranslateWithMatrix::kNo, TranslateWithMatrix::kYes}) {
83 for (
auto pm : {PerspMode::kNone, PerspMode::kX, PerspMode::kY, PerspMode::kXY}) {
84 for (
auto& blob : fBlobs) {
85 for (
bool clip : {
false,
true}) {
114 enum class PerspMode { kNone, kX, kY, kXY };
116 enum class TranslateWithMatrix :
bool {
kNo,
kYes };
119 PerspMode perspMode, TranslateWithMatrix translateWithMatrix) {
123 case PerspMode::kNone:
139 if (TranslateWithMatrix::kYes == translateWithMatrix) {
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
@ kPremul_SkAlphaType
pixel components are premultiplied by alpha
constexpr SkColor SK_ColorBLACK
@ kYes
Do pre-clip the geometry before applying the (perspective) matrix.
@ kNo
Don't pre-clip the geometry before applying the (perspective) matrix.
static SkPath clip(const SkPath &path, const SkHalfPlane &plane)
void onOnceBeforeDraw() override
SkISize getISize() override
SkString getName() const override
void onDraw(SkCanvas *inputCanvas) override
bool getProps(SkSurfaceProps *props) const
void clipRect(const SkRect &rect, SkClipOp op, bool doAntiAlias)
void translate(SkScalar dx, SkScalar dy)
SkMatrix getLocalToDeviceAs3x3() const
virtual GrRecordingContext * recordingContext() const
virtual SkISize getBaseLayerSize() const
void setMatrix(const SkM44 &matrix)
void concat(const SkMatrix &matrix)
SkImageInfo imageInfo() const
void drawTextBlob(const SkTextBlob *blob, SkScalar x, SkScalar y, const SkPaint &paint)
void drawImage(const SkImage *image, SkScalar left, SkScalar top)
@ kAntiAlias
may have transparent pixels on glyph edges
@ kAlias
no transparent pixels on glyph edges
@ kSubpixelAntiAlias
glyph positioned in pixel using transparency
static SkMatrix Translate(SkScalar dx, SkScalar dy)
SkMatrix & setPerspX(SkScalar v)
static SkMatrix Concat(const SkMatrix &a, const SkMatrix &b)
SkMatrix & setPerspY(SkScalar v)
static const SkMatrix & I()
@ kUseDeviceIndependentFonts_Flag
SkPixelGeometry pixelGeometry() const
T & emplace_back(Args &&... args)
static float max(float r, float g, float b)
sk_sp< SkBlender > blender SkRect rect
SK_API sk_sp< SkSurface > RenderTarget(GrRecordingContext *context, skgpu::Budgeted budgeted, const SkImageInfo &imageInfo, int sampleCount, GrSurfaceOrigin surfaceOrigin, const SkSurfaceProps *surfaceProps, bool shouldCreateWithMips=false, bool isProtected=false)
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
font
Font Metadata and Metrics.
static constexpr SkISize Make(int32_t w, int32_t h)
sk_sp< SkColorSpace > refColorSpace() const
static SkImageInfo MakeN32(int width, int height, SkAlphaType at)
static constexpr SkRect MakeXYWH(float x, float y, float w, float h)