86#include <initializer_list>
109 const int widthA = subsetA ? subsetA->
width() :
a->width();
110 const int heightA = subsetA ? subsetA->
height() :
a->height();
122 const int srcX = subsetA ? subsetA->
x() : 0;
123 const int srcY = subsetA ? subsetA->
y() : 0;
128 const size_t widthBytes = widthA * 4;
129 for (
int y = 0;
y < heightA; ++
y) {
143 return surface->makeImageSnapshot();
147 const size_t rowBytes =
info->minRowBytes();
169 return surface->makeImageSnapshot();
187 static void Release(
const void* pixels,
void* context) {
189 self->fReleaseCount++;
211 bool withMips =
false,
217 return surface->makeImageSnapshot();
249 auto dContext = ctxInfo.directContext();
256 bool fExpectSameAsMutable;
257 bool fExpectSameAsImmutable;
263 for (
auto rec : recs) {
299 bool was_called =
false;
302 *(
bool*)called =
true;
325 surface->getCanvas()->clear(0xFF00FF00);
328 memset(pixels, 0xFF,
sizeof(pixels));
330 const size_t dstRowBytes = 2 *
sizeof(
SkPMColor);
366 bool fExpectPeekSuccess;
367 bool fExpectSharedID;
376 rec[
i].fMakeProc(&bm);
428 SkDebugf(
"SkImage_Ganesh2Cpu : cachedBitmap was already purged\n");
443 auto dContext = contextInfo.directContext();
448 std::function<sk_sp<SkImage>()> imageFactories[] = {
462 return otherContextImage;
465 for (
const auto& factory : imageFactories) {
472 bool origIsMippedTexture =
false;
490 if (!texImage->isTextureBacked()) {
500 dContext->priv().caps()->mipmapSupport());
502 bool shouldBeMipped = origIsMippedTexture || validRequestForMips;
512 ERRORF(
reporter,
"makeTextureImage made unnecessary texture copy.");
529 dContext->flushAndSubmit();
536 auto dContext = contextInfo.directContext();
538 std::function<sk_sp<SkImage>()> imageFactories[] = {
545 for (
const auto& factory : imageFactories) {
555 ERRORF(
reporter,
"makeNonTextureImage failed for texture-backed image.");
566 using namespace skgpu;
568 auto dContext = ctxInfo.directContext();
570 Protected isProtected =
Protected(dContext->priv().caps()->supportsProtectedContent());
572 static constexpr int kSize = 10;
576 bool can = dContext->colorTypeSupportedAsImage(
colorType);
578 auto mbet = sk_gpu_test::ManagedBackendTexture::MakeWithoutData(
591 "colorTypeSupportedAsImage:%d, actual:%d, ct:%d", can,
SkToBool(img),
603 for (
int y = 0;
y < 256; ++
y) {
604 for (
int x = 0;
x < 256; ++
x) {
609 auto dContext = ctxInfo.directContext();
623 for (
int y = 0;
y < 256; ++
y) {
624 for (
int x = 0;
x < 256; ++
x) {
635 if (!texImage->readPixels(dContext,
premul.info(),
premul.getPixels(),
premul.rowBytes(),
640 for (
int y = 0;
y < 256; ++
y) {
641 for (
int x = 0;
x < 256; ++
x) {
643 int32_t origA = (origColor >> 24) & 0xff;
644 float a = origA / 255.f;
650 int32_t readA = (
read >> 24) & 0xff;
651 int32_t readB = (
read >> 16) & 0xff;
652 int32_t readG = (
read >> 8) & 0xff;
653 int32_t readR = (
read >> 0) & 0xff;
656 int32_t tol = (origA == 0 || origA == 255) ? 0 : 1;
657 if (origA != readA ||
SkTAbs(readB - origB) > tol ||
SkTAbs(readG - origG) > tol ||
658 SkTAbs(readR - origR) > tol) {
659 ERRORF(
reporter,
"unpremul(0x%08x)->premul(0x%08x) expected(0x%08x) at %d, %d.",
671 std::unique_ptr<Factory> factory(
new Factory);
672 if (!factory->get(
type)) {
686 img = gsurf->makeImageSnapshot();
694 factory->get(
type)->abandonContext();
698 rsurf->getCanvas()->drawImage(img, 0, 0);
701 factory.reset(
nullptr);
704 rsurf->getCanvas()->drawImage(img, 0, 0);
725 size_t rowBytes =
info.minRowBytes();
726 size_t size =
info.computeByteSize(rowBytes);
737 if (pixels[
i] != expected) {
753 const int w = 2,
h = 2;
754 const size_t rowBytes =
w *
sizeof(
SkPMColor);
815 auto dContext = ctxInfo.directContext();
877 auto dContext = ctxInfo.directContext();
940 auto dContext = ctxInfo.directContext();
942 auto mbet = sk_gpu_test::ManagedBackendTexture::MakeWithoutData(dContext,
963 sk_gpu_test::ManagedBackendTexture::ReleaseProc,
970 refImg, &readBackBackendTex,
false, &readBackOrigin),
971 "Did not get backend texture");
972 if (!GrBackendTexture::TestingOnly_Equals(readBackBackendTex, mbet->texture())) {
976 GrBackendTexture::TestingOnly_Equals(readBackBackendTex, mbet->texture()));
977 if (readBackOrigin != texOrigin) {
978 ERRORF(
reporter,
"origin mismatch %d %d\n", readBackOrigin, texOrigin);
984 refImg.
reset(
nullptr);
1005 if (!dContext->priv().caps()->crossContextTextureSupport()) {
1020 refImg.
reset(
nullptr);
1039 refImg.
reset(
nullptr);
1047 refImg.
reset(
nullptr);
1065 canvas =
surface->getCanvas();
1077 refImg.
reset(
nullptr);
1089 refImg.
reset(
nullptr);
1100 GrRecordingContextPriv::AutoSuppressWarningMessages aswm(otherCtx);
1108 std::tie(view, std::ignore) =
1114 std::tie(otherView, std::ignore) =
1120 std::tie(viewSecondRef, std::ignore) =
1130 std::tie(otherView, std::ignore) =
1136 viewSecondRef.
reset();
1140 std::tie(otherView, std::ignore) =
1146 refImg.
reset(
nullptr);
1158 !
bitmap.peekPixels(&pixmap)) {
1164 "SkImage_MakeCrossContextFromPixmapRelease",
1167 dContext, pixmap,
false);
1184 if (!dContext || !dContext->priv().caps()->crossContextTextureSupport()) {
1203 auto context = ctxInfo.directContext();
1212 auto createLarge = [context] {
1216 std::function<sk_sp<SkImage>()> fImageFactory;
1218 bool fCanTakeDirectly;
1227 { [otherContextInfo] {
1231 return otherContextImage;
1234 { createLarge,
false,
false }
1237 for (
const TestCase& testCase :
testCases) {
1246 if (testCase.fCanTakeDirectly) {
1253 context, std::move(
image), &newBackend, &proc);
1254 if (
result != testCase.fExpectation) {
1255 static const char *
const kFS[] = {
"fail",
"succeed" };
1257 kFS[testCase.fExpectation]);
1264 bool tookDirectly =
result && GrBackendTexture::TestingOnly_Equals(origBackend, newBackend);
1265 if (testCase.fCanTakeDirectly != tookDirectly) {
1266 static const char *
const kExpectedState[] = {
"not expected",
"expected" };
1267 ERRORF(
reporter,
"This backend texture was %s to be taken directly.",
1268 kExpectedState[testCase.fCanTakeDirectly]);
1271 context->flushAndSubmit();
1279 auto dContext = ctxInfo.directContext();
1290 dContext->abandonContext();
1346 fn.
a = 1.f; fn.
b = 0.f; fn.
c = 0.f; fn.
d = 0.f; fn.
e = 0.f; fn.
f = 0.f; fn.
g = 1.8f;
1386 for (
int a = 0;
a < 256; ++
a) {
1387 for (
int r = 0; r < 256; ++r) {
1398 for (
int y = 0;
y <
a.height(); ++
y) {
1399 for (
int x = 0;
x <
a.width(); ++
x) {
1459 for (
auto y = 0;
y < pmap->
height(); ++
y) {
1460 for (
auto x = 0;
x < pmap->
width(); ++
x) {
1461 uint32_t pixel = *pmap->
addr32(
x,
y);
1462 if (pixel != expected) {
1463 ERRORF(
reporter,
"Expected scaled pixels to be the same. At %d,%d 0x%08x != 0x%08x",
1464 x,
y, pixel, expected);
1472 uint32_t expected) {
1495 surface->getCanvas()->clear(red);
1515 surface->getCanvas()->clear(red);
1531 if (
bits & 1)
dst.fLeft = bad;
1533 if (
bits & 4)
dst.fRight = bad;
1534 if (
bits & 8)
dst.fBottom = bad;
1554 const SkPixmap pmaps[] = {pm, pm, pm};
1561 auto dContext = ctxInfo.directContext();
1566 auto i0 =
s->makeImageSnapshot();
1568 auto i1 =
s->makeImageSnapshot();
1575 dContext->flushAndSubmit();
1578 submitCnt = dContext->priv().getGpu()->stats()->numSubmitToGpus()]()
mutable {
1579 int curr = dContext->priv().getGpu()->stats()->numSubmitToGpus();
1580 int n = curr - submitCnt;
1586 dContext->flushAndSubmit(i0);
1587 dContext->flushAndSubmit(i1);
1588 dContext->flushAndSubmit(i2);
1592 dContext->flush(i0);
1595 dContext->flush(i1);
1598 dContext->flush(i2);
1603 s->getCanvas()->drawImage(i1, 0, 0);
1605 dContext->flushAndSubmit(i0);
1608 dContext->flushAndSubmit(i1);
1611 dContext->flushAndSubmit(i2);
1615 s->getCanvas()->drawImage(i2, 0, 0);
1617 dContext->flushAndSubmit(i0);
1620 dContext->flushAndSubmit(i1);
1623 dContext->flushAndSubmit(i2);
1626 s->getCanvas()->drawImage(i2, 0, 0);
1628 dContext->flushAndSubmit(i0);
1631 dContext->flushAndSubmit(i1);
1634 dContext->flushAndSubmit(i2);
1639 (0.0f/2, -1.0f/2, 2.0f/2, -1.0f/2,
1640 2.0f/2, 0.0f/2, -5.0f/2, 3.0f/2,
1641 0.0f/2, 1.0f/2, 4.0f/2, -3.0f/2,
1642 0.0f/2, 0.0f/2, -1.0f/2, 1.0f/2);
1645 ( 1.0f/18, -9.0f/18, 15.0f/18, -7.0f/18,
1646 16.0f/18, 0.0f/18, -36.0f/18, 21.0f/18,
1647 1.0f/18, 9.0f/18, 27.0f/18, -21.0f/18,
1648 0.0f/18, 0.0f/18, -6.0f/18, 7.0f/18);
1652 const float tolerance = 0.000001f;
1653 for (
int r = 0; r < 4; ++r) {
1654 for (
int c = 0; c < 4; ++c) {
1675 check_roundtrip(
image);
static bool almost_equal(float a, float b)
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
sk_gpu_test::GrContextFactory::ContextType ContextType
static constexpr SkColorType GrColorTypeToSkColorType(GrColorType ct)
static constexpr bool GrColorTypeIsAlphaOnly(GrColorType ct)
static constexpr GrColorType SkColorTypeToGrColorType(SkColorType ct)
@ kBottomLeft_GrSurfaceOrigin
@ kTopLeft_GrSurfaceOrigin
static sk_sp< SkColorSpace > rec2020()
static void make_bitmap_mutable(SkBitmap *bm)
static void check_legacy_bitmap(skiatest::Reporter *reporter, GrDirectContext *dContext, const SkImage *image, const SkBitmap &bitmap)
static sk_sp< SkImage > create_data_image()
static void draw_image_test_pattern(SkCanvas *canvas)
DEF_GANESH_TEST(AbandonedContextImage, reporter, options, CtsEnforcement::kApiLevel_T)
static void test_legacy_bitmap(skiatest::Reporter *reporter, GrDirectContext *dContext, const SkImage *image)
static bool has_pixels(const SkPMColor pixels[], int count, SkPMColor expected)
SkImageInfo read_pixels_info(SkImage *image)
constexpr SkM44 gCentripetalCatmulRom(0.0f/2, -1.0f/2, 2.0f/2, -1.0f/2, 2.0f/2, 0.0f/2, -5.0f/2, 3.0f/2, 0.0f/2, 1.0f/2, 4.0f/2, -3.0f/2, 0.0f/2, 0.0f/2, -1.0f/2, 1.0f/2)
static sk_sp< SkData > create_image_data(SkImageInfo *info)
static void test_scale_pixels(skiatest::Reporter *reporter, const SkImage *image, uint32_t expected)
static void test_cross_context_image(skiatest::Reporter *reporter, const GrContextOptions &options, const char *testName, const std::function< sk_sp< SkImage >(GrDirectContext *)> &imageMaker)
static sk_sp< SkImage > create_codec_image()
static sk_sp< SkImage > create_gpu_image(GrRecordingContext *rContext, bool withMips=false, skgpu::Budgeted budgeted=skgpu::Budgeted::kYes)
static sk_sp< SkImage > create_picture_image()
DEF_GANESH_TEST_FOR_GL_CONTEXT(SkImage_NewFromTextureRelease, reporter, ctxInfo, CtsEnforcement::kApiLevel_T)
DEF_GANESH_TEST_FOR_ALL_CONTEXTS(ImageFlush, reporter, ctxInfo, CtsEnforcement::kApiLevel_T)
constexpr SkM44 gMitchellNetravali(1.0f/18, -9.0f/18, 15.0f/18, -7.0f/18, 16.0f/18, 0.0f/18, -36.0f/18, 21.0f/18, 1.0f/18, 9.0f/18, 27.0f/18, -21.0f/18, 0.0f/18, 0.0f/18, -6.0f/18, 7.0f/18)
static sk_sp< SkImage > any_image_will_do()
DEF_TEST(ImageEncode, reporter)
static void check_scaled_pixels(skiatest::Reporter *reporter, SkPixmap *pmap, uint32_t expected)
static sk_sp< SkImage > make_yuva_image(GrDirectContext *dContext)
static sk_sp< SkImage > create_image()
static void assert_equal(skiatest::Reporter *reporter, GrDirectContext *dContextA, SkImage *a, const SkIRect *subsetA, SkImage *b)
static void test_encode(skiatest::Reporter *reporter, GrDirectContext *dContext, SkImage *image)
DEF_GANESH_TEST_FOR_RENDERING_CONTEXTS(ImageEncode_Gpu, reporter, ctxInfo, CtsEnforcement::kApiLevel_T)
static bool equal(const SkBitmap &a, const SkBitmap &b)
static sk_sp< SkImage > create_image_large(int maxTextureSize)
static sk_sp< SkImage > create_rasterproc_image(RasterDataHolder *dataHolder)
static void image_test_read_pixels(GrDirectContext *dContext, skiatest::Reporter *reporter, SkImage *image)
static void make_bitmap_immutable(SkBitmap *bm)
static void test_peek(skiatest::Reporter *reporter, SkImage *image, bool expectPeekSuccess)
static void make_all_premul(SkBitmap *bm)
skgpu::Protected Protected
sk_sp< SkData > GetResourceAsData(const char *resource)
@ kOpaque_SkAlphaType
pixel is opaque
@ kPremul_SkAlphaType
pixel components are premultiplied by alpha
#define SkASSERT_RELEASE(cond)
static SkPMColor SkSwizzle_RGBA_to_PMColor(uint32_t c)
#define SkGetPackedB32(packed)
#define SkGetPackedR32(packed)
#define SkGetPackedG32(packed)
static SkPMColor SkPackARGB32(U8CPU a, U8CPU r, U8CPU g, U8CPU b)
static bool color_space_almost_equal(float a, float b)
@ kAlpha_8_SkColorType
pixel with alpha in 8-bit byte
@ kLastEnum_SkColorType
last valid value
@ kGray_8_SkColorType
pixel with grayscale level in 8-bit byte
@ 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_ColorCYAN
constexpr SkColor SK_ColorBLUE
constexpr SkColor SK_ColorRED
static constexpr SkColor SkColorSetARGB(U8CPU a, U8CPU r, U8CPU g, U8CPU b)
constexpr SkColor SK_ColorBLACK
constexpr SkColor SK_ColorGREEN
constexpr SkColor SK_ColorWHITE
void SK_SPI SkDebugf(const char format[],...) SK_PRINTF_LIKE(1
#define sk_float_round2int(x)
static bool read(SkStream *stream, void *buffer, size_t amount)
static SkColorType colorType(AImageDecoder *decoder, const AImageDecoderHeaderInfo *headerInfo)
static bool ok(int result)
@ kJPEG_Full_SkYUVColorSpace
describes full range
SK_SPI sk_sp< SkImage > SkMakeImageFromRasterBitmap(const SkBitmap &, SkCopyPixelsMode)
@ kNever_SkCopyPixelsMode
never copy src pixels (even if they are marked mutable)
@ kIfMutable_SkCopyPixelsMode
only copy src pixels if they are marked mutable
@ kAlways_SkCopyPixelsMode
always copy src pixels (even if they are marked immutable)
static SkImage_Base * as_IB(SkImage *image)
#define SK_ScalarInfinity
static constexpr bool SkToBool(const T &x)
#define REPORTER_ASSERT(r, cond,...)
static uint32_t premul(uint32_t color)
void flushAndSubmit(GrSyncCpu sync=GrSyncCpu::kNo)
UniqueID underlyingUniqueID() const
skgpu::Budgeted isBudgeted() const
const skgpu::UniqueKey & getUniqueKey() const override
skgpu::Mipmapped mipmapped() const
void alloc(const SkImageInfo &)
static bool Find(const SkBitmapCacheDesc &, SkBitmap *result)
void allocPixels(const SkImageInfo &info, size_t rowBytes)
sk_sp< SkImage > asImage() const
bool installPixels(const SkImageInfo &info, void *pixels, size_t rowBytes, void(*releaseProc)(void *addr, void *context), void *context)
void notifyPixelsChanged() const
const SkImageInfo & info() const
bool readPixels(const SkImageInfo &dstInfo, void *dstPixels, size_t dstRowBytes, int srcX, int srcY) const
uint32_t getGenerationID() const
void allocN32Pixels(int width, int height, bool isOpaque=false)
uint32_t * getAddr32(int x, int y) const
void drawRect(const SkRect &rect, const SkPaint &paint)
void clear(SkColor color)
void drawImage(const SkImage *image, SkScalar left, SkScalar top)
bool isNumericalTransferFn(skcms_TransferFunction *fn) const
static bool Equals(const SkColorSpace *, const SkColorSpace *)
static sk_sp< SkColorSpace > MakeSRGB()
static sk_sp< SkColorSpace > MakeRGB(const skcms_TransferFunction &transferFn, const skcms_Matrix3x3 &toXYZ)
static sk_sp< SkColorSpace > MakeSRGBLinear()
static sk_sp< SkData > MakeUninitialized(size_t length)
const void * data() const
static sk_sp< SkData > MakeEmpty()
static SkM44 CubicResamplerMatrix(float B, float C)
virtual GrImageContext * context() const
bool isTextureBacked() const override
virtual sk_sp< SkImage > makeColorSpace(GrDirectContext *direct, sk_sp< SkColorSpace > target) const =0
SkColorSpace * colorSpace() const
bool readPixels(GrDirectContext *context, const SkImageInfo &dstInfo, void *dstPixels, size_t dstRowBytes, int srcX, int srcY, CachingHint cachingHint=kAllow_CachingHint) const
uint32_t uniqueID() const
SkAlphaType alphaType() const
virtual bool isLazyGenerated() const =0
bool peekPixels(SkPixmap *pixmap) const
SkColorType colorType() const
sk_sp< SkImage > makeNonTextureImage(GrDirectContext *=nullptr) const
virtual bool isValid(GrRecordingContext *context) const =0
virtual bool isTextureBacked() const =0
@ kDisallow_CachingHint
disallows internally caching decoded and copied pixels
@ kAllow_CachingHint
allows internally caching decoded and copied pixels
bool scalePixels(const SkPixmap &dst, const SkSamplingOptions &, CachingHint cachingHint=kAllow_CachingHint) const
bool asLegacyBitmap(SkBitmap *bitmap, LegacyBitmapMode legacyBitmapMode=kRO_LegacyBitmapMode) const
virtual sk_sp< SkImage > makeSubset(GrDirectContext *direct, const SkIRect &subset) const =0
SkCanvas * beginRecording(const SkRect &bounds, sk_sp< SkBBoxHierarchy > bbh)
sk_sp< SkPicture > finishRecordingAsPicture()
sk_sp< SkData > serialize(const SkSerialProcs *procs=nullptr) const
static sk_sp< SkPicture > MakeFromData(const SkData *data, const SkDeserialProcs *procs=nullptr)
virtual int approximateOpCount(bool nested=false) const =0
const uint32_t * addr32() const
const SkImageInfo & info() const
@ kY_U_V
Plane 0: Y, Plane 1: U, Plane 2: V.
@ k444
No subsampling. UV values for each Y.
static SkYUVAPixmaps FromExternalPixmaps(const SkYUVAInfo &, const SkPixmap[kMaxPlanes])
GrDirectContext * directContext() const
TestContext * testContext() const
ContextInfo getContextInfo(ContextType type, ContextOverrides=ContextOverrides::kNone)
ContextInfo getSharedContextInfo(GrDirectContext *shareContext, uint32_t shareIndex=0)
SkScopeExit makeCurrentAndAutoRestore() const
void reset(T *ptr=nullptr)
VULKAN_HPP_DEFAULT_DISPATCH_LOADER_DYNAMIC_STORAGE auto & d
Dart_NativeFunction function
static float min(float r, float g, float b)
std::unique_ptr< SkImageGenerator > MakeFromEncoded(sk_sp< SkData > data, std::optional< SkAlphaType > at)
SK_API sk_sp< SkImage > TextureFromYUVAPixmaps(GrRecordingContext *context, const SkYUVAPixmaps &pixmaps, skgpu::Mipmapped buildMips, bool limitToMaxTextureSize, sk_sp< SkColorSpace > imageColorSpace)
SK_API sk_sp< SkImage > DeferredFromPicture(sk_sp< SkPicture > picture, const SkISize &dimensions, const SkMatrix *matrix, const SkPaint *paint, BitDepth bitDepth, sk_sp< SkColorSpace > colorSpace, SkSurfaceProps props)
SK_API sk_sp< SkImage > RasterFromData(const SkImageInfo &info, sk_sp< SkData > pixels, size_t rowBytes)
SK_API sk_sp< SkImage > DeferredFromEncodedData(sk_sp< SkData > encoded, std::optional< SkAlphaType > alphaType=std::nullopt)
SK_API sk_sp< SkImage > RasterFromPixmap(const SkPixmap &pixmap, RasterReleaseProc rasterReleaseProc, ReleaseContext releaseContext)
SK_API sk_sp< SkImage > DeferredFromGenerator(std::unique_ptr< SkImageGenerator > imageGenerator)
SK_API sk_sp< SkImage > TextureFromImage(GrDirectContext *, const SkImage *, skgpu::Mipmapped=skgpu::Mipmapped::kNo, skgpu::Budgeted=skgpu::Budgeted::kYes)
SK_API sk_sp< SkImage > CrossContextTextureFromPixmap(GrDirectContext *context, const SkPixmap &pixmap, bool buildMips, bool limitToMaxTextureSize=false)
SK_API sk_sp< SkImage > RasterFromPixmapCopy(const SkPixmap &pixmap)
@ kU8
uses 8-bit unsigned int per color component
std::function< void(GrBackendTexture)> BackendTextureReleaseProc
SK_API bool GetBackendTextureFromImage(const SkImage *img, GrBackendTexture *outTexture, bool flushPendingGrContextIO, GrSurfaceOrigin *origin=nullptr)
SK_API sk_sp< SkImage > BorrowTextureFrom(GrRecordingContext *context, const GrBackendTexture &backendTexture, GrSurfaceOrigin origin, SkColorType colorType, SkAlphaType alphaType, sk_sp< SkColorSpace > colorSpace, TextureReleaseProc textureReleaseProc=nullptr, ReleaseContext releaseContext=nullptr)
SK_API bool MakeBackendTextureFromImage(GrDirectContext *context, sk_sp< SkImage > image, GrBackendTexture *backendTexture, BackendTextureReleaseProc *backendTextureReleaseProc)
static constexpr skcms_Matrix3x3 kAdobeRGB
static constexpr skcms_Matrix3x3 kRec2020
static constexpr skcms_Matrix3x3 kDisplayP3
static constexpr skcms_TransferFunction kSRGB
void(* memset32)(uint32_t[], uint32_t, int)
SK_API bool Encode(SkWStream *dst, const SkPixmap &src, const Options &options)
sk_sp< const SkImage > image
sk_sp< const SkPicture > picture
SKSHAPER_API sk_sp< Factory > Factory()
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)
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
const myers::Point & get(const myers::Segment &)
GrTextureProxy * GetTextureImageProxy(SkImage *image, GrRecordingContext *rContext)
std::tuple< GrSurfaceProxyView, GrColorType > AsView(GrRecordingContext *rContext, const SkImage *img, skgpu::Mipmapped mipmapped, GrImageTexGenPolicy policy)
static const int kContextTypeCount
SkSamplingOptions(SkFilterMode::kLinear))
SIN Vec< N, float > abs(const Vec< N, float > &x)
static void Release(const void *pixels, void *context)
static SkBitmapCacheDesc Make(const SkImage *)
constexpr int32_t x() const
constexpr int32_t y() const
constexpr int32_t height() const
constexpr int32_t width() const
static constexpr SkIRect MakeWH(int32_t w, int32_t h)
static constexpr SkIRect MakeXYWH(int32_t x, int32_t y, int32_t w, int32_t h)
static constexpr SkISize Make(int32_t w, int32_t h)
static SkImageInfo MakeN32Premul(int width, int height)
static SkImageInfo MakeS32(int width, int height, SkAlphaType at)
static SkImageInfo MakeUnknown()
static SkImageInfo MakeN32(int width, int height, SkAlphaType at)
static SkImageInfo Make(int width, int height, SkColorType ct, SkAlphaType at)
static constexpr SkRect MakeXYWH(float x, float y, float w, float h)
SkSerialImageProc fImageProc
static void Release(void *self)
std::shared_ptr< const fml::Mapping > data