110 {
111 auto rContext = canvas->recordingContext();
113#if defined(SK_GRAPHITE)
114 recorder = canvas->recorder();
115#endif
116 if (!rContext && !recorder) {
117
119 }
122 if (rContext) {
124 } else {
126 }
127 }
128
132
136 nullptr);
138 for (
int i = 0;
i < yuvaInfo.numPlanes(); ++
i) {
139 planes[
i]->peekPixels(&pixmaps[
i]);
140 }
143
144#if defined(SK_GRAPHITE)
145 if (recorder) {
147 } else
148#endif
149 {
151 }
153 *errMsg = "Could not make YUVA image";
154 if (rContext) {
156 } else {
158 }
159 }
162 int j = 0;
164 canvas->save();
166 canvas->rotate(30.f);
167 canvas->scale(0.4f, 0.4f);
168
169
170 canvas->translate(-240000.f, -240000.f);
175 paint.setShader(std::move(shader));
176 canvas->drawPaint(
paint);
177 canvas->restore();
178 ++j;
179 }
181 }
183}
sk_sp< SkShader > makeShader(SkTileMode tmx, SkTileMode tmy, const SkSamplingOptions &, const SkMatrix *localMatrix=nullptr) const
virtual sk_sp< SkImage > makeSubset(GrDirectContext *direct, const SkIRect &subset) const =0
@ k420
1 set of UV values for each 2x2 block of Y values.
static SkYUVAPixmaps FromExternalPixmaps(const SkYUVAInfo &, const SkPixmap[kMaxPlanes])
static std::unique_ptr< LazyYUVImage > Make(sk_sp< SkData > data, skgpu::Mipmapped=skgpu::Mipmapped::kNo, sk_sp< SkColorSpace >=nullptr)
std::tuple< std::array< sk_sp< SkImage >, SkYUVAInfo::kMaxPlanes >, SkYUVAInfo > MakeYUVAPlanesAsA8(SkImage *src, SkYUVColorSpace cs, SkYUVAInfo::Subsampling ss, GrRecordingContext *rContext)
SkSamplingOptions(SkFilterMode::kLinear))
static constexpr SkIRect MakeWH(int32_t w, int32_t h)
static constexpr SkRect MakeXYWH(float x, float y, float w, float h)