36 fName = std::string(
"ColorSpace") +
mode_name(fMode) +
"Transform";
53 std::fill(
std::begin(fSrcPixels), std::end(fSrcPixels), 0xFF);
66 fPipeline.
append(SkRasterPipelineOp::load_8888, &fSrcCtx);
67 fXformSteps.
apply(&fPipeline);
68 fPipeline.
append(SkRasterPipelineOp::store_8888, &fDstCtx);
70 fConversionPipeline = fPipeline.
compile();
76 for (
int i = 0;
i < loops;
i++) {
77 fConversionPipeline(0, 0, kWidth, kHeight);
82 for (
int i = 0;
i < loops;
i++) {
83 fPipeline.
run(0, 0, kWidth, kHeight);
88 for (
int i = 0;
i < loops;
i++) {
89 for (
int y = 0;
y < kHeight; ++
y) {
90 fPipeline.
run(0,
y, kWidth, 1);
111 static constexpr int kWidth = 512;
112 static constexpr int kHeight = 512;
113 static constexpr int kBytesPerPixel = 4;
117 std::function<void(
size_t,
size_t,
size_t,
size_t)> fConversionPipeline;
123 fName = std::string(
"Skcms") +
mode_name(fMode) +
"Transform";
128 return fName.c_str();
141 std::fill(
std::begin(fSrcPixels), std::end(fSrcPixels), 0xFF);
155 for (
int i = 0;
i < loops;
i++) {
169 for (
int i = 0;
i < loops;
i++) {
170 uint8_t*
src = fSrcPixels;
171 uint8_t*
dst = fDstPixels;
172 for (
int y = 0;
y < kHeight; ++
y) {
182 src += kWidth * kBytesPerPixel;
183 dst += kWidth * kBytesPerPixel;
199 static constexpr int kWidth = 512;
200 static constexpr int kHeight = 512;
201 static constexpr int kBytesPerPixel = 4;
static const char * mode_name(Mode m)
@ kPremul_SkAlphaType
pixel components are premultiplied by alpha
void toProfile(skcms_ICCProfile *) const
static sk_sp< SkColorSpace > MakeSRGB()
static sk_sp< SkColorSpace > MakeRGB(const skcms_TransferFunction &transferFn, const skcms_Matrix3x3 &toXYZ)
void run(size_t x, size_t y, size_t w, size_t h) const
void append(SkRasterPipelineOp, void *=nullptr)
std::function< void(size_t, size_t, size_t, size_t)> compile() const
static const char * begin(const StringSlice &s)
Dart_NativeFunction function
static constexpr skcms_Matrix3x3 kAdobeRGB
static constexpr skcms_TransferFunction k2Dot2
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
bool skcms_Transform(const void *src, skcms_PixelFormat srcFmt, skcms_AlphaFormat srcAlpha, const skcms_ICCProfile *srcProfile, void *dst, skcms_PixelFormat dstFmt, skcms_AlphaFormat dstAlpha, const skcms_ICCProfile *dstProfile, size_t nz)
@ skcms_PixelFormat_RGBA_8888
@ skcms_AlphaFormat_PremulAsEncoded