24 if (!duckyFG[0] || !duckyBG) {
25 *errorMsg =
"Image(s) failed to load.";
31 if (
auto* rContext = canvas->recordingContext(); rContext && !rContext->abandoned()) {
41 duckyFG[1] = duckyFG[0];
44 static constexpr int kNumPerRow = 4;
45 static constexpr int kPad = 10;
52 canvas->translate(0, kDstRect.height() +
kPad);
60 for (
auto& fg : duckyFG) {
64 canvas->drawImageRect(duckyBG, kDstRect,
sampling,
nullptr);
68 canvas->translate(kDstRect.width() +
kPad, 0);
69 if (++rowCnt == kNumPerRow) {
sk_sp< SkData > GetResourceAsData(const char *resource)
@ kLastCoeffMode
last porter duff blend mode
@ kLastMode
last valid value
constexpr SkColor SK_ColorLTGRAY
constexpr SkColor SK_ColorDKGRAY
static std::unique_ptr< LazyYUVImage > Make(sk_sp< SkData > data, skgpu::Mipmapped=skgpu::Mipmapped::kNo, sk_sp< SkColorSpace >=nullptr)
DEF_SIMPLE_GM_CAN_FAIL(ducky_yuv_blend, canvas, errorMsg, 560, 1130)
SkSamplingOptions sampling
static constexpr SkRect MakeWH(float w, float h)