44 for (
int x = 0;
x < bm.
width();
x++) {
64 SkPoint pt = { wScalar / 2, hScalar / 2 };
84 for (
int i = 0;
i < 4; ++
i) {
92 rect.inset(wScalar / 8, hScalar / 8);
154#if defined(SK_GRAPHITE)
192 *errorMsg =
"Image creation failed";
200 const int kPadX = 30;
201 const int kPadY = 40;
222 for (
int w = 1;
w <= kMaxSrcRectSize;
w *= 4) {
223 for (
int h = 1;
h <= kMaxSrcRectSize;
h *= 4) {
239 canvas->
drawRect(dstRect, blackPaint);
243 if ((dstRect.
width() + kPadX) * rowCount >
gSize) {
265 fProc(canvas, img, bm, srcRect, dstRect,
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
static GrDirectContext * GrAsDirectContext(GrContext_Base *base)
#define SkASSERT_RELEASE(cond)
@ kNormal_SkBlurStyle
fuzzy inside and outside
constexpr SkColor SK_ColorYELLOW
constexpr SkColor SK_ColorMAGENTA
constexpr SkColor SK_ColorCYAN
constexpr SkColor SK_ColorTRANSPARENT
constexpr SkColor SK_ColorBLUE
constexpr SkColor SK_ColorRED
constexpr SkColor SK_ColorBLACK
constexpr SkColor SK_ColorGREEN
constexpr SkColor SK_ColorWHITE
static int SkNextLog2(uint32_t value)
DrawBitmapRectGM(DrawRectRectProc proc, const char suffix[])
SkString getName() const override
SkISize getISize() override
DrawResult onDraw(SkCanvas *canvas, SkString *errorMsg) override
sk_sp< SkImage > asImage() const
bool extractSubset(SkBitmap *dst, const SkIRect &subset) const
void allocN32Pixels(int width, int height, bool isOpaque=false)
uint32_t * getAddr32(int x, int y) const
static SkScalar SK_SPI ConvertRadiusToSigma(SkScalar radius)
void drawRect(const SkRect &rect, const SkPaint &paint)
void translate(SkScalar dx, SkScalar dy)
virtual GrRecordingContext * recordingContext() const
virtual skgpu::graphite::Recorder * recorder() const
@ kStrict_SrcRectConstraint
sample only inside bounds; slower
void clear(SkColor color)
void drawImageRect(const SkImage *, const SkRect &src, const SkRect &dst, const SkSamplingOptions &, const SkPaint *, SrcRectConstraint)
void drawString(const char str[], SkScalar x, SkScalar y, const SkFont &font, const SkPaint &paint)
static sk_sp< SkShader > MakeRadial(const SkPoint ¢er, SkScalar radius, const SkColor colors[], const SkScalar pos[], int count, SkTileMode mode, uint32_t flags=0, const SkMatrix *localMatrix=nullptr)
virtual bool isValid(GrRecordingContext *context) const =0
bool asLegacyBitmap(SkBitmap *bitmap, LegacyBitmapMode legacyBitmapMode=kRO_LegacyBitmapMode) const
virtual sk_sp< SkImage > makeSubset(GrDirectContext *direct, const SkIRect &subset) const =0
static sk_sp< SkMaskFilter > MakeBlur(SkBlurStyle style, SkScalar sigma, bool respectCTM=true)
SkMatrix & postScale(SkScalar sx, SkScalar sy, SkScalar px, SkScalar py)
static const SkMatrix & I()
void setStyle(Style style)
void setColor(SkColor color)
void setAntiAlias(bool aa)
@ kStroke_Style
set to stroke geometry
@ kFill_Style
set to fill geometry
void setMaskFilter(sk_sp< SkMaskFilter > maskFilter)
void setStrokeWidth(SkScalar width)
void printf(const char format[],...) SK_PRINTF_LIKE(2
void set(const SkString &src)
void append(const char text[])
void void void appendf(const char format[],...) SK_PRINTF_LIKE(2
void DrawRectRectProc(SkCanvas *, sk_sp< SkImage >, const SkBitmap &, const SkIRect &srcR, const SkRect &dstR, const SkSamplingOptions &, const SkPaint *)
static void imagesubsetproc(SkCanvas *canvas, sk_sp< SkImage > image, const SkBitmap &bm, const SkIRect &srcR, const SkRect &dstR, const SkSamplingOptions &sampling, const SkPaint *paint)
static SkBitmap make_chessbm(int w, int h)
static void imageproc(SkCanvas *canvas, sk_sp< SkImage > image, const SkBitmap &, const SkIRect &srcR, const SkRect &dstR, const SkSamplingOptions &sampling, const SkPaint *paint)
static sk_sp< SkImage > makebm(SkCanvas *origCanvas, SkBitmap *resultBM, int w, int h)
static void bitmapsubsetproc(SkCanvas *canvas, sk_sp< SkImage > image, const SkBitmap &bm, const SkIRect &srcR, const SkRect &dstR, const SkSamplingOptions &sampling, const SkPaint *paint)
static void bitmapproc(SkCanvas *canvas, sk_sp< SkImage > image, const SkBitmap &, const SkIRect &srcR, const SkRect &dstR, const SkSamplingOptions &sampling, const SkPaint *paint)
static float max(float r, float g, float b)
sk_sp< const SkImage > image
sk_sp< SkBlender > blender SkRect rect
PODArray< SkColor > colors
SkSamplingOptions sampling
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.
SkSamplingOptions(SkFilterMode::kLinear))
void setXYWH(int32_t x, int32_t y, int32_t width, int32_t height)
static constexpr SkIRect MakeXYWH(int32_t x, int32_t y, int32_t w, int32_t h)
bool contains(int32_t x, int32_t y) const
static constexpr SkISize Make(int32_t w, int32_t h)
static SkImageInfo MakeN32Premul(int width, int height)
static SkRect Make(const SkISize &size)
static SkRect MakeIWH(int w, int h)
constexpr float height() const
constexpr float width() const
static constexpr SkRect MakeWH(float w, float h)