75#if defined(SK_GRAPHITE)
104 , fExpectedMatrix(expectedMatrix) {
106 fExpectedMatrix.postTranslate(1.f, 1.f);
110 Factory getFactory()
const override {
111 SK_ABORT(
"Does not participate in serialization");
114 const char* getTypeName()
const override {
return "MatrixTestImageFilter"; }
125 return desiredOutput;
128 std::optional<skif::LayerSpace<SkIRect>> onGetOutputLayerBounds(
131 return contentBounds;
142 canvas->
clear(0x00000000);
151 paint.setShader(shader);
172 this->addFilter(
"color filter",
180 this->addFilter(
"displacement map",
182 std::move(gradientSource), input, cropRect));
187 this->addFilter(
"diffuse lighting",
189 this->addFilter(
"specular lighting",
202 this->addFilter(
"matrix convolution",
218 &rightSideCropRect));
222 std::move(shaderFilterLeft), std::move(shaderFilterRight), cropRect));
239 this->addFilter(
"matrix",
248 kBlurSigma, kBlurSigma, std::move(blur), cropRect));
261 kBlurSigma, kBlurSigma, std::move(pictureFilter), cropRect));
268 kBlurSigma, kBlurSigma, std::move(paintFilter), cropRect));
273 int count()
const {
return fFilters.size(); }
274 SkImageFilter* getFilter(
int index)
const {
return fFilters[index].fFilter.get(); }
275 const char* getName(
int index)
const {
return fFilters[index].fName; }
276 bool needsSaveLayer(
int index)
const {
return fFilters[index].fNeedsSaveLayer; }
279 Filter() :
fName(
nullptr), fNeedsSaveLayer(
false) {}
282 , fFilter(std::move(filter))
283 , fNeedsSaveLayer(needsSaveLayer) {
287 bool fNeedsSaveLayer;
290 fFilters.push_back(
Filter(
name, std::move(filter), needsSaveLayer));
300 if (
src->isGaneshBacked()) {
302 src->props(),
src->colorType());
311 src->getColorSpace(),
321 canvas->
clear(0x00000000);
327 static_assert(
kBitmapSize % 4 == 0,
"bitmap size not multiple of 4");
345 return surface->makeImageSnapshot();
350 float matrix[20] = {
s, 0, 0, 0, 0,
361 memset(
matrix, 0, 20 *
sizeof(
float));
385 kTestSurfaceOrigin, {},
402 p.setColor4f(
color,
nullptr);
440 const int kWayTooManyForComposeColorFilter = 100;
441 for (
int i = 0;
i < kWayTooManyForComposeColorFilter; ++
i) {
460 float blueToRedMatrix[20] = { 0 };
461 blueToRedMatrix[2] = blueToRedMatrix[18] = 1;
462 float redToGreenMatrix[20] = { 0 };
463 redToGreenMatrix[5] = redToGreenMatrix[18] = 1;
468 std::move(filter1)));
475 paint.setImageFilter(std::move(filter2));
480 uint32_t pixel = *
result.getAddr32(0, 0);
503 location,
target, specularExponent, 180,
524 FilterList filters(input, &cropRect);
526 for (
int i = 0;
i < filters.count(); ++
i) {
531 .imageAndOffset(ctx, &
offset));
544 if (!
dst->tryAllocN32Pixels(
src->width(),
src->height())) {
575 as_IFB(positiveFilter)->filterImage(ctx).imageAndOffset(ctx, &
offset));
583 as_IFB(positiveFilter)->filterImage(negativeCTX).imageAndOffset(ctx, &
offset));
596 int diffs = memcmp(positiveResultBM.
getAddr32(0,
y),
647 as_IFB(filter)->filterImage(ctx).imageAndOffset(ctx, &
offset));
656 as_IFB(filter)->filterImage(mirrorXCTX).imageAndOffset(ctx, &
offset));
665 as_IFB(filter)->filterImage(mirrorYCTX).imageAndOffset(ctx, &
offset));
668 SkBitmap normalResultBM, mirrorXResultBM, mirrorYResultBM;
678 int diffs = memcmp(normalResultBM.
getAddr32(0,
y),
685 diffs = memcmp(normalResultBM.
getAddr32(0,
y),
727 for (
int y = 0;
y < resultBM.
height();
y++) {
728 for (
int x = 0;
x < resultBM.
width();
x++) {
760 std::move(failFilter)));
763 .imageAndOffset(ctx, &
offset));
788 FilterList filters(
nullptr);
790 SkBitmap untiledResult, tiledResult;
795 SkCanvas untiledCanvas(untiledResult);
796 const int tileSize = 8;
802 const char*
text =
"ABC";
806 for (
int i = 0;
i < filters.count(); ++
i) {
812 untiledCanvas.
save();
818 for (
int y = 0;
y <
height;
y += tileSize) {
819 for (
int x = 0;
x <
width;
x += tileSize) {
823 if (filters.needsSaveLayer(
i)) {
824 tiledCanvas.
saveLayer(
nullptr, &combinedPaint);
839 SkString errString(
"Tiled image filter doesn't match untiled reference");
840 errString.
append(
"\nExpected: ");
842 errString.
append(encoded);
844 errString.
append(
"failed to encode");
847 errString.
append(
"\nActual: ");
849 errString.
append(encoded);
851 errString.
append(
"failed to encode");
873 paint.setImageFilter(std::move(imageFilter));
897 const int tileSize = 100;
1046 std::move(filter2)));
1111 canvas->
saveLayer(
nullptr, &filterPaint);
1155 for (
int y = 0;
y <
height;
y += tileSize) {
1156 for (
int x = 0;
x <
width;
x += tileSize) {
1190 paint.setImageFilter(std::move(filter));
1228 0, 0, 0, 0, 0, 0, 0,
1229 0, 0, 0, 0, 0, 0, 0,
1230 0, 0, 0, 0, 0, 0, 0,
1231 0, 0, 0, 1, 0, 0, 0,
1232 0, 0, 0, 0, 0, 0, 0,
1233 0, 0, 0, 0, 0, 0, 0,
1241 kernelSize, identityKernel, gain, bias, kernelOffset,
1295 recordingCanvas->
save();
1328 as_IFB(imageFilter)->filterImage(ctx).imageAndOffset(ctx, &
offset));
1348 bitmap.allocN32Pixels(10, 10);
1370 uint32_t pixel = *
bitmap.getAddr32(0, 0);
1374 recordingCanvas->
saveLayer(
nullptr, &imageFilterPaint);
1380 pixel = *
bitmap.getAddr32(0, 0);
1390 pixel = *
bitmap.getAddr32(0, 0);
1396 bitmap.allocN32Pixels(100, 100);
1397 bitmap.eraseARGB(0, 0, 0, 0);
1419 SkISize::Make(1<<30, 1<<30), kernel, gain, bias, kernelOffset,
1451 bitmap.allocN32Pixels(1, 1);
1452 bitmap.eraseARGB(255, 255, 255, 255);
1463 mode, greenFilter, croppedOut,
nullptr));
1465 mode, croppedOut, greenFilter,
nullptr));
1467 mode, croppedOut, croppedOut,
nullptr));
1470 paint.setImageFilter(std::move(xfermodeNoFg));
1483 paint.setImageFilter(std::move(xfermodeNoBg));
1491 paint.setImageFilter(std::move(xfermodeNoFgNoBg));
1504 bitmap.allocN32Pixels(10, 10);
1520 canvas.
saveLayer(&bounds2, &filterPaint);
1523 canvas.
drawRect(bounds2, greenPaint);
1559 nullptr, &cropRect));
1561 std::move(offsetFilter)));
1566 as_IFB(composedFilter)->filterImage(ctx).imageAndOffset(ctx, &
offset));
1599 std::move(pictureFilter)));
1606 as_IFB(composedFilter)->filterImage(ctx).imageAndOffset(ctx, &
offset));
1653 float greenMatrix[20] = { 0, 0, 0, 0, 0,
1654 0, 0, 0, 0, 1.0f/255,
1656 0, 0, 0, 0, 1.0f/255
1669 uint8_t allOne[256],
identity[256];
1670 for (
int i = 0;
i < 256; ++
i) {
1708 paint.setImageFilter(unflattenedFilter);
1732 largeW = ctx->priv().caps()->maxTextureSize() + 1;
1761 paint.setImageFilter(std::move(blur));
1795 result = makeWithFilter(sourceImage,
nullptr, subset, clipBounds, &outSubset, &
offset);
1798 result = makeWithFilter(sourceImage, filter.get(), subset, clipBounds,
nullptr, &
offset);
1801 result = makeWithFilter(sourceImage, filter.get(), subset, clipBounds, &outSubset,
nullptr);
1805 result = makeWithFilter(sourceImage, filter.get(), bigSubset, clipBounds, &outSubset, &
offset);
1809 result = makeWithFilter(sourceImage, filter.get(),
kEmpty, clipBounds, &outSubset, &
offset);
1812 result = makeWithFilter(sourceImage, filter.get(), subset,
kEmpty, &outSubset, &
offset);
1816 result = makeWithFilter(sourceImage, filter.get(), subset, kLeftField, &outSubset, &
offset);
1819 result = makeWithFilter(sourceImage, filter.get(), subset, clipBounds, &outSubset, &
offset);
1830 clipBounds.
setXYWH(0, 0, 170, 100);
1831 subset.
setXYWH(0, 0, 160, 90);
1834 result = makeWithFilter(sourceImage, filter.get(), subset, clipBounds, &outSubset, &
offset);
1899#if defined(SK_GRAPHITE)
1905 std::unique_ptr<skgpu::graphite::Recorder> recorder =
1906 context->makeRecorder(ToolUtils::CreateTestingRecorderOptions());
1950 ctxInfo.directContext(),
1962 ctxInfo.directContext(),
1983 { cfif, MatrixCapability::kComplex },
1988 { blif, MatrixCapability::kScaleTranslate },
1995 for (
const auto& rec : recs) {
2011 expectedBounds[
i] = background_rect;
2012 expectedBounds[
i].
join(foreground_rect);
2015 SkIRect intersection = background_rect;
2016 intersection.
intersect(foreground_rect);
2033 background, foreground,
nullptr));
2053 const SkVector srcOffset = {-50.5f, -50.5f};
2111 k1, k2, k3, k4,
false, std::move(background), std::move(foreground), crop));
2127 unionRect.
join(fgRect);
2128 SkIRect intersection = bgRect;
2190 20.0f,
nullptr, tiling));
2257 scale.mapRect(&clippedDst);
2258 scale.mapRect(&clippedSrc);
2309 scale.mapRect(&targetRect);
2325 0.0f, 0.437009f, 14129.6f, 14129.6f,
SK_ColorGRAY,
nullptr));
2327 surf->getCanvas()->saveLayer(
nullptr, &
paint);
2328 surf->getCanvas()->restore();
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
SkAssertResult(font.textToGlyphs("Hello", 5, SkTextEncoding::kUTF8, glyphs, std::size(glyphs))==count)
@ kTopLeft_GrSurfaceOrigin
static void test_large_blur_input(skiatest::Reporter *reporter, SkCanvas *canvas)
static void test_cropRects(skiatest::Reporter *reporter, GrRecordingContext *rContext)
static void test_zero_blur_sigma(skiatest::Reporter *reporter, GrDirectContext *dContext)
static void test_make_with_filter(skiatest::Reporter *reporter, const std::function< sk_sp< SkSurface >(int width, int height)> &createSurface, const std::function< sk_sp< SkImage >(sk_sp< SkImage > src, const SkImageFilter *filter, const SkIRect &subset, const SkIRect &clipBounds, SkIRect *outSubset, SkIPoint *offset)> &makeWithFilter)
static void test_xfermode_cropped_input(SkSurface *surf, skiatest::Reporter *reporter)
static void draw_blurred_rect(SkCanvas *canvas)
static void draw_picture_clipped(SkCanvas *canvas, const SkRect &clipRect, const SkPicture *picture)
static void test_composed_imagefilter_offset(skiatest::Reporter *reporter, GrRecordingContext *rContext)
static sk_sp< SkImageFilter > make_grayscale(sk_sp< SkImageFilter > input, const SkIRect *cropRect)
static void test_huge_blur(SkCanvas *canvas, skiatest::Reporter *reporter)
static void test_composed_imagefilter_bounds(skiatest::Reporter *reporter, GrDirectContext *dContext)
static void test_fail_affects_transparent_black(skiatest::Reporter *reporter, GrDirectContext *dContext)
static void test_morphology_radius_with_mirror_ctm(skiatest::Reporter *reporter, GrDirectContext *dContext)
static sk_sp< SkDevice > create_empty_device(GrRecordingContext *rContext, int widthHeight)
static sk_sp< SkImageFilter > make_blue(sk_sp< SkImageFilter > input, const SkIRect *cropRect)
static sk_sp< SkImageFilter > make_drop_shadow(sk_sp< SkImageFilter > input)
static void test_negative_blur_sigma(skiatest::Reporter *reporter, GrDirectContext *dContext)
static bool special_image_to_bitmap(GrDirectContext *dContext, const SkSpecialImage *src, SkBitmap *dst)
static sk_sp< SkImageFilter > make_blur(sk_sp< SkImageFilter > input)
static sk_sp< SkSpecialImage > create_empty_special_image(GrRecordingContext *rContext, int widthHeight, SkColor4f color=SkColors::kTransparent)
static const int kBitmapSize
DEF_TEST(ImageFilter, reporter)
static void test_arithmetic_combinations(skiatest::Reporter *reporter, float v)
static void draw_saveLayer_picture(int width, int height, int tileSize, SkBBHFactory *factory, SkBitmap *result)
static sk_sp< SkImageFilter > make_scale(float amount, sk_sp< SkImageFilter > input)
static void test_imagefilter_merge_result_size(skiatest::Reporter *reporter, GrRecordingContext *rContext)
static void test_big_kernel(skiatest::Reporter *reporter, GrRecordingContext *rContext)
static void test_arithmetic_bounds(skiatest::Reporter *reporter, float k1, float k2, float k3, float k4, sk_sp< SkImageFilter > background, sk_sp< SkImageFilter > foreground, const SkIRect *crop, const SkIRect &expected)
DEF_GANESH_TEST_FOR_RENDERING_CONTEXTS(ImageFilterNegativeBlurSigma_Gpu, reporter, ctxInfo, CtsEnforcement::kNever)
static void test_clipped_picture_imagefilter(skiatest::Reporter *reporter, GrRecordingContext *rContext)
static skif::Context make_context(const SkIRect &out, const SkSpecialImage *src)
static sk_sp< SkImage > make_small_image()
DEF_GANESH_TEST_FOR_ALL_CONTEXTS(ImageFilterBlurLargeImage_Gpu, reporter, ctxInfo, CtsEnforcement::kNever)
static void scaleMatrix(const SkPath &one, const SkPath &two, SkMatrix &scale)
sk_sp< SkData > GetResourceAsData(const char *resource)
static void merge(const uint8_t *SK_RESTRICT row, int rowN, const SkAlpha *SK_RESTRICT srcAA, const int16_t *SK_RESTRICT srcRuns, SkAlpha *SK_RESTRICT dstAA, int16_t *SK_RESTRICT dstRuns, int width)
@ kOpaque_SkAlphaType
pixel is opaque
@ kPremul_SkAlphaType
pixel components are premultiplied by alpha
#define SK_ABORT(message,...)
static constexpr int kSkBlendModeCount
@ kSrcOver
r = s + (1-sa)*d
@ kSrcATop
r = s*da + d*(1-sa)
@ kDstATop
r = d*sa + s*(1-da)
static SkColorFilterBase * as_CFB(SkColorFilter *filter)
@ kBGRA_8888_SkColorType
pixel with 8 bits for blue, green, red, alpha; in 32-bit word
@ kRGBA_8888_SkColorType
pixel with 8 bits for red, green, blue, alpha; in 32-bit word
SK_API SkPMColor SkPreMultiplyColor(SkColor c)
constexpr SkColor SK_ColorTRANSPARENT
constexpr SkColor SK_ColorGRAY
constexpr SkColor SK_ColorBLUE
constexpr SkColor SK_ColorRED
constexpr SkColor SK_ColorBLACK
constexpr SkColor SK_ColorGREEN
constexpr SkColor SK_ColorWHITE
static SkImageFilter_Base * as_IFB(SkImageFilter *filter)
static SkImage_Base * as_IB(SkImage *image)
sk_sp< T > sk_ref_sp(T *obj)
static constexpr bool SkToBool(const T &x)
#define REPORTER_ASSERT(r, cond,...)
#define DEF_GRAPHITE_TEST_FOR_RENDERING_CONTEXTS(name, reporter, graphite_context, ctsEnforcement)
sk_sp< skgpu::ganesh::Device > createDevice(GrColorType, sk_sp< GrSurfaceProxy >, sk_sp< SkColorSpace >, GrSurfaceOrigin, const SkSurfaceProps &, skgpu::ganesh::Device::InitContents)
GrRecordingContextPriv priv()
sk_sp< SkImage > asImage() const
SkColor getColor(int x, int y) const
bool readPixels(const SkImageInfo &dstInfo, void *dstPixels, size_t dstRowBytes, int srcX, int srcY) const
void allocN32Pixels(int width, int height, bool isOpaque=false)
uint32_t * getAddr32(int x, int y) const
bool tryAllocPixels(const SkImageInfo &info, size_t rowBytes)
void eraseColor(SkColor4f) const
int saveLayer(const SkRect *bounds, const SkPaint *paint)
void drawRect(const SkRect &rect, const SkPaint &paint)
void clipRect(const SkRect &rect, SkClipOp op, bool doAntiAlias)
void translate(SkScalar dx, SkScalar dy)
virtual GrRecordingContext * recordingContext() const
void clear(SkColor color)
SkMatrix getTotalMatrix() const
void scale(SkScalar sx, SkScalar sy)
void drawString(const char str[], SkScalar x, SkScalar y, const SkFont &font, const SkPaint &paint)
void drawPicture(const SkPicture *picture)
void drawImage(const SkImage *image, SkScalar left, SkScalar top)
void drawCircle(SkScalar cx, SkScalar cy, SkScalar radius, const SkPaint &paint)
static sk_sp< SkColorFilter > Blend(const SkColor4f &c, sk_sp< SkColorSpace >, SkBlendMode mode)
static sk_sp< SkColorFilter > Matrix(const SkColorMatrix &)
static sk_sp< SkColorFilter > TableARGB(const uint8_t tableA[256], const uint8_t tableR[256], const uint8_t tableG[256], const uint8_t tableB[256])
sk_sp< SkData > serialize(const SkSerialProcs *=nullptr) const
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)
skif::MatrixCapability MatrixCapability
MatrixCapability getCTMCapability() const
static sk_sp< SkImageFilter > Deserialize(const void *data, size_t size, const SkDeserialProcs *procs=nullptr)
SkIRect filterBounds(const SkIRect &src, const SkMatrix &ctm, MapDirection, const SkIRect *inputRect=nullptr) const
bool asAColorFilter(SkColorFilter **filterPtr) const
bool asColorFilter(SkColorFilter **filterPtr) const
virtual SkRect computeFastBounds(const SkRect &bounds) const
const SkImageFilter * getInput(int i) const
bool canComputeFastBounds() const
static sk_sp< SkImageFilter > PointLitDiffuse(const SkPoint3 &location, SkColor lightColor, SkScalar surfaceScale, SkScalar kd, sk_sp< SkImageFilter > input, const CropRect &cropRect={})
static sk_sp< SkImageFilter > MatrixConvolution(const SkISize &kernelSize, const SkScalar kernel[], SkScalar gain, SkScalar bias, const SkIPoint &kernelOffset, SkTileMode tileMode, bool convolveAlpha, sk_sp< SkImageFilter > input, const CropRect &cropRect={})
static sk_sp< SkImageFilter > ColorFilter(sk_sp< SkColorFilter > cf, sk_sp< SkImageFilter > input, const CropRect &cropRect={})
static sk_sp< SkImageFilter > DropShadow(SkScalar dx, SkScalar dy, SkScalar sigmaX, SkScalar sigmaY, SkColor color, sk_sp< SkImageFilter > input, const CropRect &cropRect={})
static sk_sp< SkImageFilter > Erode(SkScalar radiusX, SkScalar radiusY, sk_sp< SkImageFilter > input, const CropRect &cropRect={})
static sk_sp< SkImageFilter > Merge(sk_sp< SkImageFilter > *const filters, int count, const CropRect &cropRect={})
static sk_sp< SkImageFilter > Arithmetic(SkScalar k1, SkScalar k2, SkScalar k3, SkScalar k4, bool enforcePMColor, sk_sp< SkImageFilter > background, sk_sp< SkImageFilter > foreground, const CropRect &cropRect={})
static sk_sp< SkImageFilter > DropShadowOnly(SkScalar dx, SkScalar dy, SkScalar sigmaX, SkScalar sigmaY, SkColor color, sk_sp< SkImageFilter > input, const CropRect &cropRect={})
static sk_sp< SkImageFilter > Blur(SkScalar sigmaX, SkScalar sigmaY, SkTileMode tileMode, sk_sp< SkImageFilter > input, const CropRect &cropRect={})
static sk_sp< SkImageFilter > Empty()
static sk_sp< SkImageFilter > DisplacementMap(SkColorChannel xChannelSelector, SkColorChannel yChannelSelector, SkScalar scale, sk_sp< SkImageFilter > displacement, sk_sp< SkImageFilter > color, const CropRect &cropRect={})
static sk_sp< SkImageFilter > Compose(sk_sp< SkImageFilter > outer, sk_sp< SkImageFilter > inner)
static sk_sp< SkImageFilter > Image(sk_sp< SkImage > image, const SkRect &srcRect, const SkRect &dstRect, const SkSamplingOptions &sampling)
static sk_sp< SkImageFilter > Picture(sk_sp< SkPicture > pic, const SkRect &targetRect)
static sk_sp< SkImageFilter > MatrixTransform(const SkMatrix &matrix, const SkSamplingOptions &sampling, sk_sp< SkImageFilter > input)
static sk_sp< SkImageFilter > Crop(const SkRect &rect, SkTileMode tileMode, sk_sp< SkImageFilter > input)
static sk_sp< SkImageFilter > Blend(SkBlendMode mode, sk_sp< SkImageFilter > background, sk_sp< SkImageFilter > foreground=nullptr, const CropRect &cropRect={})
static sk_sp< SkImageFilter > Offset(SkScalar dx, SkScalar dy, sk_sp< SkImageFilter > input, const CropRect &cropRect={})
static sk_sp< SkImageFilter > Shader(sk_sp< SkShader > shader, const CropRect &cropRect={})
static sk_sp< SkImageFilter > Dilate(SkScalar radiusX, SkScalar radiusY, sk_sp< SkImageFilter > input, const CropRect &cropRect={})
static sk_sp< SkImageFilter > Tile(const SkRect &src, const SkRect &dst, sk_sp< SkImageFilter > input)
static sk_sp< SkImageFilter > PointLitSpecular(const SkPoint3 &location, SkColor lightColor, SkScalar surfaceScale, SkScalar ks, SkScalar shininess, sk_sp< SkImageFilter > input, const CropRect &cropRect={})
static sk_sp< SkImageFilter > SpotLitSpecular(const SkPoint3 &location, const SkPoint3 &target, SkScalar falloffExponent, SkScalar cutoffAngle, SkColor lightColor, SkScalar surfaceScale, SkScalar ks, SkScalar shininess, sk_sp< SkImageFilter > input, const CropRect &cropRect={})
SkISize dimensions() const
bool readPixels(GrDirectContext *context, const SkImageInfo &dstInfo, void *dstPixels, size_t dstRowBytes, int srcX, int srcY, CachingHint cachingHint=kAllow_CachingHint) const
static SkMatrix Scale(SkScalar sx, SkScalar sy)
static SkMatrix RectToRect(const SkRect &src, const SkRect &dst, ScaleToFit mode=kFill_ScaleToFit)
SkMatrix & setTranslate(SkScalar dx, SkScalar dy)
SkMatrix & setScale(SkScalar sx, SkScalar sy, SkScalar px, SkScalar py)
static const SkMatrix & I()
SkMatrix & preScale(SkScalar sx, SkScalar sy, SkScalar px, SkScalar py)
bool mapRect(SkRect *dst, const SkRect &src, SkApplyPerspectiveClip pc=SkApplyPerspectiveClip::kYes) const
void setStyle(Style style)
void setColor(SkColor color)
void setImageFilter(sk_sp< SkImageFilter > imageFilter)
@ kStroke_Style
set to stroke geometry
void setColorFilter(sk_sp< SkColorFilter > colorFilter)
SkCanvas * beginRecording(const SkRect &bounds, sk_sp< SkBBoxHierarchy > bbh)
sk_sp< SkPicture > finishRecordingAsPicture()
static SkIRect MakeILarge()
virtual bool isGaneshBacked() const
void append(const char text[])
const char * c_str() const
bool readPixels(const SkPixmap &dst, int srcX, int srcY)
const FilterResult & source() const
const Mapping & mapping() const
Context withNewMapping(const Mapping &mapping) const
const SkMatrix & layerMatrix() const
Dart_NativeFunction function
static float max(float r, float g, float b)
static float min(float r, float g, float b)
static sk_sp< SkImage > make_gradient_circle(int width, int height)
constexpr SkColor4f kGreen
constexpr SkColor4f kTransparent
SK_API sk_sp< SkImage > MakeWithFilter(sk_sp< SkImage > src, const SkImageFilter *filter, const SkIRect &subset, const SkIRect &clipBounds, SkIRect *outSubset, SkIPoint *offset)
SK_API bool Encode(SkWStream *dst, const SkPixmap &src, const Options &options)
unsigned useCenter Optional< SkMatrix > matrix
Optional< SkRect > bounds
clipRect(r.rect, r.opAA.op(), r.opAA.aa())) template<> void Draw
sk_sp< const SkImage > image
sk_sp< const SkPicture > picture
sk_sp< SkBlender > blender SkRect rect
PODArray< SkColor > colors
SK_API sk_sp< SkShader > Color(SkColor)
SK_API sk_sp< SkShader > MakeTurbulence(SkScalar baseFrequencyX, SkScalar baseFrequencyY, int numOctaves, SkScalar seed, const SkISize *tileSize=nullptr)
SKSHAPER_API sk_sp< Factory > Factory()
sk_sp< SkSpecialImage > MakeFromRaster(const SkIRect &subset, const SkBitmap &bm, const SkSurfaceProps &props)
sk_sp< SkSpecialImage > MakeFromTextureImage(GrRecordingContext *rContext, const SkIRect &subset, sk_sp< SkImage > image, const SkSurfaceProps &props)
SK_API sk_sp< SkSurface > Raster(const SkImageInfo &imageInfo, size_t rowBytes, const SkSurfaceProps *surfaceProps)
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)
DEF_SWITCHES_START aot vmservice shared library name
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 mode
font
Font Metadata and Metrics.
const myers::Point & get(const myers::Segment &)
SkSamplingOptions(SkFilterMode::kLinear))
sk_sp< Backend > MakeGaneshBackend(sk_sp< GrRecordingContext > context, GrSurfaceOrigin origin, const SkSurfaceProps &surfaceProps, SkColorType colorType)
sk_sp< Backend > MakeRasterBackend(const SkSurfaceProps &surfaceProps, SkColorType colorType)
static constexpr SkIPoint Make(int32_t x, int32_t y)
SkIRect makeOutset(int32_t dx, int32_t dy) const
bool intersect(const SkIRect &r)
static constexpr SkIRect MakeLTRB(int32_t l, int32_t t, int32_t r, int32_t b)
constexpr int32_t height() const
void join(const SkIRect &r)
static constexpr SkIRect MakeEmpty()
constexpr int32_t width() const
static constexpr SkIRect MakeWH(int32_t w, int32_t h)
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 SkImageInfo MakeN32(int width, int height, SkAlphaType at)
static SkImageInfo Make(int width, int height, SkColorType ct, SkAlphaType at)
static SkPoint3 Make(SkScalar x, SkScalar y, SkScalar z)
static constexpr SkPoint Make(float x, float y)
static SkRect Make(const SkISize &size)
constexpr SkRect makeOffset(float dx, float dy) const
bool intersect(const SkRect &r)
static SkRect MakeIWH(int w, int h)
static constexpr SkRect MakeXYWH(float x, float y, float w, float h)
void roundOut(SkIRect *dst) const
SkSerialImageProc fImageProc
GrSamplerState::Filter Filter
std::shared_ptr< const fml::Mapping > data